Sfoglia il codice sorgente

Merge branch 'dev/20200727_2.0.0' into develop

gaodm 4 anni fa
parent
commit
e63f11004e
26 ha cambiato i file con 2341 aggiunte e 706 eliminazioni
  1. 10 0
      doc/019.20200727v2.0.0/qc_initv2.0.0.sql
  2. 2 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  3. 2 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  4. 7 2
      src/main/java/com/diagbot/dto/EntryStatisticsDTO.java
  5. 163 144
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  6. 62 1
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  7. 15 0
      src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java
  8. 16 0
      src/main/java/com/diagbot/service/BehospitalInfoService.java
  9. 22 0
      src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java
  10. 2 0
      src/main/java/com/diagbot/vo/AnalyzeRunVO.java
  11. 2 2
      src/main/java/com/diagbot/vo/BehospitalPageVO.java
  12. 4 0
      src/main/java/com/diagbot/vo/EntryStatisticsVO.java
  13. 14 0
      src/main/java/com/diagbot/vo/ExportQcresultVO.java
  14. 5 0
      src/main/java/com/diagbot/vo/FilterPageVO.java
  15. 5 0
      src/main/java/com/diagbot/vo/FilterUnModifyMRVO.java
  16. 5 0
      src/main/java/com/diagbot/vo/FilterVO.java
  17. 10 0
      src/main/java/com/diagbot/vo/QcResultShortPageVO.java
  18. 4 0
      src/main/java/com/diagbot/vo/ReBeHosPageVO.java
  19. 4 0
      src/main/java/com/diagbot/vo/TaskVO.java
  20. 6 4
      src/main/java/com/diagbot/web/BehospitalInfoController.java
  21. 24 12
      src/main/java/com/diagbot/web/ConsoleByDeptController.java
  22. 103 35
      src/main/java/com/diagbot/web/ConsoleController.java
  23. 33 16
      src/main/java/com/diagbot/web/ConsoleExportController.java
  24. 1290 333
      src/main/resources/mapper/BehospitalInfoMapper.xml
  25. 24 8
      src/main/resources/mapper/HomePageMapper.xml
  26. 507 149
      src/main/resources/mapper/QcresultInfoMapper.xml

+ 10 - 0
doc/019.20200727v2.0.0/qc_initv2.0.0.sql

@@ -0,0 +1,10 @@
+use `qc`;
+
+-- 新增权限
+INSERT INTO `sys_menu`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES (39, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '入院人数统计', 17, 'YH-ZKK-RYRSTJ', 1, 1, 11, '用户-质控科-入院人数统计');
+INSERT INTO `sys_role_menu`(`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', -1, 39, '用户-质控科-入院人数统计');
+update `sys_menu` set is_deleted='Y' where id=15;  -- 控制台(科室)
+update `sys_menu` set is_deleted='Y' where id=18;  -- 数据报表明细(科室)
+update `sys_menu` set is_deleted='Y' where id=21;  -- 科室平均住院天数
+update `sys_menu` set is_deleted='Y' where id=22;  -- 科室平均住院花费
+update `sys_menu` set is_deleted='Y' where id=25;  -- 各科室甲级病历占比

+ 2 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -106,6 +106,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/unModifyMRStatistics").permitAll()
                 .antMatchers("/console/unModifyMRPage").permitAll()
                 .antMatchers("/console/reHos31DaysPage").permitAll()
+                .antMatchers("/console/beHosCount").permitAll()
+                .antMatchers("/console/casesEntryStatisticsById").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByCaseAndDept").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByCaseAndDeptPage").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByEntryAndDept").permitAll()

+ 2 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -149,6 +149,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/unModifyMRStatistics", request)
                 || matchers("/console/unModifyMRPage", request)
                 || matchers("/console/reHos31DaysPage", request)
+                || matchers("/console/beHosCount", request)
+                || matchers("/console/casesEntryStatisticsById", request)
                 || matchers("/consoleByDept/entryCountGroupByCaseAndDept", request)
                 || matchers("/consoleByDept/entryCountGroupByCaseAndDeptPage", request)
                 || matchers("/consoleByDept/entryCountGroupByEntryAndDept", request)

+ 7 - 2
src/main/java/com/diagbot/dto/EntryStatisticsDTO.java

@@ -143,6 +143,11 @@ public class EntryStatisticsDTO {
      * 危急值记录病历数
      */
     private Integer crisisMRNum = 0;
+    /**
+     * 住院超过31日病人数
+     */
+    @Excel(name = "住院超过31日病人数", width = 15, orderNum = "12")
+    private Integer beHosGT31DaysMRNum;
     /**
      * 阶段小节未书写条目id
      */
@@ -154,7 +159,7 @@ public class EntryStatisticsDTO {
     /**
      * 阶段小节未书写数
      */
-    @Excel(name = "阶段小节未书写数", width = 15, orderNum = "12")
+    @Excel(name = "阶段小节未书写数", width = 15, orderNum = "13")
     private Integer stageSummaryNum = 0;
     /**
      * 阶段小节未书写率
@@ -163,7 +168,7 @@ public class EntryStatisticsDTO {
     /**
      * 阶段小节未书写率(百分比)
      */
-    @Excel(name = "阶段小节未书写率", width = 15, orderNum = "13")
+    @Excel(name = "阶段小节未书写率", width = 15, orderNum = "14")
     private String stageSummaryPercentStr = "0.00%";
     /**
      * 病人住院超过30天的病历数

+ 163 - 144
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -65,7 +65,6 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import javax.servlet.http.HttpServletResponse;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
@@ -547,73 +546,17 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
         OutputInfo outputInfo = response.getData();
-        //根据质控结果获取质控条目
-        QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
+        // 质控编码列表
         List<String> codeList = new ArrayList<>();
         // code和info的映射map
         Map<String, String> codeToInfoMap = new LinkedHashMap<>();
-        Map<String, Map<String, String>> codeMap = outputInfo.getResult();
-        for (String key : codeMap.keySet()) {
-            codeList.add(key);
-            Map<String, String> mapInfo = codeMap.get(key);
-            if (mapInfo != null && StringUtil.isNotBlank(mapInfo.get("info"))) {
-                codeToInfoMap.put(key, mapInfo.get("info"));
-            }
-        }
-        // 判断code是否为空
-        List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
-        if (ListUtil.isNotEmpty(codeList)) {
-            qcResultAlgQueryVO.setCodeList(codeList);
-            qcResultAlgQueryVO.setHospitalId(hospitalId);
-            qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
-        }
-
-        // 对info赋值
-        for (QcResultAlgVO bean : qcResultAlgVOList) {
-            String info = codeToInfoMap.get(bean.getCode());
-            if (StringUtil.isNotBlank(info)) {
-                bean.setInfo(info);
-            }
-        }
-
-        // 评分
-        AlgorithmVO algorithmVO = new AlgorithmVO();
-        algorithmVO.setType(0);
-        algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
-        algorithmVO.setHospitalId(hospitalId);
-        algorithmVO.setBehospitalCode(analyzeVO.getBehospitalCode());
-        AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
-        //保存
-        Map<String, Object> pageMap = outputInfo.getPageData();
-        // 手动拼接数据【知情同意书】【谈话告知书】
-        List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
-                .eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("behospital_code", analyzeVO.getBehospitalCode())
-                .eq("hospital_id", hospitalId)
-                .in("mode_id", Arrays.asList(53, 54, 16))
-                .orderByAsc("rec_date")
-        );
-        List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
-        Map<Long, List<MedicalRecordDTO>> recordMap = EntityUtil.makeEntityListMap(medicalRecordDTOList, "modeId");
-        List<MedicalRecordDTO> recordDTOList = new ArrayList<>();
-        if (recordMap.get(53L) != null) {
-            recordDTOList.addAll(recordMap.get(53L)); // 知情同意书
-        }
-        if (recordMap.get(16L) != null) {
-            recordDTOList.addAll(recordMap.get(16L)); // 手术知情同意书
-        }
-        // 医嘱信息
-        pageMap.put("医嘱信息", null);
-        // 知情同意书 = 【知情同意书】 + 【手术知情同意书】
-        pageMap.put("知情同意书", recordDTOList);
-        pageMap.put("谈话告知书", recordMap.get(54L));
+        // 对codeList 和 codeToInfoMap进行赋值
+        setCodeData(outputInfo, codeList, codeToInfoMap);
 
-        String pageData = JSON.toJSONString(pageMap);
-        // 获取菜单信息
-        List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
-        String menuData = JSON.toJSONString(qcModeDTOList);
-
-        Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask(), null);
+        // 计算分值并保存结果至数据库
+        Map<String, Object> resMap = calScoreAndSave(outputInfo, codeList, codeToInfoMap, analyzeVO);
+        AlgorithmDTO algorithmDTO = (AlgorithmDTO)resMap.get("algorithmDTO");
+        Date date = (Date)resMap.get("date");
 
         // 返回提示信息
         //        List<MsgDTO> msgDTOList = getMsg(analyzeVO);
@@ -1055,41 +998,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
         OutputInfo outputInfo = response.getData();
-        //根据质控结果获取质控条目
-        // QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
+        // 质控编码列表
         List<String> codeList = new ArrayList<>();
         // code和info的映射map
         Map<String, String> codeToInfoMap = new LinkedHashMap<>();
-        Map<String, Map<String, String>> codeMap = outputInfo.getResult();
-        for (String key : codeMap.keySet()) {
-            codeList.add(key);
-            Map<String, String> mapInfo = codeMap.get(key);
-            if (mapInfo != null && StringUtil.isNotBlank(mapInfo.get("info"))) {
-                codeToInfoMap.put(key, mapInfo.get("info"));
-            }
-        }
-        // List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
-        // if (ListUtil.isNotEmpty(codeList)) {
-        //     qcResultAlgQueryVO.setCodeList(codeList);
-        //     qcResultAlgQueryVO.setHospitalId(hospitalId);
-        //     qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
-        // }
-        //
-        // // 评分
-        // AlgorithmVO algorithmVO = new AlgorithmVO();
-        // algorithmVO.setType(0);
-        // algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
-        // AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
-
-        //保存
-        // Map<String, Object> pageMap = outputInfo.getPageData();
-        // String pageData = JSON.toJSONString(pageMap);
-        // 获取菜单信息
-        // List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
-        // String menuData = JSON.toJSONString(qcModeDTOList);
+        // 对codeList 和 codeToInfoMap进行赋值
+        setCodeData(outputInfo, codeList, codeToInfoMap);
 
-        // 运行质控不保存评分结果信息
-        // Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
+        // 如果是1,说明已是终末质控,不再保存质控结果数据;如果是0,则保存质控结果数据
+        if ("0".equals(analyzeRunVO.getIsPlacefile())) {
+            // 计算分值并保存结果至数据库
+            Map<String, Object> resMap = calScoreAndSave(outputInfo, codeList, codeToInfoMap, analyzeVO);
+        }
 
         // 返回缺陷提示信息
         List<MsgDTO> msgDTOList = new ArrayList<>();
@@ -1147,15 +1067,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) {
@@ -1171,23 +1091,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param exportQcresultVO
      */
     public void exportQcresult(HttpServletResponse response, ExportQcresultVO exportQcresultVO) {
-        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         exportQcresultVO.setHospitalId(hospitalId);
-        Date startDate = exportQcresultVO.getLeaveHosDateStart();
-        Date endDate = exportQcresultVO.getLeaveHosDateEnd();
-        //时间间隔7天
-        long interval = 7 * 24 * 60 * 60 * 1000;
-        if (endDate.getTime() < startDate.getTime()) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-        }
-        if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
-        }
-
-        exportQcresultVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(endDate, 1)));
+        //时间设置
+        exportQcresultVOSet(exportQcresultVO);
         List<ExportExcelDTO> res = this.exportQcresult(exportQcresultVO);
-        String fileName = dateFormat.format(startDate) + "-" + dateFormat.format(endDate) + "抽查住院病历质量情况.xls";
+        String fileName = "抽查住院病历质量情况.xls";
         response.setContentType("text/html;charset=UTF-8");
         ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
     }
@@ -1199,24 +1108,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param exportQcresultVO
      */
     public void exportQcresultByDept(HttpServletResponse response, ExportQcresultVO exportQcresultVO) {
-        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         String userId = SysUserUtils.getCurrentPrincipleID();
         exportQcresultVO.setHospitalId(hospitalId);
         exportQcresultVO.setUserId(Long.valueOf(userId));
-        Date startDate = exportQcresultVO.getLeaveHosDateStart();
-        Date endDate = exportQcresultVO.getLeaveHosDateEnd();
-        //时间间隔7天
-        long interval = 7 * 24 * 60 * 60 * 1000;
-        if (endDate.getTime() < startDate.getTime()) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-        }
-        if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
-        }
-        exportQcresultVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(endDate, 1)));
+        //时间设置
+        exportQcresultVOSet(exportQcresultVO);
         List<ExportExcelDTO> res = this.exportQcresultByDept(exportQcresultVO);
-        String fileName = dateFormat.format(startDate) + "-" + dateFormat.format(endDate) + "抽查住院病历质量情况.xls";
+        String fileName = "抽查住院病历质量情况.xls";
         response.setContentType("text/html;charset=UTF-8");
         ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
     }
@@ -1228,25 +1127,145 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param exportQcresultVO
      */
     public void exportQcresultByGroup(HttpServletResponse response, ExportQcresultVO exportQcresultVO) {
-        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         String userId = SysUserUtils.getCurrentPrincipleID();
         exportQcresultVO.setHospitalId(hospitalId);
         exportQcresultVO.setUserId(Long.valueOf(userId));
-        Date startDate = exportQcresultVO.getLeaveHosDateStart();
-        Date endDate = exportQcresultVO.getLeaveHosDateEnd();
-        //时间间隔7天
-        long interval = 7 * 24 * 60 * 60 * 1000;
-        if (endDate.getTime() < startDate.getTime()) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-        }
-        if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
-        }
-        exportQcresultVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(endDate, 1)));
+        //时间设置
+        exportQcresultVOSet(exportQcresultVO);
         List<ExportExcelDTO> res = this.exportQcresultByGroup(exportQcresultVO);
-        String fileName = dateFormat.format(startDate) + "-" + dateFormat.format(endDate) + "抽查住院病历质量情况.xls";
+        String fileName = "抽查住院病历质量情况.xls";
         response.setContentType("text/html;charset=UTF-8");
         ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
     }
+
+    private void exportQcresultVOSet(ExportQcresultVO exportQcresultVO){
+        //入参验证
+        long interval = 7 * 24 * 60 * 60 * 1000;
+        //入院时间
+        if (null != exportQcresultVO && null != exportQcresultVO.getBehosDateStart() && null != exportQcresultVO.getBehosDateEnd()) {
+            Date startDate = exportQcresultVO.getBehosDateStart();
+            Date endDate = exportQcresultVO.getBehosDateEnd();
+            //时间间隔7天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            }
+            exportQcresultVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getBehosDateStart()));
+            exportQcresultVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(exportQcresultVO.getBehosDateEnd(), 1)));
+        }
+        //出院时间
+        if (null != exportQcresultVO && null != exportQcresultVO.getLeaveHosDateStart() && null != exportQcresultVO.getLeaveHosDateEnd()) {
+            Date startDate = exportQcresultVO.getLeaveHosDateStart();
+            Date endDate = exportQcresultVO.getLeaveHosDateEnd();
+            //时间间隔7天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval) {
+                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            }
+            exportQcresultVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getLeaveHosDateStart()));
+            exportQcresultVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(exportQcresultVO.getLeaveHosDateEnd(), 1)));
+        }
+    }
+
+    /**
+     * 设置共用code数据
+     *
+     * @param outputInfo 质控出参数据
+     * @param codeList 质控编码列表
+     * @param codeToInfoMap 质控编码对应的info信息
+     */
+    public void setCodeData(OutputInfo outputInfo, List<String> codeList, Map<String, String> codeToInfoMap) {
+        Map<String, Map<String, String>> codeMap = outputInfo.getResult();
+        for (String key : codeMap.keySet()) {
+            codeList.add(key);
+            Map<String, String> mapInfo = codeMap.get(key);
+            if (mapInfo != null && StringUtil.isNotBlank(mapInfo.get("info"))) {
+                codeToInfoMap.put(key, mapInfo.get("info"));
+            }
+        }
+    }
+
+
+    /**
+     * 计算分值并保存结果至数据库
+     *
+     * @param outputInfo 质控出参数据
+     * @param codeList 质控编码列表
+     * @param codeToInfoMap 质控编码对应的info信息
+     * @param analyzeVO 入参
+     * @return
+     */
+    public Map<String, Object> calScoreAndSave(OutputInfo outputInfo, List<String> codeList,
+                                               Map<String, String> codeToInfoMap, AnalyzeVO analyzeVO) {
+        Long hospitalId = analyzeVO.getHospitalId();
+        List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
+        if (ListUtil.isNotEmpty(codeList)) {
+            // 根据质控结果获取质控条目
+            QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
+            qcResultAlgQueryVO.setCodeList(codeList);
+            qcResultAlgQueryVO.setHospitalId(hospitalId);
+            qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
+        }
+
+        // 对info赋值
+        for (QcResultAlgVO bean : qcResultAlgVOList) {
+            String info = codeToInfoMap.get(bean.getCode());
+            if (StringUtil.isNotBlank(info)) {
+                bean.setInfo(info);
+            }
+        }
+
+        // 评分
+        AlgorithmVO algorithmVO = new AlgorithmVO();
+        algorithmVO.setType(0);
+        algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
+        algorithmVO.setHospitalId(hospitalId);
+        algorithmVO.setBehospitalCode(analyzeVO.getBehospitalCode());
+        algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
+        AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
+
+        //保存
+        Map<String, Object> pageMap = outputInfo.getPageData();
+        // 手动拼接数据【知情同意书】【谈话告知书】
+        List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("behospital_code", analyzeVO.getBehospitalCode())
+                .eq("hospital_id", hospitalId)
+                .in("mode_id", Arrays.asList(53, 54, 16))
+                .orderByAsc("rec_date")
+        );
+        List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
+        Map<Long, List<MedicalRecordDTO>> recordMap = EntityUtil.makeEntityListMap(medicalRecordDTOList, "modeId");
+        List<MedicalRecordDTO> recordDTOList = new ArrayList<>();
+        if (recordMap.get(53L) != null) {
+            recordDTOList.addAll(recordMap.get(53L)); // 知情同意书
+        }
+        if (recordMap.get(16L) != null) {
+            recordDTOList.addAll(recordMap.get(16L)); // 手术知情同意书
+        }
+        // 医嘱信息
+        pageMap.put("医嘱信息", null);
+        // 知情同意书 = 【知情同意书】 + 【手术知情同意书】
+        pageMap.put("知情同意书", recordDTOList);
+        pageMap.put("谈话告知书", recordMap.get(54L));
+
+        String pageData = JSON.toJSONString(pageMap);
+        // 获取菜单信息
+        List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
+        String menuData = JSON.toJSONString(qcModeDTOList);
+
+        // 保存评分结果信息
+        Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask(), null);
+
+        // 返回结果信息
+        Map<String, Object> map = new HashMap<>();
+        map.put("algorithmDTO", algorithmDTO);
+        map.put("date", date);
+        return map;
+    }
 }

+ 62 - 1
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -807,6 +807,13 @@ public class ConsoleFacade {
             record.setStageSummaryPercent(stageSummaryPercent);
             record.setStageSummaryPercentStr(stageSummaryPercentStr);
         }
+        //住院超过31日病人数
+        Integer beHosGT31DaysMRNum = records
+                .stream()
+                .map(EntryStatisticsDTO::getBeHosGT31DaysMRNum)
+                .reduce(0, Integer::sum);
+        record.setBeHosGT31DaysMRNum(beHosGT31DaysMRNum);
+
         return record;
     }
 
@@ -1134,7 +1141,9 @@ public class ConsoleFacade {
             }
         });
         //增加全院数据
-        if (StringUtil.isBlank(filterUnModifyMRVO.getName()) || filterUnModifyMRVO.getName().equals("全院")) {
+        if (ListUtil.isNotEmpty(retList) &&
+                (StringUtil.isBlank(filterUnModifyMRVO.getName())
+                        || filterUnModifyMRVO.getName().equals("全院"))) {
             try {
 
                 Object globleObj = new Object();
@@ -1235,4 +1244,56 @@ public class ConsoleFacade {
         retPage.setRecords(retRecords);
         return retPage;
     }
+
+    /**
+     * 入院人数统计(首页)
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> beHosCount(FilterVO filterVO) {
+        filterFacade.filterVOSet(filterVO);
+        List<NumDTO> records = behospitalInfoFacade.beHosCount(filterVO);
+
+        if (ListUtil.isNotEmpty(records)) {
+            NumDTO globleRecord = new NumDTO();
+            globleRecord.setName("全院");
+            Integer num = records.stream()
+                    .map(NumDTO::getNum)
+                    .reduce(0, Integer::sum);
+            globleRecord.setNum(num);
+            records.add(0, globleRecord);
+        }
+
+        if (ListUtil.isNotEmpty(records) && records.size() > filterVO.getLimitCount()) {
+            records = records.subList(0, 10);
+        }
+        return records;
+    }
+
+    /**
+     * 单条条目缺陷统计(首页)
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> casesEntryStatisticsById(FilterVO filterVO) {
+        filterFacade.filterVOSet(filterVO);
+        List<NumDTO> records = behospitalInfoFacade.casesEntryStatisticsById(filterVO);
+
+        if (ListUtil.isNotEmpty(records)) {
+            NumDTO globleRecord = new NumDTO();
+            globleRecord.setName("全院");
+            Integer num = records.stream()
+                    .map(NumDTO::getNum)
+                    .reduce(0, Integer::sum);
+            globleRecord.setNum(num);
+            records.add(0, globleRecord);
+        }
+
+        if (ListUtil.isNotEmpty(records) && records.size() > filterVO.getLimitCount()) {
+            records = records.subList(0, 10);
+        }
+        return records;
+    }
 }

+ 15 - 0
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -365,4 +365,19 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
 
+    /**
+     * 入院人数统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> beHosCount(FilterVO filterVO);
+
+    /**
+     * 单条条目缺陷统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> casesEntryStatisticsById(FilterVO filterVO);
 }

+ 16 - 0
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -356,4 +356,20 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      * @return
      */
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
+
+    /**
+     * 入院人数统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> beHosCount(FilterVO filterVO);
+
+    /**
+     * 单条条目缺陷统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public List<NumDTO> casesEntryStatisticsById(FilterVO filterVO);
 }

+ 22 - 0
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -484,4 +484,26 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO) {
         return baseMapper.reHos31DaysPage(reBeHosPageVO);
     }
+
+    /**
+     * 入院人数统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    @Override
+    public List<NumDTO> beHosCount(FilterVO filterVO) {
+        return baseMapper.beHosCount(filterVO);
+    }
+
+    /**
+     * 单条条目缺陷统计-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    @Override
+    public List<NumDTO> casesEntryStatisticsById(FilterVO filterVO){
+        return baseMapper.casesEntryStatisticsById(filterVO);
+    }
 }

+ 2 - 0
src/main/java/com/diagbot/vo/AnalyzeRunVO.java

@@ -21,4 +21,6 @@ public class AnalyzeRunVO {
     // 模块id
     @NotNull(message = "modeId不能为空")
     private Long modeId;
+    // 归档字段
+    private String isPlacefile = "1";
 }

+ 2 - 2
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -92,8 +92,8 @@ public class BehospitalPageVO extends Page implements Serializable {
     /**
      * 是否归档(0:未归档,1:已归档)
      */
-    @ApiModelProperty(hidden = true)
-    private String isPlacefile;
+//    @ApiModelProperty(hidden = true)
+    private String isPlacefile = "1";
 
     private Integer checkStatus;
     private Integer mrStatus;

+ 4 - 0
src/main/java/com/diagbot/vo/EntryStatisticsVO.java

@@ -48,4 +48,8 @@ public class EntryStatisticsVO {
      * 科室名称
      */
     private String deptName;
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 14 - 0
src/main/java/com/diagbot/vo/ExportQcresultVO.java

@@ -14,6 +14,15 @@ import java.util.Date;
 @Getter
 @Setter
 public class ExportQcresultVO {
+    /**
+     * 入院时间开始时间
+     */
+    private Date behosDateStart;
+
+    /**
+     * 入院时间结束时间
+     */
+    private Date behosDateEnd;
     private Date leaveHosDateStart;
     private Date leaveHosDateEnd;
     @ApiModelProperty(hidden = true)
@@ -35,4 +44,9 @@ public class ExportQcresultVO {
     private Date chTimeEnd;
     private Date mrTimeStart;
     private Date mrTimeEnd;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterPageVO.java

@@ -66,4 +66,9 @@ public class FilterPageVO extends Page {
      * 规则类型(0:无,1:空项,2:错误)
      */
     private Integer ruleType;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterUnModifyMRVO.java

@@ -57,4 +57,9 @@ public class FilterUnModifyMRVO {
      * 排序(降序)
      */
     private String desc;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterVO.java

@@ -49,4 +49,9 @@ public class FilterVO {
     private String deptClass;
 
     private String level;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 10 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -112,4 +112,14 @@ public class QcResultShortPageVO extends Page {
      * 首页核查截止时间
      */
     private Date mrTimeEnd;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
+
+    /**
+     * 住院超过31日标志
+     */
+    private Integer beHosGT31Days;
 }

+ 4 - 0
src/main/java/com/diagbot/vo/ReBeHosPageVO.java

@@ -32,4 +32,8 @@ public class ReBeHosPageVO extends Page {
      * 病人姓名
      */
     private String name;
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 4 - 0
src/main/java/com/diagbot/vo/TaskVO.java

@@ -35,4 +35,8 @@ public class TaskVO {
     private boolean useCrfCache;
     // 指定编码列表
     private List<String> behospitalCodeList = new ArrayList<>();
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 6 - 4
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -89,11 +89,13 @@ public class BehospitalInfoController {
 
     @ApiOperation(value = "评分-运行质控[by:zhoutg]",
             notes = "    // 病历id\n" +
-                    "     String behospitalCode;\n" +
+                    "    String behospitalCode;\n" +
                     "    // 医院ID\n" +
-                    "     Long hospitalId;\n" +
+                    "    Long hospitalId;\n" +
                     "    // 模块id\n" +
-                    "     Long modeId;")
+                    "    Long modeId;\n" +
+                    "    // 归档字段\n" +
+                    "    String isPlacefile;")
     @PostMapping("/analyze_run")
     @SysLogger("analyze_run")
     @Transactional
@@ -221,7 +223,7 @@ public class BehospitalInfoController {
         return RespDTO.onSuc(data);
     }
 
-    @ApiOperation(value = "导出病历[by:gaodm]",
+    @ApiOperation(value = "导出病历例子[by:gaodm]",
             notes = "")
     @PostMapping("/exportExcel")
     @SysLogger("exportExcel")

+ 24 - 12
src/main/java/com/diagbot/web/ConsoleByDeptController.java

@@ -42,7 +42,8 @@ public class ConsoleByDeptController {
 
     //region --------------------------首页接口开始------------------------------
     @ApiOperation(value = "出院病人统计(科室)-首页[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/leaveHosCountByDept")
     @SysLogger("leaveHosCountByDept")
     public RespDTO<Map<String, Object>> leaveHosCountByDept(@RequestBody @Valid FilterVO filterVO) {
@@ -51,7 +52,8 @@ public class ConsoleByDeptController {
     }
 
     @ApiOperation(value = "病历数统计(科室)-首页[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/mrCountByDept")
     @SysLogger("mrCountByDept")
     public RespDTO<Map<String, Object>> mrCountByDept(@RequestBody @Valid FilterVO filterVO) {
@@ -60,7 +62,8 @@ public class ConsoleByDeptController {
     }
 
     @ApiOperation(value = "各模块缺陷占比排名(科室)-首页[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByCaseAndDept")
     @SysLogger("entryCountGroupByCaseAndDept")
     public RespDTO<Map<String, Object>> entryCountGroupByCaseAndDept(@RequestBody @Valid FilterVO filterVO) {
@@ -69,7 +72,8 @@ public class ConsoleByDeptController {
     }
 
     @ApiOperation(value = "条目缺陷占比(科室)-首页[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByEntryAndDept")
     @SysLogger("entryCountGroupByEntryAndDept")
     public RespDTO<Map<String, Object>> entryCountGroupByEntryAndDept(@RequestBody @Valid FilterVO filterVO) {
@@ -89,7 +93,8 @@ public class ConsoleByDeptController {
                     "name: 主治医生名称 <br>" +
                     "deptName: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageLevelByDeptLimit")
     @SysLogger("homePageLevelByDeptLimit")
     public RespDTO<List<HomePageNumDTO>> homePageLevelByDeptLimit(@RequestBody @Valid FilterOrderByDeptVO filterOrderByDeptVO) {
@@ -110,7 +115,8 @@ public class ConsoleByDeptController {
     @ApiOperation(value = "各模块缺陷占比排名-科室(分页)-内页[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
                     "name: 模块名称<br>" +
-                    "deptName: 科室名称(必填)<br>")
+                    "deptName: 科室名称(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByCaseAndDeptPage")
     @SysLogger("entryCountGroupByCaseAndDeptPage")
     public RespDTO<IPage<DeptNumDTO>> entryCountGroupByCaseAndDeptPage(@RequestBody @Valid FilterPageByDeptVO filterPageByDeptVO) {
@@ -125,7 +131,8 @@ public class ConsoleByDeptController {
                     "casesId: 模块id:243=病案首页 <br>" +
                     "casesName: 模块名称<br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
-                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
+                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByEntryAndDeptPage")
     @SysLogger("entryCountGroupByEntryAndDeptPage")
     public RespDTO<IPage<DeptEntryNumDTO>> entryCountGroupByEntryAndDeptPage(@RequestBody @Valid FilterPageByDeptVO filterPageByDeptVO) {
@@ -137,7 +144,8 @@ public class ConsoleByDeptController {
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
                     "name: 缺陷名称<br>" +
                     "deptName: 科室名称(必填)<br>" +
-                    "doctorName: 医生名称(必填)<br>")
+                    "doctorName: 医生名称(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/resultStatisticsByDeptAndDoctorPage")
     @SysLogger("resultStatisticsByDeptAndDoctorPage")
     @ApiIgnore
@@ -157,7 +165,8 @@ public class ConsoleByDeptController {
                     "name: 缺陷名称<br>" +
                     "deptName: 科室名称(必填)<br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
-                    "casesName: 模块名称<br>")
+                    "casesName: 模块名称<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryGroupByEntryAndDeptInnerPage")
     @SysLogger("entryGroupByEntryAndDeptInnerPage")
     public RespDTO<IPage<DeptEntryNumDTO>> entryGroupByEntryAndDeptInnerPage(@RequestBody @Valid FilterPageByDeptVO filterPageByDeptVO) {
@@ -177,7 +186,8 @@ public class ConsoleByDeptController {
                     "name: 主治医生名称 <br>" +
                     "deptName: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelStatisticsByDept")
     @SysLogger("levelStatisticsByDept")
     public RespDTO<List<LevelStatisticsDTO>> levelStatisticsByDept(@RequestBody @Valid FilterOrderByDeptVO filterOrderByDeptVO) {
@@ -196,7 +206,8 @@ public class ConsoleByDeptController {
                     "name: 主治医生名称 <br>" +
                     "deptName: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageLevelStatisticsByDept")
     @SysLogger("homePageLevelStatisticsByDept")
     public RespDTO<List<HomePageNumDTO>> homePageLevelStatisticsByDept(@RequestBody @Valid FilterOrderByDeptVO filterOrderByDeptVO) {
@@ -220,7 +231,8 @@ public class ConsoleByDeptController {
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcResultShortByDeptPage")
     @SysLogger("qcResultShortByDeptPage")
     public RespDTO<IPage<QcResultShortDTO>> qcResultShortByDeptPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {

+ 103 - 35
src/main/java/com/diagbot/web/ConsoleController.java

@@ -55,7 +55,8 @@ public class ConsoleController {
 
     //region-----------------------聚合接口开始-------------------------------
     @ApiOperation(value = "病历相关统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/mrStatistics")
     @SysLogger("mrStatistics")
     @ApiIgnore
@@ -65,7 +66,8 @@ public class ConsoleController {
     }
 
     @ApiOperation(value = "缺陷相关统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/resultStatistics")
     @SysLogger("resultStatistics")
     @ApiIgnore
@@ -75,7 +77,8 @@ public class ConsoleController {
     }
 
     @ApiOperation(value = "平均值相关统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/averageStatistics")
     @SysLogger("averageStatistics")
     @ApiIgnore
@@ -94,7 +97,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "平均住院天数[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageDayNum")
     @SysLogger("getAverageDayNum")
     public RespDTO<Map<String, Object>> getAverageDayNum(@RequestBody @Valid FilterVO filterVO) {
@@ -108,7 +112,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "平均住院费用[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageFee")
     @SysLogger("getAverageFee")
     public RespDTO<Map<String, Object>> getAverageFee(@RequestBody @Valid FilterVO filterVO) {
@@ -122,7 +127,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "质控平均分按科室统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageScore")
     @SysLogger("getAverageScore")
     public RespDTO<Map<String, Object>> getAverageScore(@RequestBody @Valid FilterVO filterVO) {
@@ -137,7 +143,8 @@ public class ConsoleController {
      */
     @ApiOperation(value = "各科室质控平均分(首页)-根据内外科系统统计[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "deptClass: 科室分类:内科/外科,全部不传 <br>")
+                    "deptClass: 科室分类:内科/外科,全部不传 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageScoreByDeptClass")
     @SysLogger("getAverageScoreByDeptClass")
     public RespDTO<Map<String, Object>> getAverageScoreByDeptClass(@RequestBody @Valid FilterVO filterVO) {
@@ -151,7 +158,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各科室甲级病历占比[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getLevelResultDept")
     @SysLogger("getLevelResultDept")
     public RespDTO<Map<String, Object>> getLevelResultDept(@RequestBody @Valid FilterVO filterVO) {
@@ -165,7 +173,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "出院人数统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/leaveHosCount")
     @SysLogger("leaveHosCount")
     public RespDTO<Map<String, Object>> leaveHosCount(@RequestBody @Valid FilterVO filterVO) {
@@ -179,7 +188,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "质控病历统计[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/mrCount")
     @SysLogger("mrCount")
     public RespDTO<Map<String, Object>> mrCount(@RequestBody @Valid FilterVO filterVO) {
@@ -193,7 +203,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各模块缺陷占比排行(首页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByCase")
     @SysLogger("entryCountGroupByCase")
     public RespDTO<Map<String, Object>> entryCountGroupByCase(@RequestBody @Valid FilterVO filterVO) {
@@ -209,7 +220,8 @@ public class ConsoleController {
     @ApiOperation(value = "条目缺陷占比(首页)[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
-                    "casesName: 模块名称<br>")
+                    "casesName: 模块名称<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByEntry")
     @SysLogger("entryCountGroupByEntry")
     public RespDTO<Map<String, Object>> entryCountGroupByEntry(@RequestBody @Valid FilterVO filterVO) {
@@ -223,7 +235,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "单项否决缺陷占比(首页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryRejectPercent")
     @SysLogger("entryRejectPercent")
     public RespDTO<List<EntryNumDTO>> entryRejectPercent(@RequestBody @Valid FilterVO filterVO) {
@@ -238,7 +251,8 @@ public class ConsoleController {
      */
     @ApiOperation(value = "各科室甲/乙/丙级病历占比(首页)[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "level: 病历等级 甲、乙、丙(必填)<br>")
+                    "level: 病历等级 甲、乙、丙(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcResultLevelPercent")
     @SysLogger("qcResultLevelPercent")
     public RespDTO<List<DeptNumDTO>> qcResultLevelPercent(@RequestBody @Valid FilterVO filterVO) {
@@ -252,7 +266,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各科室缺陷占比[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryByDept")
     @SysLogger("entryByDept")
     public RespDTO<Map<String, Object>> entryByDept(@RequestBody @Valid FilterVO filterVO) {
@@ -269,7 +284,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各模块缺陷占比(分页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByCasePage")
     @SysLogger("entryCountGroupByCasePage")
     public RespDTO<IPage<NumDTO>> entryCountGroupByCasePage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -288,7 +304,8 @@ public class ConsoleController {
                     "casesId: 模块id:243=病案首页 <br>" +
                     "casesName: 模块名称 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
-                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
+                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByEntryPage")
     @SysLogger("entryCountGroupByEntryPage")
     public RespDTO<IPage<EntryNumGroupDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -303,7 +320,8 @@ public class ConsoleController {
      */
     @ApiOperation(value = "按科室统计平均住院天数(分页)[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年<br>" +
-                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageDayNumPage")
     @SysLogger("getAverageDayNumPage")
     public RespDTO<IPage<AverageStatisticsDTO>> getAverageDayNumPage(@RequestBody FilterPageByAverageVO filterPageByAverageVO) {
@@ -318,7 +336,8 @@ public class ConsoleController {
      */
     @ApiOperation(value = "按科室统计平均住院费用(分页)[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年<br>" +
-                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageFeePage")
     @SysLogger("getAverageFeePage")
     public RespDTO<IPage<AverageStatisticsFeeDTO>> getAverageFeePage(@RequestBody FilterPageByAverageVO filterPageByAverageVO) {
@@ -332,7 +351,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各科室质控平均分(分页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageScoreByDeptPage")
     @SysLogger("getAverageScoreByDeptPage")
     public RespDTO<IPage<AverageStatisticsDTO>> getAverageScoreByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -346,7 +366,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各科室缺陷占比排行(分页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/resultStatisticsByDeptPage")
     @SysLogger("resultStatisticsByDeptPage")
     public RespDTO<IPage<NumDTO>> resultStatisticsByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -360,7 +381,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "各科室甲级病历占比排行(分页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelPercentGroupByDeptPage")
     @SysLogger("levelPercentGroupByDeptPage")
     public RespDTO<IPage<NumDTO>> levelPercentGroupByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -374,7 +396,8 @@ public class ConsoleController {
      * @return
      */
     @ApiOperation(value = "条目缺陷占比(分页)[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryGroupByEntryInnerPage")
     @SysLogger("entryGroupByEntryInnerPage")
     public RespDTO<IPage<EntryNumDTO>> entryGroupByEntryInnerPage(@RequestBody @Valid FilterPageVO filterPageVO) {
@@ -393,7 +416,8 @@ public class ConsoleController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelStatistics")
     @SysLogger("levelStatistics")
     public RespDTO<List<LevelStatisticsDTO>> levelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -412,7 +436,8 @@ public class ConsoleController {
                     "name: 科室名称 <br>" +
                     "deptClass: 科室分类:内科/外科,全部不传 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelStatisticsByDeptClass")
     @SysLogger("levelStatisticsByDeptClass")
     public RespDTO<List<LevelStatisticsTZDTO>> levelStatisticsByDeptClass(@RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -430,7 +455,8 @@ public class ConsoleController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageLevelStatistics")
     @SysLogger("homePageLevelStatistics")
     public RespDTO<List<HomePageNumDTO>> homePageLevelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -448,7 +474,8 @@ public class ConsoleController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageLevelLimit")
     @SysLogger("homePageLevelLimit")
     public RespDTO<List<HomePageNumDTO>> homePageLevelLimit(@RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -472,6 +499,7 @@ public class ConsoleController {
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "beHosGT31Days: 住院超过31日标志 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
                     "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
@@ -483,7 +511,8 @@ public class ConsoleController {
                     "mrTimeStart: 首页核查起始时间 <br>" +
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcResultShortPage")
     @SysLogger("qcResultShortPage")
     public RespDTO<IPage<QcResultShortDTO>> qcResultShortPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -501,7 +530,8 @@ public class ConsoleController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryStatistics")
     @SysLogger("entryStatistics")
     public RespDTO<List<EntryStatisticsDTO>> entryStatistics(@RequestBody @Valid EntryStatisticsVO entryStatisticsVO) {
@@ -516,7 +546,8 @@ public class ConsoleController {
      */
     @ApiOperation(value = "病案首页病历统计[by:zhaops]",
             notes = "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageMRCount")
     @SysLogger("homePageMRCount")
     public RespDTO<Map<String, Object>> homePageMRCount(@RequestBody @Valid FilterVO filterVO) {
@@ -546,7 +577,8 @@ public class ConsoleController {
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "leaveHosType: 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/leaveHosMRPage")
     @SysLogger("leaveHosMRPage")
     public RespDTO<IPage<QcResultShortDTO>> leaveHosMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -564,7 +596,8 @@ public class ConsoleController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcCheckStatistics")
     @SysLogger("qcCheckStatistics")
     public RespDTO<List<HomePageImproveDTO>> qcCheckStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -582,7 +615,8 @@ public class ConsoleController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/unModifyMRStatistics")
     @SysLogger("unModifyMRStatistics")
     public RespDTO<UnModifyMRDTO> unModifyMRStatistics(@RequestBody @Valid FilterUnModifyMRVO filterUnModifyMRVO) {
@@ -613,7 +647,8 @@ public class ConsoleController {
                     "mrTimeStart: 首页核查起始时间 <br>" +
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/unModifyMRPage")
     @SysLogger("unModifyMRPage")
     public RespDTO<IPage<QcResultShortDTO>> unModifyMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -631,10 +666,43 @@ public class ConsoleController {
             notes = "name: 病人名称 <br>" +
                     "fileCode: 病案号 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/reHos31DaysPage")
     @SysLogger("reHos31DaysPage")
     public RespDTO<IPage<ReBeHosDTO>> reHos31DaysPage(@RequestBody @Valid ReBeHosPageVO reBeHosPageVO) {
         return RespDTO.onSuc(consoleFacade.reHos31DaysPage(reBeHosPageVO));
     }
+
+    /**
+     * 入院人数统计(首页)
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "入院人数统计(首页)[by:zhaops]",
+            notes = "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/beHosCount")
+    @SysLogger("beHosCount")
+    public RespDTO<List<NumDTO>> beHosCount(@RequestBody @Valid FilterVO filterVO) {
+        return RespDTO.onSuc(consoleFacade.beHosCount(filterVO));
+    }
+
+    /**
+     * 单条条目缺陷统计(首页)
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "单条条目缺陷统计(首页)[by:zhaops]",
+            notes = "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/casesEntryStatisticsById")
+    @SysLogger("casesEntryStatisticsById")
+    public RespDTO<List<NumDTO>> casesEntryStatisticsById(@RequestBody @Valid FilterVO filterVO) {
+        return RespDTO.onSuc(consoleFacade.casesEntryStatisticsById(filterVO));
+    }
 }

+ 33 - 16
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -45,7 +45,8 @@ public class ConsoleExportController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/homePageLevelExport")
     @SysLogger("homePageLevelExport")
     public void homePageLevelExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -60,7 +61,8 @@ public class ConsoleExportController {
      * @return
      */
     @ApiOperation(value = "条目缺陷占比导出[by:gaodm]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryGroupByEntryExport")
     @SysLogger("entryGroupByEntryExport")
     public void entryGroupByEntryExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
@@ -78,7 +80,8 @@ public class ConsoleExportController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelExport")
     @SysLogger("levelExport")
     public void levelExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -96,7 +99,8 @@ public class ConsoleExportController {
                     "level: 病历等级 <br>" +
                     "name: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>")
+                    "desc: 排序(降序) <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelExport_TZ")
     @SysLogger("levelExport_TZ")
     public void levelExport_TZ(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -111,7 +115,8 @@ public class ConsoleExportController {
      */
     @ApiOperation(value = "按科室统计平均住院天数导出[by:gaodm]",
             notes = "type: 统计维度 1-本月,2-本年<br>" +
-                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageDayNumExport")
     @SysLogger("getAverageDayNumExport")
     public void getAverageDayNumExport(HttpServletResponse response, @RequestBody FilterPageByAverageVO filterPageByAverageVO) {
@@ -126,7 +131,8 @@ public class ConsoleExportController {
      */
     @ApiOperation(value = "按科室统计平均住院费用导出[by:gaodm]",
             notes = "type: 统计维度 1-本月,2-本年<br>" +
-                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
+                    "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/getAverageFeeExport")
     @SysLogger("getAverageFeeExport")
     public void getAverageFeeExport(HttpServletResponse response, @RequestBody FilterPageByAverageVO filterPageByAverageVO) {
@@ -140,7 +146,8 @@ public class ConsoleExportController {
      * @return
      */
     @ApiOperation(value = "各科室甲级病历占比排行导出[by:gaodm]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/levelPercentGroupByDeptExport")
     @SysLogger("levelPercentGroupByDeptExport")
     public void levelPercentGroupByDeptExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
@@ -159,7 +166,8 @@ public class ConsoleExportController {
                     "casesId: 模块id:243=病案首页 <br>" +
                     "casesName: 模块名称 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
-                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
+                    "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByEntryExport")
     @SysLogger("entryCountGroupByEntryExport")
     public void entryCountGroupByEntryExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
@@ -173,7 +181,8 @@ public class ConsoleExportController {
      * @return
      */
     @ApiOperation(value = "各模块缺陷占比导出[by:gaodm]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
+            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryCountGroupByCaseExport")
     @SysLogger("entryCountGroupByCaseExport")
     public void entryCountGroupByCaseExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
@@ -191,7 +200,8 @@ public class ConsoleExportController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/entryStatisticsExport")
     @SysLogger("entryStatisticsExport")
     public void entryStatisticsExport(HttpServletResponse response, @RequestBody @Valid EntryStatisticsVO entryStatisticsVO) {
@@ -215,6 +225,7 @@ public class ConsoleExportController {
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "beHosGT31Days: 住院超过31日标志 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
                     "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
@@ -226,7 +237,8 @@ public class ConsoleExportController {
                     "mrTimeStart: 首页核查起始时间 <br>" +
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcResultShortPageExport")
     @SysLogger("qcResultShortPageExport")
     public void qcResultShortPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -256,7 +268,8 @@ public class ConsoleExportController {
                     "mrTimeStart: 首页核查起始时间 <br>" +
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/leaveHosMrPageExport")
     @SysLogger("leaveHosMrPageExport")
     public void leaveHosMrPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -274,7 +287,8 @@ public class ConsoleExportController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/qcCheckStatisticsExport")
     @SysLogger("qcCheckStatisticsExport")
     public void qcCheckStatisticsExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
@@ -303,7 +317,8 @@ public class ConsoleExportController {
                     "mrTimeStart: 首页核查起始时间 <br>" +
                     "mrTimeEnd: 首页核查截止时间 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/unModifyMRPageExport")
     @SysLogger("unModifyMRPageExport")
     public void unModifyMRPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
@@ -321,7 +336,8 @@ public class ConsoleExportController {
                     "asc: 排序(升序) <br>" +
                     "desc:排序(降序) <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/unModifyMRStatisticsExport")
     @SysLogger("unModifyMRStatisticsExport")
     public void unModifyMRStatisticsExport(HttpServletResponse response, @RequestBody @Valid FilterUnModifyMRVO filterUnModifyMRVO) {
@@ -339,7 +355,8 @@ public class ConsoleExportController {
             notes = "name: 病人姓名 <br>" +
                     "fileCode: 病案号 <br>" +
                     "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>")
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
     @PostMapping("/reHos31DaysPageExport")
     @SysLogger("reHos31DaysPageExport")
     public void reHos31DaysPageExport(HttpServletResponse response, @RequestBody @Valid ReBeHosPageVO reBeHosPageVO) {

File diff suppressed because it is too large
+ 1290 - 333
src/main/resources/mapper/BehospitalInfoMapper.xml


+ 24 - 8
src/main/resources/mapper/HomePageMapper.xml

@@ -168,7 +168,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -200,7 +202,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -244,7 +248,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -278,7 +284,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -312,7 +320,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -369,7 +379,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -403,7 +415,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -437,7 +451,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}

File diff suppressed because it is too large
+ 507 - 149
src/main/resources/mapper/QcresultInfoMapper.xml