Procházet zdrojové kódy

质控核查分配核查任务--获取待分配核查任务列表接口改成分页

songxinlu před 4 roky
rodič
revize
fdfdc1b320
1 změnil soubory, kde provedl 10 přidání a 10 odebrání
  1. 10 10
      src/main/resources/mapper/MedCheckInfoMapper.xml

+ 10 - 10
src/main/resources/mapper/MedCheckInfoMapper.xml

@@ -30,7 +30,7 @@
         SELECT check_id doctorId, count(*) as jobNum
         from med_check_info
         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}
         </if>
         <if test="userList !=null">
@@ -51,22 +51,22 @@
             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'
                 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}
                 </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}
                 </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}
                 </if>
-                <if test="doctorName !=null">
+                <if test="doctorName !=null and doctorName != ''">
                     and a.doctor_name = #{doctorName}
                 </if>
-                <if test="behospitalCode !=null">
+                <if test="behospitalCode !=null and behospitalCode != ''">
                     and a.behospital_code = #{behospitalCode}
                 </if>
-                <if test="name !=null">
+                <if test="name !=null and name != ''">
                     and a.`name` LIKE CONCAT('%',#{name},'%')
                 </if>
                 <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
         where a.behospital_code = b.behospital_code and a.hospital_id = b.hospital_id and a.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}
         </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}
         </if>
-        <if test="checkId !=null">
+        <if test="checkId !=null and checkId != ''">
             and b.check_id = #{checkId}
         </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