浏览代码

Merge remote-tracking branch 'origin/dev/20200727_2.0.0' into test

zhaops 4 年之前
父节点
当前提交
b8b50057bd

+ 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)

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

@@ -1141,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();
@@ -1242,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);
+    }
 }

+ 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) {

+ 102 - 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) {
@@ -484,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) {
@@ -502,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) {
@@ -517,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) {
@@ -547,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) {
@@ -565,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) {
@@ -583,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) {
@@ -614,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) {
@@ -632,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));
+    }
 }

+ 32 - 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) {
@@ -227,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) {
@@ -257,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) {
@@ -275,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) {
@@ -304,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) {
@@ -322,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) {
@@ -340,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) {

文件差异内容过多而无法显示
+ 1029 - 252
src/main/resources/mapper/BehospitalInfoMapper.xml


+ 450 - 120
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -35,11 +35,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -68,11 +79,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -109,11 +131,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -146,11 +179,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -201,11 +245,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         d.cases_id
@@ -233,11 +288,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         ) t2,
         (
@@ -305,11 +371,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         d.cases_entry_id
@@ -337,11 +414,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         ) t2
         ORDER BY
@@ -402,11 +490,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.isReject != null">
             AND d.is_reject = #{filterPageVO.isReject}
@@ -450,11 +549,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         ) t2
         ) t
@@ -511,11 +621,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         d.cases_entry_id,
@@ -549,11 +670,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         ) t2
         ORDER BY
@@ -583,11 +715,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -626,11 +769,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         <if test="deptClass != null and deptClass != ''">
             AND e.dept_name = #{deptClass}
@@ -668,11 +822,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         <if test="gradeType != null and gradeType != ''">
             AND c.grade_type = #{gradeType}
@@ -729,11 +894,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         d.cases_id,
@@ -797,11 +973,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         d.cases_entry_id,
@@ -840,11 +1027,22 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
         </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -925,11 +1123,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -987,11 +1196,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1056,11 +1276,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
@@ -1094,11 +1325,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.deptName},'%')
@@ -1178,11 +1420,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageVO.deptName}
@@ -1233,11 +1486,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
             AND a.beh_dept_name  =  #{filterPageVO.deptName}
@@ -1283,11 +1547,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -1327,11 +1602,22 @@
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
         </if>
-        <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
@@ -1409,11 +1695,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1458,11 +1755,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
@@ -1557,11 +1865,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name =  #{filterPageByDeptVO.deptName}
@@ -1629,11 +1948,22 @@
         <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
         </if>
-        <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-            <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
+            AND ifnull(a.leave_hospital_date ,'') = ''
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
-        <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-            <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
+            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
+            </if>
+            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
+            </if>
         </if>
         <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
             AND a.beh_dept_name =  #{filterPageByDeptVO.deptName}