فهرست منبع

质控核查防止旧核查任务对核查按钮显示功能优化

songxinlu 3 سال پیش
والد
کامیت
f4b2236dd6
1فایلهای تغییر یافته به همراه43 افزوده شده و 42 حذف شده
  1. 43 42
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

+ 43 - 42
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -310,18 +310,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     }
 
     private void showButtonByPageType(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
-//        switch (getDetailVO.getPageType()){
-//            case "1":
-//                break;
-//            case "2":
-//                checkButtonShow(hospitalId,getDetailVO,res);
-//                break;
-//            case "3":
-//                appealButtonShow(hospitalId,getDetailVO,res);
-//                break;
-//            default:
-//                break;
-//        }
+        //        switch (getDetailVO.getPageType()){
+        //            case "1":
+        //                break;
+        //            case "2":
+        //                checkButtonShow(hospitalId,getDetailVO,res);
+        //                break;
+        //            case "3":
+        //                appealButtonShow(hospitalId,getDetailVO,res);
+        //                break;
+        //            default:
+        //                break;
+        //        }
         checkButtonShow(hospitalId, getDetailVO, res);
         appealButtonShow(hospitalId, getDetailVO, res);
     }
@@ -363,8 +363,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("hospital_id", hospitalId)
-                .eq("behospital_code", getDetailVO.getBehospitalCode()));
-        if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getCheckId() != null
+                .eq("behospital_code", getDetailVO.getBehospitalCode())
+                .orderByDesc("gmt_create"));
+        if (medCheckInfos.size() >= 1 && medCheckInfos.get(0).getCheckId() != null
                 && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
             //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
             int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
@@ -454,7 +455,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         }
 
         Map<String, List<RecordContentDTO>> recMap = EntityUtil.makeEntityListMap(recordContentDTOList, "standModelName");
-//        -------------------------------------文书数据改造开始----------------------------------
+        //        -------------------------------------文书数据改造开始----------------------------------
         // 获取会诊申请单
         List<StrConsultationApply> strConsultationApplyList = strConsultationApplyFacade.list(new QueryWrapper<StrConsultationApply>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -681,7 +682,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 .select("whole_data", "rec_id", "hospital_id")
                 .orderByAsc("rec_date")
         );
-//        -------------------------------------文书数据改造结束----------------------------------
+        //        -------------------------------------文书数据改造结束----------------------------------
         // 获取护理
         List<MedNurse> medNurseList = medNurseFacade.list(new QueryWrapper<MedNurse>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -1009,7 +1010,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 null, null);
 
 
-//=========================================
+        //=========================================
     /*    // 会诊记录
         addDataWithKey("会诊", recMap, medrecVoList,
                 Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
@@ -1023,7 +1024,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         addDataWithKey("转科", recMap, medrecVoList,
                 Arrays.asList("转入记录", "转出记录"));
 */
-//        ==================================
+        //        ==================================
 
         addData("有创操作", recMap, medrecVoList);
 
@@ -1067,14 +1068,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         // 病案首页
         //义乌数据回来还要处理
-//        if(analyzeVO.getHospitalId()==5 && ListUtil.isNotEmpty(recMap.get("病案首页"))){
-//            addDataWithInnerKey("病案首页", recMap, medrecVoList);
-//        }else {
+        //        if(analyzeVO.getHospitalId()==5 && ListUtil.isNotEmpty(recMap.get("病案首页"))){
+        //            addDataWithInnerKey("病案首页", recMap, medrecVoList);
+        //        }else {
         if (homePage != null) {
             addDataWithFirstPage("病案首页", homePage, medrecVoList, dicMap,
                     homePageList, homeOperationInfoList);
         }
-//        }
+        //        }
 
         queryVo.setMedrec(medrecVoList);
         return queryVo;
@@ -1098,14 +1099,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
         queryVo.setUseCrfCache(analyzeVO.isUseCrfCache());
         //已核查抛出以评分
-//        List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
-//                .eq("is_deleted", IsDeleteEnum.N.getKey())
-//                .eq("hospital_id", analyzeVO.getHospitalId())
-//                .eq("behospital_code", analyzeVO.getBehospitalCode()));
-//        Set<Integer> status = medCheckInfos.stream().map(MedCheckInfo::getStatus).collect(Collectors.toSet());
-//        if (medCheckInfos.size() >= 1 && status.contains(CheckStatusEnum.Enable.getKey()) && analyzeVO.getCheckFlag()) {
-//            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病例已经核查无需评分!");
-//        }
+        //        List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
+        //                .eq("is_deleted", IsDeleteEnum.N.getKey())
+        //                .eq("hospital_id", analyzeVO.getHospitalId())
+        //                .eq("behospital_code", analyzeVO.getBehospitalCode()));
+        //        Set<Integer> status = medCheckInfos.stream().map(MedCheckInfo::getStatus).collect(Collectors.toSet());
+        //        if (medCheckInfos.size() >= 1 && status.contains(CheckStatusEnum.Enable.getKey()) && analyzeVO.getCheckFlag()) {
+        //            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病例已经核查无需评分!");
+        //        }
         //  调用质控接口
         Response<OutputInfo> response = qcServiceClient.extract(queryVo);
         if (response == null || response.getData() == null) {
@@ -1217,7 +1218,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         }
 
         for (MedrecVo medrec : medrecVoList) {
-//            存在标题
+            //            存在标题
             if (key.equals(medrec.getTitle())) {
                 Map<String, Object> keyContent = medrec.getContent();
                 specialContent = JSON.parseObject(JSON.toJSONString(keyContent.get("content")), new TypeReference<Map<String, List<RecordContentDTO>>>() {
@@ -2025,15 +2026,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
         behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
-//        behospitalPageVO.setIsPlacefile("1");
-//        if (null != behospitalPageVO.getStatisticsType()
-//                && null == behospitalPageVO.getLeaveHosDateStart()
-//                && null == behospitalPageVO.getLeaveHosDateEnd()) {
-//            String startDate = filterFacade.getStartDateStr(behospitalPageVO.getStatisticsType(), null);
-//            String endDate = filterFacade.getEndDateStr(behospitalPageVO.getStatisticsType(), null);
-//            behospitalPageVO.setLeaveHosDateStart(DateUtil.parseDate(startDate));
-//            behospitalPageVO.setLeaveHosDateEnd(DateUtil.parseDate(endDate));
-//        }
+        //        behospitalPageVO.setIsPlacefile("1");
+        //        if (null != behospitalPageVO.getStatisticsType()
+        //                && null == behospitalPageVO.getLeaveHosDateStart()
+        //                && null == behospitalPageVO.getLeaveHosDateEnd()) {
+        //            String startDate = filterFacade.getStartDateStr(behospitalPageVO.getStatisticsType(), null);
+        //            String endDate = filterFacade.getEndDateStr(behospitalPageVO.getStatisticsType(), null);
+        //            behospitalPageVO.setLeaveHosDateStart(DateUtil.parseDate(startDate));
+        //            behospitalPageVO.setLeaveHosDateEnd(DateUtil.parseDate(endDate));
+        //        }
     }
 
     public void exportExcelFac(HttpServletResponse response) {
@@ -2392,7 +2393,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                             }
                         }
                 );
-                if(ListUtil.isNotEmpty(strInformedConsents)){
+                if (ListUtil.isNotEmpty(strInformedConsents)) {
                     //删除手术知情同意书历史ric_id
                     strInformedConsentServiceImpl.remove(new QueryWrapper<StrInformedConsent>()
                             .eq("hospital_id", analyzeVO.getHospitalId())
@@ -2400,7 +2401,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                             .eq("behospital_code", analyzeVO.getBehospitalCode())
                             .in("rec_id", recIds));
                 }
-                if(ListUtil.isNotEmpty(strInformedConsents)){
+                if (ListUtil.isNotEmpty(strInformedConsents)) {
                     //新增
                     strInformedConsentServiceImpl.saveBatch(strInformedConsents);
                 }