Przeglądaj źródła

质控核查bug修改

songxinlu 4 lat temu
rodzic
commit
57da1c1e4d
1 zmienionych plików z 8 dodań i 2 usunięć
  1. 8 2
      src/main/resources/mapper/MedCheckInfoMapper.xml

+ 8 - 2
src/main/resources/mapper/MedCheckInfoMapper.xml

@@ -169,7 +169,7 @@
                 </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'
+        and a.hospital_id = b.hospital_id and b.is_deleted = 'N' and  b.`value` is not null
     </select>
 
 
@@ -220,12 +220,18 @@
             <if test="checkId !=null and checkId != ''">
                 and b.check_id = #{checkId}
             </if>
-            <if test="deptList !=null and deptList.size()!=0">
+            <if test="deptList !=null and deptList.size()!=0 and jobType==0">
                 and a.beh_dept_id in
                 <foreach collection="deptList" item="item" open="(" close=")" separator=",">
                     #{item}
                 </foreach>
             </if>
+            <if test="deptList !=null and deptList.size()!=0 and jobType==2">
+                and a.beh_dept_id not in
+                <foreach collection="deptList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </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'
     </select>