瀏覽代碼

Merge branch 'master' into his/tzmh

# Conflicts:
#	src/main/java/com/diagbot/entity/MedLisResult.java
#	src/main/java/com/diagbot/entity/MedPacsResult.java
#	src/main/java/com/diagbot/mapper/MedLisResultMapper.java
#	src/main/java/com/diagbot/mapper/MedPacsResultMapper.java
#	src/main/java/com/diagbot/service/MedLisResultService.java
#	src/main/java/com/diagbot/service/MedPacsResultService.java
#	src/main/java/com/diagbot/service/impl/MedLisResultServiceImpl.java
#	src/main/java/com/diagbot/service/impl/MedPacsResultServiceImpl.java
liuqq 4 年之前
父節點
當前提交
b6b5e70ac7
共有 60 個文件被更改,包括 6654 次插入867 次删除
  1. 134 0
      doc/017.20200716v1.3.8/qc_inti_check.sql
  2. 10 0
      doc/019.20200727v2.0.0/qc_initv2.0.0.sql
  3. 12 0
      doc/020.20200805v1.4.0/qc_initv1.4.0.sql
  4. 116 0
      src/main/java/com/diagbot/aggregate/HomePageStatisticsAggregate.java
  5. 9 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  6. 9 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  7. 7 0
      src/main/java/com/diagbot/dto/BehospitalInfoDTO.java
  8. 7 2
      src/main/java/com/diagbot/dto/EntryStatisticsDTO.java
  9. 27 2
      src/main/java/com/diagbot/dto/QcResultShortDTO.java
  10. 43 0
      src/main/java/com/diagbot/dto/ReBeHosDTO.java
  11. 69 0
      src/main/java/com/diagbot/dto/ReBeHosDetailDTO.java
  12. 44 0
      src/main/java/com/diagbot/dto/ReBeHosMergeDTO.java
  13. 10 0
      src/main/java/com/diagbot/entity/MedCheckInfo.java
  14. 258 0
      src/main/java/com/diagbot/entity/MedLisInfo.java
  15. 31 18
      src/main/java/com/diagbot/entity/MedLisResult.java
  16. 297 0
      src/main/java/com/diagbot/entity/MedPacsInfo.java
  17. 18 18
      src/main/java/com/diagbot/entity/MedPacsResult.java
  18. 284 158
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  19. 75 1
      src/main/java/com/diagbot/facade/ConsoleExportFacade.java
  20. 140 41
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  21. 13 0
      src/main/java/com/diagbot/facade/FilterFacade.java
  22. 14 1
      src/main/java/com/diagbot/facade/MedCheckInfoFacade.java
  23. 13 0
      src/main/java/com/diagbot/facade/MedLisInfoFacade.java
  24. 13 0
      src/main/java/com/diagbot/facade/MedPacsInfoFacade.java
  25. 19 1
      src/main/java/com/diagbot/facade/SysUserPagesetFacade.java
  26. 60 0
      src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java
  27. 16 0
      src/main/java/com/diagbot/mapper/MedLisInfoMapper.java
  28. 16 0
      src/main/java/com/diagbot/mapper/MedPacsInfoMapper.java
  29. 58 0
      src/main/java/com/diagbot/service/BehospitalInfoService.java
  30. 16 0
      src/main/java/com/diagbot/service/MedLisInfoService.java
  31. 2 2
      src/main/java/com/diagbot/service/MedLisResultService.java
  32. 16 0
      src/main/java/com/diagbot/service/MedPacsInfoService.java
  33. 2 2
      src/main/java/com/diagbot/service/MedPacsResultService.java
  34. 79 0
      src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java
  35. 20 0
      src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java
  36. 20 0
      src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java
  37. 2 0
      src/main/java/com/diagbot/vo/AnalyzeRunVO.java
  38. 10 2
      src/main/java/com/diagbot/vo/BehospitalPageVO.java
  39. 4 0
      src/main/java/com/diagbot/vo/EntryStatisticsVO.java
  40. 21 0
      src/main/java/com/diagbot/vo/ExportQcresultVO.java
  41. 5 0
      src/main/java/com/diagbot/vo/FilterPageVO.java
  42. 5 0
      src/main/java/com/diagbot/vo/FilterUnModifyMRVO.java
  43. 5 0
      src/main/java/com/diagbot/vo/FilterVO.java
  44. 2 0
      src/main/java/com/diagbot/vo/MedCheckInfoAddVO.java
  45. 52 1
      src/main/java/com/diagbot/vo/QcResultShortPageVO.java
  46. 39 0
      src/main/java/com/diagbot/vo/ReBeHosPageVO.java
  47. 4 0
      src/main/java/com/diagbot/vo/TaskVO.java
  48. 6 4
      src/main/java/com/diagbot/web/BehospitalInfoController.java
  49. 24 12
      src/main/java/com/diagbot/web/ConsoleByDeptController.java
  50. 209 34
      src/main/java/com/diagbot/web/ConsoleController.java
  51. 138 15
      src/main/java/com/diagbot/web/ConsoleExportController.java
  52. 8 1
      src/main/java/com/diagbot/web/SysUserPagesetController.java
  53. 3551 393
      src/main/resources/mapper/BehospitalInfoMapper.xml
  54. 24 8
      src/main/resources/mapper/HomePageMapper.xml
  55. 1 0
      src/main/resources/mapper/MedCheckInfoMapper.xml
  56. 27 0
      src/main/resources/mapper/MedLisInfoMapper.xml
  57. 2 1
      src/main/resources/mapper/MedLisResultMapper.xml
  58. 30 0
      src/main/resources/mapper/MedPacsInfoMapper.xml
  59. 1 1
      src/main/resources/mapper/MedPacsResultMapper.xml
  60. 507 149
      src/main/resources/mapper/QcresultInfoMapper.xml

+ 134 - 0
doc/017.20200716v1.3.8/qc_inti_check.sql

@@ -0,0 +1,134 @@
+use `qc`;
+ALTER TABLE `med_check_info` ADD COLUMN `check_type` INT(11) NULL COMMENT '核查类型(0病历,1病案首页)' AFTER `status`;
+UPDATE med_check_info a SET check_type =0;
+UPDATE med_check_info a SET check_name = (SELECT linkman FROM sys_user b WHERE a.check_id=b.id);
+
+DELETE FROM sys_user_pageset WHERE user_id = -1;
+
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历等级', 'level', '1', '1', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历得分', 'scoreRes', '1', '2', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人住院序号', 'behospitalCode', '1', '3', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查状态', 'mrStatus', '1', '4', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查人', 'mrName', '1', '5', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查时间', 'mrTime', '1', '6', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查状态', 'checkStatus', '1', '7', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查人', 'chName', '1', '8', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查时间', 'chTime', '1', '9', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案号', 'fileCode', '1', '10', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人姓名', 'name', '1', '11', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '性别', 'sex', '1', '12', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '年龄', 'age', '1', '13', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '床号', 'bedCode', '1', '14', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '入院日期', 'behospitalDate', '1', '15', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '出院日期', 'leaveHospitalDate', '1', '16', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '归档日期', 'placefileDate', '1', '17', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主诊断', 'diagnose', '1', '18', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '住院医生', 'behDoctorName', '1', '19', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主管医生', 'doctorName', '1', '20', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主任医生', 'directorDoctorName', '1', '21', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '科室', 'behDeptName', '1', '22', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '评分时间', 'gradeTime', '1', '23', NULL);
+
+-- 找出没有”核查状态“的人员并给加上
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查状态" ELSE "病案首页核查状态" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrStatus" ELSE "mrStatus" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 4 ELSE 4 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrStatus") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查人" ELSE "病案首页核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrName" ELSE "mrName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 5 ELSE 5 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查时间" ELSE "病案首页核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrTime" ELSE "mrTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 6 ELSE 6 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查人" ELSE "病历核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chName" ELSE "chName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 7 ELSE 7 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查时间" ELSE "病历核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chTime" ELSE "chTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 8 ELSE 8 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+ UPDATE sys_user_pageset a SET a.name = "病历核查状态" WHERE a.user_id <> -1 AND val ="checkStatus";
+
+-- 新增权限
+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 (38, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31日再入院病人数', 17, 'YH-ZKK-31TZRYRS', 1, 1, 14, '用户-质控科-31日再入院病人数');
+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, 38, '用户-质控科-31天再入院人数');
+
+update sys_menu set name ='时效性相关统计' where id=37;

+ 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;  -- 各科室甲级病历占比

+ 12 - 0
doc/020.20200805v1.4.0/qc_initv1.4.0.sql

@@ -0,0 +1,12 @@
+use `qc`;
+
+-- 默认列设置
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behospitalCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'mrTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'chTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'sex';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'age';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'bedCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'placefileDate';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behDoctorName';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'directorDoctorName';

+ 116 - 0
src/main/java/com/diagbot/aggregate/HomePageStatisticsAggregate.java

@@ -0,0 +1,116 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.HomePageImproveDTO;
+import com.diagbot.dto.HomePageNumDTO;
+import com.diagbot.dto.NumDTO;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.vo.FilterVO;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/22 11:45
+ */
+@Component
+public class HomePageStatisticsAggregate {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    @DataProvider("setAllHomePage")
+    public Map<String, Object> setAllHomePage(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("getQcNumDTO") HomePageNumDTO qcNumDTO,
+            @DataConsumer("getEmptyNumDTO") HomePageNumDTO emptyNumDTO,
+            @DataConsumer("getImproveDTO") HomePageImproveDTO improveDTO) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        retMap.put("合格率", null);
+        retMap.put("不合格率", null);
+        retMap.put("完整率", null);
+        retMap.put("改善率", null);
+
+        if (qcNumDTO != null) {
+            //合格率
+            NumDTO pass = new NumDTO();
+            pass.setName("合格率");
+            pass.setNum(qcNumDTO.getFirstLevelNum());
+            pass.setTotleNum(qcNumDTO.getMrNum());
+            pass.setPercent(qcNumDTO.getFirstLevelPercent());
+            pass.setPercentStr(qcNumDTO.getFirstLevelPercentStr());
+            //不合格率
+            NumDTO unPass = new NumDTO();
+            unPass.setName("不合格率");
+            unPass.setNum(qcNumDTO.getSecondLevelNum());
+            unPass.setTotleNum(qcNumDTO.getMrNum());
+            unPass.setPercent(qcNumDTO.getSecondLevelPercent());
+            unPass.setPercentStr(qcNumDTO.getSecondLevelPercentStr());
+
+            retMap.put("合格率", pass);
+            retMap.put("不合格率", unPass);
+        }
+        if (emptyNumDTO != null) {
+            //完整率
+            NumDTO full = new NumDTO();
+            full.setName("完整率");
+            full.setNum(emptyNumDTO.getEntryTotleNum() - emptyNumDTO.getEmptyNum());
+            full.setTotleNum(emptyNumDTO.getEntryTotleNum());
+            full.setPercent(emptyNumDTO.getEmptyPercent());
+            full.setPercentStr(emptyNumDTO.getEmptyPercentStr());
+
+            retMap.put("完整率", full);
+        }
+
+        if (improveDTO != null) {
+            //改善率
+            NumDTO improve = new NumDTO();
+            improve.setName("改善率");
+            improve.setNum(improveDTO.getImproveNum());
+            improve.setTotleNum(improveDTO.getHomePageMRNum());
+            improve.setPercent(improveDTO.getImprovePercent());
+            improve.setPercentStr(improveDTO.getImprovePercentStr());
+
+            retMap.put("改善率", improve);
+        }
+        return retMap;
+    }
+
+    /**
+     * 合格率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getQcNumDTO")
+    public HomePageNumDTO getQcNumDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.homePageQcPercent(filterVO);
+    }
+
+    /**
+     * 完整率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getEmptyNumDTO")
+    public HomePageNumDTO getEmptyNumDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.hmEmptyEntryPercent(filterVO);
+    }
+
+    /**
+     * 改善率
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getImproveDTO")
+    public HomePageImproveDTO getImproveDTO(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.homePageImproveCount(filterVO);
+    }
+}

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

@@ -72,6 +72,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/dataimport/test").permitAll()
                 .antMatchers("/sys/user/pageset/getPageSet").permitAll()
                 .antMatchers("/sys/user/pageset/savePageSet").permitAll()
+                .antMatchers("/sys/user/pageset/getDefultPageSet").permitAll()
                 .antMatchers("/consoleByDept/getDept").permitAll()
                 .antMatchers("/console/entryRejectPercent").permitAll()
                 .antMatchers("/console/qcResultLevelPercent").permitAll()
@@ -105,6 +106,11 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/qcCheckStatistics").permitAll()
                 .antMatchers("/console/unModifyMRStatistics").permitAll()
                 .antMatchers("/console/unModifyMRPage").permitAll()
+                .antMatchers("/console/reHos31DaysPage").permitAll()
+                .antMatchers("/console/beHosCount").permitAll()
+                .antMatchers("/console/casesEntryStatisticsById").permitAll()
+                .antMatchers("/console/hmImproveMRPage").permitAll()
+                .antMatchers("/console/qcCheckMRPage").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByCaseAndDept").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByCaseAndDeptPage").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupByEntryAndDept").permitAll()
@@ -133,6 +139,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/qcCheckStatisticsExport").permitAll()
                 .antMatchers("/console/export/unModifyMRPageExport").permitAll()
                 .antMatchers("/console/export/unModifyMRStatisticsExport").permitAll()
+                .antMatchers("/console/export/reHos31DaysPageExport").permitAll()
+                .antMatchers("/console/export/hmImproveMRPageExport").permitAll()
+                .antMatchers("/console/export/qcCheckMRPageExport").permitAll()
                 .antMatchers("/qc/data/sendDoctorInfos").permitAll()
                 .antMatchers("/qc/data/sendDeptInfos").permitAll()
                 .antMatchers("/qc/data/sendRecordTypes").permitAll()

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

@@ -115,6 +115,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/dataimport/test", request)
                 || matchers("/sys/user/pageset/getPageSet", request)
                 || matchers("/sys/user/pageset/savePageSet", request)
+                || matchers("/sys/user/pageset/getDefaultPageSet", request)
                 || matchers("/consoleByDept/getDept", request)
                 || matchers("/console/entryRejectPercent", request)
                 || matchers("/console/qcResultLevelPercent", request)
@@ -148,6 +149,11 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/qcCheckStatistics", request)
                 || matchers("/console/unModifyMRStatistics", request)
                 || matchers("/console/unModifyMRPage", request)
+                || matchers("/console/reHos31DaysPage", request)
+                || matchers("/console/beHosCount", request)
+                || matchers("/console/casesEntryStatisticsById", request)
+                || matchers("/console/hmImproveMRPage", request)
+                || matchers("/console/qcCheckMRPage", request)
                 || matchers("/consoleByDept/entryCountGroupByCaseAndDept", request)
                 || matchers("/consoleByDept/entryCountGroupByCaseAndDeptPage", request)
                 || matchers("/consoleByDept/entryCountGroupByEntryAndDept", request)
@@ -176,6 +182,9 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/qcCheckStatisticsExport", request)
                 || matchers("/console/export/unModifyMRPageExport", request)
                 || matchers("/console/export/unModifyMRStatisticsExport", request)
+                || matchers("/console/export/reHos31DaysPageExport", request)
+                || matchers("/console/export/hmImproveMRPageExport", request)
+                || matchers("/console/export/qcCheckMRPageExport", request)
                 || matchers("/qc/data/sendDoctorInfos", request)
                 || matchers("/qc/data/sendDeptInfos", request)
                 || matchers("/qc/data/sendRecordTypes", request)

+ 7 - 0
src/main/java/com/diagbot/dto/BehospitalInfoDTO.java

@@ -119,4 +119,11 @@ public class BehospitalInfoDTO implements Serializable {
     private Date placefileDate;
 
     private Integer checkStatus;
+    private Integer mrStatus;
+    private String chName;
+    private String mrName;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
 }

+ 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天的病历数

+ 27 - 2
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -32,8 +32,6 @@ public class QcResultShortDTO {
     private Double scoreRes;
     @Excel(name = "病人住院序号", width = 40, orderNum = "3")
     private String behospitalCode;
-    //@Excel(name = "核查状态", width = 20, orderNum = "4",replace = { "已核查_1", "未核查_0", "_null" })
-    private Integer checkStatus;
     @Excel(name = "病案号", width = 30, orderNum = "5")
     private String fileCode;
     @Excel(name = "病人姓名", width = 30, orderNum = "6")
@@ -94,4 +92,31 @@ public class QcResultShortDTO {
      */
     private String wardName;
 
+    /**
+     * 病历核查状态
+     */
+    //@Excel(name = "核查状态", width = 20, orderNum = "4",replace = { "已核查_1", "未核查_0", "_null" })
+    private Integer checkStatus;
+    /**
+     * 首页核查状态
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date chTime;
+    /**
+     * 首页核查时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date mrTime;
 }

+ 43 - 0
src/main/java/com/diagbot/dto/ReBeHosDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/16 13:43
+ */
+@Getter
+@Setter
+public class ReBeHosDTO {
+    /**
+     * 病案号
+     */
+    @Excel(name = "病案号", width = 20, needMerge = true, orderNum = "1")
+    private String fileCode;
+    /**
+     * 性别
+     */
+    @Excel(name = "性别", width = 10, needMerge = true, orderNum = "2")
+    private String sex;
+    /**
+     * 主诊断
+     */
+    @Excel(name = "主诊断", width = 50, needMerge = true, orderNum = "3")
+    private String diagnose;
+    /**
+     * 间隔天数
+     */
+    @Excel(name = "间隔天数", width = 10, needMerge = true, orderNum = "4")
+    private Integer diffDays;
+    /**
+     * 比较病历组
+     */
+    @ExcelCollection(name = "", orderNum = "5")
+    private List<ReBeHosDetailDTO> details;
+}

+ 69 - 0
src/main/java/com/diagbot/dto/ReBeHosDetailDTO.java

@@ -0,0 +1,69 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/16 15:17
+ */
+@Getter
+@Setter
+public class ReBeHosDetailDTO {
+    /**
+     * 病人住院号
+     */
+    @Excel(name = "病人住院号", width = 20, orderNum = "1")
+    private String behospitalCode;
+    /**
+     * 病人姓名
+     */
+    @Excel(name = "病人姓名", width = 20, orderNum = "2")
+    private String name;
+    /**
+     * 病历等级
+     */
+    @Excel(name = "病历等级", width = 10, orderNum = "3")
+    private String level;
+    /**
+     * 病历得分
+     */
+    @Excel(name = "病历得分", width = 10, orderNum = "4")
+    private Double scoreRes;
+    /**
+     * 科室编码
+     */
+    private String behDeptId;
+    /**
+     * 科室
+     */
+    @Excel(name = "科室", width = 50, orderNum = "5")
+    private String behDeptName;
+    /**
+     * 出院日期
+     */
+    @Excel(name = "出院日期", format = "yyyy-MM-dd", width = 30, orderNum = "6")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+    /**
+     * 入院日期
+     */
+    @Excel(name = "入院日期", format = "yyyy-MM-dd", width = 30, orderNum = "7")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+    /**
+     * 住院天数
+     */
+    @Excel(name = "住院天数", width = 15, orderNum = "8")
+    private String behospitalDayNum;
+    /**
+     * 住院费用
+     */
+    @Excel(name = "住院费用", width = 15, orderNum = "9")
+    private String totleFee;
+}

+ 44 - 0
src/main/java/com/diagbot/dto/ReBeHosMergeDTO.java

@@ -0,0 +1,44 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/16 14:49
+ */
+@Getter
+@Setter
+public class ReBeHosMergeDTO {
+    private String fileCode;
+    private String diagnose;
+    private String name;
+    private String sex;
+    private String behDeptId;
+    private String behDeptName;
+    private String behospitalCode;
+    private Double scoreRes;
+    private String level;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date behospitalDate;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date leaveHospitalDate;
+    private String lastBehDeptId;
+    private String lastBehDeptName;
+    private String lastBehospitalCode;
+    private Double lastScoreRes;
+    private String lastLevel;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date lastBehospitalDate;
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date lastLeaveHospitalDate;
+    private Integer diffDays;
+    private String totleFee;
+    private String behospitalDayNum;
+    private String lastTotleFee;
+    private String lastBehospitalDayNum;
+}

+ 10 - 0
src/main/java/com/diagbot/entity/MedCheckInfo.java

@@ -79,6 +79,16 @@ public class MedCheckInfo implements Serializable {
      */
     private Integer status;
 
+    private Integer checkType;
+
+    public Integer getCheckType() {
+        return checkType;
+    }
+
+    public void setCheckType(Integer checkType) {
+        this.checkType = checkType;
+    }
+
     public Long getId() {
         return id;
     }

+ 258 - 0
src/main/java/com/diagbot/entity/MedLisInfo.java

@@ -0,0 +1,258 @@
+package com.diagbot.entity;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public class MedLisInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 报告单号
+     */
+    private String repNo;
+
+    /**
+     * 医院ID
+     */
+    private String hospitalId;
+
+    /**
+     * 住院病人ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 报告类型代码
+     */
+    private String repType;
+
+    /**
+     * 报告名称
+     */
+    private String repName;
+
+    /**
+     * 检查类型名称
+     */
+    private String repTypeName;
+
+    /**
+     * 标本名称
+     */
+    private String slideType;
+
+    /**
+     * 发布时间
+     */
+    private String repDate;
+
+    /**
+     * 报告检查时间
+     */
+    private String checkDate;
+
+    /**
+     * 申请医生
+     */
+    private String applyDoctor;
+
+    /**
+     * 开单科室代码
+     */
+    private String deptId;
+
+    /**
+     * 开单科室名称
+     */
+    private String deptName;
+
+    /**
+     * 报告单状态
+     */
+    private String registerFlag;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    public String getRepNo() {
+        return repNo;
+    }
+
+    public void setRepNo(String repNo) {
+        this.repNo = repNo;
+    }
+    public String getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(String hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getRepType() {
+        return repType;
+    }
+
+    public void setRepType(String repType) {
+        this.repType = repType;
+    }
+    public String getRepName() {
+        return repName;
+    }
+
+    public void setRepName(String repName) {
+        this.repName = repName;
+    }
+    public String getRepTypeName() {
+        return repTypeName;
+    }
+
+    public void setRepTypeName(String repTypeName) {
+        this.repTypeName = repTypeName;
+    }
+    public String getSlideType() {
+        return slideType;
+    }
+
+    public void setSlideType(String slideType) {
+        this.slideType = slideType;
+    }
+    public String getRepDate() {
+        return repDate;
+    }
+
+    public void setRepDate(String repDate) {
+        this.repDate = repDate;
+    }
+    public String getCheckDate() {
+        return checkDate;
+    }
+
+    public void setCheckDate(String checkDate) {
+        this.checkDate = checkDate;
+    }
+    public String getApplyDoctor() {
+        return applyDoctor;
+    }
+
+    public void setApplyDoctor(String applyDoctor) {
+        this.applyDoctor = applyDoctor;
+    }
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public String getRegisterFlag() {
+        return registerFlag;
+    }
+
+    public void setRegisterFlag(String registerFlag) {
+        this.registerFlag = registerFlag;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "MedLisInfo{" +
+            "repNo=" + repNo +
+            ", hospitalId=" + hospitalId +
+            ", behospitalCode=" + behospitalCode +
+            ", repType=" + repType +
+            ", repName=" + repName +
+            ", repTypeName=" + repTypeName +
+            ", slideType=" + slideType +
+            ", repDate=" + repDate +
+            ", checkDate=" + checkDate +
+            ", applyDoctor=" + applyDoctor +
+            ", deptId=" + deptId +
+            ", deptName=" + deptName +
+            ", registerFlag=" + registerFlag +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 31 - 18
src/main/java/com/diagbot/entity/MedLisResult.java

@@ -1,15 +1,15 @@
 package com.diagbot.entity;
 
+import java.time.LocalDateTime;
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * <p>
  * 
  * </p>
  *
- * @author gaodm
- * @since 2020-06-30
+ * @author zhoutg
+ * @since 2020-08-04
  */
 public class MedLisResult implements Serializable {
 
@@ -18,12 +18,12 @@ public class MedLisResult implements Serializable {
     /**
      * 报告单号
      */
-    private String reptNo;
+    private String repNo;
 
     /**
      * 医院ID
      */
-    private Long hospitalId;
+    private Integer hospitalId;
 
     /**
      * 住院病人ID
@@ -45,6 +45,11 @@ public class MedLisResult implements Serializable {
      */
     private String result;
 
+    /**
+     * 参考值
+     */
+    private String reference;
+
     /**
      * 最小参考值
      */
@@ -78,12 +83,12 @@ public class MedLisResult implements Serializable {
     /**
      * 记录创建时间
      */
-    private Date gmtCreate;
+    private LocalDateTime gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private Date gmtModified;
+    private LocalDateTime gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -95,18 +100,18 @@ public class MedLisResult implements Serializable {
      */
     private String modifier;
 
-    public String getReptNo() {
-        return reptNo;
+    public String getRepNo() {
+        return repNo;
     }
 
-    public void setReptNo(String reptNo) {
-        this.reptNo = reptNo;
+    public void setRepNo(String repNo) {
+        this.repNo = repNo;
     }
-    public Long getHospitalId() {
+    public Integer getHospitalId() {
         return hospitalId;
     }
 
-    public void setHospitalId(Long hospitalId) {
+    public void setHospitalId(Integer hospitalId) {
         this.hospitalId = hospitalId;
     }
     public String getBehospitalCode() {
@@ -137,6 +142,13 @@ public class MedLisResult implements Serializable {
     public void setResult(String result) {
         this.result = result;
     }
+    public String getReference() {
+        return reference;
+    }
+
+    public void setReference(String reference) {
+        this.reference = reference;
+    }
     public String getReferenceMin() {
         return referenceMin;
     }
@@ -179,18 +191,18 @@ public class MedLisResult implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public Date getGmtCreate() {
+    public LocalDateTime getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(Date gmtCreate) {
+    public void setGmtCreate(LocalDateTime gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public Date getGmtModified() {
+    public LocalDateTime getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(Date gmtModified) {
+    public void setGmtModified(LocalDateTime gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {
@@ -211,12 +223,13 @@ public class MedLisResult implements Serializable {
     @Override
     public String toString() {
         return "MedLisResult{" +
-            "reptNo=" + reptNo +
+            "repNo=" + repNo +
             ", hospitalId=" + hospitalId +
             ", behospitalCode=" + behospitalCode +
             ", itemCode=" + itemCode +
             ", itemName=" + itemName +
             ", result=" + result +
+            ", reference=" + reference +
             ", referenceMin=" + referenceMin +
             ", referenceMax=" + referenceMax +
             ", unit=" + unit +

+ 297 - 0
src/main/java/com/diagbot/entity/MedPacsInfo.java

@@ -0,0 +1,297 @@
+package com.diagbot.entity;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public class MedPacsInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 报告单号
+     */
+    private String repNo;
+
+    /**
+     * 医院ID
+     */
+    private String hospitalId;
+
+    /**
+     * 住院病人ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 报告名称
+     */
+    private String repName;
+
+    /**
+     * 报告类型代码
+     */
+    private String repType;
+
+    /**
+     * 检查类型名称
+     */
+    private String repTypeName;
+
+    /**
+     * 检查部位
+     */
+    private String part;
+
+    /**
+     * 发布时间
+     */
+    private String repDate;
+
+    /**
+     * 报告检查时间
+     */
+    private String checkDate;
+
+    /**
+     * 申请医生
+     */
+    private String applyDoctor;
+
+    /**
+     * 开单科室代码
+     */
+    private String deptId;
+
+    /**
+     * 开单科室名称
+     */
+    private String deptName;
+
+    /**
+     * 报告单状态
+     */
+    private String registerFlag;
+
+    /**
+     * 报告医生
+     */
+    private String reportDoctor;
+
+    /**
+     * 报告审核医生
+     */
+    private String checker;
+
+    /**
+     * 云胶片地址
+     */
+    private String yjpdz;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    public String getRepNo() {
+        return repNo;
+    }
+
+    public void setRepNo(String repNo) {
+        this.repNo = repNo;
+    }
+    public String getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(String hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getRepName() {
+        return repName;
+    }
+
+    public void setRepName(String repName) {
+        this.repName = repName;
+    }
+    public String getRepType() {
+        return repType;
+    }
+
+    public void setRepType(String repType) {
+        this.repType = repType;
+    }
+    public String getRepTypeName() {
+        return repTypeName;
+    }
+
+    public void setRepTypeName(String repTypeName) {
+        this.repTypeName = repTypeName;
+    }
+    public String getPart() {
+        return part;
+    }
+
+    public void setPart(String part) {
+        this.part = part;
+    }
+    public String getRepDate() {
+        return repDate;
+    }
+
+    public void setRepDate(String repDate) {
+        this.repDate = repDate;
+    }
+    public String getCheckDate() {
+        return checkDate;
+    }
+
+    public void setCheckDate(String checkDate) {
+        this.checkDate = checkDate;
+    }
+    public String getApplyDoctor() {
+        return applyDoctor;
+    }
+
+    public void setApplyDoctor(String applyDoctor) {
+        this.applyDoctor = applyDoctor;
+    }
+    public String getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(String deptId) {
+        this.deptId = deptId;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public String getRegisterFlag() {
+        return registerFlag;
+    }
+
+    public void setRegisterFlag(String registerFlag) {
+        this.registerFlag = registerFlag;
+    }
+    public String getReportDoctor() {
+        return reportDoctor;
+    }
+
+    public void setReportDoctor(String reportDoctor) {
+        this.reportDoctor = reportDoctor;
+    }
+    public String getChecker() {
+        return checker;
+    }
+
+    public void setChecker(String checker) {
+        this.checker = checker;
+    }
+    public String getYjpdz() {
+        return yjpdz;
+    }
+
+    public void setYjpdz(String yjpdz) {
+        this.yjpdz = yjpdz;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "MedPacsInfo{" +
+            "repNo=" + repNo +
+            ", hospitalId=" + hospitalId +
+            ", behospitalCode=" + behospitalCode +
+            ", repName=" + repName +
+            ", repType=" + repType +
+            ", repTypeName=" + repTypeName +
+            ", part=" + part +
+            ", repDate=" + repDate +
+            ", checkDate=" + checkDate +
+            ", applyDoctor=" + applyDoctor +
+            ", deptId=" + deptId +
+            ", deptName=" + deptName +
+            ", registerFlag=" + registerFlag +
+            ", reportDoctor=" + reportDoctor +
+            ", checker=" + checker +
+            ", yjpdz=" + yjpdz +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 18 - 18
src/main/java/com/diagbot/entity/MedPacsResult.java

@@ -1,15 +1,15 @@
 package com.diagbot.entity;
 
+import java.time.LocalDateTime;
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * <p>
  * 
  * </p>
  *
- * @author gaodm
- * @since 2020-06-30
+ * @author zhoutg
+ * @since 2020-08-04
  */
 public class MedPacsResult implements Serializable {
 
@@ -18,12 +18,12 @@ public class MedPacsResult implements Serializable {
     /**
      * 报告单号
      */
-    private String reptNo;
+    private String repNo;
 
     /**
      * 医院ID
      */
-    private Long hospitalId;
+    private Integer hospitalId;
 
     /**
      * 住院病人ID
@@ -88,12 +88,12 @@ public class MedPacsResult implements Serializable {
     /**
      * 记录创建时间
      */
-    private Date gmtCreate;
+    private LocalDateTime gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private Date gmtModified;
+    private LocalDateTime gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -105,18 +105,18 @@ public class MedPacsResult implements Serializable {
      */
     private String modifier;
 
-    public String getReptNo() {
-        return reptNo;
+    public String getRepNo() {
+        return repNo;
     }
 
-    public void setReptNo(String reptNo) {
-        this.reptNo = reptNo;
+    public void setRepNo(String repNo) {
+        this.repNo = repNo;
     }
-    public Long getHospitalId() {
+    public Integer getHospitalId() {
         return hospitalId;
     }
 
-    public void setHospitalId(Long hospitalId) {
+    public void setHospitalId(Integer hospitalId) {
         this.hospitalId = hospitalId;
     }
     public String getBehospitalCode() {
@@ -203,18 +203,18 @@ public class MedPacsResult implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public Date getGmtCreate() {
+    public LocalDateTime getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(Date gmtCreate) {
+    public void setGmtCreate(LocalDateTime gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public Date getGmtModified() {
+    public LocalDateTime getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(Date gmtModified) {
+    public void setGmtModified(LocalDateTime gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {
@@ -235,7 +235,7 @@ public class MedPacsResult implements Serializable {
     @Override
     public String toString() {
         return "MedPacsResult{" +
-            "reptNo=" + reptNo +
+            "repNo=" + repNo +
             ", hospitalId=" + hospitalId +
             ", behospitalCode=" + behospitalCode +
             ", reptName=" + reptName +

+ 284 - 158
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -28,7 +28,9 @@ import com.diagbot.entity.HomeOperationInfo;
 import com.diagbot.entity.HomePage;
 import com.diagbot.entity.MedCheckInfo;
 import com.diagbot.entity.MedCrisisInfo;
+import com.diagbot.entity.MedLisInfo;
 import com.diagbot.entity.MedLisResult;
+import com.diagbot.entity.MedPacsInfo;
 import com.diagbot.entity.MedPacsResult;
 import com.diagbot.entity.MedicalRecord;
 import com.diagbot.enums.IsDeleteEnum;
@@ -63,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;
@@ -119,8 +120,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     @Autowired
     private FilterFacade filterFacade;
     @Autowired
+    MedLisInfoFacade medLisInfoFacade;
+    @Autowired
     MedLisResultFacade medLisResultFacade;
     @Autowired
+    MedPacsInfoFacade medPacsInfoFacade;
+    @Autowired
     MedPacsResultFacade medPacsResultFacade;
     @Autowired
     MedCrisisInfoFacade medCrisisInfoFacade;
@@ -183,6 +188,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
             mapAll.put("behospital_code", getDetailVO.getBehospitalCode());
             mapAll.put("hospital_id", hospitalId);
+            mapAll.put("check_type", 0);
             QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
             medCheckInfoQuerys.allEq(mapAll);
             int count = medCheckInfoFacade.count(medCheckInfoQuerys);
@@ -191,6 +197,20 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             } else {
                 res.put("checkStatus", 0);
             }
+            //增加该病案首页是否核查状态
+            Map<String, Object> mapAllMr = new HashMap<String, Object>();
+            mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
+            mapAllMr.put("hospital_id", hospitalId);
+            mapAllMr.put("check_type", 1);
+            QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
+            medCheckInfoMr.allEq(mapAllMr);
+            int countMr = medCheckInfoFacade.count(medCheckInfoMr);
+            if (countMr > 0) {
+                res.put("mrStatus", 1);
+            } else {
+                res.put("mrStatus", 0);
+            }
         }
 
         // 获取提示信息
@@ -276,20 +296,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 .eq("behospital_code", analyzeVO.getBehospitalCode())
         );
 
-        // 化验
-        List<MedLisResult> medLisResultList = medLisResultFacade.list(new QueryWrapper<MedLisResult>()
-                .eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("hospital_id", hospitalId)
-                .eq("behospital_code", analyzeVO.getBehospitalCode())
-        );
-
-        // 辅检
-        List<MedPacsResult> medPacsResultList = medPacsResultFacade.list(new QueryWrapper<MedPacsResult>()
-                .eq("is_deleted", IsDeleteEnum.N.getKey())
-                .eq("hospital_id", hospitalId)
-                .eq("behospital_code", analyzeVO.getBehospitalCode())
-        );
-
         // 获取病案首页
         HomePage homePage = homePageFacade.getOne(new QueryWrapper<HomePage>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -345,6 +351,11 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             queryVo.setBehospitalInfo(behospitalInfoList.get(0));
         }
 
+        // 化验
+        List<MedLisResult> medLisResultList = getMedLisResultList(behospitalInfoList.get(0));
+        // 辅检
+        List<MedPacsResult> medPacsResultList = getMedPacsResultList(behospitalInfoList.get(0));
+
         // 会诊记录
         addDataWithKey("会诊", recMap, medrecVoList,
                 Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
@@ -412,6 +423,101 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return queryVo;
     }
 
+    private List<MedLisResult> getMedLisResultList(BehospitalInfo behospitalInfo) {
+        String behospitalDate = null, leaveHospitalDate = null;
+        try {
+            behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
+            leaveHospitalDate = DateUtil.format(behospitalInfo.getLeaveHospitalDate(), DateUtil.DATE_TIME_FORMAT);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+        if (StringUtil.isBlank(behospitalDate)) {
+            return null;
+        }
+        List<MedLisResult> medLisResultList = null;
+        QueryWrapper<MedLisInfo> medLisInfoQe = new QueryWrapper<>();
+        medLisInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medLisInfoQe.eq("hospital_id", behospitalInfo.getHospitalId());
+        medLisInfoQe.like("behospital_code", behospitalInfo.getFileCode());
+        medLisInfoQe.isNotNull("rep_name");
+        medLisInfoQe.isNotNull("check_date");
+        medLisInfoQe.apply("check_date!=''");
+        medLisInfoQe.apply(
+                "date_format (check_date,'%Y-%m-%d %H:%i:%s') >= date_format('"
+                        + behospitalDate
+                        + "','%Y-%m-%d %H:%i:%s')"
+        );
+        if (StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
+                && behospitalInfo.getIsPlacefile().equals("1")
+                && StringUtil.isNotBlank(leaveHospitalDate)) {
+            medLisInfoQe.apply(
+                    "date_format (check_date,'%Y-%m-%d %H:%i:%s') <= date_format('"
+                            + leaveHospitalDate
+                            + "','%Y-%m-%d %H:%i:%s')"
+            );
+        }
+        medLisInfoQe.select("rep_no", "rep_name");
+        List<MedLisInfo> medLisInfoList = medLisInfoFacade.list(medLisInfoQe);
+        if (ListUtil.isNotEmpty(medLisInfoList)) {
+            Map<String, String> repNoRepNameMap = medLisInfoList.stream().collect(Collectors.toMap(i -> i.getRepNo(), i -> i.getRepName()));
+            medLisResultList = medLisResultFacade.list(new QueryWrapper<MedLisResult>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", behospitalInfo.getHospitalId())
+                    .like("behospital_code", behospitalInfo.getFileCode())
+                    .isNotNull("item_name")
+                    .in("rep_no", medLisInfoList.stream().map(i -> i.getRepNo()).collect(Collectors.toList()))
+            );
+            medLisResultList.forEach(medLisResult -> {
+                medLisResult.setItemName(repNoRepNameMap.get(medLisResult.getRepNo()) + "=" + medLisResult.getItemName());
+            });
+        }
+        return medLisResultList;
+    }
+
+    private List<MedPacsResult> getMedPacsResultList(BehospitalInfo behospitalInfo) {
+        String behospitalDate = null, leaveHospitalDate = null;
+        try {
+            behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
+            leaveHospitalDate = DateUtil.format(behospitalInfo.getLeaveHospitalDate(), DateUtil.DATE_TIME_FORMAT);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+        if (StringUtil.isBlank(behospitalDate)) {
+            return null;
+        }
+        List<MedPacsResult> medPacsResultList = null;
+        QueryWrapper<MedPacsInfo> medPacsInfoQe = new QueryWrapper<>();
+        medPacsInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medPacsInfoQe.eq("hospital_id", behospitalInfo.getHospitalId());
+        medPacsInfoQe.like("behospital_code", behospitalInfo.getFileCode());
+        medPacsInfoQe.isNotNull("check_date");
+        medPacsInfoQe.apply("check_date!=''");
+        medPacsInfoQe.apply(
+                "date_format (check_date,'%Y-%m-%d %H:%i:%s') >= date_format('"
+                        + behospitalDate
+                        + "','%Y-%m-%d %H:%i:%s')"
+        );
+        if (StringUtil.isNotBlank(behospitalInfo.getIsPlacefile())
+                && behospitalInfo.getIsPlacefile().equals("1")
+                && StringUtil.isNotBlank(leaveHospitalDate)) {
+            medPacsInfoQe.apply(
+                    "date_format (check_date,'%Y-%m-%d %H:%i:%s') <= date_format('"
+                            + leaveHospitalDate
+                            + "','%Y-%m-%d %H:%i:%s')"
+            );
+        }
+        List<MedPacsInfo> medPacsInfoList = medPacsInfoFacade.list(medPacsInfoQe);
+        if (ListUtil.isNotEmpty(medPacsInfoList)) {
+            medPacsResultList = medPacsResultFacade.list(new QueryWrapper<MedPacsResult>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", behospitalInfo.getHospitalId())
+                    .like("behospital_code", behospitalInfo.getFileCode())
+                    .in("rep_no", medPacsInfoList.stream().map(i -> i.getRepNo()).collect(Collectors.toList()))
+            );
+        }
+        return medPacsResultList;
+    }
+
     /**
      * 评分-终末质控
      *
@@ -440,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);
@@ -948,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);
+        // 对codeList 和 codeToInfoMap进行赋值
+        setCodeData(outputInfo, codeList, codeToInfoMap);
 
-        //保存
-        // Map<String, Object> pageMap = outputInfo.getPageData();
-        // 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());
+        // 如果是1,说明已是终末质控,不再保存质控结果数据;如果是0,则保存质控结果数据
+        if ("0".equals(analyzeRunVO.getIsPlacefile())) {
+            // 计算分值并保存结果至数据库
+            Map<String, Object> resMap = calScoreAndSave(outputInfo, codeList, codeToInfoMap, analyzeVO);
+        }
 
         // 返回缺陷提示信息
         List<MsgDTO> msgDTOList = new ArrayList<>();
@@ -1040,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) {
@@ -1064,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);
     }
@@ -1092,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);
     }
@@ -1121,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;
+    }
 }

+ 75 - 1
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -17,6 +17,7 @@ import com.diagbot.dto.LevelStatisticsDTO;
 import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
+import com.diagbot.dto.ReBeHosDTO;
 import com.diagbot.dto.UnModifyMRDTO;
 import com.diagbot.entity.SysHospitalSet;
 import com.diagbot.exception.CommonErrorCode;
@@ -32,6 +33,7 @@ import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -333,7 +335,7 @@ public class ConsoleExportFacade {
 
         List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
         for (String valueStr : columnSet) {
-            if(StringUtil.isBlank(valueStr)){
+            if (StringUtil.isBlank(valueStr)) {
                 continue;
             }
             String[] keyValue = valueStr.split("--");
@@ -351,4 +353,76 @@ public class ConsoleExportFacade {
         String fileName = "未整改病历统计.xls";
         ExcelUtils.exportExcelDynamicCol(colList, data, null, "sheet1", fileName, response);
     }
+
+    /**
+     * 31天再入院统计导出
+     *
+     * @param reBeHosPageVO
+     * @return
+     */
+    public void reHos31DaysPageExport(HttpServletResponse response, ReBeHosPageVO reBeHosPageVO) {
+        reBeHosPageVO.setCurrent(1L);
+        reBeHosPageVO.setSize(Long.MAX_VALUE);
+        reBeHosPageVO.setSearchCount(false);
+        IPage<ReBeHosDTO> page = consoleFacade.reHos31DaysPage(reBeHosPageVO);
+        List<ReBeHosDTO> records = page.getRecords();
+        String fileName = "31天再入院统计详情.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", ReBeHosDTO.class, fileName, response);
+    }
+
+    /**
+     * 病案首页改善率质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void hmImproveMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔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天");
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.hmImproveMRPageExport(qcResultShortPageVO);
+        String fileName = "病案首页改善率评分病历导出.xls";
+        ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void qcCheckMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔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天");
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.qcCheckMRPageExport(qcResultShortPageVO);
+        String fileName = "质控核查病历导出.xls";
+        ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
 }

+ 140 - 41
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -2,6 +2,7 @@ package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.aggregate.AverageStatisticsAggregate;
 import com.diagbot.aggregate.MrStatisticsAggregate;
 import com.diagbot.aggregate.ResultStatisticsAggregate;
@@ -19,12 +20,16 @@ import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.dto.ReBeHosDTO;
+import com.diagbot.dto.ReBeHosDetailDTO;
+import com.diagbot.dto.ReBeHosMergeDTO;
 import com.diagbot.dto.UnModifyMRDTO;
 import com.diagbot.dto.UnModifyMRDetailDTO;
 import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.entity.SysHospitalSet;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ClassUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
@@ -37,8 +42,10 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import com.google.common.collect.Lists;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -801,6 +808,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;
     }
 
@@ -817,46 +831,14 @@ public class ConsoleFacade {
         retMap.put("完整率", null);
         retMap.put("改善率", null);
         filterFacade.filterVOSet(filterVO);
-        HomePageNumDTO qcNumDTO = behospitalInfoFacade.homePageQcPercent(filterVO);
-        HomePageNumDTO emptyNumDTO = behospitalInfoFacade.hmEmptyEntryPercent(filterVO);
-        HomePageImproveDTO improveDTO = behospitalInfoFacade.homePageImproveCount(filterVO);
-
-        //合格率
-        NumDTO pass = new NumDTO();
-        pass.setName("合格率");
-        pass.setNum(qcNumDTO.getFirstLevelNum());
-        pass.setTotleNum(qcNumDTO.getMrNum());
-        pass.setPercent(qcNumDTO.getFirstLevelPercent());
-        pass.setPercentStr(qcNumDTO.getFirstLevelPercentStr());
-
-        //不合格率
-        NumDTO unPass = new NumDTO();
-        unPass.setName("不合格率");
-        unPass.setNum(qcNumDTO.getSecondLevelNum());
-        unPass.setTotleNum(qcNumDTO.getMrNum());
-        unPass.setPercent(qcNumDTO.getSecondLevelPercent());
-        unPass.setPercentStr(qcNumDTO.getSecondLevelPercentStr());
-
-        //完整率
-        NumDTO full = new NumDTO();
-        full.setName("完整率");
-        full.setNum(emptyNumDTO.getEntryTotleNum() - emptyNumDTO.getEmptyNum());
-        full.setTotleNum(emptyNumDTO.getEntryTotleNum());
-        full.setPercent(emptyNumDTO.getEmptyPercent());
-        full.setPercentStr(emptyNumDTO.getEmptyPercentStr());
-
-        //改善率
-        NumDTO improve = new NumDTO();
-        improve.setName("改善率");
-        improve.setNum(improveDTO.getImproveNum());
-        improve.setTotleNum(improveDTO.getHomePageMRNum());
-        improve.setPercent(improveDTO.getImprovePercent());
-        improve.setPercentStr(improveDTO.getImprovePercentStr());
-
-        retMap.put("合格率", pass);
-        retMap.put("不合格率", unPass);
-        retMap.put("完整率", full);
-        retMap.put("改善率", improve);
+        try {
+            Map<String, Object> invokeParams = new HashMap<>();
+            invokeParams.put("filterVO", filterVO);
+            retMap
+                    = dataBeanAggregateQueryFacade.get("setAllHomePage", invokeParams, Map.class);
+        } catch (Exception e) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
+        }
         return retMap;
     }
 
@@ -1160,7 +1142,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();
@@ -1222,4 +1206,119 @@ public class ConsoleFacade {
         filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
         return behospitalInfoFacade.unModifyMRPage(qcResultShortPageVO);
     }
+
+    /**
+     * 31天再入院详情页
+     *
+     * @param reBeHosPageVO
+     * @return
+     */
+    public IPage<ReBeHosDTO> reHos31DaysPage(ReBeHosPageVO reBeHosPageVO) {
+        filterFacade.reBeHosPageVOSet(reBeHosPageVO);
+        IPage<ReBeHosMergeDTO> page = behospitalInfoFacade.reHos31DaysPage(reBeHosPageVO);
+        List<ReBeHosMergeDTO> records = page.getRecords();
+        IPage<ReBeHosDTO> retPage = new Page<>();
+        BeanUtil.copyProperties(page, retPage);
+        List<ReBeHosDTO> retRecords = Lists.newLinkedList();
+        if (ListUtil.isNotEmpty(records)) {
+            for (ReBeHosMergeDTO record : records) {
+                ReBeHosDTO retRecord = new ReBeHosDTO();
+                BeanUtil.copyProperties(record, retRecord);
+                List<ReBeHosDetailDTO> details = Lists.newLinkedList();
+                ReBeHosDetailDTO detailRecord = new ReBeHosDetailDTO();
+                BeanUtil.copyProperties(record, detailRecord);
+                details.add(detailRecord);
+                ReBeHosDetailDTO lastDetailRecord = new ReBeHosDetailDTO();
+                lastDetailRecord.setName(record.getName());
+                lastDetailRecord.setBehDeptId(record.getLastBehDeptId());
+                lastDetailRecord.setBehDeptName(record.getBehDeptName());
+                lastDetailRecord.setBehospitalCode(record.getLastBehospitalCode());
+                lastDetailRecord.setBehospitalDate(record.getLastBehospitalDate());
+                lastDetailRecord.setLeaveHospitalDate(record.getLastLeaveHospitalDate());
+                lastDetailRecord.setLevel(record.getLastLevel());
+                lastDetailRecord.setScoreRes(record.getLastScoreRes());
+                lastDetailRecord.setBehospitalDayNum(record.getLastBehospitalDayNum());
+                lastDetailRecord.setTotleFee(record.getLastTotleFee());
+                details.add(lastDetailRecord);
+                retRecord.setDetails(details);
+                retRecords.add(retRecord);
+            }
+        }
+        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;
+    }
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        return behospitalInfoFacade.hmImproveMRPage(qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        return behospitalInfoFacade.qcCheckMRPage(qcResultShortPageVO);
+    }
 }

+ 13 - 0
src/main/java/com/diagbot/facade/FilterFacade.java

@@ -13,6 +13,7 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
@@ -278,4 +279,16 @@ public class FilterFacade {
         filterUnModifyMRVO.setHospitalId(hospitalId);
         filterUnModifyMRVO.setUserId(Long.valueOf(userId));
     }
+
+    /**
+     * 31天再入院参数拼接
+     *
+     * @param reBeHosPageVO
+     */
+    public void reBeHosPageVOSet(ReBeHosPageVO reBeHosPageVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        reBeHosPageVO.setHospitalId(hospitalId);
+        reBeHosPageVO.setUserId(Long.valueOf(userId));
+    }
 }

+ 14 - 1
src/main/java/com/diagbot/facade/MedCheckInfoFacade.java

@@ -3,6 +3,7 @@ package com.diagbot.facade;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.diagbot.entity.MedCheckInfo;
+import com.diagbot.entity.SysUser;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -10,6 +11,7 @@ import com.diagbot.service.impl.MedCheckInfoServiceImpl;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.MedCheckInfoAddVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
@@ -24,6 +26,9 @@ import java.util.Map;
 @Component
 public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
 
+    @Autowired
+    SysUserFacade sysUserFacade;
+
     /**
      * @param medCheckInfoAddVO
      * @return
@@ -33,12 +38,18 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
         Date now = DateUtil.now();
         //获取人员id 和 该人员的医院id
         Long hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
-        String principleName = SysUserUtils.getCurrentPrinciple();
         Long principleId = Long.valueOf(SysUserUtils.getCurrentPrincipleID());
+        QueryWrapper<SysUser> userQuer = new QueryWrapper<>();
+        userQuer.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id",principleId)
+                .eq("status",1);
+        SysUser user = sysUserFacade.getOne(userQuer);
+        String principleName = user.getLinkman();
         Map<String, Object> mapAll = new HashMap<String, Object>();
         mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
         mapAll.put("behospital_code", medCheckInfoAddVO.getBehospitalCode());
         mapAll.put("hospital_id", hospitalId);
+        mapAll.put("check_type", medCheckInfoAddVO.getCheckType());
         QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
         medCheckInfoQuerys.allEq(mapAll);
         MedCheckInfo data = this.getOne(medCheckInfoQuerys, false);
@@ -58,6 +69,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
             medCheckInfo.setCheckId(principleId);
             medCheckInfo.setCheckName(principleName);
             medCheckInfo.setCheckTime(now);
+            medCheckInfo.setCheckType(medCheckInfoAddVO.getCheckType());
             medCheckInfo.setStatus(medCheckInfoAddVO.getCheckStatus());
             medCheckInfo.setBehospitalCode(medCheckInfoAddVO.getBehospitalCode());
             res = this.save(medCheckInfo);
@@ -89,6 +101,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
             medCheckInfo.setCheckId(principleId);
             medCheckInfo.setCheckName(principleName);
             medCheckInfo.setCheckTime(now);
+            medCheckInfo.setCheckType(medCheckInfoAddVO.getCheckType());
             medCheckInfo.setStatus(medCheckInfoAddVO.getCheckStatus());
             medCheckInfo.setBehospitalCode(medCheckInfoAddVO.getBehospitalCode());
             res = this.save(medCheckInfo);

+ 13 - 0
src/main/java/com/diagbot/facade/MedLisInfoFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.MedLisInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/7/28 15:48
+ */
+@Component
+public class MedLisInfoFacade extends MedLisInfoServiceImpl {
+}

+ 13 - 0
src/main/java/com/diagbot/facade/MedPacsInfoFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.MedPacsInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2020/7/28 15:49
+ */
+@Component
+public class MedPacsInfoFacade extends MedPacsInfoServiceImpl {
+}

+ 19 - 1
src/main/java/com/diagbot/facade/SysUserPagesetFacade.java

@@ -96,4 +96,22 @@ public class SysUserPagesetFacade extends SysUserPagesetServiceImpl {
         return sysUserPagesetService.saveBatch(saveList);
     }
 
-}
+    /**
+     * 获取默认列设置
+     *
+     * @param sysUserPagesetQueryVO
+     * @return
+     */
+    public List<SysUserPagesetDTO> getDefaultPageSet(SysUserPagesetQueryVO sysUserPagesetQueryVO) {
+        List<SysUserPagesetDTO> sysUserPagesetDTOList = new ArrayList<>();
+        List<SysUserPageset> sysUserPagesetListDefault = sysUserPagesetService.list(
+                new QueryWrapper<SysUserPageset>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("user_id", -1)
+                        .eq("page_type", sysUserPagesetQueryVO.getPageType())
+                        .orderByAsc("order_no")
+        );
+        sysUserPagesetDTOList = BeanUtil.listCopyTo(sysUserPagesetListDefault, SysUserPagesetDTO.class);
+        return sysUserPagesetDTOList;
+    }
+}

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

@@ -13,6 +13,7 @@ import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.MsgDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.dto.ReBeHosMergeDTO;
 import com.diagbot.dto.UnModifyMRDetailDTO;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.vo.AnalyzeCodeVO;
@@ -27,6 +28,7 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import com.diagbot.vo.TaskVO;
 import org.apache.ibatis.annotations.Param;
 
@@ -352,5 +354,63 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @param qcResultShortPageVO
      * @return
      */
+
     public List<ExportExcelDTO> unModifyMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 31天再入院详情页
+     *
+     * @param reBeHosPageVO
+     * @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);
+
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 病案首页改善率质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> hmImproveMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> qcCheckMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 }

+ 16 - 0
src/main/java/com/diagbot/mapper/MedLisInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedLisInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public interface MedLisInfoMapper extends BaseMapper<MedLisInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/MedPacsInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedPacsInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public interface MedPacsInfoMapper extends BaseMapper<MedPacsInfo> {
+
+}

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

@@ -13,6 +13,7 @@ import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.MsgDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.dto.ReBeHosMergeDTO;
 import com.diagbot.dto.UnModifyMRDetailDTO;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.vo.AnalyzeCodeVO;
@@ -27,6 +28,7 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import com.diagbot.vo.TaskVO;
 import org.apache.ibatis.annotations.Param;
 
@@ -346,4 +348,60 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      * @return
      */
     public List<ExportExcelDTO> unModifyMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 31天再入院详情页
+     *
+     * @param reBeHosPageVO
+     * @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);
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 病案首页改善率质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> hmImproveMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> qcCheckMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedLisInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public interface MedLisInfoService extends IService<MedLisInfo> {
+
+}

+ 2 - 2
src/main/java/com/diagbot/service/MedLisResultService.java

@@ -8,8 +8,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  *  服务类
  * </p>
  *
- * @author gaodm
- * @since 2020-06-30
+ * @author zhoutg
+ * @since 2020-08-04
  */
 public interface MedLisResultService extends IService<MedLisResult> {
 

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedPacsInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+public interface MedPacsInfoService extends IService<MedPacsInfo> {
+
+}

+ 2 - 2
src/main/java/com/diagbot/service/MedPacsResultService.java

@@ -8,8 +8,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  *  服务类
  * </p>
  *
- * @author gaodm
- * @since 2020-06-30
+ * @author zhoutg
+ * @since 2020-08-04
  */
 public interface MedPacsResultService extends IService<MedPacsResult> {
 

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

@@ -13,6 +13,7 @@ import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.MsgDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.dto.ReBeHosMergeDTO;
 import com.diagbot.dto.UnModifyMRDetailDTO;
 import com.diagbot.entity.BehospitalInfo;
 import com.diagbot.mapper.BehospitalInfoMapper;
@@ -29,6 +30,7 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import com.diagbot.vo.TaskVO;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
@@ -471,4 +473,81 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     public List<ExportExcelDTO> unModifyMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
         return baseMapper.unModifyMRPageExport((qcResultShortPageVO));
     }
+
+    /**
+     * 31天再入院详情页
+     *
+     * @param reBeHosPageVO
+     * @return
+     */
+    @Override
+    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);
+    }
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @Override
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        return baseMapper.hmImproveMRPage(qcResultShortPageVO);
+    }
+
+    /**
+     * 病案首页改善率质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @Override
+    public List<ExportExcelDTO> hmImproveMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        return baseMapper.hmImproveMRPageExport(qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @Override
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        return baseMapper.qcCheckMRPage(qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @Override
+    public List<ExportExcelDTO> qcCheckMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        return baseMapper.qcCheckMRPageExport(qcResultShortPageVO);
+    }
 }

+ 20 - 0
src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedLisInfo;
+import com.diagbot.mapper.MedLisInfoMapper;
+import com.diagbot.service.MedLisInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+@Service
+public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisInfo> implements MedLisInfoService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedPacsInfo;
+import com.diagbot.mapper.MedPacsInfoMapper;
+import com.diagbot.service.MedPacsInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+@Service
+public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPacsInfo> implements MedPacsInfoService {
+
+}

+ 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";
 }

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

@@ -92,8 +92,16 @@ 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;
+    private String chName;
+    private String mrName;
+    private Date chTimeStart;
+    private Date chTimeEnd;
+    private Date mrTimeStart;
+    private Date mrTimeEnd;
+
 }

+ 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";
 }

+ 21 - 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)
@@ -28,4 +37,16 @@ public class ExportQcresultVO {
     private String deptId;
     private String name;
     private Integer checkStatus;
+    private Integer mrStatus;
+    private String chName;
+    private String mrName;
+    private Date chTimeStart;
+    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";
 }

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

@@ -16,4 +16,6 @@ public class MedCheckInfoAddVO {
     private String behospitalCode; // 病历id
     @ApiModelProperty(hidden = true)
     private Integer checkStatus = 1;//核查状态(0未核查,1已核查)
+    private Integer checkType;
+
 }

+ 52 - 1
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -36,6 +36,14 @@ public class QcResultShortPageVO extends Page {
      * 条目id
      */
     private Long casesEntryId;
+    /**
+     * 模块名称
+     */
+    private String casesName;
+    /**
+     * 模块id
+     */
+    private Long casesId;
     /**
      * 科室名称
      */
@@ -76,4 +84,47 @@ public class QcResultShortPageVO extends Page {
      * 核查状态(1:已核查,0:未核查)
      */
     private Integer checkStatus;
-}
+    /**
+     * 首页核查状态(1:已核查,0:未核查)
+     */
+    private Integer mrStatus;
+    /**
+     * 病历核查人员
+     */
+    private String chName;
+    /**
+     * 首页核查人员
+     */
+    private String mrName;
+    /**
+     * 病历核查起始时间
+     */
+    private Date chTimeStart;
+    /**
+     * 病历核查截止时间
+     */
+    private Date chTimeEnd;
+    /**
+     * 首页核查起始时间
+     */
+    private Date mrTimeStart;
+    /**
+     * 首页核查截止时间
+     */
+    private Date mrTimeEnd;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
+
+    /**
+     * 住院超过31日标志
+     */
+    private Integer beHosGT31Days;
+
+    /**
+     * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
+     */
+    private Integer improveType;
+}

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

@@ -0,0 +1,39 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/16 13:29
+ */
+@Getter
+@Setter
+public class ReBeHosPageVO extends Page {
+    @ApiModelProperty(hidden = true)
+    private Long userId;
+    @ApiModelProperty(hidden = true)
+    private String hospitalId;
+    @NotNull(message = "请输入起始时间")
+    private Date startDate;
+    @NotNull(message = "请输入截止时间")
+    private Date endDate;
+    /**
+     * 病案号
+     */
+    private String fileCode;
+    /**
+     * 病人姓名
+     */
+    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) {

+ 209 - 34
src/main/java/com/diagbot/web/ConsoleController.java

@@ -14,6 +14,7 @@ import com.diagbot.dto.LevelStatisticsDTO;
 import com.diagbot.dto.LevelStatisticsTZDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultShortDTO;
+import com.diagbot.dto.ReBeHosDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.UnModifyMRDTO;
 import com.diagbot.facade.ConsoleFacade;
@@ -24,6 +25,7 @@ import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.FilterVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -53,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
@@ -63,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
@@ -73,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
@@ -92,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) {
@@ -106,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) {
@@ -120,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) {
@@ -135,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) {
@@ -149,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) {
@@ -163,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) {
@@ -177,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) {
@@ -191,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) {
@@ -207,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) {
@@ -221,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) {
@@ -236,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) {
@@ -250,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) {
@@ -267,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) {
@@ -286,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) {
@@ -301,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) {
@@ -316,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) {
@@ -330,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) {
@@ -344,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) {
@@ -358,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) {
@@ -372,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) {
@@ -391,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) {
@@ -410,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) {
@@ -428,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) {
@@ -446,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) {
@@ -464,14 +493,26 @@ public class ConsoleController {
                     "patName: 病人姓名 <br>" +
                     "casesEntryName: 条目名称 <br>" +
                     "casesEntryId: 条目id <br>" +
+                    "casesName: 模块名称 <br>" +
+                    "casesId: 模块id <br>" +
                     "behDeptName:科室名称 <br>" +
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "beHosGT31Days: 住院超过31日标志 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "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) {
@@ -489,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) {
@@ -504,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) {
@@ -524,9 +567,18 @@ public class ConsoleController {
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "mrTimeStart: 首页核查起始时间 <br>" +
+                    "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) {
@@ -544,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) {
@@ -562,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) {
@@ -584,11 +638,132 @@ public class ConsoleController {
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "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) {
         return RespDTO.onSuc(consoleFacade.unModifyMRPage(qcResultShortPageVO));
     }
+
+
+    /**
+     * 31天再入院人数(内页)
+     *
+     * @param reBeHosPageVO
+     * @return
+     */
+    @ApiOperation(value = "31天再入院人数(内页)[by:zhaops]",
+            notes = "name: 病人名称 <br>" +
+                    "fileCode: 病案号 <br>" +
+                    "startDate: 起始时间 <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));
+    }
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "病案首页改善率质控评分页(内页)[by:zhaops]",
+            notes = "behospitalCode: 病历号<br>" +
+                    "patName: 病人姓名 <br>" +
+                    "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
+                    "level: 病历等级 <br>" +
+                    "improveType: 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历) <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "mrTimeStart: 首页核查起始时间 <br>" +
+                    "mrTimeEnd: 首页核查截止时间 <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/hmImproveMRPage")
+    @SysLogger("hmImproveMRPage")
+    public RespDTO<IPage<QcResultShortDTO>> hmImproveMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return RespDTO.onSuc(consoleFacade.hmImproveMRPage(qcResultShortPageVO));
+    }
+
+    /**
+     * 质控核查质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查质控评分页(内页)[by:zhaops]",
+            notes = "behospitalCode: 病历号<br>" +
+                    "patName: 病人姓名 <br>" +
+                    "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
+                    "level: 病历等级 <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "mrTimeStart: 首页核查起始时间 <br>" +
+                    "mrTimeEnd: 首页核查截止时间 <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/qcCheckMRPage")
+    @SysLogger("qcCheckMRPage")
+    public RespDTO<IPage<QcResultShortDTO>> qcCheckMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return RespDTO.onSuc(consoleFacade.qcCheckMRPage(qcResultShortPageVO));
+    }
 }

+ 138 - 15
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -8,6 +8,7 @@ import com.diagbot.vo.FilterPageByAverageVO;
 import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterUnModifyMRVO;
 import com.diagbot.vo.QcResultShortPageVO;
+import com.diagbot.vo.ReBeHosPageVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,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) {
@@ -59,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) {
@@ -77,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) {
@@ -95,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) {
@@ -110,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) {
@@ -125,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) {
@@ -139,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) {
@@ -158,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) {
@@ -172,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) {
@@ -190,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) {
@@ -208,14 +219,26 @@ public class ConsoleExportController {
                     "patName: 病人姓名 <br>" +
                     "casesEntryName: 条目名称 <br>" +
                     "casesEntryId: 条目id <br>" +
+                    "casesName: 模块名称 <br>" +
+                    "casesId: 模块id <br>" +
                     "behDeptName:科室名称 <br>" +
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "beHosGT31Days: 住院超过31日标志 <br>" +
                     "isReject: 单项否决 1-否决,0-非<br>" +
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "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) {
@@ -236,8 +259,17 @@ public class ConsoleExportController {
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
                     "leaveHosType: 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人) <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "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) {
@@ -255,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) {
@@ -275,8 +308,17 @@ public class ConsoleExportController {
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +
                     "level: 病历等级 <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "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) {
@@ -294,10 +336,91 @@ 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) {
         consoleExportFacade.unModifyMRStatisticsExport(response, filterUnModifyMRVO);
     }
+
+    /**
+     * 未整改病历统计导出
+     * 31天再入院统计导出
+     *
+     * @param reBeHosPageVO
+     * @return
+     */
+    @ApiOperation(value = "31天再入院统计导出[by:zhaops]",
+            notes = "name: 病人姓名 <br>" +
+                    "fileCode: 病案号 <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/reHos31DaysPageExport")
+    @SysLogger("reHos31DaysPageExport")
+    public void reHos31DaysPageExport(HttpServletResponse response, @RequestBody @Valid ReBeHosPageVO reBeHosPageVO) {
+        consoleExportFacade.reHos31DaysPageExport(response, reBeHosPageVO);
+    }
+
+    /**
+     * 病案首页改善率质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "病案首页改善率质控评分页导出[by:zhaops]",
+            notes = "behospitalCode: 病历号<br>" +
+                    "patName: 病人姓名 <br>" +
+                    "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
+                    "level: 病历等级 <br>" +
+                    "improveType: 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历) <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "mrTimeStart: 首页核查起始时间 <br>" +
+                    "mrTimeEnd: 首页核查截止时间 <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/hmImproveMRPageExport")
+    @SysLogger("hmImproveMRPageExport")
+    public void hmImproveMRPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        consoleExportFacade.hmImproveMRPageExport(response, qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查质控评分页导出[by:zhaops]",
+            notes = "behospitalCode: 病历号<br>" +
+                    "patName: 病人姓名 <br>" +
+                    "behDeptName:科室名称 <br>" +
+                    "doctorId:医生工号 <br>" +
+                    "doctorName:医生姓名 <br>" +
+                    "level: 病历等级 <br>" +
+                    "checkStatus: 核查状态(1:已核查,0:未核查) <br>" +
+                    "mrStatus: 首页核查状态(1:已核查,0:未核查) <br>" +
+                    "chName: 病历核查人员 <br>" +
+                    "mrName: 首页核查人员 <br>" +
+                    "chTimeStart: 病历核查起始时间 <br>" +
+                    "chTimeEnd: 病历核查截止时间 <br>" +
+                    "mrTimeStart: 首页核查起始时间 <br>" +
+                    "mrTimeEnd: 首页核查截止时间 <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/qcCheckMRPageExport")
+    @SysLogger("qcCheckMRPageExport")
+    public void qcCheckMRPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        consoleExportFacade.qcCheckMRPageExport(response, qcResultShortPageVO);
+    }
 }

+ 8 - 1
src/main/java/com/diagbot/web/SysUserPagesetController.java

@@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 import java.util.List;
@@ -56,4 +55,12 @@ public class SysUserPagesetController {
     public RespDTO<Boolean> savePageSet(@RequestBody @Valid SysUserPagesetSaveVO sysUserPagesetSaveVO) {
         return RespDTO.onSuc(sysUserPagesetFacade.savePageSet(sysUserPagesetSaveVO));
     }
+
+    @ApiOperation(value = "获取默认列设置[by:zhaops]",
+            notes = "pageType:页面分组,必填<br>")
+    @PostMapping("/getDefaultPageSet")
+    @SysLogger("getDefaultPageSet")
+    public RespDTO<List<SysUserPagesetDTO>> getDefaultPageSet(@RequestBody @Valid SysUserPagesetQueryVO sysUserPagesetQueryVO) {
+        return RespDTO.onSuc(sysUserPagesetFacade.getDefaultPageSet(sysUserPagesetQueryVO));
+    }
 }

文件差異過大導致無法顯示
+ 3551 - 393
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}

+ 1 - 0
src/main/resources/mapper/MedCheckInfoMapper.xml

@@ -16,6 +16,7 @@
         <result column="check_name" property="checkName" />
         <result column="check_time" property="checkTime" />
         <result column="status" property="status" />
+        <result column="check_type" property="checkType" />
     </resultMap>
 
 </mapper>

+ 27 - 0
src/main/resources/mapper/MedLisInfoMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.MedLisInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedLisInfo">
+        <id column="rep_no" property="repNo" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="rep_type" property="repType" />
+        <result column="rep_name" property="repName" />
+        <result column="rep_type_name" property="repTypeName" />
+        <result column="slide_type" property="slideType" />
+        <result column="rep_date" property="repDate" />
+        <result column="check_date" property="checkDate" />
+        <result column="apply_doctor" property="applyDoctor" />
+        <result column="dept_id" property="deptId" />
+        <result column="dept_name" property="deptName" />
+        <result column="register_flag" property="registerFlag" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+    </resultMap>
+
+</mapper>

+ 2 - 1
src/main/resources/mapper/MedLisResultMapper.xml

@@ -4,12 +4,13 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.MedLisResult">
-        <id column="rept_no" property="reptNo" />
+        <result column="rep_no" property="repNo" />
         <result column="hospital_id" property="hospitalId" />
         <result column="behospital_code" property="behospitalCode" />
         <result column="item_code" property="itemCode" />
         <result column="item_name" property="itemName" />
         <result column="result" property="result" />
+        <result column="reference" property="reference" />
         <result column="reference_min" property="referenceMin" />
         <result column="reference_max" property="referenceMax" />
         <result column="unit" property="unit" />

+ 30 - 0
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.MedPacsInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedPacsInfo">
+        <id column="rep_no" property="repNo" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="rep_name" property="repName" />
+        <result column="rep_type" property="repType" />
+        <result column="rep_type_name" property="repTypeName" />
+        <result column="part" property="part" />
+        <result column="rep_date" property="repDate" />
+        <result column="check_date" property="checkDate" />
+        <result column="apply_doctor" property="applyDoctor" />
+        <result column="dept_id" property="deptId" />
+        <result column="dept_name" property="deptName" />
+        <result column="register_flag" property="registerFlag" />
+        <result column="report_doctor" property="reportDoctor" />
+        <result column="checker" property="checker" />
+        <result column="yjpdz" property="yjpdz" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+    </resultMap>
+
+</mapper>

+ 1 - 1
src/main/resources/mapper/MedPacsResultMapper.xml

@@ -4,7 +4,7 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.MedPacsResult">
-        <id column="rept_no" property="reptNo" />
+        <result column="rep_no" property="repNo" />
         <result column="hospital_id" property="hospitalId" />
         <result column="behospital_code" property="behospitalCode" />
         <result column="rept_name" property="reptName" />

文件差異過大導致無法顯示
+ 507 - 149
src/main/resources/mapper/QcresultInfoMapper.xml