Bladeren bron

Merge branch '20210512_yw_check' of http://192.168.2.236:10080/gaodm/mrqc-sys into 20210512_yw_check

songxinlu 4 jaren geleden
bovenliggende
commit
409f926aa1

+ 1 - 2
src/main/java/com/diagbot/facade/QcClientFacade.java

@@ -34,8 +34,7 @@ public class QcClientFacade {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "配置表内找不到评分接口地址数据!");
         }
         try {
-//            uri = new URI(url);
-            uri = new URI("http://localhost:6010");
+            uri = new URI(url);
         } catch (Exception e) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }

+ 4 - 2
src/main/java/com/diagbot/facade/RecordCheckFacade.java

@@ -65,6 +65,8 @@ public class RecordCheckFacade {
             } else if (roleId.intValue() == CheckerRoleEnum.DEPT_SUPERVISOR.getKey()
                     && (ListUtil.isEmpty(checkedRecordListVO.getCheckJobTypes()) || checkedRecordListVO.getCheckJobTypes().contains(CheckJobTypeEnum.DEPT_SUPERVISOR.getKey() + ""))) {
                 userIds.addAll(getUserIdsOfRoleId(hospitalId, deptIds, CheckerRoleEnum.DEPT_GENERAL.getKey()));
+            } else if (roleId.intValue() == CheckerRoleEnum.DEPT_GENERAL.getKey() || roleId.intValue() == CheckerRoleEnum.QUAT_GENERAL.getKey() || roleId.intValue() == CheckerRoleEnum.HOSP_GENERAL.getKey()) {
+                userIds.add(userId);
             }
         });
 
@@ -81,7 +83,7 @@ public class RecordCheckFacade {
             medQcresultDetailQueryWrapper.select("behospital_code", "cases_entry_id");
             Map<String, Long> behospitalCodeCasesMap = medQcresultDetailService.list(medQcresultDetailQueryWrapper).stream().collect(Collectors.groupingBy(MedQcresultDetail::getBehospitalCode, Collectors.counting()));
             iPage.getRecords().forEach(i -> {
-                i.setCasesEntryNum(behospitalCodeCasesMap.get(i.getBehospitalCode()).intValue());
+                i.setCasesEntryNum(behospitalCodeCasesMap.get(i.getBehospitalCode()) == null ? 0 : behospitalCodeCasesMap.get(i.getBehospitalCode()).intValue());
             });
         }
 
@@ -120,7 +122,7 @@ public class RecordCheckFacade {
         medCheckInfo.setStatus(1);
         medCheckInfo.setCheckTime(DateUtil.now());
         medCheckInfoFacade.updateById(medCheckInfo);
-        
+
         return true;
     }
 

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

@@ -233,13 +233,13 @@
         LEFT JOIN med_check_info mci
         ON mbi.behospital_code = mci.behospital_code
         AND mbi.hospital_id = mci.hospital_id AND mci.is_deleted = 'N'
-        AND mci.check_id is null
         LEFT JOIN med_qcresult_info mqi
         ON mbi.behospital_code = mqi.behospital_code
         AND mbi.hospital_id = mqi.hospital_id AND mqi.is_deleted = 'N'
         LEFT JOIN med_behospital_type mbt ON mbi.behospital_code = mbt.behospital_code
         AND mbi.hospital_id = mbt.hospital_id AND mbt.is_deleted = 'N'
         WHERE mbi.hospital_id=#{hospitalId} AND mbi.is_deleted = 'N' and mqi.score_res is not null
+        AND mci.check_id is null
         <if test="startDate != null">
             <![CDATA[ AND mbi.leave_hospital_date >= #{startDate}]]>
         </if>
@@ -315,7 +315,8 @@
         a.check_time as checkTime,
         c.`level` as level,
         c.score_res as scoreRes,
-        case when a.check_type='2' and FIND_IN_SET(b.beh_dept_id,#{currentDeptIds}) then 0 else 1 end as isDel
+        <!-- 张三是A科室的监管员,李四是A科室和B科室的普通质控员,那么张三在核查任务列表中不能看到李四B科室的数据  -->
+        case when a.check_type='0' and FIND_IN_SET(b.beh_dept_id,#{currentDeptIds})=0 then 0 else 1 end as isDel
         from med_check_info a join med_behospital_info b on a.hospital_id=b.hospital_id and
         a.behospital_code=b.behospital_code
         join med_qcresult_info c on b.hospital_id=c.hospital_id and b.behospital_code=c.behospital_code and