浏览代码

Merge remote-tracking branch 'origin/develop' into develop

chengyao 3 年之前
父节点
当前提交
1017327de1
共有 87 个文件被更改,包括 4451 次插入298 次删除
  1. 215 0
      doc/041.20220118_v2.2.0_通用版_申诉驳回/qc_init_v2.2.0_通用版_申诉驳回.sql
  2. 8 0
      doc/044.20220311v2.2.1/qc_initv2.2.1.sql
  3. 129 0
      src/main/java/com/diagbot/aggregate/LeaveHosCountByDeptAggregate.java
  4. 91 0
      src/main/java/com/diagbot/client/MedAppealExamineInfoServiceClient.java
  5. 102 0
      src/main/java/com/diagbot/client/MedAppealExamineInfoServiceClientFacade.java
  6. 48 0
      src/main/java/com/diagbot/client/MedAppealInfoServiceClient.java
  7. 52 0
      src/main/java/com/diagbot/client/MedAppealInfoServiceClientFacade.java
  8. 63 0
      src/main/java/com/diagbot/client/hystrix/MedAppealExamineInfoServiceHystrix.java
  9. 64 0
      src/main/java/com/diagbot/client/hystrix/MedAppealInfoServiceHystrix.java
  10. 29 26
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  11. 28 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  12. 89 0
      src/main/java/com/diagbot/dto/AppealExamineRecordDTO.java
  13. 61 0
      src/main/java/com/diagbot/dto/CommonResult.java
  14. 58 0
      src/main/java/com/diagbot/dto/ExportGetAppealReviewDTO.java
  15. 57 0
      src/main/java/com/diagbot/dto/ExportGetComplaintRecordDTO.java
  16. 20 0
      src/main/java/com/diagbot/dto/GetAppealDeptDTO.java
  17. 72 0
      src/main/java/com/diagbot/dto/GetAppealInfoDTO.java
  18. 20 0
      src/main/java/com/diagbot/dto/GetAppealModeDTO.java
  19. 67 0
      src/main/java/com/diagbot/dto/GetAppealReviewDTO.java
  20. 92 0
      src/main/java/com/diagbot/dto/GetComplaintRecordDTO.java
  21. 22 0
      src/main/java/com/diagbot/dto/GetReviewerDTO.java
  22. 40 0
      src/main/java/com/diagbot/dto/MedRecordContentOtherDTO.java
  23. 26 0
      src/main/java/com/diagbot/dto/MsgApiDTO.java
  24. 19 0
      src/main/java/com/diagbot/dto/MsgDTO.java
  25. 103 0
      src/main/java/com/diagbot/entity/MedAppealExamineInfo.java
  26. 145 0
      src/main/java/com/diagbot/entity/MedAppealInfo.java
  27. 77 0
      src/main/java/com/diagbot/entity/WorkFlowInfo.java
  28. 44 0
      src/main/java/com/diagbot/enums/AppealOperationTypeEnum.java
  29. 44 0
      src/main/java/com/diagbot/enums/ExampleOperationEnum.java
  30. 43 0
      src/main/java/com/diagbot/enums/ExampleStatusEnum.java
  31. 43 0
      src/main/java/com/diagbot/enums/WorkFlowNodeEnum.java
  32. 148 98
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  33. 76 120
      src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java
  34. 310 0
      src/main/java/com/diagbot/facade/MedAppealExamineInfoManagementFacade.java
  35. 18 0
      src/main/java/com/diagbot/facade/MedAppealInfoManagementFacade.java
  36. 5 0
      src/main/java/com/diagbot/facade/MedCheckInfoFacade.java
  37. 121 0
      src/main/java/com/diagbot/facade/MedicalRecordOtherFacade.java
  38. 2 9
      src/main/java/com/diagbot/facade/QcresultInfoFacade.java
  39. 24 2
      src/main/java/com/diagbot/facade/RecordCheckFacade.java
  40. 38 3
      src/main/java/com/diagbot/facade/SysDictionaryFacade.java
  41. 14 5
      src/main/java/com/diagbot/facade/SysUserFacade.java
  42. 16 0
      src/main/java/com/diagbot/mapper/MedAppealExamineInfoMapper.java
  43. 16 0
      src/main/java/com/diagbot/mapper/MedAppealInfoMapper.java
  44. 2 0
      src/main/java/com/diagbot/mapper/QcresultInfoMapper.java
  45. 3 0
      src/main/java/com/diagbot/mapper/SysUserMapper.java
  46. 16 0
      src/main/java/com/diagbot/service/MedAppealExamineInfoService.java
  47. 16 0
      src/main/java/com/diagbot/service/MedAppealInfoService.java
  48. 3 0
      src/main/java/com/diagbot/service/QcresultInfoService.java
  49. 20 0
      src/main/java/com/diagbot/service/impl/MedAppealExamineInfoServiceImpl.java
  50. 20 0
      src/main/java/com/diagbot/service/impl/MedAppealInfoServiceImpl.java
  51. 4 0
      src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java
  52. 87 0
      src/main/java/com/diagbot/vo/AddAppealInfoApiVO.java
  53. 89 0
      src/main/java/com/diagbot/vo/AddAppealInfoVO.java
  54. 75 0
      src/main/java/com/diagbot/vo/ApprovedVo.java
  55. 3 0
      src/main/java/com/diagbot/vo/BehospitalPageVO.java
  56. 26 0
      src/main/java/com/diagbot/vo/CancelAppealInfoApiVO.java
  57. 22 0
      src/main/java/com/diagbot/vo/CancelAppealInfoVO.java
  58. 37 0
      src/main/java/com/diagbot/vo/GetAppealDeptVo.java
  59. 39 0
      src/main/java/com/diagbot/vo/GetAppealInfoVO.java
  60. 37 0
      src/main/java/com/diagbot/vo/GetAppealModeVo.java
  61. 24 0
      src/main/java/com/diagbot/vo/GetAppealOperationTypeVO.java
  62. 55 0
      src/main/java/com/diagbot/vo/GetAppealReviewVO.java
  63. 21 0
      src/main/java/com/diagbot/vo/GetApprovedViewVO.java
  64. 21 0
      src/main/java/com/diagbot/vo/GetAuditNumberVO.java
  65. 31 0
      src/main/java/com/diagbot/vo/GetComplaintDetailMsgVO.java
  66. 61 0
      src/main/java/com/diagbot/vo/GetComplaintRecordVO.java
  67. 3 0
      src/main/java/com/diagbot/vo/GetDetailVO.java
  68. 27 0
      src/main/java/com/diagbot/vo/GetReviewerApiVO.java
  69. 23 0
      src/main/java/com/diagbot/vo/GetReviewerVO.java
  70. 18 0
      src/main/java/com/diagbot/vo/MedAppealInfoVO.java
  71. 51 0
      src/main/java/com/diagbot/vo/MedRecordContentOtherVO.java
  72. 47 0
      src/main/java/com/diagbot/vo/MedRecordOtherVO.java
  73. 37 0
      src/main/java/com/diagbot/vo/RejectedVo.java
  74. 179 0
      src/main/java/com/diagbot/web/MedAppealExamineInfoController.java
  75. 237 0
      src/main/java/com/diagbot/web/MedAppealInfoController.java
  76. 58 0
      src/main/java/com/diagbot/web/MedRecordOtherController.java
  77. 5 1
      src/main/resources/application-dev.yml
  78. 5 1
      src/main/resources/application-local.yml
  79. 5 1
      src/main/resources/application-pre.yml
  80. 5 1
      src/main/resources/application-pro.yml
  81. 5 1
      src/main/resources/application-test.yml
  82. 1 1
      src/main/resources/bootstrap.yml
  83. 147 28
      src/main/resources/mapper/BehospitalInfoMapper.xml
  84. 22 0
      src/main/resources/mapper/MedAppealExamineInfoMapper.xml
  85. 34 0
      src/main/resources/mapper/MedAppealInfoMapper.xml
  86. 57 1
      src/main/resources/mapper/QcresultInfoMapper.xml
  87. 14 0
      src/main/resources/mapper/SysUserMapper.xml

+ 215 - 0
doc/041.20220118_v2.2.0_通用版_申诉驳回/qc_init_v2.2.0_通用版_申诉驳回.sql

@@ -0,0 +1,215 @@
+
+use `qc`;
+-- 执行前请看注意事项!
+-- 申诉驳回相关配置
+-- 注意
+
+
+ALTER TABLE med_qcresult_detail MODIFY COLUMN explain_info varchar(1500) DEFAULT NULL COMMENT '解释说明';
+
+/**
+med_appeal_info 申诉记录表
+ */
+DROP TABLE IF EXISTS `med_appeal_info`;
+CREATE TABLE `med_appeal_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
+  `qcresult_detail_id` bigint(20) DEFAULT NULL COMMENT '质控缺陷id',
+  `qcresult_detail_msg` varchar(255) DEFAULT NULL COMMENT '缺陷详情',
+  `qcresult_detai_value` decimal(5,1) DEFAULT NULL COMMENT '缺陷扣分分值',
+  `cases_score` decimal(5,1) DEFAULT NULL COMMENT '模块总分',
+  `is_reject` int(3) DEFAULT '0' COMMENT '单项否决(1-单项否决 0-非)',
+  `cases_entry_id` bigint(20) DEFAULT NULL COMMENT '条目ID',
+  `cases_entry_name` varchar(255) DEFAULT NULL COMMENT '质控条目(新增已有操作才有值)',
+  `cases_entry_msg` varchar(255) DEFAULT NULL COMMENT '提示信息(新增已有操作才有值)',
+  `value` decimal(5,1) DEFAULT NULL COMMENT '分值(新增已有操作才有值)',
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '模块id',
+  `mode_name` varchar(60) DEFAULT NULL COMMENT '模块名称',
+  `defect_content` longtext COMMENT '病历内容',
+  `claimant_id` bigint(20) NOT NULL COMMENT '申诉人id',
+  `appeal_type` char(3) NOT NULL COMMENT '申诉类型(0:医生申诉|1:质控申诉)',
+  `appeal_operation_type` char(3) NOT NULL COMMENT '申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)',
+  `appeal_explain` varchar(1500) DEFAULT NULL COMMENT '申诉说明',
+  `check_id` bigint(20) NOT NULL COMMENT '审核人id',
+  `work_flow_node_id` bigint(20) NOT NULL COMMENT '当前工作流节点id',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(60) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(60) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='申诉记录表';
+
+/**
+med_appeal_examine_info 申诉审批表
+ */
+DROP TABLE IF EXISTS `med_appeal_examine_info`;
+CREATE TABLE `med_appeal_examine_info` (
+  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '申诉审批id',
+  `appeal_info_id` bigint(11) NOT NULL COMMENT '申诉id',
+  `check_id` bigint(20) NOT NULL COMMENT '审核人id',
+  `example_status` char(1) DEFAULT '0' COMMENT '审核状态:0:待审核|1:驳回|2:通过',
+  `example_operation` char(1) DEFAULT NULL COMMENT '审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复',
+  `value` decimal(5,1) DEFAULT NULL COMMENT '审核分值',
+  `process_result` varchar(1500) DEFAULT NULL COMMENT '处理结果',
+  `reject_reason` varchar(1500) DEFAULT NULL COMMENT '驳回理由',
+  `msg` varchar(255) DEFAULT '' COMMENT '提示信息',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(1500) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='申诉审批表';
+
+
+/**
+med_work_flow_info 流程表
+ */
+DROP TABLE IF EXISTS `med_work_flow_info`;
+CREATE TABLE `med_work_flow_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
+  `work_flow_name` varchar(60) NOT NULL COMMENT '流程名称',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='流程表';
+
+SET @hospitalid ='35';
+INSERT INTO `med_work_flow_info` (`hospital_id`, `work_flow_name`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES ( @hospitalid, '湘雅申诉审核流程', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+
+/**
+med_work_flow_link 流程线表
+ */
+DROP TABLE IF EXISTS `med_work_flow_link`;
+CREATE TABLE `med_work_flow_link` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `work_flow_id` bigint(20) NOT NULL COMMENT '流程id',
+  `work_flow_link_id` bigint(20) NOT NULL COMMENT '工作流id',
+  `work_link_now_node` bigint(20) NOT NULL COMMENT '当前节点id',
+  `work_link_condition` varchar(60) DEFAULT NULL COMMENT '流程条件(流程线分叉,下一结点判断条件)',
+  `work_link_next_node` bigint(20) NOT NULL COMMENT '下一节点id 0:表示结束',
+  `work_link_name` varchar(60) NOT NULL COMMENT '流程线内容',
+  `work_link_status` varchar(60) NOT NULL COMMENT '工作流状态',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='流程线表';
+
+set @workflowid:= (SELECT id FROM `med_work_flow_info` where `work_flow_name`='湘雅申诉审核流程' and `hospital_id`= @hospitalid );
+INSERT INTO `med_work_flow_link` (`work_flow_id`, `work_flow_link_id`, `work_link_now_node`, `work_link_condition`, `work_link_next_node`, `work_link_name`, `work_link_status`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '1', '0', NULL, '1', '申诉人员向审核员发起申诉', '申诉', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+INSERT INTO `med_work_flow_link` (`work_flow_id`, `work_flow_link_id`, `work_link_now_node`, `work_link_condition`, `work_link_next_node`, `work_link_name`, `work_link_status`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '2', '1', NULL, '2', '申诉人员撤回申诉', '申诉', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+INSERT INTO `med_work_flow_link` (`work_flow_id`, `work_flow_link_id`, `work_link_now_node`, `work_link_condition`, `work_link_next_node`, `work_link_name`, `work_link_status`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '3', '1', NULL, '3', '科室审核员审核', '审核', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+
+
+/**
+med_work_flow_node 流程节点表
+ */
+DROP TABLE IF EXISTS `med_work_flow_node`;
+CREATE TABLE `med_work_flow_node` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `work_flow_id` bigint(20) NOT NULL COMMENT '流程id',
+  `work_flow_node_id` bigint(20) NOT NULL COMMENT '工作节点id',
+  `work_node_name` varchar(60) NOT NULL COMMENT '节点名称',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='流程节点表';
+
+INSERT INTO `med_work_flow_node` (`work_flow_id`,`work_flow_node_id`, `work_node_name`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '1', '申诉', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+INSERT INTO `med_work_flow_node` (`work_flow_id`,`work_flow_node_id`, `work_node_name`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '2', '撤销申诉', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+INSERT INTO `med_work_flow_node` (`work_flow_id`,`work_flow_node_id`, `work_node_name`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES (@workflowid, '3', '科室审核', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '');
+
+
+/**
+sys_dictionary_info 系统字典表
+ */
+
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '0', '删改条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '1', '新增已有条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '2', '新增缺失条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '3', '恢复条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '0', '待审核', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '1', '已驳回', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '2', '审核通过', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '34', '申诉驳回', '32,33,35', '2', '0', '申诉驳回状态登字典数据总览');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '1', '修改', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '2', '删除', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '3', '新增已有', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '4', '新增缺失', '2', '0', '审核处理方式');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '5', '恢复', '2', '0', '审核处理方式');
+
+
+/**
+sys_hospital_set 系统配置表
+ */
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '审核人是否可以是自己开关', 'self_flag', 'false', '审核人是否可以是自己开关');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '核查按钮是否关联申诉流程', 'check_appeal_relation', 'true', '核查按钮是否关联申诉流程');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '核查操作是否与申诉状态关联配置', 'check_operation_with_appeal', 'true', '核查操作是否与申诉状态关联配置');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '工作流节点-操作接口映射关系', 'work_flow_node_mapping', '{\"addAppealInfo\":1,\"cancelAppealInfo\":2,\"approved\":3,\"rejected\":3}', '工作流节点-操作接口映射关系');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '单人申诉', 'single_appeal_falg', 'true', '单人申诉开关');
+
+
+/**
+sys_role 系统角色表
+ */
+INSERT INTO `sys_role` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `roleLevel`, `descritpion`, `menuItems`, `remark`) VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '申诉审核员', '0', '', '', NULL);
+
+/**
+sys_menu 菜单表
+ */
+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 ('100', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '申诉信息', '-1', 'YH-SSXX', '1', '1', '14', '用户-申诉信息');
+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 ('101', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '申诉记录', '100', 'YH-SSXX-SSJL', '1', '1', '1', '用户-申诉信息-申诉记录');
+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 ('102', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '申诉审核', '100', 'YH-SSXX-SSSH', '1', '1', '2', '用户-申诉信息-申诉审核');
+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 ('103', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '申诉发起', '100', 'YH-SSXX-SSFQ', '1', '1', '3', '用户-申诉信息-申诉发起');
+
+
+/**
+sys_permission 系统资源表
+ */
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('166', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查看', 'FUNC000166', '/qc/appealInfo/getAppealInfo', 'ALL', '查看', '用户-申诉信息-申诉记录-查看');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('167', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '撤回', 'FUNC000167', '/qc/appealInfo/cancelAppealInfo', 'ALL', '撤回', '用户-申诉信息-申诉记录-撤回');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('168', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '再次申诉', 'FUNC000168', '/qc/appealInfo/addAppealInfo', 'ALL', '再次申诉', '用户-申诉信息-申诉记录-再次申诉');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('169', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查看', 'FUNC000169', '/qc/appealExamineInfo/getApprovedView', 'ALL', '查看', '用户-申诉信息-申诉审核-查看');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('170', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '缺陷申诉', 'FUNC000170', '/qc/appealInfo/addAppealInfo', 'ALL', '缺陷申诉', '用户-申诉信息-申诉发起-缺陷申诉');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('171', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新增缺陷申', 'FUNC000171', '/qc/appealInfo/addAppealInfo', 'ALL', '新增缺陷申', '用户-申诉信息-申诉发起-新增缺陷申诉');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('172', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '撤回申诉', 'FUNC000172', '/qc/appealInfo/cancelAppealInfo', 'ALL', '撤回申诉', '用户-申诉信息-申诉发起-撤回申诉');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('173', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '审核通过', 'FUNC000173', '/qc/appealExamineInfo/approved', 'ALL', '\r\n审核通过', '用户-申诉信息-申诉审核-审核通过');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('174', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '驳回', 'FUNC000174', '/qc/appealExamineInfo/rejected', 'ALL', '驳回', '用户-申诉信息-申诉审核-驳回');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('175', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案详情查看', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-申诉信息-申诉记录-病案详情查看', '无需加密');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('176', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '病案详情查看', 'FUNC000014', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '用户-申诉信息-申诉审核-病案详情查看', '无需加密');
+
+
+/**
+sys_menu_permission 系统资源表
+ */
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '101', '166', NULL, '用户-申诉信息-申诉记录-查看');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '101', '167', NULL, '用户-申诉信息-申诉记录-撤回');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '101', '168', NULL, '用户-申诉信息-申诉记录-再次申诉');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '101', '166', NULL, '用户-申诉信息-申诉审核-查看');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '103', '170', NULL, '用户-申诉信息-申诉发起-缺陷申诉');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '103', '171', NULL, '用户-申诉信息-申诉发起-新增缺陷申诉');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '103', '172', NULL, '用户-申诉信息-申诉发起-撤回申诉');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '102', '173', NULL, '用户-申诉信息-申诉审核-审核通过');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '102', '174', NULL, '用户-申诉信息-申诉审核-驳回');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '102', '169', NULL, '用户-申诉信息-申诉审核-查看');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '101', '175', NULL, '用户-申诉信息-申诉记录-病案详情查看');
+INSERT INTO `sys_menu_permission` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '102', '176', NULL, '用户-申诉信息-申诉审核-病案详情查看');

+ 8 - 0
doc/044.20220311v2.2.1/qc_initv2.2.1.sql

@@ -0,0 +1,8 @@
+use `qc`;
+
+UPDATE `qc_mode` SET `name`='其他信息' WHERE (`name`='其他');
+
+
+
+
+

+ 129 - 0
src/main/java/com/diagbot/aggregate/LeaveHosCountByDeptAggregate.java

@@ -0,0 +1,129 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.DeptBaseDTO;
+import com.diagbot.dto.NumDTO;
+import com.diagbot.facade.BasDeptInfoFacade;
+import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+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.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/15 16:03
+ */
+@Component
+public class LeaveHosCountByDeptAggregate {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private BasDeptInfoFacade basDeptInfoFacade;
+
+    @DataProvider("setAllLeaveHosCount")
+    public Map<String, Object> setAllLeaveHosCount(
+            @InvokeParameter("filterVO") FilterVO filterVO,
+            @DataConsumer("leaveHosCountByDept") List<NumDTO> totleNumList,
+            @DataConsumer("deathCountByDept") List<NumDTO> deathNumList,
+            @DataConsumer("operationCountByDept") List<NumDTO> operationNumList) {
+        Map<String, Object> retMap = new LinkedHashMap<>();
+        //关联科室
+        Map<String, Object> deptMap = getDeptByUser(filterVO);
+        if (deptMap == null) {
+            return retMap;
+        }
+        Map<String, NumDTO> totleMap = ListUtil.isEmpty(totleNumList)
+                ? new HashMap<>()
+                : EntityUtil.makeEntityMap(totleNumList, "name");
+
+        Map<String, NumDTO> deathMap = new HashMap<>();
+        Map<String, NumDTO> operationMap = new HashMap<>();
+        deathMap = ListUtil.isEmpty(deathNumList)
+                ? new HashMap<>()
+                : EntityUtil.makeEntityMap(deathNumList, "name");
+        operationMap = ListUtil.isEmpty(operationNumList)
+                ? new HashMap<>()
+                : EntityUtil.makeEntityMap(operationNumList, "name");
+
+
+        for (String deptName : deptMap.keySet()) {
+            Map<String, Object> map = new LinkedHashMap<>();
+            map.put("总人数", 0);
+            map.put("死亡人数", 0);
+            map.put("手术病人数", 0);
+            if (totleMap.containsKey(deptName)) {
+                map.put("总人数", totleMap.get(deptName).getNum());
+            }
+            if (deathMap.containsKey(deptName)) {
+                map.put("死亡人数", deathMap.get(deptName).getNum());
+            }
+            if (operationMap.containsKey(deptName)) {
+                map.put("手术病人数", operationMap.get(deptName).getNum());
+            }
+            retMap.put(deptName, map);
+        }
+        return retMap;
+    }
+
+    /**
+     * 出院总人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("leaveHosCountByDept")
+    public List<NumDTO> leaveHosCountByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<NumDTO> numDTOS = behospitalInfoFacade.leaveHosCountByDept(filterVO);
+        return numDTOS;
+    }
+
+    /**
+     * 死亡人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("deathCountByDept")
+    public List<NumDTO> deathCountByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<NumDTO> numDTOS = behospitalInfoFacade.deathCountByDept(filterVO);
+        return numDTOS;
+
+    }
+
+    /**
+     * 手术人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("operationCountByDept")
+    public List<NumDTO> operationCountByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+        List<NumDTO> numDTOS = behospitalInfoFacade.operationCountByDept(filterVO);
+        return numDTOS;
+    }
+
+    /**
+     * 用户关联科室
+     *
+     * @param filterVO
+     * @return
+     */
+    public Map<String, Object> getDeptByUser(FilterVO filterVO) {
+        List<DeptBaseDTO> deptList = basDeptInfoFacade.getDeptByUser(filterVO);
+        if (ListUtil.isNotEmpty(deptList)) {
+            return EntityUtil.makeMapWithKeyValue(deptList, "deptName", "deptId");
+        } else {
+            return null;
+        }
+    }
+}

+ 91 - 0
src/main/java/com/diagbot/client/MedAppealExamineInfoServiceClient.java

@@ -0,0 +1,91 @@
+package com.diagbot.client;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.hystrix.MedAppealExamineInfoServiceHystrix;
+import com.diagbot.dto.CommonResult;
+import com.diagbot.dto.GetAppealInfoDTO;
+import com.diagbot.dto.GetAppealReviewDTO;
+import com.diagbot.dto.GetComplaintRecordDTO;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.vo.ApprovedVo;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealReviewVO;
+import com.diagbot.vo.GetAuditNumberVO;
+import com.diagbot.vo.GetComplaintDetailMsgVO;
+import com.diagbot.vo.GetComplaintRecordVO;
+import com.diagbot.vo.RejectedVo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+
+
+/**
+ * @description: 申诉功能远程调用
+ * @author: zhoutg
+ * @date: 2020/4/13 18:28
+ */
+@FeignClient(name = "gateway-service", url = "${appeal.address}", fallback = MedAppealExamineInfoServiceHystrix.class)
+public interface MedAppealExamineInfoServiceClient {
+    /**
+     * 获取申诉记录
+     * @param getComplaintRecordVO
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/getComplaintRecord")
+    CommonResult<Page<GetComplaintRecordDTO>> getComplaintRecord(@RequestBody GetComplaintRecordVO getComplaintRecordVO);
+
+    /**
+     * 获取申诉审核列表
+     * @param getAppealReviewVO
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/getAppealReview")
+    CommonResult<Page<GetAppealReviewDTO>> getAppealReview(@RequestBody GetAppealReviewVO getAppealReviewVO);
+
+
+    /**
+     *审核通过
+     * @param approvedVo
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/approved")
+    CommonResult<Boolean> approved(@RequestBody ApprovedVo approvedVo);
+
+    /**
+     *驳回
+     * @param rejectedVo
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/rejected")
+    CommonResult<Boolean> rejected(@RequestBody RejectedVo rejectedVo);
+
+    /**
+     *审核查看
+     * @param getAppealInfoVO
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/getApprovedView")
+    CommonResult<GetAppealInfoDTO> getApprovedView(@RequestBody GetAppealInfoVO getAppealInfoVO);
+
+    /**
+     *待审核数量
+     * @param getAuditNumberVO
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/getAuditNumber")
+    CommonResult<Integer> getAuditNumber(@RequestBody GetAuditNumberVO getAuditNumberVO);
+
+    /**
+     *获取该申诉记录最新缺陷详情
+     * @param getComplaintDetailMsgVO
+     * @return
+     */
+    @PostMapping(value = "/report-service/medAppealExamineInInfoManage/getComplaintDetailMsg")
+    CommonResult<QcresultDetail> getComplaintDetailMsg(@RequestBody GetComplaintDetailMsgVO getComplaintDetailMsgVO);
+
+
+}
+
+
+

+ 102 - 0
src/main/java/com/diagbot/client/MedAppealExamineInfoServiceClientFacade.java

@@ -0,0 +1,102 @@
+package com.diagbot.client;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.CommonResult;
+import com.diagbot.dto.GetAppealInfoDTO;
+import com.diagbot.dto.GetAppealReviewDTO;
+import com.diagbot.dto.GetComplaintRecordDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.vo.ApprovedVo;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealReviewVO;
+import com.diagbot.vo.GetAuditNumberVO;
+import com.diagbot.vo.GetComplaintDetailMsgVO;
+import com.diagbot.vo.GetComplaintRecordVO;
+import com.diagbot.vo.RejectedVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @description: 申诉功能远程调用后处理
+ * @author: zhoutg
+ * @date: 2020/4/13 18:28
+ */
+@Component
+public class MedAppealExamineInfoServiceClientFacade {
+
+    @Autowired
+    MedAppealExamineInfoServiceClient medAppealExamineInfoServiceClient;
+
+    /**
+     * 获取申诉记录
+     *
+     * @param getComplaintRecordVO
+     * @return
+     */
+    public RespDTO<Page<GetComplaintRecordDTO>> getComplaintRecord(GetComplaintRecordVO getComplaintRecordVO) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getComplaintRecord(getComplaintRecordVO));
+    }
+
+    /**
+     * 获取申诉审核列表
+     *
+     * @param getAppealReviewVO
+     * @return
+     */
+    public RespDTO<Page<GetAppealReviewDTO>> getAppealReview(GetAppealReviewVO getAppealReviewVO) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getAppealReview(getAppealReviewVO));
+    }
+
+
+    /**
+     * 审核通过
+     *
+     * @param approvedVo
+     * @return
+     */
+    public RespDTO<Boolean> approved(ApprovedVo approvedVo) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.approved(approvedVo));
+    }
+
+    /**
+     * 驳回
+     *
+     * @param rejectedVo
+     * @return
+     */
+    public RespDTO<Boolean> rejected(RejectedVo rejectedVo) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.rejected(rejectedVo));
+    }
+
+    /**
+     * 审核查看
+     *
+     * @param getAppealInfoVO
+     * @return
+     */
+    public RespDTO<GetAppealInfoDTO> getApprovedView(GetAppealInfoVO getAppealInfoVO) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getApprovedView(getAppealInfoVO));
+    }
+
+    /**
+     * 待审核数量
+     *
+     * @param getAuditNumberVO
+     * @return
+     */
+    public RespDTO<Integer> getAuditNumber(GetAuditNumberVO getAuditNumberVO) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getAuditNumber(getAuditNumberVO));
+    }
+
+    /**
+     * 获取该申诉记录最新缺陷详情
+     *
+     * @param getComplaintDetailMsgVO
+     * @return
+     */
+    public RespDTO<QcresultDetail> getComplaintDetailMsg(GetComplaintDetailMsgVO getComplaintDetailMsgVO) {
+        return CommonResult.tranResp(medAppealExamineInfoServiceClient.getComplaintDetailMsg(getComplaintDetailMsgVO));
+    }
+
+}

+ 48 - 0
src/main/java/com/diagbot/client/MedAppealInfoServiceClient.java

@@ -0,0 +1,48 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.MedAppealInfoServiceHystrix;
+import com.diagbot.dto.*;
+import com.diagbot.vo.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @description: 申诉功能远程调用
+ * @author: zhoutg
+ * @date: 2020/4/13 18:28
+ */
+@FeignClient(name = "gateway-service", url = "${appeal.address}", fallback = MedAppealInfoServiceHystrix.class)
+public interface MedAppealInfoServiceClient {
+
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/addAppealInfo")
+    CommonResult<Boolean> addAppealInfo(@RequestBody @Valid AddAppealInfoVO addAppealInfoVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getReviewer")
+    CommonResult<List<GetReviewerDTO>> getReviewer(@RequestBody GetReviewerVO getReviewerVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealOperationType")
+    CommonResult<Map<String, String>> getAppealOperationType(@RequestBody @Valid GetAppealOperationTypeVO getAppealOperationTypeVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/cancelAppealInfo")
+    CommonResult<Boolean> cancelAppealInfo(@RequestBody @Valid CancelAppealInfoVO cancelAppealInfoVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealInfo")
+    CommonResult<GetAppealInfoDTO> getAppealInfo(@RequestBody GetAppealInfoVO getAppealInfoVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealDept")
+    CommonResult<List<GetAppealDeptDTO>> getAppealDept(@RequestBody GetAppealDeptVo getAppealDeptVo);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealMode")
+    CommonResult<List<GetAppealModeDTO>> getAppealMode(@RequestBody GetAppealModeVo getAppealModeVo);
+
+}
+
+
+

+ 52 - 0
src/main/java/com/diagbot/client/MedAppealInfoServiceClientFacade.java

@@ -0,0 +1,52 @@
+package com.diagbot.client;
+
+import com.diagbot.dto.*;
+import com.diagbot.vo.*;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description: 申诉功能远程调用后处理
+ * @author: zhoutg
+ * @date: 2020/4/13 18:28
+ */
+@Component
+public class MedAppealInfoServiceClientFacade {
+
+    @Autowired
+    private MedAppealInfoServiceClient medAppealInfoServiceClient;
+
+    public RespDTO<Boolean> addAppealInfo(AddAppealInfoVO addAppealInfoVO) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.addAppealInfo(addAppealInfoVO));
+    }
+
+    public RespDTO<List<GetReviewerDTO>> getReviewer(GetReviewerVO getReviewerVO) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.getReviewer(getReviewerVO));
+    }
+
+    public RespDTO<Map<String, String>> getAppealOperationType(GetAppealOperationTypeVO getAppealOperationTypeVO) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.getAppealOperationType(getAppealOperationTypeVO));
+    }
+
+    public RespDTO<Boolean> cancelAppealInfo(CancelAppealInfoVO cancelAppealInfoVO) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.cancelAppealInfo(cancelAppealInfoVO));
+    }
+
+    public RespDTO<GetAppealInfoDTO> getAppealInfo(GetAppealInfoVO getAppealInfoVO) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.getAppealInfo(getAppealInfoVO));
+    }
+
+    public RespDTO<List<GetAppealDeptDTO>> getAppealDept(GetAppealDeptVo getAppealDeptVo) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.getAppealDept(getAppealDeptVo));
+    }
+
+
+    public RespDTO<List<GetAppealModeDTO>> getAppealMode(GetAppealModeVo getAppealModeVo) {
+        return CommonResult.tranResp(medAppealInfoServiceClient.getAppealMode(getAppealModeVo));
+    }
+
+}

+ 63 - 0
src/main/java/com/diagbot/client/hystrix/MedAppealExamineInfoServiceHystrix.java

@@ -0,0 +1,63 @@
+package com.diagbot.client.hystrix;
+
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.MedAppealExamineInfoServiceClient;
+import com.diagbot.dto.*;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.vo.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+/**
+ * @description: 申诉远程调用熔断器
+ * @author: zhoutg
+ * @date: 2020/4/13 18:23
+ */
+@Component
+@Slf4j
+public class MedAppealExamineInfoServiceHystrix implements MedAppealExamineInfoServiceClient {
+
+    @Override
+    public CommonResult<Page<GetComplaintRecordDTO>> getComplaintRecord(@RequestBody GetComplaintRecordVO getComplaintRecordVO) {
+        log.error("【hystrix】调用{}异常", "getComplaintRecord");
+        return null;
+    }
+
+    @Override
+    public CommonResult<Page<GetAppealReviewDTO>> getAppealReview(@RequestBody GetAppealReviewVO getAppealReviewVO) {
+        log.error("【hystrix】调用{}异常", "getAppealReview");
+        return null;
+    }
+
+
+    @Override
+    public CommonResult<Boolean> approved( @RequestBody ApprovedVo approvedVo) {
+        log.error("【hystrix】调用{}异常", "approved");
+        return null;
+    }
+
+    @Override
+    public CommonResult<Boolean> rejected( @RequestBody RejectedVo rejectedVo) {
+        log.error("【hystrix】调用{}异常", "rejected");
+        return null;
+    }
+    @Override
+    public CommonResult<GetAppealInfoDTO> getApprovedView( @RequestBody GetAppealInfoVO getAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "getApprovedView");
+        return null;
+    }
+    @Override
+    public CommonResult<Integer> getAuditNumber( @RequestBody GetAuditNumberVO getAuditNumberVO) {
+        log.error("【hystrix】调用{}异常", "getAuditNumberVO");
+        return null;
+    }
+
+    @Override
+    public CommonResult<QcresultDetail> getComplaintDetailMsg(@RequestBody GetComplaintDetailMsgVO getComplaintDetailMsgVO) {
+        log.error("【hystrix】调用{}异常", "getComplaintDetailMsg");
+        return null;
+    }
+
+}

+ 64 - 0
src/main/java/com/diagbot/client/hystrix/MedAppealInfoServiceHystrix.java

@@ -0,0 +1,64 @@
+package com.diagbot.client.hystrix;
+
+
+import com.diagbot.client.MedAppealInfoServiceClient;
+import com.diagbot.dto.*;
+import com.diagbot.vo.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description: 申诉远程调用熔断器
+ * @author: zhoutg
+ * @date: 2020/4/13 18:23
+ */
+@Component
+@Slf4j
+public class MedAppealInfoServiceHystrix implements MedAppealInfoServiceClient {
+
+    @Override
+    public CommonResult<Boolean> addAppealInfo(@Valid AddAppealInfoVO addAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "addAppealInfo");
+        return null;
+    }
+
+    @Override
+    public CommonResult<List<GetReviewerDTO>> getReviewer(GetReviewerVO getReviewerVO) {
+        log.error("【hystrix】调用{}异常", "getReviewer");
+        return null;
+    }
+
+    @Override
+    public CommonResult<Map<String, String>> getAppealOperationType(@Valid GetAppealOperationTypeVO getAppealOperationTypeVO) {
+        log.error("【hystrix】调用{}异常", "getAppealOperationType");
+        return null;
+    }
+
+    @Override
+    public CommonResult<Boolean> cancelAppealInfo(@Valid CancelAppealInfoVO cancelAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "cancelAppealInfo");
+        return null;
+    }
+
+    @Override
+    public CommonResult<GetAppealInfoDTO> getAppealInfo(GetAppealInfoVO getAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "getAppealInfo");
+        return null;
+    }
+
+    @Override
+    public CommonResult<List<GetAppealDeptDTO>> getAppealDept(@Valid GetAppealDeptVo getAppealDeptVo) {
+        log.error("【hystrix】调用{}异常", "getAppealDept");
+        return null;
+    }
+
+    @Override
+    public CommonResult<List<GetAppealModeDTO>> getAppealMode(GetAppealModeVo getAppealModeVo) {
+        log.error("【hystrix】调用{}异常", "getAppealMode");
+        return null;
+    }
+}

+ 29 - 26
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -194,32 +194,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/data/getColumnZhAndCh").permitAll()
                 .antMatchers("/qc/data/analyseRec").permitAll()
                 .antMatchers("/qc/data/hisDataDeal").permitAll()
-                .antMatchers("/qc/data_str/sendAdmissionNote").permitAll()
-                .antMatchers("/qc/data_str/sendBloodResult").permitAll()
-                .antMatchers("/qc/data_str/sendBloodTransfusion").permitAll()
-                .antMatchers("/qc/data_str/sendConsultationApply").permitAll()
-                .antMatchers("/qc/data_str/sendConsultationNote").permitAll()
-                .antMatchers("/qc/data_str/sendConsultationRecord").permitAll()
-                .antMatchers("/qc/data_str/sendConsultationResult").permitAll()
-                .antMatchers("/qc/data_str/sendCrisisNote").permitAll()
-                .antMatchers("/qc/data_str/sendDeathDiscussion").permitAll()
-                .antMatchers("/qc/data_str/sendDeathNote").permitAll()
-                .antMatchers("/qc/data_str/sendDifficultCase").permitAll()
-                .antMatchers("/qc/data_str/sendFirstRecord").permitAll()
-                .antMatchers("/qc/data_str/sendIllCritically").permitAll()
-                .antMatchers("/qc/data_str/sendIllSeriousl").permitAll()
-                .antMatchers("/qc/data_str/sendLeaveHospital").permitAll()
-                .antMatchers("/qc/data_str/sendOperativeFirstRecord").permitAll()
-                .antMatchers("/qc/data_str/sendOperativeNote").permitAll()
-                .antMatchers("/qc/data_str/sendWardRecord").permitAll()
-                .antMatchers("/qc/data_str/sendTransferOutNote").permitAll()
-                .antMatchers("/qc/data_str/sendTransferInNote").permitAll()
-                .antMatchers("/qc/data_str/sendRescueNote").permitAll()
-                .antMatchers("/qc/data_str/sendPeriodConclusion").permitAll()
-                .antMatchers("/qc/data_str/sendPreoperativeDiscussion").permitAll()
-                .antMatchers("/qc/data_str/sendTalkInform").permitAll()
-                .antMatchers("/qc/data_str/sendInformedConsent").permitAll()
-                .antMatchers("/qc/data_str/sendContent").permitAll()
+                .antMatchers("/qc/data_str/*").permitAll()
                 .antMatchers("/qc/doctoradvice/getPage").permitAll()
                 .antMatchers("/qc/medPacsInfo/getCheckPage").permitAll()
                 .antMatchers("/qc/medLisInfo/getExaminePage").permitAll()
@@ -234,6 +209,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/export/badLevelPagePageExport").permitAll()
                 .antMatchers("/console/export/badLevelPageXYExport").permitAll()
                 .antMatchers("/qc/medNurse/getMedNursePage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordOtherPage").permitAll()
+                .antMatchers("/qc/medRecordOther/getMedRecordContentOther").permitAll()
                 .antMatchers("/qc/behospitalInfo/exportQcresultByPerson").permitAll()
                 .antMatchers("/consoleByDept/beHosCountByDept").permitAll()
                 .antMatchers("/consoleByDept/casesEntryStatisticsByDept").permitAll()
@@ -289,6 +266,32 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/analysisDept/getEntryDefectImproveByDeptExport").permitAll()
                 .antMatchers("/qc/analysisDept/getEntryDefectImproveInnerDept").permitAll()
                 .antMatchers("/qc/analysisDept/getDefectImproveInnerByDeptExport").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getComplaintRecord").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getAppealReview").permitAll()
+                .antMatchers("/qc/appealExamineInfo/approved").permitAll()
+                .antMatchers("/qc/appealExamineInfo/rejected").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getApprovedView").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getAppealReviewDictionary").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getAuditNumber").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getAppealReviewExport").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getComplaintRecordExport").permitAll()
+                .antMatchers("/qc/appealExamineInfo/getComplaintDetailMsg").permitAll()
+                .antMatchers("/qc/appealInfo/addAppealInfo").permitAll()
+                .antMatchers("/qc/appealInfo/addAppealInfoApi").permitAll()
+                .antMatchers("/qc/appealInfo/getReviewer").permitAll()
+                .antMatchers("/qc/appealInfo/getReviewerApi").permitAll()
+                .antMatchers("/qc/behospitalInfo/addCase").permitAll()
+                .antMatchers("/qc/appealInfo/delCase").permitAll()
+                .antMatchers("/qc/appealInfo/logicDelCase").permitAll()
+                .antMatchers("/qc/appealInfo/updCase").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealOperationType").permitAll()
+                .antMatchers("/qc/appealInfo/cancelAppealInfo").permitAll()
+                .antMatchers("/qc/appealInfo/cancelAppealInfoApi").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealInfo").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealDept").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealMode").permitAll()
+                .antMatchers("/qc/appealInfo/getUserRole").permitAll()
+                .antMatchers("/qc/mode/getModes").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

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

@@ -286,6 +286,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/badLevelPagePageExport", request)
                 || matchers("/console/export/badLevelPageXYExport", request)
                 || matchers("/qc/medNurse/getMedNursePage", request)
+                || matchers("/qc/medRecordOther/getMedRecordOtherPage", request)
+                || matchers("/qc/medRecordOther/getMedRecordContentOther", request)
                 || matchers("/qc/behospitalInfo/exportQcresultByPerson", request)
                 || matchers("/consoleByDept/beHosCountByDept", request)
                 || matchers("/consoleByDept/casesEntryStatisticsByDept", request)
@@ -341,6 +343,32 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/analysisDept/getEntryDefectImproveByDeptExport", request)
                 || matchers("/qc/analysisDept/getEntryDefectImproveInnerDept", request)
                 || matchers("/qc/analysisDept/getDefectImproveInnerByDeptExport", request)
+                || matchers("/qc/appealExamineInfo/getComplaintRecord", request)
+                || matchers("/qc/appealExamineInfo/getAppealReview", request)
+                || matchers("/qc/appealExamineInfo/approved", request)
+                || matchers("/qc/appealExamineInfo/rejected", request)
+                || matchers("/qc/appealExamineInfo/getApprovedView", request)
+                || matchers("/qc/appealExamineInfo/getAppealReviewDictionary", request)
+                || matchers("/qc/appealExamineInfo/getAuditNumber", request)
+                || matchers("/qc/appealExamineInfo/getAppealReviewExport", request)
+                || matchers("/qc/appealExamineInfo/getComplaintRecordExport", request)
+                || matchers("/qc/appealExamineInfo/getComplaintDetailMsg", request)
+                || matchers("/qc/appealInfo/addAppealInfo", request)
+                || matchers("/qc/appealInfo/addAppealInfoApi", request)
+                || matchers("/qc/appealInfo/getReviewer", request)
+                || matchers("/qc/appealInfo/getReviewerApi", request)
+                || matchers("/qc/behospitalInfo/addCase", request)
+                || matchers("/qc/behospitalInfo/delCase", request)
+                || matchers("/qc/behospitalInfo/logicDelCase", request)
+                || matchers("/qc/behospitalInfo/updCase", request)
+                || matchers("/qc/appealInfo/getAppealOperationType", request)
+                || matchers("/qc/appealInfo/cancelAppealInfo", request)
+                || matchers("/qc/appealInfo/cancelAppealInfoApi", request)
+                || matchers("/qc/appealInfo/getAppealInfo", request)
+                || matchers("/qc/appealInfo/getAppealDept", request)
+                || matchers("/qc/appealInfo/getAppealMode", request)
+                || matchers("/qc/appealInfo/getUserRole", request)
+                || matchers("/qc/mode/getModes", request)
                 || matchers("/", request)) {
             return true;
         }

+ 89 - 0
src/main/java/com/diagbot/dto/AppealExamineRecordDTO.java

@@ -0,0 +1,89 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 申诉审核记录对象
+ * @Author songxl
+ */
+@Data
+public class AppealExamineRecordDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "申诉id")
+    private Long id;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "质控条目")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "申诉-提示信息(新增已有操作才有值)")
+    private String casesEntryMsg;
+
+    @ApiModelProperty(value = "申诉-分值(新增已有操作才有值)")
+    private BigDecimal value;
+
+    @ApiModelProperty(value = "申诉人id")
+    private String claimantId;
+
+    @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)")
+    private String appealType;
+
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "申诉说明")
+    private String appealExplain;
+
+    @ApiModelProperty(value = "审核人id")
+    private Long checkId;
+
+    @ApiModelProperty(value = "申诉备注")
+    private String appealRemark;
+
+    @ApiModelProperty(value = "审核状态:1:驳回|2:通过")
+    private String exampleStatus;
+
+    @ApiModelProperty(value = "审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复")
+    private String exampleOperation;
+
+    @ApiModelProperty(value = "处理结果")
+    private String processResult;
+
+    @ApiModelProperty(value = "驳回理由")
+    private String rejectReason;
+
+    @ApiModelProperty(value = "审核备注")
+    private String exampleRemark;
+
+    @ApiModelProperty(value = "申诉人姓名")
+    private String claimantName;
+
+    @ApiModelProperty(value = "审核人姓名")
+    private String checkName;
+
+    @ApiModelProperty(value = "申诉时间")
+    private Date appealCreateDate;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date appealExamineDate;
+
+    @ApiModelProperty(value = "审核-提示信息")
+    private String msg;
+
+    @ApiModelProperty(value = "审核-分值")
+    private BigDecimal score;
+
+    @ApiModelProperty(value = "单项否决")
+    private String isReject;
+
+    @ApiModelProperty(value = "模块总分")
+    private BigDecimal casesScore;
+}

+ 61 - 0
src/main/java/com/diagbot/dto/CommonResult.java

@@ -0,0 +1,61 @@
+package com.diagbot.dto;
+
+/**
+ * @Description: 通用返回对象
+ * @author: rengb
+ * @time: 2021/1/5 18:27
+ */
+public class CommonResult<T> {
+
+    private long code;
+    private String message;
+    private T data;
+
+    protected CommonResult() {
+    }
+
+    protected CommonResult(long code, String message, T data) {
+        this.code = code;
+        this.message = message;
+        this.data = data;
+    }
+
+    public long getCode() {
+        return code;
+    }
+
+    public void setCode(long code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public static <T> RespDTO<T> tranResp(CommonResult<T> commonResult) {
+        RespDTO respDTO = new RespDTO();
+        if (commonResult.code == 500l) {
+            respDTO.code = "-1";
+        } else if (commonResult.code == 200l) {
+            respDTO.code = "0";
+        } else {
+            respDTO.code = commonResult.code + "";
+        }
+        respDTO.msg = commonResult.message;
+        respDTO.data = commonResult.data;
+        return respDTO;
+    }
+
+}

+ 58 - 0
src/main/java/com/diagbot/dto/ExportGetAppealReviewDTO.java

@@ -0,0 +1,58 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * 审核excle
+ *
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class ExportGetAppealReviewDTO {
+
+//    @Excel(name = "申述id", needMerge = true)
+//    private Long id;
+
+    @Excel(name = "申诉人", needMerge = true)
+    private String claimantName;
+
+    @Excel(name = "所属科室", needMerge = true)
+    private String behDeptName;
+
+    @Excel(name = "申诉时间", needMerge = true, exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date claimantGmtCreate;
+
+    @Excel(name = "病人住院序号", needMerge = true)
+    private String behospitalCode;
+
+    @Excel(name = "患者姓名", needMerge = true)
+    private String name;
+
+    @Excel(name = "申诉模块", needMerge = true)
+    private String modeName;
+
+    @Excel(name = "缺陷详情", needMerge = true)
+    private String qcresultDetailMsg;
+
+    @Excel(name = "审核人", needMerge = true)
+    private String checkName;
+
+    @Excel(name = "审核时间", needMerge = true, exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date checkGmtCreate;
+
+    @Excel(name = "操作类型", needMerge = true, replace = {"删改条目_0","新增已有条目_1","新增缺失条目_2","恢复条目_3"})
+    private String appealOperationType;
+
+    @Excel(name = "状态", needMerge = true, replace = {"待审核_0","已驳回_1","审核通过_2"})
+    private String exampleStatus;
+
+}

+ 57 - 0
src/main/java/com/diagbot/dto/ExportGetComplaintRecordDTO.java

@@ -0,0 +1,57 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 申述记录excle
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class ExportGetComplaintRecordDTO {
+
+//    @Excel(name = "申述id", needMerge = true)
+//    private Long id;
+
+    @Excel(name = "申诉人", needMerge = true)
+    private String claimantName;
+
+    @Excel(name = "所属科室", needMerge = true)
+    private String behDeptName;
+
+    @Excel(name = "申诉时间", needMerge = true, exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date claimantGmtCreate;
+
+    @Excel(name = "病人住院序号", needMerge = true)
+    private String behospitalCode;
+
+    @Excel(name = "患者姓名", needMerge = true)
+    private String name;
+
+    @Excel(name = "申诉模块", needMerge = true)
+    private String modeName;
+
+    @Excel(name = "缺陷详情", needMerge = true)
+    private String qcresultDetailMsg;
+
+    @Excel(name = "审核人", needMerge = true)
+    private String checkName;
+
+    @Excel(name = "审核时间", needMerge = true, exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date checkGmtCreate;
+
+    @Excel(name = "操作类型", needMerge = true, replace = {"删改条目_0","新增已有条目_1","新增缺失条目_2","恢复条目_3"})
+    private String appealOperationType;
+
+    @Excel(name = "状态", needMerge = true, replace = {"待审核_0","已驳回_1","审核通过_2"})
+    private String exampleStatus;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/GetAppealDeptDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 申诉审核科室下拉列表返回对象
+ * @Author songxl
+ */
+@Data
+public class GetAppealDeptDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "科室id")
+    private String deptId;
+
+    @ApiModelProperty(value = "科室名称")
+    private String deptName;
+}

+ 72 - 0
src/main/java/com/diagbot/dto/GetAppealInfoDTO.java

@@ -0,0 +1,72 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 申诉审核内容对象
+ * @Author songxl
+ */
+@Data
+public class GetAppealInfoDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "医院ID")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "性别(男,女)")
+    private String sex;
+
+    @ApiModelProperty(value = "年龄")
+    private String age;
+
+    @ApiModelProperty(value = "住院科室ID")
+    private String deptId;
+
+    @ApiModelProperty(value = "住院科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "主管医生ID")
+    private String doctorId;
+
+    @ApiModelProperty(value = "主管医生ID")
+    private String doctorName;
+
+    @ApiModelProperty(value = "入院时间")
+    private Date behospitalDate;
+
+    @ApiModelProperty(value = "出院时间")
+    private Date leaveHospitalDate;
+
+    @ApiModelProperty(value = "申诉模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+    @ApiModelProperty(value = "病历内容")
+    private String defectContent;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
+
+    @ApiModelProperty(value = "申诉审核记录")
+    private List<AppealExamineRecordDTO> appealExamineRecordDTOList;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/GetAppealModeDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 申诉审核模块下拉列表返回对象
+ * @Author songxl
+ */
+@Data
+public class GetAppealModeDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "申诉模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+}

+ 67 - 0
src/main/java/com/diagbot/dto/GetAppealReviewDTO.java

@@ -0,0 +1,67 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * 审核
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetAppealReviewDTO {
+
+    @ApiModelProperty(value = "申述id")
+    private Long id;
+
+    @ApiModelProperty(value = "申述人")
+    private String claimantName;
+
+    @ApiModelProperty(value = "所属科室")
+    private String behDeptName;
+
+    @ApiModelProperty(value = "医院id")
+    private String hospitalId;
+
+    @ApiModelProperty(value = "缺陷详情id")
+    private String qcresultDetailId;
+
+    @ApiModelProperty(value = "条目ID")
+    private String casesEntryId;
+
+    @ApiModelProperty(value = "申述申诉时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date claimantGmtCreate;
+
+    @ApiModelProperty(value = "病人住院序号")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String name;
+
+    @ApiModelProperty(value = "申述模块")
+    private String modeName;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "审核人")
+    private String checkName;
+
+    @ApiModelProperty(value = "审核时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date checkGmtCreate;
+
+    @ApiModelProperty(value = "操作类型")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "状态")
+    private String exampleStatus;
+
+}

+ 92 - 0
src/main/java/com/diagbot/dto/GetComplaintRecordDTO.java

@@ -0,0 +1,92 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 申述记录
+ *
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetComplaintRecordDTO {
+
+    @ApiModelProperty(value = "申述id")
+    private Long id;
+
+    @ApiModelProperty(value = "申述人")
+    private String claimantName;
+
+    @ApiModelProperty(value = "申述人ID")
+    private String claimantId;
+
+    @ApiModelProperty(value = "审核人ID")
+    private String checkId;
+
+    @ApiModelProperty(value = "所属科室")
+    private String behDeptName;
+
+    @ApiModelProperty(value = "申述申诉时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date claimantGmtCreate;
+
+    @ApiModelProperty(value = "病人住院序号")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "医院id")
+    private String hospitalId;
+
+    @ApiModelProperty(value = "缺陷详情id")
+    private String qcresultDetailId;
+
+    @ApiModelProperty(value = "条目ID")
+    private String casesEntryId;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String name;
+
+    @ApiModelProperty(value = "申述模块")
+    private String modeName;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "审核人")
+    private String checkName;
+
+    @ApiModelProperty(value = "审核时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date checkGmtCreate;
+
+    @ApiModelProperty(value = "操作类型")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "状态")
+    private String exampleStatus;
+
+    @ApiModelProperty(value = "审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复")
+    private String exampleOperation;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
+
+    @ApiModelProperty(value = "模块总分")
+    private BigDecimal casesScore;
+
+    @ApiModelProperty(value = "单项否决(1-单项否决 0-非)")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 22 - 0
src/main/java/com/diagbot/dto/GetReviewerDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 审核人对象
+ * @Author songxl
+ */
+@Data
+public class GetReviewerDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "审核人ID")
+    private Long id;
+
+    @ApiModelProperty(value = "审核人姓名")
+    private String userName;
+
+}

+ 40 - 0
src/main/java/com/diagbot/dto/MedRecordContentOtherDTO.java

@@ -0,0 +1,40 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author Wsy
+ * @since 2022-03-09
+ */
+@Getter
+@Setter
+public class MedRecordContentOtherDTO implements Serializable {
+
+    /**
+     * 病历ID
+     */
+    private String recId;
+
+    /**
+     * 文书内容
+     */
+    private String htmlText;
+
+    /**
+     * 创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 修改时间(如果时间是1970年则表示纪录未修改)
+     */
+    private Date gmtModified;
+}

+ 26 - 0
src/main/java/com/diagbot/dto/MsgApiDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -13,6 +14,8 @@ import java.math.BigDecimal;
 @Getter
 @Setter
 public class MsgApiDTO {
+    //明细主键
+    private Long id;
     //得分
     private BigDecimal score;
     //提示信息
@@ -21,4 +24,27 @@ public class MsgApiDTO {
     private String isReject;
     //模块名称
     private String modelName;
+    //模块id
+    private String modelId;
+    //模块ID
+    private Long casesId;
+    //模块分数
+    private BigDecimal casesScore;
+    // 条目ID
+    private Long casesEntryId;
+
+    @ApiModelProperty("申诉条目id")
+    private Long appealInfoId;
+
+    @ApiModelProperty("审核状态 0:待审核|1:驳回|2:通过")
+    private String exampleStatus;
+
+    @ApiModelProperty(value = "操作类型")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "缺陷说明")
+    private String explainInfo;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
 }

+ 19 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -62,4 +63,22 @@ public class MsgDTO {
     private String explainInfo;
     // 条目id对应页面数据的key值
     private List<Long> pageKeyList = new ArrayList<>();
+
+    @ApiModelProperty("申诉条目id")
+    private Long appealInfoId;
+
+    @ApiModelProperty("审核状态 0:待审核|1:驳回|2:通过")
+    private String exampleStatus;
+
+    @ApiModelProperty(value = "操作类型")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "审核人")
+    private String reviewer;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date exampleDate;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
 }

+ 103 - 0
src/main/java/com/diagbot/entity/MedAppealExamineInfo.java

@@ -0,0 +1,103 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 申诉审批表
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Getter
+@Setter
+public class MedAppealExamineInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 申诉审批id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 申诉id
+     */
+    private Long appealInfoId;
+
+    /**
+     * 审核人id
+     */
+    private Long checkId;
+
+    /**
+     * 审核状态:1:驳回|2:通过
+     */
+    private String exampleStatus;
+
+    /**
+     * 审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复
+     */
+    private String exampleOperation;
+
+    /**
+     * 审核分值
+     */
+    private BigDecimal value;
+
+    /**
+     * 处理结果
+     */
+    private String processResult;
+
+    /**
+     * 驳回理由
+     */
+    private String rejectReason;
+
+    /**
+     * 提示信息
+     */
+    private String msg;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 145 - 0
src/main/java/com/diagbot/entity/MedAppealInfo.java

@@ -0,0 +1,145 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 申诉记录表
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Data
+public class MedAppealInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 质控缺陷id
+     */
+    private Long qcresultDetailId;
+
+    /**
+     * 缺陷详情
+     */
+    private String qcresultDetailMsg;
+
+    /**
+     * 缺陷扣分分值
+     */
+    private BigDecimal qcresultDetaiValue;
+
+    /**
+     * 条目ID
+     */
+    private Long casesEntryId;
+
+    /**
+     * 质控条目(新增已有操作才有值)
+     */
+    private String casesEntryName;
+
+    /**
+     * 提示信息(新增已有操作才有值)
+     */
+    private String casesEntryMsg;
+
+    /**
+     * 分值(新增已有操作才有值)
+     */
+    private BigDecimal value;
+
+    /**
+     * 申诉模块id
+     */
+    private Long modeId;
+
+    /**
+     * 模块名称
+     */
+    private String modeName;
+
+    /**
+     * 病历内容
+     */
+    private String defectContent;
+
+    /**
+     * 申诉人id
+     */
+    private String claimantId;
+
+    /**
+     * 申诉类型(0:医生申诉|1:质控申诉)
+     */
+    private String appealType;
+
+    /**
+     * 申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)
+     */
+    private String appealOperationType;
+
+    /**
+     * 申诉说明
+     */
+    private String appealExplain;
+
+    /**
+     * 审核人id
+     */
+    private Long checkId;
+
+    /**
+     * 当前工作流节点id
+     */
+    private Long workFlowNodeId;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+}

+ 77 - 0
src/main/java/com/diagbot/entity/WorkFlowInfo.java

@@ -0,0 +1,77 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 流程表 实体类
+ * </p>
+ */
+@Data
+@TableName("med_work_flow_info")
+public class WorkFlowInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 医院ID
+     */
+    @TableField("hospital_id")
+    private Long hospitalId;
+
+    /**
+     * 流程名称
+     */
+    @TableField("work_flow_name")
+    private String workFlowName;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    @TableField("is_deleted")
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    @TableField("gmt_modified")
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    @TableField("creator")
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    @TableField("modifier")
+    private String modifier;
+
+    /**
+     * 备注
+     */
+    @TableField("remark")
+    private String remark;
+
+}

+ 44 - 0
src/main/java/com/diagbot/enums/AppealOperationTypeEnum.java

@@ -0,0 +1,44 @@
+package com.diagbot.enums;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 工作流节点
+ * @author: gaodm
+ * @time: 2018/9/3 16:01
+ */
+public enum AppealOperationTypeEnum {
+
+    UP_OR_DEL("0", "删改"),
+    ADD_EXIST("1", "新增已有"),
+    ADD_NO_EXIST("2", "新增缺失"),
+    RECOVER("3", "恢复");
+
+    @Getter
+    @Setter
+    private String key;
+
+    @Getter
+    @Setter
+    private String name;
+
+    AppealOperationTypeEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static AppealOperationTypeEnum getEnum(String key) {
+        for (AppealOperationTypeEnum item : AppealOperationTypeEnum.values()) {
+            if (item.key.equals(key)) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        AppealOperationTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+}

+ 44 - 0
src/main/java/com/diagbot/enums/ExampleOperationEnum.java

@@ -0,0 +1,44 @@
+package com.diagbot.enums;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 审核状态
+ * @author: gaodm
+ * @time: 2018/9/3 16:01
+ */
+public enum ExampleOperationEnum {
+    UP_OR_UP("1", "修改"),
+    UP_OR_DEL("2", "删除"),
+    ADD_EXIST("3", "新增已有"),
+    ADD_NO_EXIST("4", "新增缺失"),
+    RECOVER("5", "恢复");
+
+    @Getter
+    @Setter
+    private String key;
+
+    @Getter
+    @Setter
+    private String name;
+
+    ExampleOperationEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ExampleOperationEnum getEnum(String key) {
+        for (ExampleOperationEnum item : ExampleOperationEnum.values()) {
+            if (item.key.equals(key)) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        ExampleOperationEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+}

+ 43 - 0
src/main/java/com/diagbot/enums/ExampleStatusEnum.java

@@ -0,0 +1,43 @@
+package com.diagbot.enums;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 审核状态
+ * @author: gaodm
+ * @time: 2018/9/3 16:01
+ */
+public enum ExampleStatusEnum {
+
+    NOT_EXAMPLE("0", "待审核"),
+    REJECT_EXAMPLE("1", "驳回"),
+    ADOPT_EXAMPLE("2", "审核通过");
+
+    @Getter
+    @Setter
+    private String key;
+
+    @Getter
+    @Setter
+    private String name;
+
+    ExampleStatusEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ExampleStatusEnum getEnum(String key) {
+        for (ExampleStatusEnum item : ExampleStatusEnum.values()) {
+            if (item.key.equals(key)) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        ExampleStatusEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+}

+ 43 - 0
src/main/java/com/diagbot/enums/WorkFlowNodeEnum.java

@@ -0,0 +1,43 @@
+package com.diagbot.enums;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 工作流节点
+ * @author: gaodm
+ * @time: 2018/9/3 16:01
+ */
+public enum WorkFlowNodeEnum {
+
+    APPEAL("1", "申诉"),
+    APPEAL_BACK("2", "撤销申诉"),
+    DEPT_CHECK("3", "科室审核");
+
+    @Getter
+    @Setter
+    private String key;
+
+    @Getter
+    @Setter
+    private String name;
+
+    WorkFlowNodeEnum(String key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static WorkFlowNodeEnum getEnum(String key) {
+        for (WorkFlowNodeEnum item : WorkFlowNodeEnum.values()) {
+            if (item.key.equals(key)) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(String key) {
+        WorkFlowNodeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+}

+ 148 - 98
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -154,7 +154,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     QcresultDetailFacade qcresultDetailFacade;
 
 
-
     /**
      * 分页
      *
@@ -260,82 +259,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 qcResultDTO.setMenuData("");
             }
             res.put("result", qcResultDTO);
-            //增加该病历是否核查状态
-            QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
-            medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
-            medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
-            medCheckInfoQuerys.eq("hospital_id", hospitalId);
-            medCheckInfoQuerys.in("check_type", 0, 2);
-            medCheckInfoQuerys.eq("status", 1);
-            int count = medCheckInfoFacade.count(medCheckInfoQuerys);
-            if (count > 0) {
-                res.put("checkStatus", 1);
-            } 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);
-            }
-            //新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
-            //1.获取病历核查人员id,该操作只能是核查员操作
-            List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
-                    .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .eq("hospital_id", hospitalId)
-                    .eq("behospital_code", getDetailVO.getBehospitalCode()));
-            if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getCheckId() != null
-                    && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
-                //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
-                int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("behospital_code", getDetailVO.getBehospitalCode())
-                        .eq("hospital_id", hospitalId)
-                        .eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
-                //2.2获取用户角色
-                List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("user_id", SysUserUtils.getCurrentPrincipleID())
-                ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
-                switch (jobType) {
-                    case 0:
-                        if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    case 1:
-                        if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    case 2:
-                        if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    default:
-                        res.put("checkShow", 0);
-                        break;
-                }
-
-            } else {
-                res.put("checkShow", 0);
-            }
+            //通过页面类型显示不同操作按钮
+            showButtonByPageType(hospitalId, getDetailVO, res);
+            //添加核查操作是否与申诉状态关联配置
+            res.put("checkOperationWithAppeal", sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal"));
         }
 
         // 获取提示信息
@@ -382,6 +309,106 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return res;
     }
 
+    private void showButtonByPageType(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
+//        switch (getDetailVO.getPageType()){
+//            case "1":
+//                break;
+//            case "2":
+//                checkButtonShow(hospitalId,getDetailVO,res);
+//                break;
+//            case "3":
+//                appealButtonShow(hospitalId,getDetailVO,res);
+//                break;
+//            default:
+//                break;
+//        }
+        checkButtonShow(hospitalId, getDetailVO, res);
+        appealButtonShow(hospitalId, getDetailVO, res);
+    }
+
+    private void appealButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
+        res.put("appealShow", 1);
+    }
+
+    private void checkButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
+        //增加该病历是否核查状态
+        QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
+        medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
+        medCheckInfoQuerys.eq("hospital_id", hospitalId);
+        medCheckInfoQuerys.in("check_type", 0, 2);
+        medCheckInfoQuerys.eq("status", 1);
+        int count = medCheckInfoFacade.count(medCheckInfoQuerys);
+        if (count > 0) {
+            res.put("checkStatus", 1);
+        } 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);
+        }
+        //新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
+        //1.获取病历核查人员id,该操作只能是核查员操作
+        List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId)
+                .eq("behospital_code", getDetailVO.getBehospitalCode()));
+        if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getCheckId() != null
+                && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
+            //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
+            int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("behospital_code", getDetailVO.getBehospitalCode())
+                    .eq("hospital_id", hospitalId)
+                    .eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
+            //2.2获取用户角色
+            List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("user_id", SysUserUtils.getCurrentPrincipleID())
+            ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
+            switch (jobType) {
+                case 0:
+                    if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                case 1:
+                    if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                case 2:
+                    if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                default:
+                    res.put("checkShow", 0);
+                    break;
+            }
+
+        } else {
+            res.put("checkShow", 0);
+        }
+    }
+
     /**
      * 处理数据(公共方法)
      *
@@ -1746,8 +1773,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             Map<String, Object> resMap = calScore(outputInfo, codeList, codeToInfoMap, analyzeVO, queryVo.getBehospitalInfo().getIsPlacefile());
             algorithmDTO = (AlgorithmDTO) resMap.get("algorithmDTO");
         }
-
+        QcresultInfo qcresultInfo = qcresultInfoFacade.getOne(new QueryWrapper<QcresultInfo>()
+                .eq("hospital_id", analyzeVO.getHospitalId())
+                .eq("behospital_code", analyzeVO.getBehospitalCode())
+                .eq("is_deleted", IsDeleteEnum.N.getKey()));
+        if (qcresultInfo != null && qcresultInfo.getId() != null) {
+            analyzeVO.setQcresultInfoId(qcresultInfo.getId());
+        }
         List<MsgDTO> msgDTOList = this.getBaseMapper().getForeignMsg(analyzeVO);
+        if (ListUtil.isEmpty(msgDTOList)) {
+            analyzeVO.setQcresultInfoId(null);
+            msgDTOList = this.getBaseMapper().getForeignMsg(analyzeVO);
+        }
+
         if (ListUtil.isNotEmpty(msgDTOList)) {
             msgDTOList.forEach(msgDTO -> {
                 if (StringUtils.isNotEmpty(msgDTO.getInfo()) && StringUtils.isNotEmpty(msgDTO.getInfo().trim()) &&
@@ -2335,28 +2373,37 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             if (ListUtil.isNotEmpty(informList)) {
                 informList.forEach(obj ->
                         {
-                            Map<String, String> strMap = new HashMap<>();
-                            strMap.put("使用植入性材料", String.valueOf(obj.get("使用植入性材料")));
-                            StrInformedConsent strInformedConsent = new StrInformedConsent();
-                            strInformedConsent.setHospitalId(analyzeVO.getHospitalId());
-                            strInformedConsent.setBehospitalCode(analyzeVO.getBehospitalCode());
-                            strInformedConsent.setRecId(String.valueOf(obj.get("记录编号")));
-                            strInformedConsent.setRecTitle(String.valueOf(obj.get("病历标题")));
-                            strInformedConsent.setRecType("知情同意书");
-                            strInformedConsent.setContent(JSONObject.toJSONString(strMap));
-                            strInformedConsent.setGmtCreate(new Date());
-                            strInformedConsents.add(strInformedConsent);
-                            recIds.add(String.valueOf(obj.get("记录编号")));
+                            if (obj.containsKey("病历标题")
+                                    && obj.containsKey("记录编号")
+                                    && obj.containsKey("记录编号")
+                                    && obj.containsKey("使用植入性材料")) {
+                                Map<String, String> strMap = new HashMap<>();
+                                strMap.put("使用植入性材料", String.valueOf(obj.get("使用植入性材料")));
+                                StrInformedConsent strInformedConsent = new StrInformedConsent();
+                                strInformedConsent.setHospitalId(analyzeVO.getHospitalId());
+                                strInformedConsent.setBehospitalCode(analyzeVO.getBehospitalCode());
+                                strInformedConsent.setRecId(String.valueOf(obj.get("记录编号")));
+                                strInformedConsent.setRecTitle(String.valueOf(obj.get("病历标题")));
+                                strInformedConsent.setRecType("知情同意书");
+                                strInformedConsent.setContent(JSONObject.toJSONString(strMap));
+                                strInformedConsent.setGmtCreate(new Date());
+                                strInformedConsents.add(strInformedConsent);
+                                recIds.add(String.valueOf(obj.get("记录编号")));
+                            }
                         }
                 );
-                //删除手术知情同意书历史ric_id
-                strInformedConsentServiceImpl.remove(new QueryWrapper<StrInformedConsent>()
-                        .eq("hospital_id", analyzeVO.getHospitalId())
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("behospital_code", analyzeVO.getBehospitalCode())
-                        .in("rec_id", recIds));
-                //新增
-                strInformedConsentServiceImpl.saveBatch(strInformedConsents);
+                if(ListUtil.isNotEmpty(strInformedConsents)){
+                    //删除手术知情同意书历史ric_id
+                    strInformedConsentServiceImpl.remove(new QueryWrapper<StrInformedConsent>()
+                            .eq("hospital_id", analyzeVO.getHospitalId())
+                            .eq("is_deleted", IsDeleteEnum.N.getKey())
+                            .eq("behospital_code", analyzeVO.getBehospitalCode())
+                            .in("rec_id", recIds));
+                }
+                if(ListUtil.isNotEmpty(strInformedConsents)){
+                    //新增
+                    strInformedConsentServiceImpl.saveBatch(strInformedConsents);
+                }
             }
         }
         // 手动拼接数据【知情同意书】【谈话告知书】
@@ -2384,6 +2431,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         pageMap.put("检验信息", null);
         // 护理信息
         pageMap.put("护理信息", null);
+        // 其他信息
+        pageMap.put("其他信息", null);
         // 知情同意书 = 【知情同意书】 + 【手术知情同意书】
         pageMap.put("知情同意书", recordDTOList);
         pageMap.put("谈话告知书", recordMap.get(54L));
@@ -2538,6 +2587,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         return behospitalInfoAgeDTOList;
     }
+
     /**
      * @param analyzeVO
      * @param codeList

+ 76 - 120
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -11,6 +11,7 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.util.*;
 import com.diagbot.vo.*;
 import com.google.common.collect.Lists;
+import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +45,8 @@ public class ConsoleByDeptFacade {
     private SysHospitalSetFacade sysHospitalSetFacade;
     @Autowired
     private QcCasesEntryFacade qcCasesEntryFacade;
+    @Autowired
+    private DataBeanAggregateQueryFacade dataBeanAggregateQueryFacade;
 
 
     /**
@@ -60,40 +63,13 @@ public class ConsoleByDeptFacade {
         if (deptMap == null) {
             return retMap;
         }
-        //出院总人数
-        List<NumDTO> totleNumList = behospitalInfoFacade.leaveHosCountByDept(filterVO);
-        Map<String, NumDTO> totleMap = ListUtil.isEmpty(totleNumList)
-                ? new HashMap<>()
-                : EntityUtil.makeEntityMap(totleNumList, "name");
-        Map<String, NumDTO> deathMap = new HashMap<>();
-        Map<String, NumDTO> operationMap = new HashMap<>();
-        //终末--死亡人数/手术病人数
-            //死亡人数
-            List<NumDTO> deathNumList = behospitalInfoFacade.deathCountByDept(filterVO);
-             deathMap = ListUtil.isEmpty(deathNumList)
-                    ? new HashMap<>()
-                    : EntityUtil.makeEntityMap(deathNumList, "name");
-            //手术人数
-            List<NumDTO> operationNumList = behospitalInfoFacade.operationCountByDept(filterVO);
-             operationMap = ListUtil.isEmpty(operationNumList)
-                    ? new HashMap<>()
-                    : EntityUtil.makeEntityMap(operationNumList, "name");
-
-        for (String deptName : deptMap.keySet()) {
-            Map<String, Object> map = new LinkedHashMap<>();
-            map.put("总人数", 0);
-            map.put("死亡人数", 0);
-            map.put("手术病人数", 0);
-            if (totleMap.containsKey(deptName)) {
-                map.put("总人数", totleMap.get(deptName).getNum());
-            }
-            if(deathMap.containsKey(deptName)) {
-                map.put("死亡人数", deathMap.get(deptName).getNum());
-            }
-            if(operationMap.containsKey(deptName)) {
-                map.put("手术病人数", operationMap.get(deptName).getNum());
-            }
-            retMap.put(deptName, map);
+        try {
+            Map<String, Object> invokeParams = new HashMap<>();
+            invokeParams.put("filterVO", filterVO);
+            retMap  = dataBeanAggregateQueryFacade.get("setAllLeaveHosCount", invokeParams, Map.class);
+            long L2 = System.currentTimeMillis();
+        } catch (Exception e) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }
         return retMap;
     }
@@ -123,98 +99,78 @@ public class ConsoleByDeptFacade {
         DecimalFormat df = new DecimalFormat("#0.00");
         Map<String, Object> retMap = new LinkedHashMap<>();
         filterFacade.filterVOSet(filterVO);
-        QcresultFilterVO qcresultFilterVO = new QcresultFilterVO();
-        BeanUtil.copyProperties(filterVO, qcresultFilterVO);
         //关联科室
         Map<String, Object> deptMap = getDeptByUser(filterVO);
         if (deptMap == null) {
             return retMap;
         }
-        //质控病历总数
-        List<NumDTO> totleNumList = qcresultInfoFacade.resultCountByDept(qcresultFilterVO);
-        Map<String, NumDTO> totleMap = ListUtil.isEmpty(totleNumList)
-                ? new HashMap<>()
-                : EntityUtil.makeEntityMap(totleNumList, "name");
-        //甲级病历
-        qcresultFilterVO.setLevel("甲");
-        List<NumDTO> firstNumList = qcresultInfoFacade.resultCountByDept(qcresultFilterVO);
-        Map<String, NumDTO> firstMap = ListUtil.isEmpty(firstNumList)
-                ? new HashMap<>()
-                : EntityUtil.makeEntityMap(firstNumList, "name");
-        //乙级病历
-        qcresultFilterVO.setLevel("乙");
-        List<NumDTO> secondNumList = qcresultInfoFacade.resultCountByDept(qcresultFilterVO);
-        Map<String, NumDTO> secondMap = ListUtil.isEmpty(secondNumList)
-                ? new HashMap<>()
-                : EntityUtil.makeEntityMap(secondNumList, "name");
-        //丙级病历
-        qcresultFilterVO.setLevel("丙");
-        List<NumDTO> thirdNumList = qcresultInfoFacade.resultCountByDept(qcresultFilterVO);
-        Map<String, NumDTO> thirdMap = ListUtil.isEmpty(thirdNumList)
-                ? new HashMap<>()
-                : EntityUtil.makeEntityMap(thirdNumList, "name");
-        for (String deptName : deptMap.keySet()) {
-            List<NumDTO> retList = Lists.newLinkedList();
-            int totleNum = 0;
-            int firstLevelNum = 0;
-            int secondLevelNum = 0;
-            int thirdLevelNum = 0;
-            if (totleMap.containsKey(deptName)) {
-                totleNum = totleMap.get(deptName).getNum();
-            }
-            if (firstMap.containsKey(deptName)) {
-                firstLevelNum = firstMap.get(deptName).getNum();
-            }
-            if (secondMap.containsKey(deptName)) {
-                secondLevelNum = secondMap.get(deptName).getNum();
-            }
-            if (thirdMap.containsKey(deptName)) {
-                thirdLevelNum = thirdMap.get(deptName).getNum();
-            }
-            //总病历数为0
-            if (totleNum == 0) {
-                retMap.put(deptName, Lists.newLinkedList());
-                continue;
+        QcresultFilterVO qcresultFilterVO = new QcresultFilterVO();
+        BeanUtil.copyProperties(filterVO, qcresultFilterVO);
+        //质控病历数
+        List<Map<String,Object>> maps = qcresultInfoFacade.resultMrCountByDept(qcresultFilterVO);
+        if(ListUtil.isEmpty(maps)){
+            return retMap;
+        }
+        for (Map<String, Object> map : maps) {
+            if(null != map.get("NAME") && StringUtils.isNotBlank(map.get("NAME").toString()) && deptMap.containsKey(map.get("NAME").toString())){
+                List<NumDTO> retList = Lists.newLinkedList();
+                int totleNum = 0;
+                int firstLevelNum = 0;
+                int secondLevelNum = 0;
+                int thirdLevelNum = 0;
+                if(null != map.get("num")){
+                    totleNum = Integer.parseInt(map.get("num").toString());
+                }
+                if(null != map.get("firNum")){
+                    firstLevelNum = Integer.parseInt(map.get("firNum").toString());
+                }
+                if(null != map.get("secNum")){
+                    secondLevelNum = Integer.parseInt(map.get("secNum").toString());
+                }
+                if(null != map.get("thrNum")){
+                    thirdLevelNum = Integer.parseInt(map.get("thrNum").toString());
+                }
+
+                NumDTO totleNumDTO = new NumDTO();
+                totleNumDTO.setName("累计质控病历数");
+                totleNumDTO.setTotleNum(totleNum);
+                totleNumDTO.setNum(totleNum);
+                NumDTO firstLevelNumDTO = new NumDTO();
+                firstLevelNumDTO.setName("甲级病历");
+                firstLevelNumDTO.setNum(firstLevelNum);
+                firstLevelNumDTO.setTotleNum(totleNum);
+                Double firstPercent = BigDecimal.valueOf(firstLevelNum)
+                        .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                        .doubleValue();
+                String firstPercentStr = df.format(BigDecimal.valueOf(firstPercent).multiply(BigDecimal.valueOf(100))) + "%";
+                firstLevelNumDTO.setPercent(firstPercent);
+                firstLevelNumDTO.setPercentStr(firstPercentStr);
+                NumDTO secondLevelNumDTO = new NumDTO();
+                secondLevelNumDTO.setName("乙级病历");
+                secondLevelNumDTO.setNum(secondLevelNum);
+                secondLevelNumDTO.setTotleNum(totleNum);
+                Double secondPercent = BigDecimal.valueOf(secondLevelNum)
+                        .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                        .doubleValue();
+                String secondPercentStr = df.format(BigDecimal.valueOf(secondPercent).multiply(BigDecimal.valueOf(100))) + "%";
+                secondLevelNumDTO.setPercent(secondPercent);
+                secondLevelNumDTO.setPercentStr(secondPercentStr);
+                NumDTO thirdLevelNumDTO = new NumDTO();
+                thirdLevelNumDTO.setName("丙级病历");
+                thirdLevelNumDTO.setNum(thirdLevelNum);
+                thirdLevelNumDTO.setTotleNum(totleNum);
+                Double thirdPercent = BigDecimal.valueOf(thirdLevelNum)
+                        .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
+                        .doubleValue();
+                String thirdPercentStr = df.format(BigDecimal.valueOf(thirdPercent).multiply(BigDecimal.valueOf(100))) + "%";
+                thirdLevelNumDTO.setPercent(thirdPercent);
+                thirdLevelNumDTO.setPercentStr(thirdPercentStr);
+                retList.add(totleNumDTO);
+                retList.add(firstLevelNumDTO);
+                retList.add(secondLevelNumDTO);
+                retList.add(thirdLevelNumDTO);
+                retMap.put(map.get("NAME").toString(), retList);
             }
-            NumDTO totleNumDTO = new NumDTO();
-            totleNumDTO.setName("累计质控病历数");
-            totleNumDTO.setTotleNum(totleNum);
-            totleNumDTO.setNum(totleNum);
-            NumDTO firstLevelNumDTO = new NumDTO();
-            firstLevelNumDTO.setName("甲级病历");
-            firstLevelNumDTO.setNum(firstLevelNum);
-            firstLevelNumDTO.setTotleNum(totleNum);
-            Double firstPercent = BigDecimal.valueOf(firstLevelNum)
-                    .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
-                    .doubleValue();
-            String firstPercentStr = df.format(BigDecimal.valueOf(firstPercent).multiply(BigDecimal.valueOf(100))) + "%";
-            firstLevelNumDTO.setPercent(firstPercent);
-            firstLevelNumDTO.setPercentStr(firstPercentStr);
-            NumDTO secondLevelNumDTO = new NumDTO();
-            secondLevelNumDTO.setName("乙级病历");
-            secondLevelNumDTO.setNum(secondLevelNum);
-            secondLevelNumDTO.setTotleNum(totleNum);
-            Double secondPercent = BigDecimal.valueOf(secondLevelNum)
-                    .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
-                    .doubleValue();
-            String secondPercentStr = df.format(BigDecimal.valueOf(secondPercent).multiply(BigDecimal.valueOf(100))) + "%";
-            secondLevelNumDTO.setPercent(secondPercent);
-            secondLevelNumDTO.setPercentStr(secondPercentStr);
-            NumDTO thirdLevelNumDTO = new NumDTO();
-            thirdLevelNumDTO.setName("丙级病历");
-            thirdLevelNumDTO.setNum(thirdLevelNum);
-            thirdLevelNumDTO.setTotleNum(totleNum);
-            Double thirdPercent = BigDecimal.valueOf(thirdLevelNum)
-                    .divide(BigDecimal.valueOf(totleNum), 4, RoundingMode.HALF_UP)
-                    .doubleValue();
-            String thirdPercentStr = df.format(BigDecimal.valueOf(thirdPercent).multiply(BigDecimal.valueOf(100))) + "%";
-            thirdLevelNumDTO.setPercent(thirdPercent);
-            thirdLevelNumDTO.setPercentStr(thirdPercentStr);
-            retList.add(totleNumDTO);
-            retList.add(firstLevelNumDTO);
-            retList.add(secondLevelNumDTO);
-            retList.add(thirdLevelNumDTO);
-            retMap.put(deptName, retList);
         }
         return retMap;
     }

+ 310 - 0
src/main/java/com/diagbot/facade/MedAppealExamineInfoManagementFacade.java

@@ -0,0 +1,310 @@
+package com.diagbot.facade;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.MedAppealExamineInfoServiceClientFacade;
+import com.diagbot.dto.AnalyzeDTO;
+
+import com.diagbot.dto.ExportGetAppealReviewDTO;
+import com.diagbot.dto.ExportGetComplaintRecordDTO;
+import com.diagbot.dto.GetAppealReviewDTO;
+import com.diagbot.dto.GetComplaintRecordDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.MedAppealExamineInfo;
+import com.diagbot.entity.MedAppealInfo;
+
+import com.diagbot.entity.QcCasesEntry;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.enums.ExampleOperationEnum;
+import com.diagbot.enums.ExampleStatusEnum;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.MedAppealExamineInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.ApprovedVo;
+import com.diagbot.vo.GetAppealReviewVO;
+import com.diagbot.vo.GetComplaintRecordVO;
+import com.diagbot.vo.QcResultAlgVO;
+import com.diagbot.vo.QcresultVO;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @Description:申述记录
+ * @Author: songxl
+ * @Date 2022/1/5
+ */
+@Component
+public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoServiceImpl {
+    @Autowired
+    private QcresultDetailFacade qcresultDetailFacade;
+    @Autowired
+    private MedAppealInfoManagementFacade medAppealInfoManagementFacade;
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private QcCasesEntryFacade qcCasesEntryFacade;
+
+    /**
+     * 审核通过
+     *
+     * @param approvedVo
+     * @return
+     */
+    public Boolean approved(ApprovedVo approvedVo) {
+        LocalDateTime dateTime = LocalDateTime.now();
+        QcresultVO qcresultVO = new QcresultVO();
+        qcresultVO.setBehospitalCode(approvedVo.getBehospitalCode());
+        qcresultVO.setHospitalId(approvedVo.getHospitalId());
+        QcResultAlgVO qcResultAlgVO = approvedVo.getQcResultAlgVO();
+        Long modeId = approvedVo.getModeId();
+        if (modeId != null) {
+            QcCasesEntry qcCasesEntry = qcCasesEntryFacade.getOne(new QueryWrapper<QcCasesEntry>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("mode_id", modeId)
+                    .groupBy("mode_id")
+            );
+            if(qcCasesEntry!=null) {
+                qcResultAlgVO.setCasesId(qcCasesEntry.getCasesId());
+            }
+        }
+        //获取处理方式
+        String handling = approvedVo.getExampleOperation();
+        if (StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.UP_OR_DEL.getKey())) {
+            QcresultDetail detail = getQcresultDetail(approvedVo);
+            if (detail == null) {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "该条目已删除,无法进行审核操作,请走驳回流程。");
+            }
+            //调用删除接口
+            qcresultVO.setDelStatus(0);
+            qcresultVO.setType(4);
+            qcResultAlgVO.setId(detail.getId());
+            qcresultVO.setOptResultAlgVO(qcResultAlgVO);
+            AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
+            if (analyzeDTORespDTO.getIsSuccess()) {
+                approvedVo.setQcresultDetailId(detail.getId());
+                Boolean appealInfo = updateAppealInfo(approvedVo);
+                MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
+                medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_DEL.getKey());
+                medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                medAppealExamineInfo.setGmtCreate(dateTime);
+                medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("appeal_info_id", approvedVo.getId())
+                        .eq("check_id", approvedVo.getAppealId())
+                );
+                if (appealInfo && update) {
+                    return true;
+                } else {
+                    throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
+                }
+            } else {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "删除失败!");
+            }
+        }
+        if (StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.UP_OR_UP.getKey())) {
+            QcresultDetail detail = getQcresultDetail(approvedVo);
+            if (detail == null) {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "该条目已删除,无法进行审核操作,请走驳回流程。");
+            }
+            //调用修改接口
+            qcresultVO.setType(3);
+            qcResultAlgVO.setId(detail.getId());
+            qcresultVO.setOptResultAlgVO(qcResultAlgVO);
+            AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
+            if (analyzeDTORespDTO.getIsSuccess()) {
+                Boolean appealInfo = updateAppealInfo(approvedVo);
+                MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
+                medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_UP.getKey());
+                medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                medAppealExamineInfo.setGmtCreate(dateTime);
+                medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("appeal_info_id", approvedVo.getId())
+                        .eq("check_id", approvedVo.getAppealId())
+                );
+                if (appealInfo && update) {
+                    return true;
+                } else {
+                    throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
+                }
+            } else {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "修改失败!");
+            }
+        }
+        if (StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.ADD_EXIST.getKey())) {
+            //判断是否已存在该条目
+            QcresultDetail qcresultDetail = getQcresultDetail(approvedVo);
+            if (qcresultDetail != null) {
+                throw new CommonException(CommonErrorCode.IS_EXISTS, "该条目已存在,无法新增,请走驳回流程");
+            }
+            //调用新增接口
+            qcresultVO.setType(1);
+            qcresultVO.setOptResultAlgVO(qcResultAlgVO);
+            AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
+            if (analyzeDTORespDTO.getIsSuccess()) {
+                QcresultDetail detail = getQcresultDetail(approvedVo);
+                MedAppealInfo medAppealInfo = new MedAppealInfo();
+                medAppealInfo.setQcresultDetailId(detail.getId());
+                medAppealInfo.setWorkFlowNodeId(approvedVo.getWorkFlowNodeId());
+                boolean update = medAppealInfoManagementFacade.update(medAppealInfo, new UpdateWrapper<MedAppealInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("hospital_id", approvedVo.getHospitalId())
+                        .eq("behospital_code", approvedVo.getBehospitalCode())
+                        .eq("id", approvedVo.getId())
+                );
+                MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
+                medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_EXIST.getKey());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                medAppealExamineInfo.setGmtCreate(dateTime);
+                boolean update1 = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("appeal_info_id", approvedVo.getId())
+                        .eq("check_id", approvedVo.getAppealId())
+                );
+                if (update && update1) {
+                    return true;
+                } else {
+                    throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
+                }
+            } else {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "新增失败!");
+            }
+        }
+        if (StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.RECOVER.getKey())) {
+            qcresultVO.setType(4);
+            qcresultVO.setDelStatus(1);
+            //判断条目是否以恢复
+            QcresultDetail qcresultDetail = getQcresultDetail(approvedVo);
+            if (qcresultDetail != null) {
+                throw new CommonException(CommonErrorCode.IS_EXISTS, "该条目已恢复,无法进行审核操作,请走驳回流程。");
+            }
+
+            //调用删除恢复接口
+            List<QcresultDetail> qcresultDetails = qcresultDetailFacade.list(new QueryWrapper<QcresultDetail>()
+                    .eq("hospital_id", approvedVo.getHospitalId())
+                    .eq("behospital_code", approvedVo.getBehospitalCode())
+                    .eq("cases_entry_id", approvedVo.getQcResultAlgVO().getCasesEntryId())
+                    .eq("is_deleted",IsDeleteEnum.Y.getKey())
+                    .eq("grade_type", 2)
+                    .orderByDesc("id")
+            );
+            if(ListUtil.isNotEmpty(qcresultDetails)){
+                qcResultAlgVO.setId(qcresultDetails.get(0).getId());
+                qcresultVO.setOptResultAlgVO(qcResultAlgVO);
+                AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
+                if (analyzeDTORespDTO.getIsSuccess()) {
+                    approvedVo.setQcresultDetailId(qcresultDetails.get(0).getId());
+                    Boolean appealInfo = updateAppealInfo(approvedVo);
+                    MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
+                    medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.RECOVER.getKey());
+                    medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                    medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                    medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                    medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                    medAppealExamineInfo.setGmtCreate(dateTime);
+                    boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
+                            .eq("is_deleted", IsDeleteEnum.N.getKey())
+                            .eq("appeal_info_id", approvedVo.getId())
+                            .eq("check_id", approvedVo.getAppealId())
+                    );
+                    if (appealInfo && update) {
+                        return true;
+                    } else {
+                        throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
+                    }
+                } else {
+                    throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "恢复失败!");
+                }
+            }
+        }
+        if (StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.ADD_NO_EXIST.getKey())) {
+            Boolean appealInfo = updateAppealInfo(approvedVo);
+            MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
+            medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_NO_EXIST.getKey());
+            medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+            medAppealExamineInfo.setProcessResult(approvedVo.getProcessResult());
+            medAppealExamineInfo.setGmtCreate(dateTime);
+            boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("appeal_info_id", approvedVo.getId())
+                    .eq("check_id", approvedVo.getAppealId())
+            );
+            if (appealInfo && update) {
+                return true;
+            } else {
+                throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
+            }
+        }
+        throw new CommonException(CommonErrorCode.NOT_EXISTS, "无此类型处理方式!");
+    }
+    public Boolean updateAppealInfo(ApprovedVo approvedVo) {
+        MedAppealInfo medAppealInfo = new MedAppealInfo();
+        medAppealInfo.setQcresultDetailId(approvedVo.getQcresultDetailId());
+        medAppealInfo.setWorkFlowNodeId(approvedVo.getWorkFlowNodeId());
+        boolean update = medAppealInfoManagementFacade.update(medAppealInfo, new UpdateWrapper<MedAppealInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", approvedVo.getHospitalId())
+                .eq("behospital_code", approvedVo.getBehospitalCode())
+                .eq("id", approvedVo.getId())
+        );
+        if (update) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    //  获取detail条目信息
+    public QcresultDetail getQcresultDetail(ApprovedVo approvedVo) {
+        QcresultDetail qcresultDetail = qcresultDetailFacade.getOne(new QueryWrapper<QcresultDetail>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", approvedVo.getHospitalId())
+                .eq("behospital_code", approvedVo.getBehospitalCode())
+                .eq("cases_entry_id", approvedVo.getQcResultAlgVO().getCasesEntryId())
+        );
+        return qcresultDetail;
+    }
+
+    public void getAppealReviewExport(HttpServletResponse response, GetAppealReviewVO getAppealReviewVO, MedAppealExamineInfoServiceClientFacade medAppealExamineInfoServiceClient) {
+        getAppealReviewVO.setCurrent(1L);
+        getAppealReviewVO.setSize(Long.MAX_VALUE);
+        getAppealReviewVO.setSearchCount(false);
+        RespDTO<Page<GetAppealReviewDTO>> appealReview = medAppealExamineInfoServiceClient.getAppealReview(getAppealReviewVO);
+        //格式转换
+        List<ExportGetAppealReviewDTO> out = BeanUtil.listCopyTo(appealReview.data.getRecords(), ExportGetAppealReviewDTO.class);
+        String fileName = "申诉审核.xls";
+        ExcelUtils.exportExcelUser(out, null, "sheet1", ExportGetAppealReviewDTO.class, fileName, response);
+    }
+
+    public void getComplaintRecordExport(HttpServletResponse response, GetComplaintRecordVO getComplaintRecordVO, MedAppealExamineInfoServiceClientFacade medAppealExamineInfoServiceClient) {
+        getComplaintRecordVO.setCurrent(1L);
+        getComplaintRecordVO.setSize(Long.MAX_VALUE);
+        getComplaintRecordVO.setSearchCount(false);
+        RespDTO<Page<GetComplaintRecordDTO>> complaintRecord = medAppealExamineInfoServiceClient.getComplaintRecord(getComplaintRecordVO);
+        //格式转换
+        List<ExportGetComplaintRecordDTO> out = BeanUtil.listCopyTo(complaintRecord.data.getRecords(), ExportGetComplaintRecordDTO.class);
+        String fileName = "申诉记录.xls";
+        ExcelUtils.exportExcelUser(out, null, "sheet1", ExportGetComplaintRecordDTO.class, fileName, response);
+    }
+}

+ 18 - 0
src/main/java/com/diagbot/facade/MedAppealInfoManagementFacade.java

@@ -0,0 +1,18 @@
+package com.diagbot.facade;
+
+
+
+
+import com.diagbot.service.impl.MedAppealInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * @Description:申诉审核管理
+ * @Author: songxl
+ * @Date 2022/1/5
+ */
+@Component
+public class MedAppealInfoManagementFacade extends MedAppealInfoServiceImpl {
+
+}

+ 5 - 0
src/main/java/com/diagbot/facade/MedCheckInfoFacade.java

@@ -72,6 +72,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
         //获取人员id 和 该人员的医院id
         Long hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
         Long principleId = Long.valueOf(SysUserUtils.getCurrentPrincipleID());
+        checkAppealRelation();
         QueryWrapper<SysUser> userQuer = new QueryWrapper<>();
         userQuer.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("id", principleId)
@@ -111,6 +112,10 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
         return res;
     }
 
+    private void checkAppealRelation() {
+
+    }
+
     /**
      * @param mapAll
      * @param now

+ 121 - 0
src/main/java/com/diagbot/facade/MedicalRecordOtherFacade.java

@@ -0,0 +1,121 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.*;
+import com.diagbot.entity.MedicalRecord;
+import com.diagbot.entity.MedicalRecordContent;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.facade.data.AMedicalRecordContentFacade;
+import com.diagbot.service.impl.MedicalRecordServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EncrypDES;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.MedRecordContentOtherVO;
+import com.diagbot.vo.MedRecordOtherVO;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/3/9 11:39
+ */
+@Component
+public class MedicalRecordOtherFacade extends MedicalRecordServiceImpl {
+
+    @Autowired
+    private MedicalRecordFacade medicalRecordFacade;
+
+    @Autowired
+    private AMedicalRecordContentFacade AMedicalRecordContentFacade;
+
+    @Value("${encrypt.enable}")
+    Boolean encryptFlag;
+
+    /**
+     * @param medRecordOtherVO
+     * @return
+     */
+    public IPage<MedicalRecord> pageFac(MedRecordOtherVO medRecordOtherVO) {
+        Boolean flag = false;
+        QueryWrapper<MedicalRecord> medicalRecordQueryWrapper = new QueryWrapper<>();
+        medicalRecordQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medicalRecordQueryWrapper.eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        medicalRecordQueryWrapper.eq("mode_id", 0);
+        if (medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.eq("behospital_code", medRecordOtherVO.getBehospitalCode());
+        }
+
+        if (medRecordOtherVO.getRecTitle() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.like("rec_title", medRecordOtherVO.getRecTitle());
+        }
+        if (medRecordOtherVO.getRecDateStart() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.ge("rec_date", medRecordOtherVO.getRecDateStart());
+        }
+        if (medRecordOtherVO.getRecDateEnd() != null && medRecordOtherVO != null) {
+            medicalRecordQueryWrapper.le("rec_date", medRecordOtherVO.getRecDateEnd());
+        }
+        for (Object order : medRecordOtherVO.getOrders()) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            OrderItem orderName = objectMapper.convertValue(order, OrderItem.class);
+            String column = orderName.getColumn();
+            if (StringUtil.isNotEmpty(column) && orderName.isAsc()) {
+                flag = true;
+            }
+        }
+        if (flag) {
+            medicalRecordQueryWrapper.orderByAsc("rec_date");
+        } else {
+            medicalRecordQueryWrapper.orderByDesc("rec_date");
+        }
+
+        Page<MedicalRecord> pageCase = new Page<MedicalRecord>(medRecordOtherVO.getCurrent(), medRecordOtherVO.getSize());
+        IPage<MedicalRecord> medicalRecordIPage = medicalRecordFacade.getBaseMapper().selectPage(pageCase, medicalRecordQueryWrapper);
+
+        return medicalRecordIPage;
+    }
+
+    /**
+     * 文书详情
+     */
+    public MedRecordContentOtherDTO getRecordContentOther(MedRecordContentOtherVO medRecordContentOtherVO) {
+        MedicalRecordContent medicalRecordContent = AMedicalRecordContentFacade.getOne(new QueryWrapper<MedicalRecordContent>()
+                .eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()))
+                .eq("rec_id", medRecordContentOtherVO.getRecId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+        );
+        if (medicalRecordContent != null) {
+            if (medicalRecordContent.getHospitalId() == 35) {
+                medicalRecordContent.setHtmlText(medicalRecordContent.getXmlText());
+            }
+        } else {
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "该文书数据缺失~");
+        }
+        MedRecordContentOtherDTO medRecordContentOtherDTO = new MedRecordContentOtherDTO();
+        BeanUtil.copyProperties(medicalRecordContent, medRecordContentOtherDTO);
+        // 解密数据
+        if (encryptFlag) {
+            try {
+                EncrypDES encrypDES = new EncrypDES();
+                if (StringUtils.isNotEmpty(medRecordContentOtherDTO.getHtmlText())) {
+                    medRecordContentOtherDTO.setHtmlText(encrypDES.decryptor(medRecordContentOtherDTO.getHtmlText()));
+                }
+            } catch (Exception e) {
+                medRecordContentOtherDTO.setHtmlText(null);
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "解密错误!病历ID=【" + medRecordContentOtherDTO.getRecId() + "】");
+            }
+        }
+        return medRecordContentOtherDTO;
+    }
+
+}

+ 2 - 9
src/main/java/com/diagbot/facade/QcresultInfoFacade.java

@@ -222,9 +222,7 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
                         .eq("hospital_id", analyzeVO.getHospitalId())
                         .eq("behospital_code", analyzeVO.getBehospitalCode())
-                        .set("is_deleted", IsDeleteEnum.Y.getKey())
-                        .set("modifier", useId)
-                        .set("gmt_modified", now));
+                        .set("is_deleted", IsDeleteEnum.Y.getKey()));
                 //
                 //批量插入新的数据
                 List<QcresultDetail> qcresultDetailList = new ArrayList<>();
@@ -252,8 +250,8 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                         qcresultDetail.setQcresultInfoId(newId);
                         qcresultDetailList.add(qcresultDetail);
                     }
-                    qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
                 }
+                qcresultDetailServiceImpl.saveBatch(qcresultDetailList);
                 break;
             case 1:
                 //新增条目
@@ -337,7 +335,6 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                             .set("opt_type", 1)
                             .set("qcresult_info_id", newId)
                             .set("modifier", useId)
-                            .set("remark", null)
                             .set("gmt_modified", now)
                     );
                 } else {
@@ -359,8 +356,6 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                         .eq("grade_type", 2)
                         .eq("behospital_code", analyzeVO.getBehospitalCode())
                         .set("qcresult_info_id", newId)
-                        .set("modifier", useId)
-                        .set("gmt_modified", now)
                 );
             }
             //未删除的 评分主表id
@@ -369,8 +364,6 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                     .eq("hospital_id", analyzeVO.getHospitalId())
                     .eq("behospital_code", analyzeVO.getBehospitalCode())
                     .set("qcresult_info_id", newId)
-                    .set("modifier", useId)
-                    .set("gmt_modified", now)
             );
         }
 

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

@@ -6,6 +6,7 @@ import com.diagbot.dto.BehospitalInfoAgeDTO;
 import com.diagbot.dto.CheckedRecordListDTO;
 import com.diagbot.dto.SysUserDeptDTO;
 import com.diagbot.entity.BasDeptInfo;
+import com.diagbot.entity.MedAppealInfo;
 import com.diagbot.entity.MedBehospitalType;
 import com.diagbot.entity.MedCheckInfo;
 import com.diagbot.entity.SysUserDept;
@@ -24,6 +25,7 @@ import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.CheckedRecordListVO;
+import com.diagbot.vo.MedCheckInfoAddVO;
 import com.diagbot.vo.RecordCheckVO;
 import com.diagbot.vo.SysUserBaseVO;
 import com.google.common.collect.Lists;
@@ -60,7 +62,10 @@ public class RecordCheckFacade {
     BasDeptInfoFacade basDeptInfoFacade;
     @Autowired
     MedBehospitalTypeServiceImpl medBehospitalTypeServiceImpl;
-
+    @Autowired
+    private SysHospitalSetFacade sysHospitalSetFacade;
+    @Autowired
+    private MedAppealInfoManagementFacade appealInfoManagementFacade;
 
     public IPage<CheckedRecordListDTO> checkedRecordList(CheckedRecordListVO checkedRecordListVO) {
         Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
@@ -159,7 +164,8 @@ public class RecordCheckFacade {
     public boolean recordCheck(RecordCheckVO recordCheckVO) {
         Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
         Long userId = Long.parseLong(SysUserUtils.getCurrentPrincipleID());
-
+        //获取核查与申诉是否相关配置(核查完成是否有申诉时的内容)
+        checkAppealRelation(hospitalId,recordCheckVO);
         QueryWrapper<MedCheckInfo> medCheckInfoQueryWrapper = new QueryWrapper<>();
         medCheckInfoQueryWrapper.eq("behospital_code", recordCheckVO.getBehospitalCode());
         medCheckInfoQueryWrapper.eq("hospital_id", hospitalId);
@@ -177,6 +183,22 @@ public class RecordCheckFacade {
         return true;
     }
 
+    private void checkAppealRelation(Long hospitalId, RecordCheckVO recordCheckVO) {
+        //获取核查与申诉是否相关配置(核查完成是否有申诉时的内容)
+        String check_appeal_relation = sysHospitalSetFacade.getValue(hospitalId,"check_appeal_relation");
+        if(StringUtil.isNotEmpty(check_appeal_relation)&&Boolean.parseBoolean(check_appeal_relation)){
+            //获取该病例在待审核状态下的病历数量
+            int count = appealInfoManagementFacade.count(new QueryWrapper<MedAppealInfo>()
+                    .eq("work_flow_node_id","1")
+                    .eq("behospital_code",recordCheckVO.getBehospitalCode())
+                    .eq("is_deleted",IsDeleteEnum.N.getKey()));
+            if(count>0){
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "当前缺陷列表存在待审核记录,无法完成核查。");
+            }
+        }
+
+    }
+
     /**
      * @Author songxl
      * @Description获取当前用户的任务来源 和筛选分值

+ 38 - 3
src/main/java/com/diagbot/facade/SysDictionaryFacade.java

@@ -11,9 +11,7 @@ import com.diagbot.util.ListUtil;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Component;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @Description:
@@ -70,4 +68,41 @@ public class SysDictionaryFacade extends SysDictionaryInfoServiceImpl {
         }
         return accessToken;
     }
+
+    /**
+     * 获取字典申诉驳回具体信息
+     * @return
+     */
+    public List<SysDictionaryInfoDTO> getAppealRejectDictionary(String groupType){
+        List<SysDictionaryInfoDTO> sysDictionaryInfoDTOS = new LinkedList<SysDictionaryInfoDTO>();
+        if (getDictionary() != null
+                && getDictionary().containsKey(Long.parseLong(groupType))
+        ) {
+            sysDictionaryInfoDTOS = getDictionary().get(Long.parseLong(groupType));
+        }
+        return sysDictionaryInfoDTOS;
+    }
+
+    /**
+     * 获取字典申诉驳回总体信息
+     * @return
+     */
+    public Map<String,Map<String, String>> getAppealRejectionDictionary(){
+        Map<String, Map<String,String>> appealOperationMap = new HashMap<>();
+        Map<String, String> appealOperationMapKey = new HashMap<>();
+        if (getDictionaryWithKey() != null
+                && getDictionaryWithKey().containsKey("34")
+        ) {
+            appealOperationMapKey= getDictionaryWithKey().get("34");
+        }
+        String appealOperation = appealOperationMapKey.get("申诉驳回");
+        String[] split = appealOperation.split(",");
+        List<String> strings = Arrays.asList(split);
+        for (int i = 0; i < strings.size(); i++) {
+            List<SysDictionaryInfoDTO> appealStatusDictionary = getAppealRejectDictionary(strings.get(i));
+            Map<String, String> keyValue = EntityUtil.makeMapWithKeyValue(appealStatusDictionary, "name", "val");
+            appealOperationMap.put(appealStatusDictionary.get(0).getRemark(), keyValue);
+        }
+        return appealOperationMap;
+    }
 }

+ 14 - 5
src/main/java/com/diagbot/facade/SysUserFacade.java

@@ -143,8 +143,9 @@ public class SysUserFacade extends SysUserServiceImpl {
 
     /**
      * 获取jwt
-     *
+     * <p>
      * userLoginVO
+     *
      * @return jwt
      */
     public JwtDTO getJwt(HttpServletRequest request, UserLoginVO userLoginVO) {
@@ -158,9 +159,9 @@ public class SysUserFacade extends SysUserServiceImpl {
                     "请输入密码");
         }
         //非湘雅医院执行
-        String captchaId ="";
-        if(0L == getHospitalMark()) {
-            if ( StringUtils.isEmpty(userLoginVO.getCaptcha())) {
+        String captchaId = "";
+        if (0L == getHospitalMark()) {
+            if (StringUtils.isEmpty(userLoginVO.getCaptcha())) {
                 throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
                         "请输入验证码");
             }
@@ -191,7 +192,7 @@ public class SysUserFacade extends SysUserServiceImpl {
         if (null == jwt) {
             throw new CommonException(ServiceErrorCode.GET_TOKEN_FAIL);
         }
-        if(0L == getHospitalMark()) {
+        if (0L == getHospitalMark()) {
             redisUtils.del("user:captchaIds:" + captchaId);
         }
         data.setAccessToken(jwt.getAccess_token());
@@ -779,6 +780,14 @@ public class SysUserFacade extends SysUserServiceImpl {
             throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "该医院下无该用户");
         }
     }
+
+    public Long getUserId(String claimantId, Long hospitalId) {
+        SysUser user = this.getBaseMapper().getUser(claimantId, hospitalId);
+        if (user != null && user.getId() != null) {
+            return user.getId();
+        }
+        return null;
+    }
     //-------------用户维护END---------------------------
 
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedAppealExamineInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 申诉审批表 Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface MedAppealExamineInfoMapper extends BaseMapper<MedAppealExamineInfo> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedAppealInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 申诉记录表 Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface MedAppealInfoMapper extends BaseMapper<MedAppealInfo> {
+
+}

+ 2 - 0
src/main/java/com/diagbot/mapper/QcresultInfoMapper.java

@@ -89,6 +89,8 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      */
     public List<NumDTO> resultCountByDept(QcresultFilterVO qcresultFilterVO);
 
+    public List<Map<String,Object>> resultMrCountByDept(QcresultFilterVO qcresultFilterVO);
+
     /**
      * 各模块缺陷占比-按科室
      *

+ 3 - 0
src/main/java/com/diagbot/mapper/SysUserMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.SysUserQueryDTO;
 import com.diagbot.entity.SysUser;
 import com.diagbot.vo.SysUserQueryVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -16,4 +17,6 @@ import com.diagbot.vo.SysUserQueryVO;
  */
 public interface SysUserMapper extends BaseMapper<SysUser> {
     IPage<SysUserQueryDTO> userPage(SysUserQueryVO sysUserQueryVO);
+
+    SysUser getUser(@Param("claimantId") String claimantId, @Param("hospitalId") Long hospitalId);
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedAppealExamineInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 申诉审批表 服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface MedAppealExamineInfoService extends IService<MedAppealExamineInfo> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedAppealInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 申诉记录表 服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+public interface MedAppealInfoService extends IService<MedAppealInfo> {
+
+}

+ 3 - 0
src/main/java/com/diagbot/service/QcresultInfoService.java

@@ -17,6 +17,7 @@ import com.diagbot.vo.QcresultFilterVO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -86,6 +87,8 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      */
     public List<NumDTO> resultCountByDept(QcresultFilterVO qcresultFilterVO);
 
+    public  List<Map<String,Object>> resultMrCountByDept(QcresultFilterVO qcresultFilterVO);
+
     /**
      * 各模块缺陷占比-按科室
      *

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedAppealExamineInfo;
+import com.diagbot.mapper.MedAppealExamineInfoMapper;
+import com.diagbot.service.MedAppealExamineInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 申诉审批表 服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Service
+public class MedAppealExamineInfoServiceImpl extends ServiceImpl<MedAppealExamineInfoMapper, MedAppealExamineInfo> implements MedAppealExamineInfoService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedAppealInfo;
+import com.diagbot.mapper.MedAppealInfoMapper;
+import com.diagbot.service.MedAppealInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 申诉记录表 服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-01-20
+ */
+@Service
+public class MedAppealInfoServiceImpl extends ServiceImpl<MedAppealInfoMapper, MedAppealInfo> implements MedAppealInfoService {
+
+}

+ 4 - 0
src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java

@@ -113,6 +113,10 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
     public List<NumDTO> resultCountByDept(QcresultFilterVO qcresultFilterVO) {
         return baseMapper.resultCountByDept(qcresultFilterVO);
     }
+    @Override
+    public List<Map<String,Object>> resultMrCountByDept(QcresultFilterVO qcresultFilterVO){
+        return baseMapper.resultMrCountByDept(qcresultFilterVO);
+    }
 
     /**
      * 各模块缺陷占比-按科室

+ 87 - 0
src/main/java/com/diagbot/vo/AddAppealInfoApiVO.java

@@ -0,0 +1,87 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class AddAppealInfoApiVO {
+
+    @ApiModelProperty(value = "医院ID",required = true)
+    @NotNull(message = "医院ID不能为空")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "病人住院ID", required = true)
+    @NotBlank(message = "病人住院ID不能为空")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "模块总分")
+    private BigDecimal casesScore;
+
+    @ApiModelProperty(value = "单项否决(1-单项否决 0-非)")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "质控条目")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "提示信息(")
+    private String casesEntryMsg;
+
+    @ApiModelProperty(value = "分值")
+    private BigDecimal value;
+
+    @ApiModelProperty(value = "模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+    @ApiModelProperty(value = "病历内容")
+    private String defectContent;
+
+    @ApiModelProperty(value = "申诉人工号", required = true)
+    @NotBlank(message = "申诉人工号不能为空")
+    private String claimantId;
+
+    @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)", required = true)
+    @NotBlank(message = "申诉类型不能为空")
+    private String appealType;
+
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)", required = true)
+    @NotBlank(message = "申诉操作类型不能为空")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "申诉说明", required = true)
+    @NotBlank(message = "申诉说明不能为空")
+    private String appealExplain;
+
+    @ApiModelProperty(value = "审核人id", required = true)
+    @NotNull(message = "审核人id不能为空")
+    private Long checkId;
+
+    @ApiModelProperty(value = "当前工作流节点id", hidden = true)
+    private Long workFlowNodeId;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 89 - 0
src/main/java/com/diagbot/vo/AddAppealInfoVO.java

@@ -0,0 +1,89 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class AddAppealInfoVO {
+
+    @ApiModelProperty(value = "医院ID")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "病人住院ID", required = true)
+    @NotBlank(message = "病人住院ID不能为空")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "模块总分")
+    private BigDecimal casesScore;
+
+    @ApiModelProperty(value = "单项否决(1-单项否决 0-非)")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "质控条目(新增已有操作才有值)")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "提示信息(新增已有操作才有值)")
+    private String casesEntryMsg;
+
+    @ApiModelProperty(value = "分值(新增已有操作才有值)")
+    private BigDecimal value;
+
+    @ApiModelProperty(value = "模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称", hidden = true)
+    private String modeName;
+
+
+    @ApiModelProperty(value = "病历内容")
+    private String defectContent;
+
+    @ApiModelProperty(value = "申诉人id")
+    private String claimantId;
+
+    @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)", required = true)
+    @NotBlank(message = "申诉类型不能为空")
+    private String appealType;
+
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)", required = true)
+    @NotBlank(message = "申诉操作类型不能为空")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "申诉说明", required = true)
+    @NotBlank(message = "申诉说明不能为空")
+    private String appealExplain;
+
+    @ApiModelProperty(value = "审核人id", required = true)
+    @NotNull(message = "审核人id不能为空")
+    private Long checkId;
+
+    @ApiModelProperty(value = "当前工作流节点id", hidden = true)
+    private Long workFlowNodeId;
+
+    @ApiModelProperty(value = "单人申诉开关", hidden = true)
+    private Boolean singleAppealFalg;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 75 - 0
src/main/java/com/diagbot/vo/ApprovedVo.java

@@ -0,0 +1,75 @@
+package com.diagbot.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+
+import java.math.BigDecimal;
+
+/**
+ * 通过
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class ApprovedVo {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "申诉id",required = true)
+    private Long id;
+
+    @ApiModelProperty(value = "工作流节点",hidden = true)
+    private Long workFlowNodeId;
+
+    @ApiModelProperty(value = "审核人id",hidden = true)
+    private Long appealId;
+
+    @ApiModelProperty(value = "病人住院序号",required = true)
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "处理方式(1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复)",required = true)
+    private String exampleOperation;
+
+    @ApiModelProperty(value = "处理结果")
+    private String processResult;
+
+//    @ApiModelProperty(value = "申诉模块",required = true)
+//    private Long casesId;
+//
+    @ApiModelProperty(value = "质控缺陷ID",hidden = true)
+    private Long qcresultDetailId;
+//
+//    @ApiModelProperty(value = "条目ID")
+//    private Long casesEntryId;
+//
+    @ApiModelProperty(value = "质控条目")
+    private String casesEntryName;
+//
+//    @ApiModelProperty(value = "提示信息")
+//    private String casesEntryMsg;
+//
+//    @ApiModelProperty(value = "分值")
+//    private BigDecimal value;
+//
+//    @ApiModelProperty(value = "备注")
+//    private String remark;
+
+    @ApiModelProperty(hidden = true)
+    private Integer type;
+
+    @ApiModelProperty("逻辑删除接口(1-恢复和0-删除)标志")
+    private Integer delStatus;
+
+    @ApiModelProperty(value = "模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "操作条目")
+    private QcResultAlgVO qcResultAlgVO;
+}

+ 3 - 0
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -109,4 +109,7 @@ public class BehospitalPageVO extends Page implements Serializable {
     private Date mrTimeStart;
     private Date mrTimeEnd;
 
+    @ApiModelProperty("页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
+    private String pageType = "1";
+
 }

+ 26 - 0
src/main/java/com/diagbot/vo/CancelAppealInfoApiVO.java

@@ -0,0 +1,26 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class CancelAppealInfoApiVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    private Long id;
+    @ApiModelProperty(value = "医院ID",required = true)
+    @NotNull(message = "医院ID不能为空")
+    private Long hospitalId;
+    @ApiModelProperty(value = "申述人工号",required = true)
+    @NotBlank(message = "申述人工号不能为空")
+    private String claimantId;
+    @ApiModelProperty(value = "当前工作流节点id 1:申诉|2:撤回|3:审核", hidden = true)
+    private Long workFlowNodeId;
+}

+ 22 - 0
src/main/java/com/diagbot/vo/CancelAppealInfoVO.java

@@ -0,0 +1,22 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class CancelAppealInfoVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    private Long id;
+    @ApiModelProperty(value = "申述人工号", hidden = true)
+    private String claimantId;
+    @ApiModelProperty(value = "当前工作流节点id 1:申诉|2:撤回|3:审核", hidden = true)
+    private Long workFlowNodeId;
+}

+ 37 - 0
src/main/java/com/diagbot/vo/GetAppealDeptVo.java

@@ -0,0 +1,37 @@
+package com.diagbot.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 通过
+ *
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetAppealDeptVo {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "医院ID", hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "申诉人id", hidden = true)
+    private Long claimantId;
+
+    @ApiModelProperty(value = "审核人id", hidden = true)
+    private Long checkId;
+
+    @ApiModelProperty(value = "页面类型:1:申诉记录|2:申诉审核")
+    @NotBlank(message = "页面类型不能为空")
+    private String pageType;
+
+    @ApiModelProperty(value = "是否已归档(0:未归档,1:已归档)")
+    private String isPlacefile;
+
+}

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

@@ -0,0 +1,39 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetAppealInfoVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    @NotNull(message = "申诉id不能为空")
+    private Long id;
+
+    @ApiModelProperty(value = "医院ID")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "解释说明" ,hidden = true)
+    private String appealExplain;
+
+    @ApiModelProperty(value = "排除的工作节点" ,hidden = true)
+    //排除撤回的申诉记录
+    private String concelWorkFlowNode = "2";
+//    @ApiModelProperty(value = "类型 1:申诉查看|2:审核查看")
+//    private String type = "1";
+}

+ 37 - 0
src/main/java/com/diagbot/vo/GetAppealModeVo.java

@@ -0,0 +1,37 @@
+package com.diagbot.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 通过
+ *
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetAppealModeVo {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "医院ID", hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "申诉人id", hidden = true)
+    private Long claimantId;
+
+    @ApiModelProperty(value = "审核人id", hidden = true)
+    private Long checkId;
+
+    @ApiModelProperty(value = "页面类型:1:申诉记录|2:申诉审核")
+    @NotBlank(message = "页面类型不能为空")
+    private String pageType;
+
+    @ApiModelProperty(value = "是否已归档(0:未归档,1:已归档)")
+    private String isPlacefile;
+
+}

+ 24 - 0
src/main/java/com/diagbot/vo/GetAppealOperationTypeVO.java

@@ -0,0 +1,24 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetAppealOperationTypeVO {
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+    @ApiModelProperty(value = "审核状态 0:待审核|1:驳回|2:通过", required = true)
+    @NotBlank(message = "审核状态不能为空")
+    private String exampleStatus;
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)", required = true)
+    @NotBlank(message = "申诉操作类型不能为空")
+    private String appealOperationType;
+}

+ 55 - 0
src/main/java/com/diagbot/vo/GetAppealReviewVO.java

@@ -0,0 +1,55 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 审核记录
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetAppealReviewVO extends Page implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "审核人id",hidden = true)
+    private Long appealId;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申述开始时间", required = true)
+    private Date complaintDateStart;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申述结束时间", required = true)
+    private Date complaintDateEnd;
+
+    @ApiModelProperty(value = "所属科室")
+    private String deptName;
+
+    @ApiModelProperty(value = "申述模块")
+    private String modeName;
+
+    @ApiModelProperty(value = "申诉人")
+    private String name;
+
+    @ApiModelProperty(value = "操作类型")
+    private String operationType;
+
+    @ApiModelProperty(value = "状态")
+    private String state;
+
+    @ApiModelProperty(value = "是否已归档(0:未归档,1:已归档)")
+    private String isPlacefile;
+
+}

+ 21 - 0
src/main/java/com/diagbot/vo/GetApprovedViewVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetApprovedViewVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    @NotNull(message = "申诉id不能为空")
+    private Long id;
+
+    @ApiModelProperty(value = "类型 1:申诉查看|2:审核查看")
+    private String type = "2";
+}

+ 21 - 0
src/main/java/com/diagbot/vo/GetAuditNumberVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetAuditNumberVO {
+    @ApiModelProperty(value = "审核人",required = true,hidden = true)
+    private Long id;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "质控类型 0-运行质控,1-终末质控")
+    private Long analyzeType;
+}

+ 31 - 0
src/main/java/com/diagbot/vo/GetComplaintDetailMsgVO.java

@@ -0,0 +1,31 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description:
+ * @author: zhanghang
+ * @time: 2022/3/1 14:38
+ */
+@Getter
+@Setter
+public class GetComplaintDetailMsgVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "缺陷Id")
+    private Long id;
+
+    @ApiModelProperty(value = "病人序列号")
+    private Long behospitalCode;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+}

+ 61 - 0
src/main/java/com/diagbot/vo/GetComplaintRecordVO.java

@@ -0,0 +1,61 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 申述记录
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class GetComplaintRecordVO extends Page implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "申述人id",hidden = true)
+    private Long complaintId;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申述开始时间", required = true)
+    private Date complaintDateStart;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "申述结束时间", required = true)
+    private Date complaintDateEnd;
+
+    @ApiModelProperty(value = "所属科室")
+    private String deptName;
+
+    @ApiModelProperty(value = "申述模块")
+    private String modeName;
+
+    @ApiModelProperty(value = "审核人")
+    private String name;
+
+    @ApiModelProperty(value = "操作类型")
+    private String operationType;
+
+    @ApiModelProperty(value = "状态")
+    private String state;
+
+    @ApiModelProperty(value = "是否已归档(0:未归档,1:已归档)")
+    private String isPlacefile;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String patientName;
+
+}

+ 3 - 0
src/main/java/com/diagbot/vo/GetDetailVO.java

@@ -19,4 +19,7 @@ public class GetDetailVO {
     @ApiModelProperty(hidden = true)
     private Long hospitalId; //医院ID
     private List<String> paramStr = new ArrayList<>(); // 获取具体的参数
+
+//    @ApiModelProperty(value = "页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
+//    private String pageType = "1";
 }

+ 27 - 0
src/main/java/com/diagbot/vo/GetReviewerApiVO.java

@@ -0,0 +1,27 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetReviewerApiVO {
+
+    @ApiModelProperty(value = "医院ID",required = true)
+    @NotNull(message = "医院ID不能为空")
+    private Long hospitalId;
+    @ApiModelProperty(value = "申述人工号",required = true)
+    @NotBlank(message = "申述人工号不能为空")
+    private String claimantId;
+    @ApiModelProperty(value = "是否包含自身开关", hidden = true)
+    private Boolean selfFlag = false;
+    @ApiModelProperty(value = "审核角色id", hidden = true)
+    private String roleID = "10";
+}

+ 23 - 0
src/main/java/com/diagbot/vo/GetReviewerVO.java

@@ -0,0 +1,23 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetReviewerVO {
+    @ApiModelProperty(value = "申诉人id", hidden = true)
+    private String claimantId;
+    @ApiModelProperty(value = "是否包含自身开关", hidden = true)
+    private Boolean selfFlag = false;
+    @ApiModelProperty(value = "审核角色id", hidden = true)
+    private String roleID = "10";
+    @ApiModelProperty(value = "医院ID",hidden = true)
+    private Long hospitalId;
+}

+ 18 - 0
src/main/java/com/diagbot/vo/MedAppealInfoVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class MedAppealInfoVO {
+    @ApiModelProperty(value = "编号",required = true)
+    @NotNull(message = "编号为空")
+    private Long id;
+}

+ 51 - 0
src/main/java/com/diagbot/vo/MedRecordContentOtherVO.java

@@ -0,0 +1,51 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/03/09 14:59
+ */
+@Data
+public class MedRecordContentOtherVO {
+
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 文书ID
+     */
+    private String recId;
+
+    /**
+     * 病历号
+     */
+    @ApiModelProperty(hidden = true)
+    private String behospitalCode;
+
+    /**
+     * 病历标题
+     */
+    @ApiModelProperty(hidden = true)
+    private String recTitle;
+
+    /**
+     * 创建开始时间
+     */
+    @ApiModelProperty(hidden = true)
+    private Date recDateStart;
+
+    /**
+     * 创建结束时间
+     */
+    @ApiModelProperty(hidden = true)
+    private Date recDateEnd;
+
+}

+ 47 - 0
src/main/java/com/diagbot/vo/MedRecordOtherVO.java

@@ -0,0 +1,47 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: Wsy
+ * @time: 2022/03/09 14:59
+ */
+@Data
+public class MedRecordOtherVO extends Page implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 病历号
+     */
+    @NotBlank(message = "请输入病历号")
+    private String behospitalCode;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+
+    /**
+     * 创建开始时间
+     */
+    private Date recDateStart;
+
+    /**
+     * 创建结束时间
+     */
+    private Date recDateEnd;
+
+}

+ 37 - 0
src/main/java/com/diagbot/vo/RejectedVo.java

@@ -0,0 +1,37 @@
+package com.diagbot.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 驳回
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class RejectedVo {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "医院id",hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "申诉id",required = true)
+    private Long id;
+
+    @ApiModelProperty(value = "工作流节点",hidden = true)
+    private Long workFlowNodeId;
+
+    @ApiModelProperty(value = "审核人id",hidden = true)
+    private Long appealId;
+
+    @ApiModelProperty(value = "病人住院序号",required = true)
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "驳回理由")
+    private String rejectedReason;
+
+}

+ 179 - 0
src/main/java/com/diagbot/web/MedAppealExamineInfoController.java

@@ -0,0 +1,179 @@
+package com.diagbot.web;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.client.MedAppealExamineInfoServiceClientFacade;
+import com.diagbot.dto.GetAppealInfoDTO;
+import com.diagbot.dto.GetAppealReviewDTO;
+import com.diagbot.dto.GetComplaintRecordDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.facade.MedAppealExamineInfoManagementFacade;
+import com.diagbot.facade.SysDictionaryFacade;
+import com.diagbot.facade.SysHospitalSetFacade;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.ApprovedVo;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealReviewVO;
+import com.diagbot.vo.GetAuditNumberVO;
+import com.diagbot.vo.GetComplaintDetailMsgVO;
+import com.diagbot.vo.GetComplaintRecordVO;
+import com.diagbot.vo.RejectedVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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 javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.Map;
+
+
+/**
+ * <p>
+ * 申诉审核 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-07-06
+ */
+@RestController
+@RequestMapping("/qc/appealExamineInfo")
+@Api(value = "申诉审核API", tags = { "申诉审核API" })
+@SuppressWarnings("unchecked")
+public class MedAppealExamineInfoController {
+    @Autowired
+    MedAppealExamineInfoServiceClientFacade medAppealExamineInfoServiceClientFacade;
+    @Autowired
+    SysDictionaryFacade sysDictionaryFacade;
+    @Autowired
+    MedAppealExamineInfoManagementFacade medAppealExamineInfoManagementFacade;
+    @Autowired
+    SysHospitalSetFacade sysHospitalSetFacade;
+
+    @ApiOperation(value = "获取申述记录列表[by:zhanghang]",
+            notes = "获取申诉任务接口")
+    @PostMapping("/getComplaintRecord")
+    @SysLogger("getComplaintRecord")
+    public RespDTO<Page<GetComplaintRecordDTO>> getComplaintRecord(@RequestBody GetComplaintRecordVO getComplaintRecordVO) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getComplaintRecordVO.setHospitalId(Long.valueOf(hospitalId));
+        getComplaintRecordVO.setComplaintId(Long.valueOf(userId));
+        return medAppealExamineInfoServiceClientFacade.getComplaintRecord(getComplaintRecordVO);
+    }
+
+    @ApiOperation(value = "获取申诉审核列表[by:zhanghang]",
+            notes = "获取申诉审核列表")
+    @PostMapping("/getAppealReview")
+    public RespDTO<Page<GetAppealReviewDTO>> getAppealReview(@RequestBody GetAppealReviewVO getAppealReviewVO) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getAppealReviewVO.setHospitalId(Long.valueOf(hospitalId));
+        getAppealReviewVO.setAppealId(Long.valueOf(userId));
+        return medAppealExamineInfoServiceClientFacade.getAppealReview(getAppealReviewVO);
+    }
+
+    @ApiOperation(value = "审核通过[by:zhanghang]",
+            notes = "审核通过")
+    @PostMapping("/approved")
+    @Transactional
+    public RespDTO<Boolean> approved(@RequestBody ApprovedVo approvedVo) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        approvedVo.setHospitalId(Long.valueOf(hospitalId));
+        approvedVo.setAppealId(Long.valueOf(userId));
+
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()),"work_flow_node_mapping");
+        if(StringUtil.isNotEmpty(mapping)){
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            approvedVo.setWorkFlowNodeId(mapJSON.getLong("approved"));
+        }
+        // return RespDTO.onSuc(medAppealExamineInfoServiceClient.approved(approvedVo));
+        return RespDTO.onSuc(medAppealExamineInfoManagementFacade.approved(approvedVo));
+    }
+
+    @ApiOperation(value = "驳回[by:zhanghang]",
+            notes = "驳回")
+    @PostMapping("/rejected")
+    @Transactional
+    public RespDTO<Boolean> rejected(@RequestBody RejectedVo rejectedVo) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        rejectedVo.setHospitalId(Long.valueOf(hospitalId));
+        rejectedVo.setAppealId(Long.valueOf(userId));
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()),"work_flow_node_mapping");
+        if(StringUtil.isNotEmpty(mapping)){
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            rejectedVo.setWorkFlowNodeId(mapJSON.getLong("rejected"));
+        }
+        return medAppealExamineInfoServiceClientFacade.rejected(rejectedVo);
+    }
+    @ApiOperation(value = "审核查看[by:zhanghang]",
+            notes = "审核查看")
+    @PostMapping("/getApprovedView")
+    public RespDTO<GetAppealInfoDTO> getApprovedView(@RequestBody GetAppealInfoVO getAppealInfoVO) {
+        return medAppealExamineInfoServiceClientFacade.getApprovedView(getAppealInfoVO);
+    }
+
+    @ApiOperation(value = "获取操作类型及状态[by:zhanghang]",
+            notes = "获取操作类型及状态")
+    @PostMapping("/getAppealReviewDictionary")
+    public RespDTO<Map<String,Map<String,String>>> getAppealReviewDictionary() {
+        Map<String, Map<String, String>> appealRejectionDictionary = sysDictionaryFacade.getAppealRejectionDictionary();
+        return RespDTO.onSuc(appealRejectionDictionary);
+    }
+
+    @ApiOperation(value = "获取待审核数量[by:zhanghang]",
+            notes = "获取待审核数量")
+    @PostMapping("/getAuditNumber")
+    public RespDTO<Integer> getAuditNumber(@RequestBody GetAuditNumberVO getAuditNumberVO) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getAuditNumberVO.setHospitalId(Long.valueOf(hospitalId));
+        getAuditNumberVO.setId(Long.valueOf(userId));
+        return medAppealExamineInfoServiceClientFacade.getAuditNumber(getAuditNumberVO);
+    }
+
+
+    @ApiOperation(value = "申诉记录导出[by:songxl]")
+    @PostMapping("/getComplaintRecordExport")
+    @SysLogger("getComplaintRecordExport")
+    public void getComplaintRecordExport(HttpServletResponse response, @RequestBody @Valid GetComplaintRecordVO getComplaintRecordVO) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getComplaintRecordVO.setHospitalId(Long.valueOf(hospitalId));
+        getComplaintRecordVO.setComplaintId(Long.valueOf(userId));
+        medAppealExamineInfoManagementFacade.getComplaintRecordExport(response, getComplaintRecordVO, medAppealExamineInfoServiceClientFacade);
+    }
+
+    @ApiOperation(value = "申诉审核导出[by:songxl]")
+    @PostMapping("/getAppealReviewExport")
+    @SysLogger("getAppealReviewExport")
+    public void getAppealReviewExport(HttpServletResponse response, @RequestBody @Valid GetAppealReviewVO getAppealReviewVO) {
+        String userId = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getAppealReviewVO.setHospitalId(Long.valueOf(hospitalId));
+        getAppealReviewVO.setAppealId(Long.valueOf(userId));
+        medAppealExamineInfoManagementFacade.getAppealReviewExport(response, getAppealReviewVO, medAppealExamineInfoServiceClientFacade);
+    }
+
+    @ApiOperation(value = "获取该申诉记录最新缺陷详情[by:zhanghang]",
+            notes = "获取该申诉记录最新缺陷详情")
+    @PostMapping("/getComplaintDetailMsg")
+    public RespDTO<QcresultDetail> getComplaintDetailMsg(@RequestBody GetComplaintDetailMsgVO getComplaintDetailMsgVO) {
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getComplaintDetailMsgVO.setHospitalId(Long.valueOf(hospitalId));
+        return medAppealExamineInfoServiceClientFacade.getComplaintDetailMsg(getComplaintDetailMsgVO);
+    }
+
+}

+ 237 - 0
src/main/java/com/diagbot/web/MedAppealInfoController.java

@@ -0,0 +1,237 @@
+package com.diagbot.web;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.MedAppealInfoServiceClientFacade;
+import com.diagbot.dto.*;
+import com.diagbot.entity.SysUserRole;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.facade.SysHospitalSetFacade;
+import com.diagbot.facade.SysUserFacade;
+import com.diagbot.facade.SysUserRoleFacade;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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 javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>
+ * 申诉审核 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-07-06
+ */
+@RestController
+@RequestMapping("/qc/appealInfo")
+@Api(value = "申诉审核API", tags = { "申诉审核API" })
+@SuppressWarnings("unchecked")
+public class MedAppealInfoController {
+
+    @Autowired
+    MedAppealInfoServiceClientFacade medAppealInfoServiceClientFacade;
+
+    @Autowired
+    SysHospitalSetFacade sysHospitalSetFacade;
+
+    @Autowired
+    SysUserRoleFacade sysUserRoleFacade;
+
+    @Autowired
+    SysUserFacade sysUserFacade;
+
+    @ApiOperation(value = "申诉[by:songxl]",
+            notes = "申诉")
+    @PostMapping("/addAppealInfo")
+    @Transactional
+    public RespDTO<Boolean> addAppealInfo(@RequestBody @Valid AddAppealInfoVO addAppealInfoVO) {
+        addAppealInfoVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        addAppealInfoVO.setClaimantId(SysUserUtils.getCurrentPrincipleID());
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()), "work_flow_node_mapping");
+        //获取是否是单人操作开关
+        String single_appeal_falg = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()), "single_appeal_falg");
+        if(StringUtil.isNotEmpty(single_appeal_falg)) {
+            addAppealInfoVO.setSingleAppealFalg(Boolean.parseBoolean(single_appeal_falg));
+        }
+        if (StringUtil.isNotEmpty(mapping)) {
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            addAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("addAppealInfo"));
+        }
+        return medAppealInfoServiceClientFacade.addAppealInfo(addAppealInfoVO);
+    }
+
+    @ApiOperation(value = "申诉-对外api接口[by:songxl]",
+            notes = "申诉")
+    @PostMapping("/addAppealInfoApi")
+    @Transactional
+    public RespDTO<Boolean> addAppealInfoApi(@RequestBody @Valid AddAppealInfoApiVO addAppealInfoApiVO) {
+        AddAppealInfoVO addAppealInfoVO = new AddAppealInfoVO();
+        BeanUtils.copyProperties(addAppealInfoApiVO, addAppealInfoVO);
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(addAppealInfoApiVO.getHospitalId(), "work_flow_node_mapping");
+        if (StringUtil.isNotEmpty(mapping)) {
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            addAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("addAppealInfo"));
+        }
+        //通过医生id获取医生的用户id
+        Long userId = sysUserFacade.getUserId(addAppealInfoApiVO.getClaimantId(), addAppealInfoApiVO.getHospitalId());
+        if (userId != null) {
+            addAppealInfoVO.setClaimantId(userId+"");
+        }
+        //获取是否是单人操作开关
+        String single_appeal_falg = sysHospitalSetFacade.getValue(addAppealInfoApiVO.getHospitalId(), "single_appeal_falg");
+        if(StringUtil.isNotEmpty(single_appeal_falg)) {
+            addAppealInfoVO.setSingleAppealFalg(Boolean.parseBoolean(single_appeal_falg));
+        }
+
+        return medAppealInfoServiceClientFacade.addAppealInfo(addAppealInfoVO);
+    }
+
+    @ApiOperation(value = "获取审核人-对外api接口[by:songxl]",
+            notes = "获取审核人")
+    @PostMapping("/getReviewerApi")
+    public RespDTO<List<GetReviewerDTO>> getReviewerApi(@RequestBody GetReviewerApiVO getReviewerApiVO) {
+        //申诉人是否包含自身开关
+        String flag = sysHospitalSetFacade.getValue(getReviewerApiVO.getHospitalId(), "self_flag");
+        GetReviewerVO getReviewerVO = new GetReviewerVO();
+        BeanUtils.copyProperties(getReviewerApiVO, getReviewerVO);
+        if (StringUtils.isNotEmpty(flag)) {
+            getReviewerVO.setSelfFlag(Boolean.parseBoolean(flag));
+        }
+        //通过医生id获取医生的用户id
+        Long userId = sysUserFacade.getUserId(getReviewerApiVO.getClaimantId(), getReviewerApiVO.getHospitalId());
+        if (userId != null) {
+            getReviewerVO.setClaimantId(userId+"");
+        }
+        return medAppealInfoServiceClientFacade.getReviewer(getReviewerVO);
+    }
+
+    @ApiOperation(value = "获取审核人[by:songxl]",
+            notes = "获取审核人")
+    @PostMapping("/getReviewer")
+    public RespDTO<List<GetReviewerDTO>> getReviewer(@RequestBody GetReviewerVO getReviewerVO) {
+        getReviewerVO.setClaimantId(SysUserUtils.getCurrentPrincipleID());
+        getReviewerVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
+        //申诉人是否包含自身开关
+        String flag = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()), "self_flag");
+        if (StringUtils.isNotEmpty(flag)) {
+            getReviewerVO.setSelfFlag(Boolean.parseBoolean(flag));
+        }
+        return medAppealInfoServiceClientFacade.getReviewer(getReviewerVO);
+    }
+
+    @ApiOperation(value = "再次申诉获取操作类型[by:songxl]",
+            notes = "再次申诉获取操作类型")
+    @PostMapping("/getAppealOperationType")
+    public RespDTO<Map<String, String>> getAppealOperationType(@RequestBody @Valid GetAppealOperationTypeVO getAppealOperationTypeVO) {
+        return medAppealInfoServiceClientFacade.getAppealOperationType(getAppealOperationTypeVO);
+    }
+
+    @ApiOperation(value = "撤回申诉[by:songxl]",
+            notes = "撤回申诉")
+    @PostMapping("/cancelAppealInfoApi")
+    @Transactional
+    public RespDTO<Boolean> cancelAppealInfoApi(@RequestBody @Valid CancelAppealInfoApiVO cancelAppealInfoApiVO) {
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(cancelAppealInfoApiVO.getHospitalId(), "work_flow_node_mapping");
+        CancelAppealInfoVO cancelAppealInfoVO = new CancelAppealInfoVO();
+        BeanUtils.copyProperties(cancelAppealInfoApiVO, cancelAppealInfoVO);
+        if (StringUtil.isNotEmpty(mapping)) {
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            cancelAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("cancelAppealInfo"));
+        }
+        //通过医生id获取医生的用户id
+        Long userId = sysUserFacade.getUserId(cancelAppealInfoApiVO.getClaimantId(), cancelAppealInfoApiVO.getHospitalId());
+        if (userId != null) {
+            cancelAppealInfoVO.setClaimantId(userId+"");
+        }
+        return medAppealInfoServiceClientFacade.cancelAppealInfo(cancelAppealInfoVO);
+    }
+
+    @ApiOperation(value = "撤回申诉[by:songxl]",
+            notes = "撤回申诉")
+    @PostMapping("/cancelAppealInfo")
+    @Transactional
+    public RespDTO<Boolean> cancelAppealInfo(@RequestBody @Valid CancelAppealInfoVO cancelAppealInfoVO) {
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()), "work_flow_node_mapping");
+        if (StringUtil.isNotEmpty(mapping)) {
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            cancelAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("cancelAppealInfo"));
+        }
+        cancelAppealInfoVO.setClaimantId(SysUserUtils.getCurrentPrincipleID());
+        return medAppealInfoServiceClientFacade.cancelAppealInfo(cancelAppealInfoVO);
+    }
+
+    @ApiOperation(value = "申诉记录详情-查看[by:songxl]",
+            notes = "申诉记录详情-查看")
+    @PostMapping("/getAppealInfo")
+    public RespDTO<GetAppealInfoDTO> getAppealInfo(@RequestBody GetAppealInfoVO getAppealInfoVO) {
+        return medAppealInfoServiceClientFacade.getAppealInfo(getAppealInfoVO);
+    }
+
+    @ApiOperation(value = "申诉审核科室下拉列表查询[by:songxl]",
+            notes = "申诉审核科室下拉列表查询")
+    @PostMapping("/getAppealDept")
+    public RespDTO<List<GetAppealDeptDTO>> getAppealDept(@RequestBody @Valid GetAppealDeptVo getAppealDeptVo) {
+        String currentPrincipleID = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getAppealDeptVo.setHospitalId(Long.valueOf(hospitalId));
+        if (Long.valueOf(getAppealDeptVo.getPageType()) == 1) {
+            //申诉人
+            getAppealDeptVo.setClaimantId(Long.valueOf(currentPrincipleID));
+        } else {
+            //审核人
+            getAppealDeptVo.setCheckId(Long.valueOf(currentPrincipleID));
+        }
+        return medAppealInfoServiceClientFacade.getAppealDept(getAppealDeptVo);
+    }
+
+    @ApiOperation(value = "申诉审核模块下拉列表查询[by:songxl]",
+            notes = "申诉审核模块下拉列表查询")
+    @PostMapping("/getAppealMode")
+    public RespDTO<List<GetAppealModeDTO>> getAppealMode(@RequestBody @Valid GetAppealModeVo getAppealModeVo) {
+        String currentPrincipleID = SysUserUtils.getCurrentPrincipleID();
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+        getAppealModeVo.setHospitalId(Long.valueOf(hospitalId));
+        if (Long.valueOf(getAppealModeVo.getPageType()) == 1) {
+            //申诉人
+            getAppealModeVo.setClaimantId(Long.valueOf(currentPrincipleID));
+        } else {
+            //审核人
+            getAppealModeVo.setCheckId(Long.valueOf(currentPrincipleID));
+        }
+        return medAppealInfoServiceClientFacade.getAppealMode(getAppealModeVo);
+    }
+
+    @ApiOperation(value = "查询该角色的所有角色id[by:songxl]",
+            notes = "查询该角色的所有角色id")
+    @PostMapping("/getUserRole")
+    public RespDTO<List<Long>> getUserRole() {
+        List<Long> roleId = new ArrayList<>();
+        List<SysUserRole> list = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", SysUserUtils.getCurrentPrincipleID()));
+        for (SysUserRole sysUserRole : list) {
+            roleId.add(sysUserRole.getRoleId());
+        }
+        return RespDTO.onSuc(roleId);
+    }
+}

+ 58 - 0
src/main/java/com/diagbot/web/MedRecordOtherController.java

@@ -0,0 +1,58 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.MedRecordContentOtherDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.MedicalRecord;
+import com.diagbot.facade.MedicalRecordOtherFacade;
+import com.diagbot.vo.MedRecordContentOtherVO;
+import com.diagbot.vo.MedRecordOtherVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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 javax.validation.Valid;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author Wsy
+ * @since 2022-03-09
+ */
+@RestController
+@RequestMapping("/qc/medRecordOther")
+@Api(value = "病历详情其他信息API", tags = {"病历详情其他信息API"})
+public class MedRecordOtherController {
+    @Autowired
+    private MedicalRecordOtherFacade medicalRecordOtherFacade;
+
+    @ApiOperation(value = "病历详情其他信息总览",
+            notes = "behospitalCode:病人住院序号<br>" +
+                    "recTitle:病历标题<br>" +
+                    "recDateStart:创建开始时间<br>" +
+                    "recDateEnd:创建结束时间")
+    @PostMapping("/getMedRecordOtherPage")
+    @SysLogger("getMedRecordOtherPage")
+    public RespDTO<IPage<MedicalRecord>> getMedRecordOtherPage(@RequestBody @Valid MedRecordOtherVO medRecordOtherVO) {
+        IPage<MedicalRecord> dataIPage = medicalRecordOtherFacade.pageFac(medRecordOtherVO);
+        return RespDTO.onSuc(dataIPage);
+    }
+
+
+    @ApiOperation(value = "文书内容展示(HTML)",
+            notes = "recID:病历id<br>")
+    @PostMapping("/getMedRecordContentOther")
+    @SysLogger("getMedRecordContentOther")
+    public RespDTO<MedRecordContentOtherDTO> getMedRecordContentOther(@RequestBody MedRecordContentOtherVO medRecordContentOtherVO) {
+        return RespDTO.onSuc(medicalRecordOtherFacade.getRecordContentOther(medRecordContentOtherVO));
+    }
+
+}

+ 5 - 1
src/main/resources/application-dev.yml

@@ -55,6 +55,8 @@ management:
 
 # 驱动配置信息
 spring:
+  application:
+    name: gateway-service
   datasource:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
@@ -179,4 +181,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://192.168.2.237:8871

+ 5 - 1
src/main/resources/application-local.yml

@@ -55,6 +55,8 @@ management:
 
 # 驱动配置信息
 spring:
+  application:
+    name: gateway-service
   datasource:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
@@ -179,4 +181,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://192.168.2.237:8871

+ 5 - 1
src/main/resources/application-pre.yml

@@ -55,6 +55,8 @@ management:
 
 # 驱动配置信息
 spring:
+  application:
+    name: gateway-service
   datasource:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
@@ -179,4 +181,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://192.168.2.125:8871

+ 5 - 1
src/main/resources/application-pro.yml

@@ -55,6 +55,8 @@ management:
 
 # 驱动配置信息
 spring:
+  application:
+    name: gateway-service
   datasource:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
@@ -179,4 +181,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://192.168.2.129:8871

+ 5 - 1
src/main/resources/application-test.yml

@@ -55,6 +55,8 @@ management:
 
 # 驱动配置信息
 spring:
+  application:
+    name: gateway-service
   datasource:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
@@ -179,4 +181,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://192.168.2.237:8871

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -2,7 +2,7 @@ spring:
   application:
     name: mrqc-sys
   profiles:
-    active: local
+    active: test
   main:
     allow-bean-definition-overriding: true
 

+ 147 - 28
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -681,44 +681,160 @@
     </select>-->
 
     <select id="getMsg" resultType="com.diagbot.dto.MsgDTO">
-        SELECT a.*, u.linkman
+        SELECT
+        a.*, u.linkman,
+        appeal.id appealInfoId,
+        appeal.appeal_operation_type appealOperationType,
+        appeal.example_status exampleStatus,
+        appeal.reviewer,
+        appeal.exampleDate
         FROM
         (
-        SELECT DISTINCT b.`name` model_name,c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info, a.cases_id cases_id, d.score cases_score,
-        b.id model_id, a.name standard_msg, c.opt_type, c.grade_type,
-         c.gmt_create, c.gmt_modified, c.modifier,c.is_deleted,c.explain_info as explainInfo,
-        a.type, a.drgs
+        SELECT DISTINCT
+        b.`name` model_name,
+        c.score,
+        c.msg,
+        c.cases_entry_id,
+        c.is_reject,
+        c.id id,
+        c.info,
+        a.cases_id cases_id,
+        d.score cases_score,
+        b.id model_id,
+        a. NAME standard_msg,
+        c.opt_type,
+        c.grade_type,
+        c.gmt_create,
+        c.gmt_modified,
+        c.modifier,
+        c.is_deleted,
+        c.remark,
+        c.explain_info AS explainInfo,
+        a.type,
+        a.drgs,
+        c.hospital_id,
+        c.behospital_code
         FROM
-        `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d
-        where a.is_deleted = 'N' and b.is_deleted = 'N' and d.is_deleted = 'N'
-        and a.id = c.cases_entry_id and a.mode_id = b.id
-        AND c.cases_id = d.cases_id and c.hospital_id = d.hospital_id
-        and c.hospital_id = #{hospitalId}
+        `qc_cases_entry` a,
+        qc_mode b,
+        med_qcresult_detail c,
+        qc_cases_hospital d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.id = c.cases_entry_id
+        AND a.mode_id = b.id
+        AND c.cases_id = d.cases_id
+        AND c.hospital_id = d.hospital_id
+        AND c.hospital_id = #{hospitalId}
         <if test="qcresultInfoId != null">
             AND c.qcresult_info_id = #{qcresultInfoId}
         </if>
-        and c.behospital_code = #{behospitalCode}
-        order by b.order_no, c.grade_type desc, a.order_no) a
-        LEFT JOIN sys_user u  on u.id = a.modifier  and u.is_deleted = 'N'
+        AND c.behospital_code = #{behospitalCode}
+        ORDER BY
+        b.order_no,
+        c.grade_type DESC,
+        a.order_no
+        ) a
+        LEFT JOIN sys_user u ON u.id = a.modifier
+        AND u.is_deleted = 'N'
+        LEFT JOIN (
+        SELECT
+        appeal.id,
+        appeal.cases_entry_id,
+        appeal.behospital_code,
+        appeal.hospital_id,
+        appeal.appeal_operation_type,
+        examine.example_status,
+        u.linkman reviewer,
+        examine.gmt_create exampleDate
+        FROM
+        med_appeal_info appeal
+        JOIN med_appeal_examine_info examine ON examine.appeal_info_id = appeal.id
+        LEFT JOIN sys_user u ON appeal.check_id = u.id
+        AND u.is_deleted = 'N'
+        WHERE
+        appeal.is_deleted = 'N'
+        ) appeal ON a.cases_entry_id = appeal.cases_entry_id
+        AND a.hospital_id = appeal.hospital_id
+        AND a.behospital_code = appeal.behospital_code
     </select>
 
     <select id="getForeignMsg" resultType="com.diagbot.dto.MsgDTO">
-        SELECT a.*, u.linkman
+        SELECT
+        a.*, u.linkman,
+        appeal.id appealInfoId,
+        appeal.appeal_operation_type appealOperationType,
+        appeal.example_status exampleStatus
         FROM
         (
-        SELECT DISTINCT b.`name` model_name,c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info, a.cases_id cases_id, d.score cases_score,
-        b.id model_id, a.name standard_msg, c.opt_type, c.grade_type,
-         c.gmt_create, c.gmt_modified, c.modifier,c.is_deleted,c.explain_info as explainInfo,
-        a.type, a.drgs
-        FROM
-        `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d
-        where a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N' and d.is_deleted = 'N'
-        and a.id = c.cases_entry_id and a.mode_id = b.id
-        AND c.cases_id = d.cases_id and c.hospital_id = d.hospital_id
-        and c.hospital_id = #{hospitalId}
-        and c.behospital_code = #{behospitalCode}
-        order by b.order_no, c.grade_type desc, a.order_no) a
-        LEFT JOIN sys_user u  on u.id = a.modifier  and u.is_deleted = 'N'
+        SELECT DISTINCT
+        b.`name` model_name,
+        c.score,
+        c.msg,
+        c.cases_entry_id,
+        c.is_reject,
+        c.id id,
+        c.info,
+        a.cases_id cases_id,
+        d.score cases_score,
+        b.id model_id,
+        a. NAME standard_msg,
+        c.opt_type,
+        c.grade_type,
+        c.gmt_create,
+        c.gmt_modified,
+        c.modifier,
+        c.is_deleted,
+        c.remark,
+        c.explain_info AS explainInfo,
+        a.type,
+        a.drgs,
+        c.hospital_id,
+        c.behospital_code
+        FROM
+        `qc_cases_entry` a,
+        qc_mode b,
+        med_qcresult_detail c,
+        qc_cases_hospital d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.id = c.cases_entry_id
+        AND a.mode_id = b.id
+        AND c.cases_id = d.cases_id
+        AND c.hospital_id = d.hospital_id
+        AND c.hospital_id = #{hospitalId}
+        <if test="qcresultInfoId != null">
+            AND c.qcresult_info_id = #{qcresultInfoId}
+        </if>
+        AND c.behospital_code = #{behospitalCode}
+        ORDER BY
+        b.order_no,
+        c.grade_type DESC,
+        a.order_no
+        ) a
+        LEFT JOIN sys_user u ON u.id = a.modifier
+        AND u.is_deleted = 'N'
+        LEFT JOIN (
+        SELECT
+        appeal.id,
+        appeal.cases_entry_id,
+        appeal.behospital_code,
+        appeal.hospital_id,
+        appeal.appeal_operation_type,
+        examine.example_status
+        FROM
+        med_appeal_info appeal
+        JOIN med_appeal_examine_info examine ON examine.appeal_info_id = appeal.id
+        WHERE
+        appeal.is_deleted = 'N'
+        ) appeal ON a.cases_entry_id = appeal.cases_entry_id
+        AND a.hospital_id = appeal.hospital_id
+        AND a.behospital_code = appeal.behospital_code
     </select>
 
 
@@ -1045,7 +1161,7 @@
         JOIN sys_user_dept d
         ON a.hospital_id = d.hospital_id
         AND a.beh_dept_id = d.dept_id
-        LEFT JOIN med_qcresult_info b
+        JOIN med_qcresult_info b
         ON a.behospital_code = b.behospital_code
         AND b.is_deleted = 'N'
         LEFT JOIN med_qcresult_cases e
@@ -1057,6 +1173,9 @@
         AND c.is_deleted = 'N'
         WHERE d.is_deleted = 'N'
         AND d.user_id = #{userId}
+        <if test="pageType == 3">
+            AND b.level is not null
+        </if>
         ) t
         LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type in(0,2) ) g
         ON t.behospital_code = g.behospital_code

+ 22 - 0
src/main/resources/mapper/MedAppealExamineInfoMapper.xml

@@ -0,0 +1,22 @@
+<?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.MedAppealExamineInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedAppealExamineInfo">
+        <id column="id" property="id" />
+        <result column="appeal_info_id" property="appealInfoId" />
+        <result column="check_id" property="checkId" />
+        <result column="example_status" property="exampleStatus" />
+        <result column="example_operation" property="exampleOperation" />
+        <result column="process_result" property="processResult" />
+        <result column="reject_reason" property="rejectReason" />
+        <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" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 34 - 0
src/main/resources/mapper/MedAppealInfoMapper.xml

@@ -0,0 +1,34 @@
+<?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.MedAppealInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedAppealInfo">
+        <id column="id" property="id" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="qcresult_detail_id" property="qcresultDetailId" />
+        <result column="qcresult_detail_msg" property="qcresultDetailMsg" />
+        <result column="qcresult_detai_value" property="qcresultDetaiValue" />
+        <result column="cases_entry_id" property="casesEntryId" />
+        <result column="cases_entry_name" property="casesEntryName" />
+        <result column="cases_entry_msg" property="casesEntryMsg" />
+        <result column="value" property="value" />
+        <result column="mode_id" property="modeId" />
+        <result column="mode_name" property="modeName" />
+        <result column="defect_content" property="defectContent" />
+        <result column="claimant_id" property="claimantId" />
+        <result column="appeal_type" property="appealType" />
+        <result column="appeal_operation_type" property="appealOperationType" />
+        <result column="appeal_explain" property="appealExplain" />
+        <result column="check_id" property="checkId" />
+        <result column="work_flow_node_id" property="workFlowNodeId" />
+        <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" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 57 - 1
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -1040,7 +1040,7 @@
         SELECT
         a.beh_dept_id AS id,
         a.beh_dept_name AS NAME,
-        COUNT(*) AS num
+        COUNT(distinct a.behospital_code) AS num
         FROM
         med_behospital_info a,
         med_qcresult_info c,
@@ -1090,6 +1090,62 @@
         a.beh_dept_name
     </select>
 
+
+    <!-- 按科室统计质控病历数 -->
+    <select id="resultMrCountByDept" parameterType="com.diagbot.vo.QcresultFilterVO" resultType="java.util.Map">
+        SELECT
+        a.beh_dept_id AS id,
+        a.beh_dept_name AS NAME,
+        COUNT(distinct a.behospital_code) AS num,
+        COUNT(distinct case when c.level ='甲' then a.behospital_code end) AS firNum,
+        COUNT(distinct case when c.level ='乙' then a.behospital_code end) AS secNum,
+        COUNT(distinct case when c.level ='丙' then a.behospital_code end) AS thrNum
+        FROM
+        med_behospital_info a,
+        med_qcresult_info c,
+        sys_user_dept d
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.hospital_id = d.hospital_id
+        AND a.behospital_code = c.behospital_code
+        AND a.beh_dept_id = d.dept_id
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        <![CDATA[AND a.qc_type_id <>0 ]]>
+        <if test="userId!=null">
+            AND d.user_id = #{userId}
+        </if>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="gradeType != null and gradeType != ''">
+            AND c.grade_type = #{gradeType}
+        </if>
+        GROUP BY
+        a.beh_dept_id,
+        a.beh_dept_name
+    </select>
+
     <!-- 按模块统计质控缺陷数 -->
     <select id="entryCountGroupByCaseAndDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.DeptNumDTO">
         SELECT

+ 14 - 0
src/main/resources/mapper/SysUserMapper.xml

@@ -126,4 +126,18 @@
             and t3.linkman like CONCAT('%',#{linkman},'%')
         </if>
     </select>
+
+    <select id="getUser" resultType="com.diagbot.entity.SysUser">
+        SELECT
+        *
+    FROM
+        sys_user u,
+        sys_user_hospital uh
+    WHERE
+        u.is_deleted = "N"
+    AND uh.is_deleted = "N"
+    AND u.id = uh.user_id
+    AND u.username = #{claimantId}
+    AND uh.hospital_id = #{hospitalId}
+    </select>
 </mapper>