|
@@ -30,7 +30,7 @@
|
|
SELECT check_id doctorId, count(*) as jobNum
|
|
SELECT check_id doctorId, count(*) as jobNum
|
|
from med_check_info
|
|
from med_check_info
|
|
where is_deleted = 'N' and job_distribution_name is not null
|
|
where is_deleted = 'N' and job_distribution_name is not null
|
|
- <if test="jobType != null">
|
|
|
|
|
|
+ <if test="jobType != null and jobType != ''">
|
|
and job_type = #{jobType}
|
|
and job_type = #{jobType}
|
|
</if>
|
|
</if>
|
|
<if test="userList !=null">
|
|
<if test="userList !=null">
|
|
@@ -51,22 +51,22 @@
|
|
a.beh_dept_id,b.id from med_behospital_info a ,med_check_info b
|
|
a.beh_dept_id,b.id from med_behospital_info a ,med_check_info b
|
|
where a.behospital_code = b.behospital_code and a.hospital_id = b.hospital_id and a.is_deleted = 'N'
|
|
where a.behospital_code = b.behospital_code and a.hospital_id = b.hospital_id and a.is_deleted = 'N'
|
|
and b.is_deleted = 'N' and b.job_distribution_name is NULL and b.`status` = 0
|
|
and b.is_deleted = 'N' and b.job_distribution_name is NULL and b.`status` = 0
|
|
- <if test="jobType !=null">
|
|
|
|
|
|
+ <if test="jobType !=null and jobType != ''">
|
|
and b.job_type = #{jobType}
|
|
and b.job_type = #{jobType}
|
|
</if>
|
|
</if>
|
|
- <if test="startTime !=null and endTime !=null">
|
|
|
|
|
|
+ <if test="startTime !=null and startTime != '' and endTime !=null and endTime != ''">
|
|
and b.job_create_time BETWEEN #{startTime} AND #{endTime}
|
|
and b.job_create_time BETWEEN #{startTime} AND #{endTime}
|
|
</if>
|
|
</if>
|
|
- <if test="behosDateStart !=null and behosDateEnd !=null">
|
|
|
|
|
|
+ <if test="behosDateStart !=null and behosDateStart != '' and behosDateEnd !=null and behosDateEnd != ''">
|
|
and a.leave_hospital_date BETWEEN #{behosDateStart} AND #{behosDateEnd}
|
|
and a.leave_hospital_date BETWEEN #{behosDateStart} AND #{behosDateEnd}
|
|
</if>
|
|
</if>
|
|
- <if test="doctorName !=null">
|
|
|
|
|
|
+ <if test="doctorName !=null and doctorName != ''">
|
|
and a.doctor_name = #{doctorName}
|
|
and a.doctor_name = #{doctorName}
|
|
</if>
|
|
</if>
|
|
- <if test="behospitalCode !=null">
|
|
|
|
|
|
+ <if test="behospitalCode !=null and behospitalCode != ''">
|
|
and a.behospital_code = #{behospitalCode}
|
|
and a.behospital_code = #{behospitalCode}
|
|
</if>
|
|
</if>
|
|
- <if test="name !=null">
|
|
|
|
|
|
+ <if test="name !=null and name != ''">
|
|
and a.`name` LIKE CONCAT('%',#{name},'%')
|
|
and a.`name` LIKE CONCAT('%',#{name},'%')
|
|
</if>
|
|
</if>
|
|
<if test="deptList !=null and jobType ==0">
|
|
<if test="deptList !=null and jobType ==0">
|
|
@@ -96,13 +96,13 @@
|
|
a.beh_dept_id,b.id from med_behospital_info a ,med_check_info b
|
|
a.beh_dept_id,b.id from med_behospital_info a ,med_check_info b
|
|
where a.behospital_code = b.behospital_code and a.hospital_id = b.hospital_id and a.is_deleted = 'N'
|
|
where a.behospital_code = b.behospital_code and a.hospital_id = b.hospital_id and a.is_deleted = 'N'
|
|
and b.is_deleted = 'N'
|
|
and b.is_deleted = 'N'
|
|
- <if test="startTime !=null and endTime !=null">
|
|
|
|
|
|
+ <if test="startTime !=null and startTime != '' and endTime !=null and endTime != ''">
|
|
and b.job_create_time BETWEEN #{startTime} AND #{endTime}
|
|
and b.job_create_time BETWEEN #{startTime} AND #{endTime}
|
|
</if>
|
|
</if>
|
|
- <if test="behosDateStart !=null and behosDateEnd !=null">
|
|
|
|
|
|
+ <if test="behosDateStart !=null and behosDateStart != '' and behosDateEnd !=null and behosDateEnd != ''">
|
|
and a.leave_hospital_date BETWEEN #{behosDateStart} AND #{behosDateEnd}
|
|
and a.leave_hospital_date BETWEEN #{behosDateStart} AND #{behosDateEnd}
|
|
</if>
|
|
</if>
|
|
- <if test="checkId !=null">
|
|
|
|
|
|
+ <if test="checkId !=null and checkId != ''">
|
|
and b.check_id = #{checkId}
|
|
and b.check_id = #{checkId}
|
|
</if>) a LEFT JOIN med_behospital_type b on a.behospital_code = b.behospital_code
|
|
</if>) a LEFT JOIN med_behospital_type b on a.behospital_code = b.behospital_code
|
|
and a.hospital_id = b.hospital_id and b.is_deleted = 'N' ORDER BY b.`value` DESC ,a.leave_hospital_date DESC
|
|
and a.hospital_id = b.hospital_id and b.is_deleted = 'N' ORDER BY b.`value` DESC ,a.leave_hospital_date DESC
|