Bladeren bron

Merge branch 'dev/20220420_v2.5.0个性化版_湘雅人工质控缺陷反馈'

# Conflicts:
#	src/main/java/com/diagbot/config/ResourceServerConfigurer.java
#	src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
#	src/main/resources/application-test.yml
#	src/main/resources/bootstrap.yml
songxinlu 3 jaren geleden
bovenliggende
commit
254e61dc5d
63 gewijzigde bestanden met toevoegingen van 3274 en 287 verwijderingen
  1. 93 0
      doc/046.20220420v2.5.0_个性化版_湘雅人工质控缺陷反馈/qc_init_v2.5.0_个性化版_湘雅人工质控缺陷反馈.sql
  2. 7 0
      pom.xml
  3. 2 1
      src/main/java/com/diagbot/MrqcSysApplication.java
  4. 6 0
      src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  5. 3 26
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  6. 223 0
      src/main/java/com/diagbot/config/mybatisLike/AbstractLikeSqlConverter.java
  7. 79 0
      src/main/java/com/diagbot/config/mybatisLike/MapLikeSqlConverter.java
  8. 160 0
      src/main/java/com/diagbot/config/mybatisLike/MybatisLikeSqlInterceptor.java
  9. 28 0
      src/main/java/com/diagbot/config/mybatisLike/ObjectLikeSqlConverter.java
  10. 2 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  11. 4 0
      src/main/java/com/diagbot/dto/BehospitalAnalysisDTO.java
  12. 4 0
      src/main/java/com/diagbot/dto/BehospitalCodeDetail.java
  13. 4 0
      src/main/java/com/diagbot/dto/BehospitalInfoDTO.java
  14. 30 0
      src/main/java/com/diagbot/dto/GetDefectDeptDTO.java
  15. 28 0
      src/main/java/com/diagbot/dto/GetDefectModeDTO.java
  16. 83 0
      src/main/java/com/diagbot/dto/GetMedDefectFeedbackPageDTO.java
  17. 4 0
      src/main/java/com/diagbot/dto/QcResultShortDTO.java
  18. 19 0
      src/main/java/com/diagbot/dto/his/DoctorHosDTO.java
  19. 5 0
      src/main/java/com/diagbot/entity/BehospitalInfo.java
  20. 153 0
      src/main/java/com/diagbot/entity/MedDefectFeedback.java
  21. 103 0
      src/main/java/com/diagbot/entity/his/DoctorHos.java
  22. 1 0
      src/main/java/com/diagbot/facade/DataAnalysisFacade.java
  23. 304 0
      src/main/java/com/diagbot/facade/MedDefectFeedbackFacade.java
  24. 31 5
      src/main/java/com/diagbot/facade/SysDictionaryFacade.java
  25. 37 0
      src/main/java/com/diagbot/facade/his/DoctorHosFacade.java
  26. 82 0
      src/main/java/com/diagbot/facade/his/FeedbackHosFacade.java
  27. 32 0
      src/main/java/com/diagbot/mapper/MedDefectFeedbackMapper.java
  28. 16 0
      src/main/java/com/diagbot/mapper/his/DoctorHosMapper.java
  29. 16 0
      src/main/java/com/diagbot/service/MedDefectFeedbackService.java
  30. 16 0
      src/main/java/com/diagbot/service/his/DoctorHosService.java
  31. 20 0
      src/main/java/com/diagbot/service/impl/MedDefectFeedbackServiceImpl.java
  32. 22 0
      src/main/java/com/diagbot/service/impl/his/DoctorHosServiceImpl.java
  33. 269 0
      src/main/java/com/diagbot/util/PushFeedbackConn.java
  34. 3 0
      src/main/java/com/diagbot/vo/BehospitalPageVO.java
  35. 27 0
      src/main/java/com/diagbot/vo/CCVO.java
  36. 62 0
      src/main/java/com/diagbot/vo/ChangeQcResultVO.java
  37. 27 0
      src/main/java/com/diagbot/vo/GetDefectDeptModeVO.java
  38. 3 0
      src/main/java/com/diagbot/vo/GetEntryDefectImproveInnerVO.java
  39. 72 0
      src/main/java/com/diagbot/vo/GetMedDefectFeedbackPageVO.java
  40. 3 0
      src/main/java/com/diagbot/vo/QcResultPageVO.java
  41. 4 0
      src/main/java/com/diagbot/vo/QcResultShortPageVO.java
  42. 2 0
      src/main/java/com/diagbot/vo/QcResultShortXYPageVO.java
  43. 23 0
      src/main/java/com/diagbot/vo/UPdDefectBackByIDVO.java
  44. 15 0
      src/main/java/com/diagbot/vo/his/DoctorHosVO.java
  45. 85 0
      src/main/java/com/diagbot/vo/his/FeedbackHosVO.java
  46. 77 0
      src/main/java/com/diagbot/web/DataViewController.java
  47. 148 0
      src/main/java/com/diagbot/web/MedDefectFeedbackController.java
  48. 58 44
      src/main/resources/application-dev.yml
  49. 209 0
      src/main/resources/application-his.yml
  50. 58 44
      src/main/resources/application-local.yml
  51. 57 44
      src/main/resources/application-pre.yml
  52. 58 44
      src/main/resources/application-pro.yml
  53. 58 44
      src/main/resources/application-test.yml
  54. 10 0
      src/main/resources/jdbc.properties
  55. 12 0
      src/main/resources/logback-spring.xml
  56. 99 20
      src/main/resources/mapper/BehospitalInfoMapper.xml
  57. 1 2
      src/main/resources/mapper/DoctorAdviceMapper.xml
  58. 5 0
      src/main/resources/mapper/MedClickInfoMapper.xml
  59. 186 0
      src/main/resources/mapper/MedDefectFeedbackMapper.xml
  60. 3 5
      src/main/resources/mapper/MedLisInfoMapper.xml
  61. 3 4
      src/main/resources/mapper/MedPacsInfoMapper.xml
  62. 16 0
      src/main/resources/mapper/his/DoctorHosMapper.xml
  63. 4 4
      src/test/java/com/diagbot/CodeGeneration.java

+ 93 - 0
doc/046.20220420v2.5.0_个性化版_湘雅人工质控缺陷反馈/qc_init_v2.5.0_个性化版_湘雅人工质控缺陷反馈.sql

@@ -0,0 +1,93 @@
+use `qc`;
+
+/**
+med_home_page 病案首页表新增字段
+ */
+ALTER TABLE `med_home_page`
+ADD COLUMN `medical_record_type`  varchar(32) NULL COMMENT '病例分型' AFTER `is_be_in_danger`,
+ADD COLUMN `is_intensive_care`  varchar(2) NULL COMMENT '有无实施重症监护' AFTER `medical_record_type`,
+ADD COLUMN `intensive_care_length`  varchar(32) NULL COMMENT '实施重症监护时长' AFTER `is_intensive_care`,
+ADD COLUMN `intensive_care_day`  varchar(32) NULL COMMENT '实施重症监护天' AFTER `intensive_care_length`,
+ADD COLUMN `intensive_care_hour`  varchar(32) NULL COMMENT '实施重症监护小时' AFTER `intensive_care_day`,
+ADD COLUMN `drg_mange_mode`  varchar(32) NULL COMMENT '实施DRG管理方式' AFTER `intensive_care_hour`,
+ADD COLUMN `is_antibiotic_use`  varchar(2) NULL COMMENT '是否抗生素使用' AFTER `drg_mange_mode`,
+ADD COLUMN `is_sobcsfe`  varchar(2) NULL COMMENT '是否细菌培养标本送检' AFTER `is_antibiotic_use`,
+ADD COLUMN `legalinfectious_disease_type`  varchar(32) NULL COMMENT '法定传染病类别' AFTER `is_sobcsfe`,
+ADD COLUMN `tumour_t_stages`  varchar(32) NULL COMMENT '浸入的组织深度(肿瘤分期T) ' AFTER `legalinfectious_disease_type`,
+ADD COLUMN `tumour_n_stages`  varchar(32) NULL COMMENT '淋巴结转移情况(肿瘤分期N)' AFTER `tumour_t_stages`,
+ADD COLUMN `tumour_m_stages`  varchar(32) NULL COMMENT '远处转移情况(肿瘤分期M)' AFTER `tumour_n_stages`,
+ADD COLUMN `newborn_apgar`  varchar(32) NULL COMMENT '新生儿Apgar评分' AFTER `tumour_m_stages`;
+
+
+/**
+med_behospital_info 病历表新增字段
+ */
+ALTER TABLE `med_behospital_info`
+ADD COLUMN `is_daytime`  varchar(2) NOT NULL DEFAULT 0 COMMENT '是否日间病例,1:是,0:否' AFTER `is_placefile`;
+
+
+/**
+med_defect_feedback 新增缺陷反馈表
+ */
+
+DROP TABLE IF EXISTS `med_defect_feedback`;
+CREATE TABLE `med_defect_feedback` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `hospital_id` bigint(11) DEFAULT NULL COMMENT '医院ID',
+  `dept_id` varchar(16) DEFAULT NULL COMMENT '住院科室ID',
+  `dept_name` varchar(64) DEFAULT NULL COMMENT '住院科室名称',
+  `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
+  `name` varchar(32) NOT NULL COMMENT '姓名',
+  `cases_entry_id` bigint(20) DEFAULT NULL COMMENT '条目ID',
+  `qcresult_detail_msg` varchar(255) DEFAULT NULL COMMENT '提示信息',
+  `qcresult_detai_score` decimal(5,1) DEFAULT NULL COMMENT '人工修改分值',
+  `mode_id` bigint(20) DEFAULT NULL COMMENT '模块id',
+  `mode_name` varchar(60) DEFAULT NULL COMMENT '模块名称',
+  `explain_info` varchar(1500) DEFAULT NULL COMMENT '反馈说明',
+  `operation_type` char(3) NOT NULL COMMENT '操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复',
+  `sender_code` varchar(20) NOT NULL COMMENT '发送人编号',
+  `sender_name` varchar(32) NOT NULL COMMENT '发送人姓名',
+  `receiver_code` varchar(20) NOT NULL COMMENT '接收人编号',
+  `receiver_name` varchar(32) NOT NULL COMMENT '接收人姓名',
+  `cc_codes` varchar(255) DEFAULT NULL COMMENT '抄送人编号集合',
+  `cc_names` varchar(1024) DEFAULT NULL COMMENT '抄送人姓名集合',
+  `status` char(3) NOT NULL DEFAULT '0' COMMENT '状态 0:待确认|1:已确认',
+  `is_deleted` char(3) 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则表示纪录未修改',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='缺陷反馈表';
+
+
+/**
+sys_role 新增质控科反馈人员角色
+ */
+INSERT INTO `sys_role` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `roleLevel`, `descritpion`, `menuItems`, `remark`) VALUES ('20', '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 ('110', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '缺陷反馈记录', '-1', 'YH-QXFKJL', '1', '1', '15', '用户-缺陷反馈记录');
+INSERT INTO `sys_permission` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ('190', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '查看', 'FUNC000190', '/qc/behospitalInfo/getByBehospitalCode', 'ALL', '查看', '用户-缺陷反馈记录-查看');
+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', '110', '190', NULL, '用户-缺陷反馈记录-查看');
+
+/**
+sys_user_pageset 页面设定新增是否日间病历
+ */
+INSERT INTO `sys_user_pageset` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '是否日间病历', 'isDaytime', '1', '26', NULL);
+
+/**
+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', '36', '缺陷反馈', '37,38', '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', '37', '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', '37', '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', '37', '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', '37', '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', '37', '5', '恢复条目', '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', '38', '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', '38', '1', '已确认', '2', '0', '状态');

+ 7 - 0
pom.xml

@@ -212,6 +212,13 @@
             <version>${easypoi.version}</version>
         </dependency>
 
+        <!--多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.3.1</version>
+        </dependency>
+
         <dependency>
             <groupId>com.oracle</groupId>
             <artifactId>ojdbc6</artifactId>

+ 2 - 1
src/main/java/com/diagbot/MrqcSysApplication.java

@@ -1,5 +1,6 @@
 package com.diagbot;
 
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -19,7 +20,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
  * @time: 2018/8/7 9:26
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
-        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class , DruidDataSourceAutoConfigure.class})
 @EnableFeignClients({ "com.diagbot.client" })
 @EnableHystrixDashboard
 @EnableHystrix

+ 6 - 0
src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -1,6 +1,7 @@
 package com.diagbot.config;
 
 import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import com.diagbot.config.mybatisLike.MybatisLikeSqlInterceptor;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -30,4 +31,9 @@ public class MybatisPlusConfigurer {
         return paginationInterceptor;
     }
 
+//    @Bean
+//    public MybatisLikeSqlInterceptor mybatisSqlInterceptor() {
+//        return new MybatisLikeSqlInterceptor();
+//    }
+
 }

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

@@ -111,7 +111,6 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/homePageLevelLimit").permitAll()
                 .antMatchers("/console/homePageLevelStatistics").permitAll()
                 .antMatchers("/console/homePageLevelStatisticsXY").permitAll()
-                .antMatchers("/console/export/homePageLevelXYExport").permitAll()
                 .antMatchers("/consoleByDept/homePageLevelStatisticsXYByDept").permitAll()
                 .antMatchers("/consoleByDept/entryCountGroupXYByEntryPageDept").permitAll()
                 .antMatchers("/consoleByDept/qcResultShortXYPageByDept").permitAll()
@@ -149,27 +148,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/consoleByDept/mrCountByDept").permitAll()
                 .antMatchers("/consoleByDept/qcResultShortByDeptPage").permitAll()
                 .antMatchers("/consoleByDept/resultStatisticsByDeptAndDoctorPage").permitAll()
-                .antMatchers("/console/export/homePageLevelExport").permitAll()
-                .antMatchers("/console/export/entryGroupByEntryExport").permitAll()
-                .antMatchers("/console/export/levelExport").permitAll()
                 .antMatchers("/console/entryStatistics").permitAll()
-                .antMatchers("/console/export/levelExport_TZ").permitAll()
-                .antMatchers("/console/export/getAverageDayNumExport").permitAll()
-                .antMatchers("/console/export/getAverageFeeExport").permitAll()
-                .antMatchers("/console/export/levelPercentGroupByDeptExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupByEntryExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupXYByEntryExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupByCaseExport").permitAll()
-                .antMatchers("/console/export/entryStatisticsExport").permitAll()
-                .antMatchers("/console/export/qcResultShortPageExport").permitAll()
-                .antMatchers("/console/export/qcResultShortXYPageExport").permitAll()
-                .antMatchers("/console/export/leaveHosMrPageExport").permitAll()
-                .antMatchers("/console/export/qcCheckStatisticsExport").permitAll()
-                .antMatchers("/console/export/unModifyMRPageExport").permitAll()
-                .antMatchers("/console/export/unModifyMRStatisticsExport").permitAll()
-                .antMatchers("/console/export/reHos31DaysPageExport").permitAll()
-                .antMatchers("/console/export/hmImproveMRPageExport").permitAll()
-                .antMatchers("/console/export/qcCheckMRPageExport").permitAll()
                 .antMatchers("/qc/data/sendDoctorInfos").permitAll()
                 .antMatchers("/qc/data/sendDeptInfos").permitAll()
                 .antMatchers("/qc/data/sendRecordTypes").permitAll()
@@ -198,12 +177,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/medicalCheckForm").permitAll()
                 .antMatchers("/qc/behospitalInfo/analyzeCds").permitAll()
                 .antMatchers("/console/medicalCheckTitle").permitAll()
-                .antMatchers("/console/export/medicalCheckExport").permitAll()
-                .antMatchers("/console/export/medicalCheckInnerExport").permitAll()
                 .antMatchers("/console/badLevelPage").permitAll()
                 .antMatchers("/console/badLevelXYPage").permitAll()
-                .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()
@@ -223,7 +198,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/consoleByDept/medicalCheckFormKs").permitAll()
                 .antMatchers("/consoleByDept/medicalCheckTitleKs").permitAll()
                 .antMatchers("/console/qualityControl").permitAll()
-                .antMatchers("/console/export/qualityControlExport").permitAll()
+                .antMatchers("/console/export/**").permitAll()
                 .antMatchers("/consoleByDept/qualityControlByDept").permitAll()
                 .antMatchers("/print/export/**").permitAll()
                 .antMatchers("/qc/behospitalInfo/getMedQualityCoList").permitAll()
@@ -274,6 +249,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/appealInfo/getAppealMode").permitAll()
                 .antMatchers("/qc/appealInfo/getUserRole").permitAll()
                 .antMatchers("/qc/mode/getModes").permitAll()
+                .antMatchers("/qcView/data/*").permitAll()
+                .antMatchers("/medDefectFeedback/*").permitAll()
                 .antMatchers("/consoleByDoctor/**").permitAll()
                 .antMatchers("/qc/getDoctorDetail/**").permitAll()
                 .antMatchers("/**").authenticated();

+ 223 - 0
src/main/java/com/diagbot/config/mybatisLike/AbstractLikeSqlConverter.java

@@ -0,0 +1,223 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.beans.IntrospectionException;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+
+/**
+ * @Description: 包含like的SQL语句转义模板
+ * @author: gaodm
+ * @time: 2020/11/2 16:05
+ */
+@Slf4j
+public abstract class AbstractLikeSqlConverter<T> {
+
+    /**
+     * SQL语句like使用关键字%
+     */
+    private final static String LIKE_SQL_KEY = "%";
+
+    /**
+     * SQL语句需要转义的关键字
+     */
+    private final static String[] ESCAPE_CHAR = new String[] { LIKE_SQL_KEY, "_", "\\" };
+
+    /**
+     * mybatis-plus中like的SQL语句样式
+     */
+    private final static String MYBATIS_PLUS_LIKE_SQL = " like ?";
+
+    /**
+     * mybatis-plus中参数前缀
+     */
+    private final static String MYBATIS_PLUS_WRAPPER_PREFIX = "ew.paramNameValuePairs.";
+
+    /**
+     * mybatis-plus中参数键
+     */
+    final static String MYBATIS_PLUS_WRAPPER_KEY = "ew";
+
+    /**
+     * mybatis-plus中参数分隔符
+     */
+    final static String MYBATIS_PLUS_WRAPPER_SEPARATOR = ".";
+
+    /**
+     * mybatis-plus中参数分隔符替换器
+     */
+    final static String MYBATIS_PLUS_WRAPPER_SEPARATOR_REGEX = "\\.";
+
+    /**
+     * 已经替换过的标记
+     */
+    final static String REPLACED_LIKE_KEYWORD_MARK = "replaced.keyword";
+
+    /**
+     * 转义特殊字符
+     *
+     * @param sql       SQL语句
+     * @param fields    字段列表
+     * @param parameter 参数对象
+     */
+    public void convert(String sql, Set<String> fields, T parameter) {
+        for (String field : fields) {
+            if (this.hasMybatisPlusLikeSql(sql)) {
+                if (this.hasWrapper(field)) {
+                    // 第一种情况:在业务层进行条件构造产生的模糊查询关键字,使用QueryWrapper,LambdaQueryWrapper
+                    this.transferWrapper(field, parameter);
+                } else {
+                    // 第二种情况:未使用条件构造器,但是在service层进行了查询关键字与模糊查询符`%`手动拼接
+                    this.transferSelf(field, parameter);
+                }
+            } else {
+                // 第三种情况:在Mapper类的注解SQL中进行了模糊查询的拼接
+                this.transferSplice(field, parameter);
+            }
+        }
+    }
+
+    /**
+     * 转义条件构造的特殊字符
+     * 在业务层进行条件构造产生的模糊查询关键字,使用QueryWrapper,LambdaQueryWrapper
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferWrapper(String field, T parameter);
+
+    /**
+     * 转义自定义条件拼接的特殊字符
+     * 未使用条件构造器,但是在service层进行了查询关键字与模糊查询符`%`手动拼接
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferSelf(String field, T parameter);
+
+    /**
+     * 转义自定义条件拼接的特殊字符
+     * 在Mapper类的注解SQL中进行了模糊查询的拼接
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferSplice(String field, T parameter);
+
+    /**
+     * 转义通配符
+     *
+     * @param before 待转义字符串
+     * @return 转义后字符串
+     */
+    String escapeChar(String before) {
+        if (StringUtils.isNotBlank(before)) {
+            before = before.replaceAll("\\\\", "\\\\\\\\");
+            before = before.replaceAll("_", "\\\\_");
+            before = before.replaceAll("%", "\\\\%");
+        }
+        return before;
+    }
+
+    /**
+     * 是否包含需要转义的字符
+     *
+     * @param obj 待判断的对象
+     * @return true/false
+     */
+    boolean hasEscapeChar(Object obj) {
+        if (!(obj instanceof String)) {
+            return false;
+        }
+        return this.hasEscapeChar((String) obj);
+    }
+
+    /**
+     * 处理对象like问题
+     *
+     * @param field     对象字段
+     * @param parameter 对象
+     */
+    void resolveObj(String field, Object parameter) {
+        if (parameter == null || StringUtils.isBlank(field)) {
+            return;
+        }
+        try {
+            PropertyDescriptor descriptor = new PropertyDescriptor(field, parameter.getClass());
+            Method readMethod = descriptor.getReadMethod();
+            Object param = readMethod.invoke(parameter);
+            if (this.hasEscapeChar(param)) {
+                Method setMethod = descriptor.getWriteMethod();
+                setMethod.invoke(parameter, this.escapeChar(param.toString()));
+            } else if (this.cascade(field)) {
+                int index = field.indexOf(MYBATIS_PLUS_WRAPPER_SEPARATOR) + 1;
+                this.resolveObj(field.substring(index), param);
+            }
+        } catch (IntrospectionException | IllegalAccessException | InvocationTargetException e) {
+            log.error("反射 {} 的 {} get/set方法出现异常", parameter, field, e);
+        }
+    }
+
+    /**
+     * 判断是否是级联属性
+     *
+     * @param field 字段名
+     * @return true/false
+     */
+    boolean cascade(String field) {
+        if (StringUtils.isBlank(field)) {
+            return false;
+        }
+        return field.contains(MYBATIS_PLUS_WRAPPER_SEPARATOR) && !this.hasWrapper(field);
+    }
+
+    /**
+     * 是否包含mybatis-plus的包含like的SQL语句格式
+     *
+     * @param sql 完整SQL语句
+     * @return true/false
+     */
+    private boolean hasMybatisPlusLikeSql(String sql) {
+        if (StringUtils.isBlank(sql)) {
+            return false;
+        }
+        return sql.toLowerCase().contains(MYBATIS_PLUS_LIKE_SQL);
+    }
+
+    /**
+     * 判断是否使用mybatis-plus条件构造器
+     *
+     * @param field 字段
+     * @return true/false
+     */
+    private boolean hasWrapper(String field) {
+        if (StringUtils.isBlank(field)) {
+            return false;
+        }
+        return field.contains(MYBATIS_PLUS_WRAPPER_PREFIX);
+    }
+
+    /**
+     * 判断字符串是否含有需要转义的字符
+     *
+     * @param str 待判断的字符串
+     * @return true/false
+     */
+    private boolean hasEscapeChar(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        for (String s : ESCAPE_CHAR) {
+            if (str.contains(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

+ 79 - 0
src/main/java/com/diagbot/config/mybatisLike/MapLikeSqlConverter.java

@@ -0,0 +1,79 @@
+package com.diagbot.config.mybatisLike;
+
+import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
+
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @Description: 参数对象为Map的转换器
+ * @author: gaodm
+ * @time: 2020/11/2 16:07
+ */
+public class MapLikeSqlConverter extends AbstractLikeSqlConverter<Map> {
+
+    @Override
+    public void transferWrapper(String field, Map parameter) {
+        AbstractWrapper wrapper = (AbstractWrapper) parameter.get(MYBATIS_PLUS_WRAPPER_KEY);
+        parameter = wrapper.getParamNameValuePairs();
+        String[] keys = field.split(MYBATIS_PLUS_WRAPPER_SEPARATOR_REGEX);
+        // ew.paramNameValuePairs.param1,截取字符串之后,获取第三个,即为参数名
+        String paramName = keys[2];
+        String mapKey = String.format("%s.%s", REPLACED_LIKE_KEYWORD_MARK, paramName);
+        if (parameter.containsKey(mapKey) && Objects.equals(parameter.get(mapKey), true)) {
+            return;
+        }
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+        } else {
+            Object param = parameter.get(paramName);
+            if (this.hasEscapeChar(param)) {
+                String paramStr = param.toString();
+                parameter.put(keys[2], String.format("%%%s%%", this.escapeChar(paramStr.substring(1, paramStr.length() - 1))));
+            }
+        }
+        parameter.put(mapKey, true);
+    }
+
+    @Override
+    public void transferSelf(String field, Map parameter) {
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+            return;
+        }
+        Object param = parameter.get(field);
+        if (this.hasEscapeChar(param)) {
+            String paramStr = param.toString();
+            parameter.put(field, String.format("%%%s%%", this.escapeChar(paramStr.substring(1, paramStr.length() - 1))));
+        }
+    }
+
+    @Override
+    public void transferSplice(String field, Map parameter) {
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+            return;
+        }
+        Object param = parameter.get(field);
+        if (this.hasEscapeChar(param)) {
+            parameter.put(field, this.escapeChar(param.toString()));
+        }
+    }
+
+    /**
+     * 处理级联属性
+     *
+     * @param field     级联字段名
+     * @param parameter 参数Map对象
+     */
+    private void resolveCascadeObj(String field, Map parameter) {
+        int index = field.indexOf(MYBATIS_PLUS_WRAPPER_SEPARATOR);
+        Object param = parameter.get(field.substring(0, index));
+        if (param == null) {
+            return;
+        }
+        this.resolveObj(field.substring(index + 1), param);
+    }
+
+}
+

+ 160 - 0
src/main/java/com/diagbot/config/mybatisLike/MybatisLikeSqlInterceptor.java

@@ -0,0 +1,160 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.plugin.Interceptor;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @Description: mybatis/mybatis-plus模糊查询语句特殊字符转义拦截器
+ * @author: gaodm
+ * @time: 2020/11/2 16:04
+ */
+@Intercepts({ @Signature(type = Executor.class, method = "query", args = { MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class }) })
+@Slf4j
+public class MybatisLikeSqlInterceptor implements Interceptor {
+
+    /**
+     * SQL语句like
+     */
+    private final static String SQL_LIKE = " like ";
+
+    /**
+     * SQL语句占位符
+     */
+    private final static String SQL_PLACEHOLDER = "?";
+
+    /**
+     * SQL语句占位符分隔
+     */
+    private final static String SQL_PLACEHOLDER_REGEX = "\\?";
+
+    /**
+     * 所有的转义器
+     */
+    private static final Map<Class, AbstractLikeSqlConverter> converterMap = new HashMap<>(4);
+
+    static {
+        converterMap.put(Map.class, new MapLikeSqlConverter());
+        converterMap.put(Object.class, new ObjectLikeSqlConverter());
+    }
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+        Object[] args = invocation.getArgs();
+        MappedStatement statement = (MappedStatement) args[0];
+        Object parameterObject = args[1];
+        BoundSql boundSql = statement.getBoundSql(parameterObject);
+        String sql = boundSql.getSql();
+        this.transferLikeSql(sql, parameterObject, boundSql);
+        return invocation.proceed();
+    }
+
+    @Override
+    public Object plugin(Object target) {
+        return Plugin.wrap(target, this);
+    }
+
+    @Override
+    public void setProperties(Properties arg0) {
+
+    }
+
+    /**
+     * 修改包含like的SQL语句
+     *
+     * @param sql             SQL语句
+     * @param parameterObject 参数对象
+     * @param boundSql        绑定SQL对象
+     */
+    private void transferLikeSql(String sql, Object parameterObject, BoundSql boundSql) {
+        if (!isEscape(sql)) {
+            return;
+        }
+        sql = sql.replaceAll(" {2}", " ");
+        // 获取关键字的个数(去重)
+        Set<String> fields = this.getKeyFields(sql, boundSql);
+        if (fields == null) {
+            return;
+        }
+        // 此处可以增强,不止是支持Map对象,Map对象仅用于传入的条件为Map或者使用@Param传入的对象被Mybatis转为的Map
+        AbstractLikeSqlConverter converter;
+        // 对关键字进行特殊字符“清洗”,如果有特殊字符的,在特殊字符前添加转义字符(\)
+        if (parameterObject instanceof Map) {
+            converter = converterMap.get(Map.class);
+        } else {
+            converter = converterMap.get(Object.class);
+        }
+        converter.convert(sql, fields, parameterObject);
+    }
+
+    /**
+     * 是否需要转义
+     *
+     * @param sql SQL语句
+     * @return true/false
+     */
+    private boolean isEscape(String sql) {
+        return this.hasLike(sql) && this.hasPlaceholder(sql);
+    }
+
+    /**
+     * 判断SQL语句中是否含有like关键字
+     *
+     * @param str SQL语句
+     * @return true/false
+     */
+    private boolean hasLike(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        return str.toLowerCase().contains(SQL_LIKE);
+    }
+
+    /**
+     * 判断SQL语句中是否包含SQL占位符
+     *
+     * @param str SQL语句
+     * @return true/false
+     */
+    private boolean hasPlaceholder(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        return str.toLowerCase().contains(SQL_PLACEHOLDER);
+    }
+
+    /**
+     * 获取需要替换的所有字段集合
+     *
+     * @param sql      完整SQL语句
+     * @param boundSql 绑定的SQL对象
+     * @return 字段集合列表
+     */
+    private Set<String> getKeyFields(String sql, BoundSql boundSql) {
+        String[] params = sql.split(SQL_PLACEHOLDER_REGEX);
+        Set<String> fields = new HashSet<>();
+        for (int i = 0; i < params.length; i++) {
+            if (this.hasLike(params[i])) {
+                String field = boundSql.getParameterMappings().get(i).getProperty();
+                fields.add(field);
+            }
+        }
+        return fields;
+    }
+
+}

+ 28 - 0
src/main/java/com/diagbot/config/mybatisLike/ObjectLikeSqlConverter.java

@@ -0,0 +1,28 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @Description: 通用参数的转换器
+ * @author: gaodm
+ * @time: 2020/11/2 16:06
+ */
+@Slf4j
+public class ObjectLikeSqlConverter extends AbstractLikeSqlConverter<Object> {
+
+    @Override
+    public void transferWrapper(String field, Object parameter) {
+        // 尚未发现这种情况
+    }
+
+    @Override
+    public void transferSelf(String field, Object parameter) {
+        // 尚未发现这种情况
+    }
+
+    @Override
+    public void transferSplice(String field, Object parameter) {
+        this.resolveObj(field, parameter);
+    }
+
+}

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

@@ -373,6 +373,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/mode/getModes", request)
                 || matchers("/consoleByDoctor/**", request)
                 || matchers("/qc/getDoctorDetail/**", request)
+                || matchers("/qcView/data/*", request)
+                || matchers("/medDefectFeedback/*", request)
                 || matchers("/", request)) {
             return true;
         }

+ 4 - 0
src/main/java/com/diagbot/dto/BehospitalAnalysisDTO.java

@@ -2,6 +2,7 @@ package com.diagbot.dto;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -91,4 +92,7 @@ public class BehospitalAnalysisDTO implements Serializable {
     @Excel(name = "评分时间", exportFormat = "yyyy/MM/dd")
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date gradeTime;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 4 - 0
src/main/java/com/diagbot/dto/BehospitalCodeDetail.java

@@ -1,6 +1,7 @@
 package com.diagbot.dto;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.util.Date;
@@ -69,4 +70,7 @@ public class BehospitalCodeDetail {
     private Date gradeTime;
 
     List<QcResultDetailInfo> qcResultDetailInfos;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -2,6 +2,7 @@ package com.diagbot.dto;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -152,4 +153,7 @@ public class BehospitalInfoDTO implements Serializable {
     private Date chTime;
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date mrTime;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 30 - 0
src/main/java/com/diagbot/dto/GetDefectDeptDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 获取缺陷反馈记录列表-科室下拉框内容
+ * @author: zhanghang
+ * @time: 2022/4/21 10:07
+ */
+@ApiModel(value = "获取缺陷反馈记录列表-科室下拉框内容--接口出参")
+@Getter
+@Setter
+public class GetDefectDeptDTO implements Serializable {
+
+
+    private static final long serialVersionUID = 5216026169810219664L;
+
+    @ApiModelProperty(value = "所属科室ID")
+    private String deptId;
+
+    @ApiModelProperty(value = "所属科室")
+    private String deptName;
+
+}

+ 28 - 0
src/main/java/com/diagbot/dto/GetDefectModeDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 获取缺陷反馈记录列表-缺陷模块下拉框内容
+ * @author: zhanghang
+ * @time: 2022/4/21 10:07
+ */
+@ApiModel(value = "获取缺陷反馈记录列表-缺陷模块下拉框内容--接口出参")
+@Getter
+@Setter
+public class GetDefectModeDTO implements Serializable {
+
+
+    private static final long serialVersionUID = -1264454776862959020L;
+    @ApiModelProperty(value = "模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+}

+ 83 - 0
src/main/java/com/diagbot/dto/GetMedDefectFeedbackPageDTO.java

@@ -0,0 +1,83 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 获取缺陷反馈列表入参--接口出参
+ * @author: zhanghang
+ * @time: 2022/4/21 10:07
+ */
+@ApiModel(value = "获取缺陷反馈列表入参--接口出参")
+@Getter
+@Setter
+public class GetMedDefectFeedbackPageDTO  implements Serializable {
+
+    private static final long serialVersionUID = -7907298942260577095L;
+    @ApiModelProperty(value = "反馈人编号")
+    private String senderCode;
+
+    @ApiModelProperty(value = "反馈人姓名")
+    private String senderName;
+
+    @ApiModelProperty(value = "所属科室ID")
+    private String deptId;
+
+    @ApiModelProperty(value = "所属科室")
+    private String deptName;
+
+    @ApiModelProperty(value = "反馈时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date gmtCreate;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String name;
+
+    @ApiModelProperty(value = "病人住院序号")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "患者年龄")
+    private String age;
+
+    @ApiModelProperty(value = "模块ID")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "提示信息")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "反馈说明")
+    private String explainInfo;
+
+    @ApiModelProperty(value = "接收人编号")
+    private String receiverCode;
+
+    @ApiModelProperty(value = "接收人姓名")
+    private String receiverName;
+
+    @ApiModelProperty(value = "抄送人编号")
+    private String ccCodes;
+
+    @ApiModelProperty(value = "抄送人姓名")
+    private String ccNames;
+
+    @ApiModelProperty(value = "操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复")
+    private String operationType;
+
+    @ApiModelProperty(value = "状态 0:待确认|1:已确认")
+    private String status;
+
+    @ApiModelProperty(value = "是否归档 0: 未归档|1:已归档")
+    private String isPlacefile ;
+}

+ 4 - 0
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -2,6 +2,7 @@ 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;
 
@@ -121,4 +122,7 @@ public class QcResultShortDTO {
      */
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date mrTime;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -0,0 +1,19 @@
+package com.diagbot.dto.his;
+
+import lombok.Data;
+
+@Data
+public class DoctorHosDTO {
+
+    private String userId;
+
+    private String deptCode;
+
+    private String name;
+
+    private String title;
+
+    private String deptName;
+
+    private String job;
+}

+ 5 - 0
src/main/java/com/diagbot/entity/BehospitalInfo.java

@@ -163,6 +163,11 @@ public class BehospitalInfo implements Serializable {
      */
     private String inState;
 
+    /**
+     * 是否日间病例,1:是,0:否
+     */
+    private String isDaytime;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */

+ 153 - 0
src/main/java/com/diagbot/entity/MedDefectFeedback.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 缺陷反馈表
+ * </p>
+ *
+ * @author songxl
+ * @since 2022-04-21
+ */
+@Getter
+@Setter
+public class MedDefectFeedback implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 住院科室ID
+     */
+    private String deptId;
+
+    /**
+     * 住院科室名称
+     */
+    private String deptName;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 条目ID
+     */
+    private Long casesEntryId;
+
+    /**
+     * 提示信息
+     */
+    private String qcresultDetailMsg;
+
+    /**
+     * 人工修改分值
+     */
+    private BigDecimal qcresultDetaiScore;
+
+    /**
+     * 模块id
+     */
+    private Long modeId;
+
+    /**
+     * 模块名称
+     */
+    private String modeName;
+
+    /**
+     * 反馈说明
+     */
+    private String explainInfo;
+
+    /**
+     * 操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复
+     */
+    private String operationType;
+
+    /**
+     * 发送人编号
+     */
+    private String senderCode;
+
+    /**
+     * 发送人姓名
+     */
+    private String senderName;
+
+    /**
+     * 接收人编号
+     */
+    private String receiverCode;
+
+    /**
+     * 接收人姓名
+     */
+    private String receiverName;
+
+    /**
+     * 抄送人编号集合
+     */
+    private String ccCodes;
+
+    /**
+     * 抄送人姓名集合
+     */
+    private String ccNames;
+
+    /**
+     * 状态 0:待确认|1:已确认
+     */
+    private String status;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+
+}

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

@@ -0,0 +1,103 @@
+package com.diagbot.entity.his;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-04-20
+ */
+@TableName("DOCTOR_HOS")
+public class DoctorHos implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("USER_ID")
+    private String userId;
+
+    @TableField("DEPT_CODE")
+    private String deptCode;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("TITLE")
+    private String title;
+
+    @TableField("CERTIFICATE")
+    private String certificate;
+
+    @TableField("DEPT_NAME")
+    private String deptName;
+
+    @TableField("JOB")
+    private String job;
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+    public String getDeptCode() {
+        return deptCode;
+    }
+
+    public void setDeptCode(String deptCode) {
+        this.deptCode = deptCode;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getCertificate() {
+        return certificate;
+    }
+
+    public void setCertificate(String certificate) {
+        this.certificate = certificate;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public String getJob() {
+        return job;
+    }
+
+    public void setJob(String job) {
+        this.job = job;
+    }
+
+    @Override
+    public String toString() {
+        return "DoctorHos{" +
+            "userId=" + userId +
+            ", deptCode=" + deptCode +
+            ", name=" + name +
+            ", title=" + title +
+            ", certificate=" + certificate +
+            ", deptName=" + deptName +
+            ", job=" + job +
+        "}";
+    }
+}

+ 1 - 0
src/main/java/com/diagbot/facade/DataAnalysisFacade.java

@@ -590,6 +590,7 @@ public class DataAnalysisFacade {
         behospitalInfoDTO.setBehDoctorName(behospitalCodeDetail.getDoctorName());
         behospitalInfoDTO.setBehDeptName(entryDefectImproveInner.getBehDeptName());
         behospitalInfoDTO.setGradeTime(behospitalCodeDetail.getGradeTime());
+        behospitalInfoDTO.setIsDaytime(behospitalCodeDetail.getIsDaytime());
         behospitalInfoDTOS.add(behospitalInfoDTO);
         return behospitalInfoDTOS;
     }

+ 304 - 0
src/main/java/com/diagbot/facade/MedDefectFeedbackFacade.java

@@ -0,0 +1,304 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.AnalyzeDTO;
+import com.diagbot.dto.GetDefectDeptDTO;
+import com.diagbot.dto.GetDefectModeDTO;
+import com.diagbot.dto.GetMedDefectFeedbackPageDTO;
+import com.diagbot.entity.BehospitalInfo;
+import com.diagbot.entity.MedDefectFeedback;
+import com.diagbot.entity.QcresultDetail;
+import com.diagbot.entity.QcresultInfo;
+import com.diagbot.entity.SysUser;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.facade.his.FeedbackHosFacade;
+import com.diagbot.service.impl.MedDefectFeedbackServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.CCVO;
+import com.diagbot.vo.ChangeQcResultVO;
+import com.diagbot.vo.GetDefectDeptModeVO;
+import com.diagbot.vo.GetMedDefectFeedbackPageVO;
+import com.diagbot.vo.QcresultVO;
+import com.diagbot.vo.UPdDefectBackByIDVO;
+import com.diagbot.vo.his.FeedbackHosVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:缺陷反馈模块处理类
+ * @author: songxl
+ * @time: 2022/4/21 10:03
+ */
+@Component
+public class MedDefectFeedbackFacade extends MedDefectFeedbackServiceImpl {
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private SysUserFacade sysUserFacade;
+    @Autowired
+    private QcresultDetailFacade qcresultDetailFacade;
+    @Autowired
+    private FeedbackHosFacade feedbackHosFacade;
+    @Autowired
+    private MedDefectFeedbackServiceImpl medDefectFeedbackServiceImpl;
+
+
+
+    /**
+     * 操作病历
+     *
+     * @param changeQcResultVO
+     * @Return com.diagbot.dto.AnalyzeDTO
+     */
+    public AnalyzeDTO changeQcResult(ChangeQcResultVO changeQcResultVO) {
+        //1.获取病历基本信息
+        Long hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
+        //验证病历的存在性
+        List<BehospitalInfo> behospitalInfos
+                = behospitalInfoFacade.list(
+                new QueryWrapper<BehospitalInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq("hospital_id", hospitalId)
+                        .eq("behospital_code", changeQcResultVO.getBehospitalCode()));
+        if (ListUtil.isEmpty(behospitalInfos)) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院下该病历号不存在!");
+        }
+        //获取操作用户
+        QueryWrapper<SysUser> userQuer = new QueryWrapper<>();
+        userQuer.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", SysUserUtils.getCurrentPrincipleID())
+                .eq("status", 1);
+        SysUser user = sysUserFacade.getOne(userQuer);
+        if (user == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "操作用户不存在,请联系管理员!");
+        }
+
+        //2.调用人工修改病历评分接口
+        AnalyzeDTO out = new AnalyzeDTO();
+        QcresultVO qcresultVO = new QcresultVO();
+        BeanUtil.copyProperties(changeQcResultVO, qcresultVO);
+        switch (changeQcResultVO.getOperationType()) {
+            case "1"://修改
+                qcresultVO.setType(3);
+                out = qcresultInfoFacade.changeQcResult(qcresultVO);
+                break;
+            case "2"://删除
+                qcresultVO.setType(4);
+                qcresultVO.setDelStatus(0);
+                out = qcresultInfoFacade.changeQcResult(qcresultVO);
+                break;
+            case "3"://新增已有
+                qcresultVO.setType(1);
+                //判断该缺陷是否存在
+                havingCase(qcresultVO);
+                out = qcresultInfoFacade.changeQcResult(qcresultVO);
+                break;
+            case "4"://新增缺失
+                //新增缺失拼装返回结果
+                //获取病历等级得分
+                QcresultInfo qcresultInfo = qcresultInfoFacade
+                        .getOne(new QueryWrapper<QcresultInfo>().select("level,score_res")
+                                .eq("hospital_id", hospitalId)
+                                .eq("behospital_code", qcresultVO.getBehospitalCode())
+                                .eq("is_deleted", IsDeleteEnum.N.getKey()));
+                out.setBehospitalCode(qcresultVO.getBehospitalCode());
+                out.setIsSuccess(true);
+                out.setGradeType(2);
+                out.setGradeTypeName("人工");
+                out.setScoreRes(qcresultInfo.getScoreRes());
+                out.setLevel(qcresultInfo.getLevel());
+                out.setGradeTime(DateUtil.now());
+                break;
+            case "5"://恢复
+                qcresultVO.setType(4);
+                qcresultVO.setDelStatus(1);
+                out = qcresultInfoFacade.changeQcResult(qcresultVO);
+                break;
+            default:
+                break;
+        }
+
+        //3.人工修改病历成功后
+        if (out != null && out.getIsSuccess()) {
+            MedDefectFeedback insert = new MedDefectFeedback();
+            BeanUtil.copyProperties(changeQcResultVO, insert);
+            insert.setDeptId(behospitalInfos.get(0).getBehDeptId());
+            insert.setDeptName(behospitalInfos.get(0).getBehDeptName());
+            insert.setName(behospitalInfos.get(0).getName());
+            //除新增缺失以外都要记录所属条目ID、缺陷详情、分值信息
+            if (!"4".equals(changeQcResultVO.getOperationType())) {
+                //条目、缺陷详情、分值信息非空判断
+                if(changeQcResultVO.getOptResultAlgVO().getCasesEntryId()==null){
+                    throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "所属条目ID为空!");
+                }
+                if(changeQcResultVO.getOptResultAlgVO().getMsg()==null){
+                    throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "缺陷详情为空!");
+                }
+                if(changeQcResultVO.getOptResultAlgVO().getScore()==null){
+                    throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "条目分值为空!");
+                }
+                insert.setCasesEntryId(changeQcResultVO.getOptResultAlgVO().getCasesEntryId());
+                insert.setQcresultDetailMsg(changeQcResultVO.getOptResultAlgVO().getMsg());
+                insert.setQcresultDetaiScore(changeQcResultVO.getOptResultAlgVO().getScore());
+            }
+            insert.setHospitalId(hospitalId);
+            insert.setGmtCreate(DateUtil.now());
+            insert.setCreator(SysUserUtils.getCurrentPrincipleID());
+            insert.setSenderCode(SysUserUtils.getCurrentPrincipleID());
+            insert.setSenderName(user.getLinkman());
+            if(ListUtil.isNotEmpty(changeQcResultVO.getCcs())){
+                insert.setCcCodes(changeQcResultVO.getCcs().stream().map(CCVO::getUserId).collect(Collectors.joining(",")));
+                insert.setCcNames(changeQcResultVO.getCcs().stream().map(CCVO::getName).collect(Collectors.joining(",")));
+            }
+            //保存结果
+            if (!this.save(insert)) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "缺陷反馈保存失败!");
+            }
+            //4.推送给his方
+            sendToHis(insert);
+        }
+
+        return out;
+    }
+
+    private void havingCase(QcresultVO qcresultVO) {
+        if (qcresultVO.getOptResultAlgVO().getCasesEntryId() == null) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "条目ID不存在!");
+        }
+        //判断机器是否有质控出该缺陷或人工添加过该缺陷
+        QueryWrapper<QcresultDetail> query = new QueryWrapper();
+        query.eq("hospital_id", SysUserUtils.getCurrentHospitalID());
+        query.eq("behospital_code", qcresultVO.getBehospitalCode());
+        query.eq("cases_entry_id", qcresultVO.getOptResultAlgVO().getCasesEntryId());
+        query.and(qw -> qw.eq("grade_type", 2)
+                .or().eq("is_deleted", IsDeleteEnum.N.getKey()).eq("grade_type", 1));
+        if (ListUtil.isNotEmpty(qcresultDetailFacade.list(query))) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "添加的缺陷条目已存在!");
+        }
+    }
+
+    /**
+     * 推送给his方
+     *
+     * @param insert
+     * @Return void
+     */
+    private void sendToHis(MedDefectFeedback insert) {
+        try {
+            FeedbackHosVO feedbackHosVO = new FeedbackHosVO();
+            BeanUtil.copyProperties(insert,feedbackHosVO);
+            feedbackHosFacade.pushFeedback(feedbackHosVO);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 确认缺陷反馈
+     *
+     * @param uPdDefectBackByIDVO
+     * @Return java.lang.Boolean
+     */
+    public Boolean updDefectBackByID(UPdDefectBackByIDVO uPdDefectBackByIDVO) {
+        MedDefectFeedback entity = new MedDefectFeedback();
+        entity.setId(uPdDefectBackByIDVO.getId());
+        entity.setStatus("1");
+        return this.updateById(entity);
+    }
+
+    /**
+     * 获取缺陷反馈记录列表-缺陷模块下拉框内容
+     *
+     * @param
+     * @return:
+     */
+    public List<GetDefectModeDTO> getDefectMode(GetDefectDeptModeVO getDefectDeptModeVO) {
+        Long hospitalID = Long.valueOf(SysUserUtils.getCurrentHospitalID());
+        getDefectDeptModeVO.setHospitalId(hospitalID);
+        List<GetDefectModeDTO> defectDept = this.baseMapper.getDefectMode(getDefectDeptModeVO);
+        return defectDept;
+    }
+
+    /**
+     * 获取缺陷反馈记录列表-科室下拉框内容
+     *
+     * @param
+     * @return:
+     */
+    public List<GetDefectDeptDTO> getDefectDept(GetDefectDeptModeVO getDefectDeptModeVO) {
+        Long hospitalID = Long.valueOf(SysUserUtils.getCurrentHospitalID());
+        getDefectDeptModeVO.setHospitalId(hospitalID);
+        List<GetDefectDeptDTO> defectDept = this.baseMapper.getDefectDept(getDefectDeptModeVO);
+        return defectDept;
+    }
+
+    /**
+     * 获取缺陷反馈记录列表
+     *
+     * @param
+     * @return:
+     */
+    public Page<GetMedDefectFeedbackPageDTO> getMedDefectFeedbackPage(GetMedDefectFeedbackPageVO getMedDefectFeedbackPageVO) {
+        //更新待确认状态
+        updateStatus();
+        Page<GetMedDefectFeedbackPageDTO> medDefectFeedbackPage = this.baseMapper.getMedDefectFeedbackPage(getMedDefectFeedbackPageVO);
+        return medDefectFeedbackPage;
+    }
+
+    /**
+     * 更新待确认状态
+     *
+     * @param
+     * @Return void
+     */
+    private void updateStatus() {
+        try {
+            //1.获取待确认的反馈缺陷id
+            List<Long> ids = this.list(new QueryWrapper<MedDefectFeedback>()
+                 .eq("hospital_id",SysUserUtils.getCurrentHospitalID())
+                 .eq("status","0")
+                 .eq("is_deleted",IsDeleteEnum.N.getKey())).stream()
+                 .map(MedDefectFeedback::getId).collect(Collectors.toList());
+
+            if(ListUtil.isNotEmpty(ids)){
+                String strIds = Optional.of(ids).orElseGet(ArrayList::new).stream().map(String::valueOf).collect(Collectors.joining(","));
+                FeedbackHosVO search = new FeedbackHosVO();
+                search.setIds(strIds);
+                //2.查his对应反馈缺陷的最新状态
+                List<FeedbackHosVO> out = feedbackHosFacade.statusQuery(search).data;
+                if(ListUtil.isNotEmpty(out)){
+                    List<MedDefectFeedback> updates = new ArrayList<>();
+                    out.stream().forEach(feedbackHosVO -> {
+                        //获取his已确认的
+                        if("1".equals(feedbackHosVO.getMsgStatus())){
+                            MedDefectFeedback entity = new MedDefectFeedback();
+                            entity.setId(feedbackHosVO.getId());
+                            entity.setStatus(feedbackHosVO.getMsgStatus());
+                            updates.add(entity);
+                        }
+                    });
+                    //3.更新自己库中状态
+                    if(ListUtil.isNotEmpty(updates)){
+                        medDefectFeedbackServiceImpl.updateBatchById(updates);
+                    }
+                }
+            }
+
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+}

+ 31 - 5
src/main/java/com/diagbot/facade/SysDictionaryFacade.java

@@ -70,10 +70,11 @@ public class SysDictionaryFacade extends SysDictionaryInfoServiceImpl {
     }
 
     /**
-     * 获取字典申诉驳回具体信息
+     * 获取字典具体信息
+     *
      * @return
      */
-    public List<SysDictionaryInfoDTO> getAppealRejectDictionary(String groupType){
+    public List<SysDictionaryInfoDTO> getAppealRejectDictionary(String groupType) {
         List<SysDictionaryInfoDTO> sysDictionaryInfoDTOS = new LinkedList<SysDictionaryInfoDTO>();
         if (getDictionary() != null
                 && getDictionary().containsKey(Long.parseLong(groupType))
@@ -85,15 +86,16 @@ public class SysDictionaryFacade extends SysDictionaryInfoServiceImpl {
 
     /**
      * 获取字典申诉驳回总体信息
+     *
      * @return
      */
-    public Map<String,Map<String, String>> getAppealRejectionDictionary(){
-        Map<String, Map<String,String>> appealOperationMap = new HashMap<>();
+    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");
+            appealOperationMapKey = getDictionaryWithKey().get("34");
         }
         String appealOperation = appealOperationMapKey.get("申诉驳回");
         String[] split = appealOperation.split(",");
@@ -105,4 +107,28 @@ public class SysDictionaryFacade extends SysDictionaryInfoServiceImpl {
         }
         return appealOperationMap;
     }
+
+    /**
+     * 获取字典缺陷返回总体信息
+     *
+     * @return
+     */
+    public Map<String, Map<String, String>> getOperationStatusType(String groupType ,String name) {
+        Map<String, Map<String, String>> appealOperationMap = new HashMap<>();
+        Map<String, String> appealOperationMapKey = new HashMap<>();
+        if (getDictionaryWithKey() != null
+                && getDictionaryWithKey().containsKey(groupType)
+        ) {
+            appealOperationMapKey = getDictionaryWithKey().get(groupType);
+        }
+        String appealOperation = appealOperationMapKey.get(name);
+        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;
+    }
 }

+ 37 - 0
src/main/java/com/diagbot/facade/his/DoctorHosFacade.java

@@ -0,0 +1,37 @@
+package com.diagbot.facade.his;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.his.DoctorHosDTO;
+import com.diagbot.entity.his.DoctorHos;
+import com.diagbot.service.impl.his.DoctorHosServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.his.DoctorHosVO;
+import com.google.common.collect.Lists;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class DoctorHosFacade extends DoctorHosServiceImpl {
+
+    public List<DoctorHosDTO> getDoctorInfo(DoctorHosVO doctorHosVO){
+        List<DoctorHosDTO> dto= Lists.newArrayList();
+        try{
+            QueryWrapper<DoctorHos> query = new QueryWrapper<>();
+            query.notIn("JOB","护士");
+            if(StringUtil.isNotEmpty(doctorHosVO.getKeyString())){
+                query.like("USER_ID",doctorHosVO.getKeyString().toUpperCase()).or()
+                        .like("NAME",doctorHosVO.getKeyString()).or()
+                        .like("DEPT_CODE",doctorHosVO.getKeyString()).or()
+                        .like("DEPT_NAME",doctorHosVO.getKeyString());
+            }
+            List<DoctorHos> list=this.baseMapper.selectList(query);
+            dto=BeanUtil.listCopyTo(list,DoctorHosDTO.class);
+        }catch (Exception e){
+            log.error("获取医生信息异常"+e.getMessage(),new Throwable());
+        }
+        return dto;
+    }
+}

+ 82 - 0
src/main/java/com/diagbot/facade/his/FeedbackHosFacade.java

@@ -0,0 +1,82 @@
+package com.diagbot.facade.his;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.PushFeedbackConn;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.his.FeedbackHosVO;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+@Component
+@Slf4j
+public class FeedbackHosFacade {
+
+    PushFeedbackConn conn=new PushFeedbackConn();
+
+    public RespDTO pushFeedback(FeedbackHosVO feedbackHosVO){
+        try{
+            if(StringUtil.isEmpty(feedbackHosVO.getBehospitalCode())){
+                return RespDTO.onError("病历号为空");
+            }else if(feedbackHosVO.getId()==null){
+                return RespDTO.onError("病历反馈缺陷ID为空");
+            }
+            //其他情况新增
+            conn.setQcMessAge(feedbackHosVO);
+
+            return RespDTO.onSuc("推送缺陷反馈完成!");
+        }catch (Exception e){
+            log.error("=======推送缺陷反馈失败,请联系维护人员==========="+e.getMessage(),new Throwable());
+            return RespDTO.onError("推送缺陷反馈失败,请联系维护人员!!!");
+        }
+    }
+
+    public RespDTO updateFeedback(FeedbackHosVO feedbackHosVO){
+        try{
+            if(StringUtil.isEmpty(feedbackHosVO.getBehospitalCode())){
+                return RespDTO.onError("病历号为空");
+            }else if(feedbackHosVO.getId()==null){
+                return RespDTO.onError("病历反馈缺陷ID为空");
+            }
+            //修改
+            conn.UpdateQcMessAge(feedbackHosVO);
+            return RespDTO.onSuc("推送缺陷反馈完成!");
+        }catch (Exception e){
+            log.error("=======推送缺陷反馈失败,请联系维护人员==========="+e.getMessage(),new Throwable());
+            return RespDTO.onError("推送缺陷反馈失败,请联系维护人员!!!");
+        }
+    }
+
+    public RespDTO deleteFeedback(FeedbackHosVO feedbackHosVO){
+        try{
+            if(StringUtil.isEmpty(feedbackHosVO.getBehospitalCode())){
+                return RespDTO.onError("病历号为空");
+            }else if(feedbackHosVO.getId()==null){
+                return RespDTO.onError("病历反馈缺陷ID为空");
+            }
+
+            //his那边物理删除
+            conn.DeleteQcMessAge(feedbackHosVO);
+            return RespDTO.onSuc("推送缺陷反馈完成!");
+        }catch (Exception e){
+            log.error("=======推送缺陷反馈失败,请联系维护人员==========="+e.getMessage(),new Throwable());
+            return RespDTO.onError("推送缺陷反馈失败,请联系维护人员!!!");
+        }
+    }
+
+    public RespDTO<List<FeedbackHosVO>> statusQuery(FeedbackHosVO feedbackHosVO){
+        try{
+            //List<FeedbackHosVO>
+            List<FeedbackHosVO> statusList=conn.statusQuery(feedbackHosVO);
+            return RespDTO.onSuc(statusList);
+        }catch (Exception e){
+            return RespDTO.onError("获取状态异常!!");
+        }
+
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/mapper/MedDefectFeedbackMapper.java

@@ -0,0 +1,32 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.GetDefectDeptDTO;
+import com.diagbot.dto.GetDefectModeDTO;
+import com.diagbot.dto.GetMedDefectFeedbackPageDTO;
+import com.diagbot.entity.MedDefectFeedback;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.GetDefectDeptModeVO;
+import com.diagbot.vo.GetMedDefectFeedbackPageVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 缺陷反馈表 Mapper 接口
+ * </p>
+ *
+ * @author songxl
+ * @since 2022-04-21
+ */
+public interface MedDefectFeedbackMapper extends BaseMapper<MedDefectFeedback> {
+
+    Page<GetMedDefectFeedbackPageDTO> getMedDefectFeedbackPage(@Param("getMedDefectFeedbackPageVO") GetMedDefectFeedbackPageVO getMedDefectFeedbackPageVO);
+
+    List<GetDefectDeptDTO> getDefectDept(@Param("getDefectDeptModeVO") GetDefectDeptModeVO getDefectDeptModeVO);
+
+    List<GetDefectModeDTO> getDefectMode(@Param("getDefectDeptModeVO") GetDefectDeptModeVO getDefectDeptModeVO);
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper.his;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.his.DoctorHos;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-04-20
+ */
+public interface DoctorHosMapper extends BaseMapper<DoctorHos> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedDefectFeedback;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 缺陷反馈表 服务类
+ * </p>
+ *
+ * @author songxl
+ * @since 2022-04-21
+ */
+public interface MedDefectFeedbackService extends IService<MedDefectFeedback> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service.his;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.his.DoctorHos;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-04-20
+ */
+public interface DoctorHosService extends IService<DoctorHos> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedDefectFeedback;
+import com.diagbot.mapper.MedDefectFeedbackMapper;
+import com.diagbot.service.MedDefectFeedbackService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 缺陷反馈表 服务实现类
+ * </p>
+ *
+ * @author songxl
+ * @since 2022-04-21
+ */
+@Service
+public class MedDefectFeedbackServiceImpl extends ServiceImpl<MedDefectFeedbackMapper, MedDefectFeedback> implements MedDefectFeedbackService {
+
+}

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

@@ -0,0 +1,22 @@
+package com.diagbot.service.impl.his;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.his.DoctorHos;
+import com.diagbot.mapper.his.DoctorHosMapper;
+import com.diagbot.service.his.DoctorHosService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-04-20
+ */
+@Service
+@DS("slave")
+public class DoctorHosServiceImpl extends ServiceImpl<DoctorHosMapper, DoctorHos> implements DoctorHosService {
+
+}

+ 269 - 0
src/main/java/com/diagbot/util/PushFeedbackConn.java

@@ -0,0 +1,269 @@
+package com.diagbot.util;
+
+import com.diagbot.entity.BasDoctorInfo;
+import com.diagbot.vo.his.FeedbackHosVO;
+import com.google.common.collect.Lists;
+
+import java.sql.*;
+import java.util.List;
+import java.util.ResourceBundle;
+
+public class PushFeedbackConn {
+    private static final String DRIVER = getValue("jdbc.driverClassName1");
+    private static final String URL = getValue("jdbc.url1");
+    private static final String USERNAME = getValue("jdbc.username1");
+    private static final String PASSWORD = getValue("jdbc.password1");
+
+    public static final Long HOSPITAL_ID=Long.valueOf("35");//1:长兴,2:邵逸夫,3:台州市立医院
+
+    private static Connection connection = null;
+    private static PreparedStatement sta = null;
+    private static ResultSet rs = null;
+
+    /**
+     * 读取属性文件中的信息
+     *
+     * @param key
+     * @return
+     */
+    private static String getValue(String key) {
+        // 资源包绑定
+        ResourceBundle bundle = ResourceBundle.getBundle("jdbc");
+        return bundle.getString(key);
+    }
+
+    /**
+     * 加载驱动程序
+     */
+    static {
+        try {
+            Class.forName(DRIVER);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * @return 连接对象
+     */
+    public Connection getConnection() {
+        try {
+            connection = DriverManager.getConnection(URL,USERNAME,PASSWORD);
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return connection;
+    }
+
+    /**
+     * @param sql sql语句
+     * @param obj 参数
+     * @return 数据集合
+     */
+    public ResultSet Query(String sql,Object...obj){
+        connection=getConnection();
+        try {
+            sta=connection.prepareStatement(sql);
+            if(obj!=null){
+                for(int i=0;i<obj.length;i++){
+                    sta.setObject(i+1, obj[i]);
+                }
+            }
+            rs=sta.executeQuery();
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return rs;
+    }
+
+    /**
+     * 关闭资源
+     */
+    public void close() {
+        try {
+            if (rs != null) {
+                rs.close();
+            }
+        } catch (SQLException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (sta != null) {
+                    sta.close();
+                }
+            } catch (SQLException e2) {
+                e2.printStackTrace();
+            } finally {
+                if (connection != null) {
+                    try {
+                        connection.close();
+                    } catch (SQLException e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 关闭数据库
+     * @param conn
+     */
+    public void closeConnection(Connection conn){
+        try{
+            if(conn != null){
+                conn.close();
+            }
+        }
+        catch(Exception e){
+            System.out.println("数据库关闭失败");
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 新赠评分插入表中
+     * @return
+     */
+    public Integer setQcMessAge(FeedbackHosVO feedbackHosVO) throws SQLException {
+        try {
+            String patientId=feedbackHosVO.getBehospitalCode().split("_")[0];
+            String visitId=feedbackHosVO.getBehospitalCode().split("_")[1];
+            int re=0;
+            connection = getConnection();
+            connection.setAutoCommit(false);//事物开始
+            PreparedStatement state=connection.prepareStatement("insert into MEDICAL_QC_MSG " +
+                    "(PATIENT_ID,VISIT_ID,DOCTOR_IN_CHARGE,QA_EVENT_TYPE,QC_MSG_CODE,MESSAGE,ISSUED_BY,ISSUED_DATE_TIME,TOPIC_ID,DEPT_STAYED,MSG_STATUS,EXPLAIN_INFO,QCRESULT_DETAI_SCORE,DETAIL_CODE)"+
+                    "values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+            state.setString(1, patientId);
+            state.setString(2, visitId);
+            state.setString(3,feedbackHosVO.getSenderName());
+            state.setString(4,feedbackHosVO.getModeName());
+            state.setInt(5,1511);
+            state.setString(6,feedbackHosVO.getQcresultDetailMsg());
+            state.setString(7,"评价质控");
+            state.setString(8, DateUtil.formatDateTime(DateUtil.now()));
+            state.setString(9,feedbackHosVO.getModeName());
+            state.setString(10,feedbackHosVO.getDeptId());
+            state.setInt(11,0);
+            state.setString(12,feedbackHosVO.getExplainInfo());
+            state.setString(13, String.format("%.2f", feedbackHosVO.getQcresultDetaiScore()));
+            state.setString(14,Long.toString(feedbackHosVO.getId()));
+            re = state.executeUpdate();
+            if(re < 0){               //插入失败
+                connection.rollback();      //回滚
+                state.close();
+                closeConnection(connection);
+                return re;
+            }
+            connection.commit();            //插入正常
+            state.close();
+            closeConnection(connection);
+            return re;
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw e;
+        }finally {
+            close();
+        }
+
+    }
+
+    /**
+     * 删除评分表中的对应数据
+     * @return
+     */
+    public Integer DeleteQcMessAge(FeedbackHosVO feedbackHosVO) throws SQLException {
+        try {
+            String patientId=feedbackHosVO.getBehospitalCode().split("_")[0];
+            String visitId=feedbackHosVO.getBehospitalCode().split("_")[1];
+            int re=0;
+            connection = getConnection();
+            connection.setAutoCommit(false);//事物开始
+            String sql ="delete from MEDICAL_QC_MSG ";
+            sql+=" where PATIENT_ID = '"+patientId+"' and VISIT_ID = '"+visitId+"' and DETAIL_CODE='"+feedbackHosVO.getId()+"'";
+            PreparedStatement state=connection.prepareStatement(sql);
+            re = state.executeUpdate();
+            if(re < 0){               //删除失败
+                connection.rollback();      //回滚
+                state.close();
+                closeConnection(connection);
+                return re;
+            }
+            connection.commit();            //删除正常
+            state.close();
+            closeConnection(connection);
+            return re;
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw e;
+        }finally {
+            close();
+        }
+
+    }
+
+    /**
+     * 修改评分表中对应数据
+     * @return
+     */
+    public Integer UpdateQcMessAge(FeedbackHosVO feedbackHosVO) throws SQLException {
+        try {
+            String patientId=feedbackHosVO.getBehospitalCode().split("_")[0];
+            String visitId=feedbackHosVO.getBehospitalCode().split("_")[1];
+            int re=0;
+            connection = getConnection();
+            connection.setAutoCommit(false);//事物开始
+            String sql =" update MEDICAL_QC_MSG set " +
+                    "MESSAGE = '"+feedbackHosVO.getQcresultDetailMsg()+"'" +
+                    ",EXPLAIN_INFO='"+feedbackHosVO.getExplainInfo()+"'" +
+                    ",QCRESULT_DETAI_SCORE='"+feedbackHosVO.getQcresultDetaiScore()+"'";
+            sql+="where PATIENT_ID = '"+patientId+"' and VISIT_ID = '"+visitId+"' and DETAIL_CODE='"+feedbackHosVO.getId()+"'";
+            PreparedStatement state=connection.prepareStatement(sql);
+            re = state.executeUpdate();
+            if(re < 0){               //修改失败
+                connection.rollback();      //回滚
+                state.close();
+                closeConnection(connection);
+                return re;
+            }
+            connection.commit();            //修改正常
+            state.close();
+            closeConnection(connection);
+            return re;
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw e;
+        }finally {
+            close();
+        }
+
+    }
+
+    public List<FeedbackHosVO> statusQuery(FeedbackHosVO feedbackHosVO){
+        List<FeedbackHosVO> statusList= Lists.newLinkedList();
+        try {
+            connection = getConnection();
+            connection.setAutoCommit(false);//事物开始
+            String sql =" select DETAIL_CODE,MSG_STATUS from MEDICAL_QC_MSG ";
+            sql+=" where DETAIL_CODE in("+feedbackHosVO.getIds()+")";
+            rs =this.Query(sql, null);
+            while(rs.next()){
+                FeedbackHosVO hosVO=new FeedbackHosVO();
+                hosVO.setId(Long.valueOf(rs.getString("DETAIL_CODE")));
+                hosVO.setMsgStatus(rs.getString("MSG_STATUS"));
+
+                statusList.add(hosVO);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            close();
+        }
+        return statusList;
+    }
+
+}

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

@@ -109,6 +109,9 @@ public class BehospitalPageVO extends Page implements Serializable {
     private Date mrTimeStart;
     private Date mrTimeEnd;
 
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
+
     @ApiModelProperty("页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
     private String pageType = "1";
 

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

@@ -0,0 +1,27 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:缺陷反馈-人工操作病历-抄送人对象
+ * @author: songxl
+ * @time: 2022/4/21 10:03
+ */
+@Getter
+@Setter
+public class CCVO {
+    @ApiModelProperty(value = "用户编号")
+    private String userId;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "科室编号")
+    private String deptCode;
+
+    @ApiModelProperty(value = "科室名")
+    private String deptName;
+
+}

+ 62 - 0
src/main/java/com/diagbot/vo/ChangeQcResultVO.java

@@ -0,0 +1,62 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:缺陷反馈-人工操作病历
+ * @author: songxl
+ * @time: 2022/4/21 10:03
+ */
+@Getter
+@Setter
+public class ChangeQcResultVO {
+    @ApiModelProperty(value = "病历id", required = true)
+    @NotBlank(message = "病历编号为空")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "医院ID", hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(hidden = true)
+    private Integer type;
+
+    @ApiModelProperty("逻辑删除接口(1-恢复和0-删除)标志")
+    private Integer delStatus;
+
+    @ApiModelProperty(value = "模块id")
+    @NotNull(message = "模块id为空")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    @NotBlank(message = "模块名称为空")
+    private String modeName;
+
+    @ApiModelProperty(value = "反馈说明", required = true)
+    @NotBlank(message = "反馈说明为空")
+    private String explainInfo;
+
+    @ApiModelProperty(value = "操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复", required = true)
+    @NotBlank(message = "操作类型为空")
+    private String operationType;
+
+    @ApiModelProperty(value = "接收人编号", required = true)
+    @NotBlank(message = "接收人编号为空")
+    private String receiverCode;
+
+    @ApiModelProperty(value = "接收人姓名", required = true)
+    @NotBlank(message = "接收人姓名为空")
+    private String receiverName;
+
+    @ApiModelProperty(value = "抄送人集合")
+    private List<CCVO> ccs;
+
+    @ApiModelProperty(value = "操作条目 casesEntryId、msg、score必填-(新增缺失除外)")
+    private QcResultAlgVO optResultAlgVO;
+}

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

@@ -0,0 +1,27 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 获取缺陷反馈科室列表--接口入参
+ * @author: zhanghang
+ * @time: 2022/4/21 10:07
+ */
+@ApiModel(value = "获取缺陷反馈科室列表--接口入参")
+@Getter
+@Setter
+public class GetDefectDeptModeVO extends Page {
+
+    @ApiModelProperty(value = "医院ID", hidden = true)
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "是否归档 0: 未归档|1:已归档")
+    private String isPlacefile ;
+}

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

@@ -112,4 +112,7 @@ public class GetEntryDefectImproveInnerVO extends Page {
      * 0-不导出 1-导出
      */
     private Long exportType = 0L;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 72 - 0
src/main/java/com/diagbot/vo/GetMedDefectFeedbackPageVO.java

@@ -0,0 +1,72 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+
+import java.util.Date;
+
+/**
+ * @Description: 获取缺陷反馈列表入参--接口入参
+ * @author: zhanghang
+ * @time: 2022/4/21 10:07
+ */
+@ApiModel(value = "获取缺陷反馈列表入参--接口入参")
+@Getter
+@Setter
+public class GetMedDefectFeedbackPageVO extends Page {
+
+    @ApiModelProperty(value = "医院ID", hidden = true)
+    private Long hospitalId;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "反馈时间起始时间", required = true)
+    private Date startDate;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "反馈时间结束时间", required = true)
+    private Date endDate;
+
+    @ApiModelProperty(value = "所属科室ID")
+    private String deptId;
+
+    @ApiModelProperty(value = "所属科室")
+    private String deptName;
+
+    @ApiModelProperty(value = "反馈人姓名")
+    private String senderName;
+
+    @ApiModelProperty(value = "模块ID")
+    private String modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+    @ApiModelProperty(value = "接收人编号")
+    private String receiverCode;
+
+    @ApiModelProperty(value = "接收人姓名")
+    private String receiverName;
+
+    @ApiModelProperty(value = "抄送人编号")
+    private String ccCodes;
+
+    @ApiModelProperty(value = "抄送人姓名")
+    private String ccNames;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String name;
+
+    @ApiModelProperty(value = "操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复")
+    private String operationType;
+
+    @ApiModelProperty(value = "状态 0:待确认|1:已确认")
+    private String status;
+
+    @ApiModelProperty(value = "是否归档 0: 未归档|1:已归档")
+    private String isPlacefile ;
+}

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

@@ -151,4 +151,7 @@ public class QcResultPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -147,4 +147,8 @@ public class QcResultShortPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -152,4 +152,6 @@ public class QcResultShortXYPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -0,0 +1,23 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotEmpty;
+
+
+/**
+ * @Description:确认缺陷反馈--接口入参
+ * @author: songxl
+ * @time: 2022/4/21 10:03
+ */
+@Getter
+@Setter
+public class UPdDefectBackByIDVO {
+
+    @ApiModelProperty(value = "缺陷反馈编号", required = true)
+    @NotEmpty(message = "缺陷反馈编号为空")
+    private Long id;
+
+}

+ 15 - 0
src/main/java/com/diagbot/vo/his/DoctorHosVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo.his;
+
+import lombok.Data;
+
+@Data
+public class DoctorHosVO {
+    private String keyString;
+    /*
+    private String userId;
+
+    private String deptCode;
+
+    private String name;*/
+
+}

+ 85 - 0
src/main/java/com/diagbot/vo/his/FeedbackHosVO.java

@@ -0,0 +1,85 @@
+package com.diagbot.vo.his;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class FeedbackHosVO {
+
+    private String ids;
+
+    private Long id;
+    /**
+     * 操作类型 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复
+     */
+    private String operationType;
+
+    /**
+     * 发送人编号
+     */
+    private String senderCode;
+
+    /**
+     * 发送人姓名
+     */
+    private String senderName;
+
+    /**
+     * 住院科室ID
+     */
+    private String deptId;
+
+    /**
+     * 住院科室名称
+     */
+    private String deptName;
+
+    /**
+     * 病人住院ID
+     */
+    private String behospitalCode;
+
+    /**
+     * 模块名称
+     */
+    private String modeName;
+
+    /**
+     * 提示信息
+     */
+    private String qcresultDetailMsg;
+
+    /**
+     * 人工修改分值
+     */
+    private BigDecimal qcresultDetaiScore;
+
+    /**
+     * 反馈说明
+     */
+    private String explainInfo;
+
+    /**
+     * 接收人编号
+     */
+    private String receiverCode;
+
+    /**
+     * 接收人姓名
+     */
+    private String receiverName;
+
+    /**
+     * 抄送人编号集合
+     */
+    private String ccCodes;
+
+    /**
+     * 抄送人姓名集合
+     */
+    private String ccNames;
+
+    private String msgStatus;
+}

+ 77 - 0
src/main/java/com/diagbot/web/DataViewController.java

@@ -0,0 +1,77 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.his.DoctorHosDTO;
+import com.diagbot.facade.his.DoctorHosFacade;
+import com.diagbot.facade.his.FeedbackHosFacade;
+import com.diagbot.vo.his.DoctorHosVO;
+import com.diagbot.vo.his.FeedbackHosVO;
+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 java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author zhanghang
+ * @since 2022-04-20
+ */
+@RestController
+@RequestMapping("/qcView/data")
+@Api(value = "HIS视图接口API", tags = { "HIS视图接口API" })
+public class DataViewController {
+
+    @Autowired
+    private DoctorHosFacade doctorHosFacade;
+
+    @Autowired
+    private FeedbackHosFacade feedbackHosFacade;
+
+    @ApiOperation(value = "获取HIS医生信息")
+    @PostMapping("/getDoctorHos")
+    @SysLogger("getDoctorHos")
+    public RespDTO<List<DoctorHosDTO>> getDoctorInfo(@RequestBody DoctorHosVO doctorHosVO){
+        return RespDTO.onSuc(doctorHosFacade.getDoctorInfo(doctorHosVO));
+    }
+
+
+    @ApiOperation(value = "推送缺陷反馈到HIS")
+    @PostMapping("/pushFeedback")
+    @SysLogger("pushFeedback")
+    public RespDTO pushFeedback(@RequestBody FeedbackHosVO feedbackHosVO){
+        return feedbackHosFacade.pushFeedback(feedbackHosVO);
+    }
+
+    @ApiOperation(value = "修改同步到his中的缺陷反馈")
+    @PostMapping("/updateFeedback")
+    @SysLogger("updateFeedback")
+    public RespDTO updateFeedback(@RequestBody FeedbackHosVO feedbackHosVO){
+        return feedbackHosFacade.updateFeedback(feedbackHosVO);
+    }
+
+    @ApiOperation(value = "删除同步到his中的缺陷反馈")
+    @PostMapping("/deleteFeedback")
+    @SysLogger("deleteFeedback")
+    public RespDTO deleteFeedback(@RequestBody FeedbackHosVO feedbackHosVO){
+        return feedbackHosFacade.deleteFeedback(feedbackHosVO);
+    }
+
+    @ApiOperation(value = "从HIS获取待确认缺陷状态")
+    @PostMapping("/statusQuery")
+    @SysLogger("statusQuery")
+    public RespDTO<List<FeedbackHosVO>> statusQuery(@RequestBody FeedbackHosVO feedbackHosVO){
+        return feedbackHosFacade.statusQuery(feedbackHosVO);
+    }
+
+
+}

+ 148 - 0
src/main/java/com/diagbot/web/MedDefectFeedbackController.java

@@ -0,0 +1,148 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.AnalyzeDTO;
+import com.diagbot.dto.GetDefectDeptDTO;
+import com.diagbot.dto.GetMedDefectFeedbackPageDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.his.DoctorHosDTO;
+import com.diagbot.facade.MedDefectFeedbackFacade;
+import com.diagbot.facade.SysDictionaryFacade;
+import com.diagbot.facade.his.DoctorHosFacade;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.ChangeQcResultVO;
+import com.diagbot.vo.GetDefectDeptModeVO;
+import com.diagbot.vo.GetMedDefectFeedbackPageVO;
+import com.diagbot.vo.UPdDefectBackByIDVO;
+import com.diagbot.vo.his.DoctorHosVO;
+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.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 缺陷反馈表 前端控制器
+ * </p>
+ *
+ * @author songxl
+ * @since 2022-04-21
+ */
+@RestController
+@RequestMapping("/medDefectFeedback")
+@Api(value = "缺陷反馈模块相关接口API", tags = { "缺陷反馈模块相关接口API" })
+public class MedDefectFeedbackController {
+    @Autowired
+    private DoctorHosFacade doctorHosFacade;
+    @Autowired
+    private MedDefectFeedbackFacade medDefectFeedbackFacade;
+    @Autowired
+    private SysDictionaryFacade sysDictionaryFacade;
+
+    @ApiOperation(value = "获取His医生信息[by:songxl]",
+            notes = "获取His医生信息")
+    @PostMapping("/getHisDoctorInfo")
+    @SysLogger("getHisDoctorInfo")
+    public RespDTO<List<DoctorHosDTO>> getDoctorInfo(@RequestBody DoctorHosVO doctorHosVO) {
+        return RespDTO.onSuc(doctorHosFacade.getDoctorInfo(doctorHosVO));
+    }
+
+    @ApiOperation(value = "新增已有质控条目[by:songxl]",
+            notes = "optResultAlgVO:操作条目,casesEntryId、msg、score必填<br>")
+    @PostMapping("/addHavingCase")
+    @SysLogger("addHavingCase")
+    @Transactional
+    public RespDTO<AnalyzeDTO> addHavingCase(@RequestBody @Valid ChangeQcResultVO changeQcResultVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.changeQcResult(changeQcResultVO));
+    }
+
+    @ApiOperation(value = "新增缺失质控条目[by:songxl]",
+            notes = "")
+    @PostMapping("/addNotHavingCase")
+    @SysLogger("addNotHavingCase")
+    @Transactional
+    public RespDTO<AnalyzeDTO> addNotHavingCase(@RequestBody @Valid ChangeQcResultVO changeQcResultVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.changeQcResult(changeQcResultVO));
+    }
+
+
+    @ApiOperation(value = "删除质控条目[by:songxl]",
+            notes = "optResultAlgVO:操作条目,casesEntryId、msg、score必填<br>")
+    @PostMapping("/delCase")
+    @SysLogger("delCase")
+    @Transactional
+    public RespDTO<AnalyzeDTO> delCase(@RequestBody @Valid ChangeQcResultVO changeQcResultVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.changeQcResult(changeQcResultVO));
+    }
+
+    @ApiOperation(value = "恢复质控条目[by:songxl]",
+            notes = "optResultAlgVO:操作条目,casesEntryId、msg、score必填<br>")
+    @PostMapping("/recoverCase")
+    @SysLogger("recoverCase")
+    @Transactional
+    public RespDTO<AnalyzeDTO> recoverCase(@RequestBody @Valid ChangeQcResultVO changeQcResultVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.changeQcResult(changeQcResultVO));
+    }
+
+    @ApiOperation(value = "修改质控条目[by:songxl]",
+            notes = "optResultAlgVO:操作条目,casesEntryId、msg、score必填<br>")
+    @PostMapping("/updCase")
+    @SysLogger("updCase")
+    @Transactional
+    public RespDTO<AnalyzeDTO> updCase(@RequestBody @Valid ChangeQcResultVO changeQcResultVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.changeQcResult(changeQcResultVO));
+    }
+
+    @ApiOperation(value = "确认缺陷反馈[by:songxl]",
+            notes = "")
+    @PostMapping("/updDefectBackByID")
+    @SysLogger("updDefectBackByID")
+    @Transactional
+    public RespDTO<Boolean> updDefectBackByID(@RequestBody @Valid UPdDefectBackByIDVO uPdDefectBackByIDVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.updDefectBackByID(uPdDefectBackByIDVO));
+    }
+
+
+    @ApiOperation(value = "获取缺陷反馈记录列表操作类型、状态下拉框内容[by:zhanghang]",
+            notes = "获取缺陷反馈记录列表操作类型、状态下拉框内容")
+    @PostMapping("/getOperationType")
+    public RespDTO<Map<String, String>> getOperationStatusType() {
+        Map<String, Map<String, String>> operationStatusType = sysDictionaryFacade.getOperationStatusType("36", "缺陷反馈");
+        return RespDTO.onSuc(operationStatusType);
+    }
+
+    @ApiOperation(value = "获取缺陷反馈记录[by:zhanghang]",
+            notes = "获取缺陷反馈记录列表")
+    @PostMapping("/getMedDefectFeedbackPage")
+    public RespDTO<Page<GetMedDefectFeedbackPageDTO>> getMedDefectFeedbackPage(@RequestBody GetMedDefectFeedbackPageVO getMedDefectFeedbackPageVO) {
+        String hospitalID = SysUserUtils.getCurrentHospitalID();
+        getMedDefectFeedbackPageVO.setHospitalId(Long.valueOf(hospitalID));
+        return RespDTO.onSuc(medDefectFeedbackFacade.getMedDefectFeedbackPage(getMedDefectFeedbackPageVO));
+    }
+
+    @ApiOperation(value = "获取缺陷反馈记录列表-科室下拉框内容[by:zhanghang]",
+            notes = "获取缺陷反馈记录列表-科室下拉框内容")
+    @PostMapping("/getDefectDept")
+    public RespDTO<List<GetDefectDeptDTO>> getDefectDept(@RequestBody GetDefectDeptModeVO getDefectDeptModeVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.getDefectDept(getDefectDeptModeVO));
+    }
+
+    @ApiOperation(value = "获取缺陷反馈记录列表-缺陷模块下拉框内容[by:zhanghang]",
+            notes = "获取缺陷反馈记录列表-缺陷模块下拉框内容")
+    @PostMapping("/getDefectMode")
+    public RespDTO<List<GetDefectDeptDTO>> getDefectMode(@RequestBody GetDefectDeptModeVO getDefectDeptModeVO) {
+        return RespDTO.onSuc(medDefectFeedbackFacade.getDefectMode(getDefectDeptModeVO));
+    }
+
+}

+ 58 - 44
src/main/resources/application-dev.yml

@@ -58,51 +58,65 @@ spring:
   application:
     name: gateway-service
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: lantone
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
 
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 209 - 0
src/main/resources/application-his.yml

@@ -0,0 +1,209 @@
+server:
+  port: 5858
+  max-http-header-size: 10MB
+  tomcat:
+    uri-encoding: utf-8
+
+hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
+  command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
+    default:
+      execution:
+        timeout:
+          enabled: true
+        isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
+          thread:
+            timeoutInMilliseconds: 20000
+
+ribbon:
+  ReadTimeout: 20000
+  ConnectTimeout: 20000
+  MaxAutoRetries: 0
+  MaxAutoRetriesNextServer: 1
+
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: bus-refresh,health,info,hystrix.stream
+      cors:
+        allowed-origins: "*"
+        allowed-methods: "*"
+  endpoint:
+    health:
+      show-details: always
+
+# 驱动配置信息
+spring:
+  application:
+    name: gateway-service
+  datasource:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
+          enabled: true
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+      token: 8 # Token索引
+    host: 192.168.2.237  #Redis服务器地址
+    port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: emrais # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
+  servlet:
+    multipart:
+      max-request-size: 2048MB
+  http:
+    encoding:
+      charset: utf-8
+      force: true
+      enabled: true
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml,classpath:/mapper/his/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+myhost: localhost
+oath.self.address: http://${myhost}:${server.port}
+
+# 加解密开关
+encrypt:
+  enable: false
+
+swagger:
+  enable: true
+
+#xml解析成结构化开关
+xml_analyse:
+  enable: false
+
+#函数初始化modeId开关
+initmodeid:
+  enable: false
+
+#对接过程中是否记录正常流程的日志
+log_switch:
+  enable: false
+
+mrqcLog:
+  enable: false
+
+appeal.address: http://132.147.253.31:8871

+ 58 - 44
src/main/resources/application-local.yml

@@ -58,51 +58,65 @@ spring:
   application:
     name: gateway-service
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: lantone
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
 
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 57 - 44
src/main/resources/application-pre.yml

@@ -58,52 +58,65 @@ spring:
   application:
     name: gateway-service
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.125:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: LangT0ng@lt
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
 
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.125:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: LangT0ng@lt
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8

+ 58 - 44
src/main/resources/application-pro.yml

@@ -58,51 +58,65 @@ spring:
   application:
     name: gateway-service
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.129:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: LangT0ng@122lt
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.129:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: LangT0ng@122lt
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
 
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 58 - 44
src/main/resources/application-test.yml

@@ -58,51 +58,65 @@ spring:
   application:
     name: gateway-service
   datasource:
-    druid:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      platform: mysql
-      url: jdbc:mysql://192.168.2.126:3307/qc_xy?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
-      username: root
-      password: Lat0ne@tesT
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
-
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: Lat0ne@tesT
+          druid:
+            initial-size: 5
 
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss

+ 10 - 0
src/main/resources/jdbc.properties

@@ -14,6 +14,16 @@ jdbc.url=jdbc:sqlserver://192.168.100.39\\tzmhemr;DatabaseName=bigemr
 jdbc.username=zjlt
 jdbc.password=zjlt@2020
 
+#jdbc.driverClassName1=oracle.jdbc.OracleDriver
+#jdbc.url1=jdbc:oracle:thin:@132.147.254.5:1521/dbserver
+#jdbc.username1=langtong
+#jdbc.password1=langtong
+
+jdbc.driverClassName1=com.mysql.cj.jdbc.Driver
+jdbc.url1=jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+jdbc.username1=root
+jdbc.password1=Lat0ne@tesT
+
 #\u6570\u636e\u670d\u52a1\u6a21\u5f0f
 remote.address.ver=http://192.18.101.207:2030/index.html
 remote.address.hor=http://192.18.101.207:2030/indexHorizontal.html

+ 12 - 0
src/main/resources/logback-spring.xml

@@ -303,4 +303,16 @@
             <appender-ref ref="LOGSTASHPRO"/>
         </root>
     </springProfile>
+
+    <!-- 生产环境下的日志配置 -->
+    <springProfile name="his">
+        <root level="INFO">
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRO"/>
+        </root>
+    </springProfile>
 </configuration>

+ 99 - 20
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -34,6 +34,7 @@
         <result column="placefile_date" property="placefileDate"/>
         <result column="in_state" property="inState"/>
         <result column="is_deleted" property="isDeleted"/>
+        <result column="is_daytime" property="isDaytime"/>
         <result column="gmt_create" property="gmtCreate"/>
         <result column="gmt_modified" property="gmtModified"/>
         <result column="creator" property="creator"/>
@@ -71,6 +72,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            AND t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1184,6 +1188,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1316,6 +1323,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         WHERE t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1420,6 +1430,9 @@
         and c1.id = #{userId}
         )
         )
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -5569,7 +5582,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime as isDaytime
         FROM
         (
         SELECT DISTINCT
@@ -5614,7 +5628,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -5636,6 +5651,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -5846,7 +5864,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime as isDaytime
         FROM
         (
         SELECT DISTINCT
@@ -5887,6 +5906,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         b.gmt_create
         FROM
         med_behospital_info a,
@@ -5905,6 +5925,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -6093,7 +6116,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT DISTINCT
@@ -6133,6 +6157,7 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
+        a.is_daytime,
         a.ward_name,
         b.gmt_create
         FROM
@@ -6156,6 +6181,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND e.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -7810,7 +7838,8 @@
         t1.chTime,
         t1.mrTime,
         CONCAT( ifnull(t2.age,'') ,ifnull(t2.age_unit,'') )as age,
-        t1.file_code AS fileCode
+        t1.file_code AS fileCode,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT be.*,
@@ -7855,12 +7884,16 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        a.file_code
+        a.file_code,
+        a.is_daytime
         FROM
         med_behospital_info a
         WHERE
         a.is_deleted = 'N'
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -12414,7 +12447,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (SELECT
         be.*,
@@ -12451,7 +12485,8 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
-        a.ward_name
+        a.ward_name,
+        a.is_daytime
         FROM
         med_behospital_info a,
         sys_user_dept c,
@@ -12466,6 +12501,9 @@
         AND a.behospital_code = e.behospital_code
         AND a.qc_type_id != 0
         AND e.cases_id = 243
+        <if test="isDaytime != null and isDaytime != ''">
+            and a.is_daytime = #{isDaytime}
+        </if>
         <if test="userId!=null">
             AND c.user_id = #{userId}
         </if>
@@ -12612,7 +12650,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (SELECT
         be.*,
@@ -12649,7 +12688,8 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
-        a.ward_name
+        a.ward_name,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_cases e
@@ -12660,6 +12700,9 @@
         AND a.behospital_code = e.behospital_code
         AND a.qc_type_id != 0
         AND e.cases_id = 243
+        <if test="qcResultPageVO.isDaytime != null and qcResultPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultPageVO.isDaytime}
+        </if>
         <if test="qcResultPageVO.titleName != null ">
             <if test="qcResultPageVO.titleName == '不合格数'">
                 AND e.`level`='不合格'
@@ -13020,7 +13063,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (SELECT
         be.*,
@@ -13057,7 +13101,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -13075,6 +13120,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -13219,7 +13267,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (SELECT
         be.*,
@@ -13256,7 +13305,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -13278,6 +13328,9 @@
         AND a.beh_dept_id = f.dept_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND f.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -16626,7 +16679,8 @@
         t1.file_code AS fileCode,
         t1.checkStatus,
         t1.chName,
-        t1.chTime
+        t1.chTime,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT
@@ -16661,7 +16715,8 @@
         a.placefile_date,
         a.ward_name,
         c.gmt_create,
-        d.score_res as scoreBn
+        d.score_res as scoreBn,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_home_page b,
@@ -16690,6 +16745,9 @@
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
         AND m1.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and m1.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16737,6 +16795,9 @@
         AND d.cases_id = 243
         AND d.score_res > e.score_res
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16863,7 +16924,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT
@@ -16901,6 +16963,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         c.gmt_create
         FROM
         med_behospital_info a,
@@ -16931,6 +16994,9 @@
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
         AND m1.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and m1.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16981,6 +17047,9 @@
         AND d.cases_id = 243
         AND d.score_res > e.score_res
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND f.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -17117,7 +17186,8 @@
         t1.file_code AS fileCode,
         t1.checkStatus,
         t1.chName,
-        t1.chTime
+        t1.chTime,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT
@@ -17152,7 +17222,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b
@@ -17162,6 +17233,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -17290,7 +17364,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime  as isDaytime
         FROM
         (
         SELECT
@@ -17328,6 +17403,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         b.gmt_create
         FROM
         med_behospital_info a,
@@ -17342,6 +17418,9 @@
         AND a.beh_dept_id = c.dept_id
         AND a.behospital_code = b.behospital_code
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND c.user_id = #{qcResultShortPageVO.userId}
         </if>

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

@@ -95,7 +95,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 2
+                and b.info in ("")
             </if>
         </if>
         <if test="doctorAdviceVO.adviceType != null and doctorAdviceVO.adviceType == 2 ">
@@ -106,7 +106,6 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1=1
             </if>
         </if>
     </select>

+ 5 - 0
src/main/resources/mapper/MedClickInfoMapper.xml

@@ -70,6 +70,7 @@
             <result column="level" property="level"/>
             <result column="scoreRes" property="scoreRes"/>
             <result column="gradeTime" property="gradeTime"/>
+            <result column="isDaytime" property="isDaytime"/>
             <collection property="qcResultDetailInfos" ofType="com.diagbot.dto.QcResultDetailInfo">
                 <result column="CasesEntryIds" property="CasesEntryIds"/>
             </collection>
@@ -231,6 +232,7 @@
         b.file_code AS fileCode,
         b.behospital_code as behospitalCode,
         b.name,
+        b.is_daytime as isDaytime,
         b.behospital_date AS behospitalDate,
         b.leave_hospital_date AS leaveHospitalDate,
         b.doctor_id AS doctorId,
@@ -251,6 +253,9 @@
         AND a.hospital_id =c.hospital_id
         AND a.behospital_code =b.behospital_code
         AND a.behospital_code =c.behospital_code
+        <if test="isDaytime != null and isDaytime != ''">
+            and b.is_daytime = #{isDaytime}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND b.hospital_id = #{hospitalId}
         </if>

+ 186 - 0
src/main/resources/mapper/MedDefectFeedbackMapper.xml

@@ -0,0 +1,186 @@
+<?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.MedDefectFeedbackMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedDefectFeedback">
+        <id column="id" property="id"/>
+        <result column="hospital_id" property="hospitalId"/>
+        <result column="dept_id" property="deptId"/>
+        <result column="dept_name" property="deptName"/>
+        <result column="behospital_code" property="behospitalCode"/>
+        <result column="name" property="name"/>
+        <result column="cases_entry_id" property="casesEntryId"/>
+        <result column="qcresult_detail_msg" property="qcresultDetailMsg"/>
+        <result column="qcresult_detai_score" property="qcresultDetaiScore"/>
+        <result column="mode_id" property="modeId"/>
+        <result column="mode_name" property="modeName"/>
+        <result column="explain_info" property="explainInfo"/>
+        <result column="operation_type" property="operationType"/>
+        <result column="sender_code" property="senderCode"/>
+        <result column="sender_name" property="senderName"/>
+        <result column="receiver_code" property="receiverCode"/>
+        <result column="receiver_name" property="receiverName"/>
+        <result column="cc_codes" property="ccCodes"/>
+        <result column="cc_names" property="ccNames"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="gmt_create" property="gmtCreate"/>
+        <result column="gmt_modified" property="gmtModified"/>
+        <result column="creator" property="creator"/>
+        <result column="modifier" property="modifier"/>
+    </resultMap>
+
+    <select id="getMedDefectFeedbackPage" resultType="com.diagbot.dto.GetMedDefectFeedbackPageDTO">
+        SELECT
+        t1.*, t2.age
+        FROM
+        (
+        SELECT
+        a.* ,b.is_placefile as isPlacefile FROM
+        (
+        SELECT
+        id,
+        dept_name as deptName,
+        gmt_modified as gmtModified,
+        mode_name as modeName,
+        qcresult_detai_score as qcresultDetaiScore,
+        modifier,
+        receiver_code as receiverCode,
+        sender_name as senderName,
+        is_deleted as isDeleted,
+        mode_id as modeId,
+        hospital_id as hospitalId,
+        creator,
+        receiver_name as receiverName,
+        behospital_code as behospitalCode,
+        dept_id as deptId,
+        gmt_create as gmtCreate,
+        sender_code as senderCode,
+        cases_entry_id as casesEntryId,
+        explain_info as explainInfo,
+        name,
+        cc_names as ccNames,
+        cc_codes as ccCodes,
+        operation_type as operationType,
+        CASE WHEN (qcresult_detail_msg is null OR qcresult_detail_msg = '') THEN '-' ELSE qcresult_detail_msg END AS qcresultDetailMsg,
+        status
+        FROM
+        med_defect_feedback
+        WHERE
+        is_deleted = 'N'
+        <if test="getMedDefectFeedbackPageVO.hospitalId != null and getMedDefectFeedbackPageVO.hospitalId != ''">
+            and hospital_id = #{getMedDefectFeedbackPageVO.hospitalId}
+        </if>
+        <if test="getMedDefectFeedbackPageVO.operationType != null and getMedDefectFeedbackPageVO.operationType != ''">
+            and operation_type = #{getMedDefectFeedbackPageVO.operationType}
+        </if>
+        <if test="getMedDefectFeedbackPageVO.status != null and getMedDefectFeedbackPageVO.status != ''">
+            and status = #{getMedDefectFeedbackPageVO.status}
+        </if>
+        <if test="getMedDefectFeedbackPageVO.deptId != null and getMedDefectFeedbackPageVO.deptId != ''">
+            and dept_id = #{getMedDefectFeedbackPageVO.deptId}
+        </if>
+        <if test="getMedDefectFeedbackPageVO.deptName != null and getMedDefectFeedbackPageVO.deptName != ''">
+            and dept_name  LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.deptName}, '%' )
+        </if>
+        <if test="getMedDefectFeedbackPageVO.modeId != null and getMedDefectFeedbackPageVO.modeId != ''">
+            and mode_id = #{getMedDefectFeedbackPageVO.modeId}
+        </if>
+        <if test="getMedDefectFeedbackPageVO.modeName != null and getMedDefectFeedbackPageVO.modeName != ''">
+            and mode_name LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.modeName}, '%' )
+        </if>
+        <if test="getMedDefectFeedbackPageVO.startDate != null ">
+            <![CDATA[ AND gmt_create >= #{getMedDefectFeedbackPageVO.startDate}]]>
+        </if>
+        <if test="getMedDefectFeedbackPageVO.endDate != null">
+            <![CDATA[ AND gmt_create <= #{getMedDefectFeedbackPageVO.endDate}]]>
+        </if>
+        <if test="getMedDefectFeedbackPageVO.receiverName != null and getMedDefectFeedbackPageVO.receiverName != ''">
+            and receiver_name LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.receiverName}, '%' )
+        </if>
+        <if test="getMedDefectFeedbackPageVO.ccNames != null and getMedDefectFeedbackPageVO.ccNames != ''">
+            and cc_names LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.ccNames}, '%' )
+        </if>
+        <if test="getMedDefectFeedbackPageVO.name != null and getMedDefectFeedbackPageVO.name != ''">
+            and name LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.name}, '%' )
+        </if>
+        <if test="getMedDefectFeedbackPageVO.senderName != null and getMedDefectFeedbackPageVO.senderName != ''">
+            and sender_name LIKE CONCAT( '%', #{getMedDefectFeedbackPageVO.senderName}, '%' )
+        </if>
+        ) a ,
+        med_behospital_info b
+        where
+        a.behospitalCode=b.behospital_code
+        and b.is_deleted='N'
+        <if test="getMedDefectFeedbackPageVO.isPlacefile != null and getMedDefectFeedbackPageVO.isPlacefile != ''">
+            and b.is_placefile =#{getMedDefectFeedbackPageVO.isPlacefile}
+        </if>
+        ) t1
+        LEFT JOIN med_home_page t2 ON t2.behospital_code = t1.behospitalCode
+        AND t2.is_deleted = 'N'
+    </select>
+
+    <select id="getDefectDept" resultType="com.diagbot.dto.GetDefectDeptDTO">
+    SELECT
+        a.*, b.is_placefile
+    FROM
+        (
+        SELECT
+            dept_id as deptId,
+            dept_name as deptName,
+            behospital_code AS behospitalCode
+        FROM
+            med_defect_feedback
+        WHERE
+            is_deleted = 'N'
+        AND hospital_id = #{getDefectDeptModeVO.hospitalId}
+        GROUP BY
+        dept_id,
+        dept_name,
+		behospital_code
+        ) a,
+        med_behospital_info b
+    WHERE
+        a.behospitalCode = b.behospital_code
+    AND a.deptId IS NOT NULL
+    <if test="getDefectDeptModeVO.isPlacefile != null and getDefectDeptModeVO.isPlacefile != ''">
+        and b.is_placefile =#{getDefectDeptModeVO.isPlacefile}
+    </if>
+    GROUP BY
+        a.deptId,
+        a.deptName
+    </select>
+
+    <select id="getDefectMode" resultType="com.diagbot.dto.GetDefectModeDTO">
+    SELECT
+        a.*, b.is_placefile
+    FROM
+        (
+        SELECT
+            mode_id as modeId,
+            mode_name as modeName,
+            behospital_code AS behospitalCode
+        FROM
+            med_defect_feedback
+        WHERE
+            is_deleted = 'N'
+        AND hospital_id = #{getDefectDeptModeVO.hospitalId}
+    	GROUP BY
+		mode_id,
+        mode_name,
+		behospital_code
+        ) a,
+        med_behospital_info b
+    WHERE
+        a.behospitalCode = b.behospital_code
+    AND a.modeId IS NOT NULL
+    <if test="getDefectDeptModeVO.isPlacefile != null and getDefectDeptModeVO.isPlacefile != ''">
+        and b.is_placefile =#{getDefectDeptModeVO.isPlacefile}
+    </if>
+    GROUP BY
+        a.modeId,
+        a.modeName
+    </select>
+
+</mapper>

+ 3 - 5
src/main/resources/mapper/MedLisInfoMapper.xml

@@ -104,7 +104,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 2
+                and b.info  in ("")
             </if>
 
     </select>
@@ -186,7 +186,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 2
+                and b.info in ("")
             </if>
         </if>
         <if test="examineInfoVO.examineType != null and examineInfoVO.examineType == 2 ">
@@ -197,7 +197,6 @@
                 </foreach>
             </if>
             <if test="badCheckInfo = null || badCheckInfo.size() == 0">
-                and 1 = 1
             </if>
         </if>
     </select>
@@ -259,7 +258,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 2
+                and t.info in ("")
             </if>
         </if>
         <if test="examineSonInfoVO.examineType != null and examineSonInfoVO.examineType == 2 ">
@@ -270,7 +269,6 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 1
             </if>
         </if>
     </select>

+ 3 - 4
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -57,8 +57,8 @@
         left join
         med_pacs_result t2
         on t1.hospital_id = t2.hospital_id
-        AND t1.is_deleted = "N"
-        AND t2.is_deleted = "N"
+        AND t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
         AND t1.rep_name IS NOT NULL
         AND t1.check_date IS NOT NULL
         AND t1.behospital_code = t2.behospital_code
@@ -107,7 +107,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 2
+                and b.info in ("")
             </if>
         </if>
         <if test="checkInfoVO.checkType != null and checkInfoVO.checkType == 2 ">
@@ -118,7 +118,6 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and 1 = 1
             </if>
         </if>
     </select>

+ 16 - 0
src/main/resources/mapper/his/DoctorHosMapper.xml

@@ -0,0 +1,16 @@
+<?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.his.DoctorHosMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.his.DoctorHos">
+        <result column="USER_ID" property="userId" />
+        <result column="DEPT_CODE" property="deptCode" />
+        <result column="NAME" property="name" />
+        <result column="TITLE" property="title" />
+        <result column="CERTIFICATE" property="certificate" />
+        <result column="DEPT_NAME" property="deptName" />
+        <result column="JOB" property="job" />
+    </resultMap>
+
+</mapper>

+ 4 - 4
src/test/java/com/diagbot/CodeGeneration.java

@@ -27,7 +27,7 @@ public class CodeGeneration {
 
         // 全局配置
         GlobalConfig gc = new GlobalConfig();
-        gc.setOutputDir("D://code");
+        gc.setOutputDir("C://code");
         gc.setFileOverride(true);
         gc.setActiveRecord(false);// 不需要ActiveRecord特性的请改为false
         gc.setEnableCache(false);// XML 二级缓存
@@ -48,15 +48,15 @@ public class CodeGeneration {
         dsc.setDbType(DbType.MYSQL);
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("lantone");
-        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
+        dsc.setPassword("Lat0ne@tesT");
+        dsc.setUrl("jdbc:mysql://192.168.2.126:3307/xy_st?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "med_check_info"}); // 需要生成的表
+        strategy.setInclude(new String[] { "DOCTOR_HOS"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);