Переглянути джерело

Merge branch 'dev/20201123_1.4.8'

chengyao 4 роки тому
батько
коміт
2c73f3083b
52 змінених файлів з 887 додано та 222 видалено
  1. 29 0
      doc/023.20200923v1.5.0/qc_initv1.5.0.sql
  2. 36 0
      doc/026.20201123v1.4.8/qc_initv1.4.8.sql
  3. 2 0
      doc/027.20201130_5.4.1云平台/qc_initv20201130_5.4.1.sql
  4. 1 1
      src/main/java/com/diagbot/dto/AverageStatisticsDTO.java
  5. 2 2
      src/main/java/com/diagbot/dto/AverageStatisticsFeeDTO.java
  6. 2 2
      src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java
  7. 2 2
      src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java
  8. 1 1
      src/main/java/com/diagbot/dto/EntryNumDTO.java
  9. 1 1
      src/main/java/com/diagbot/dto/EntryNumGroupDTO.java
  10. 2 2
      src/main/java/com/diagbot/dto/EntryStatisticsDTO.java
  11. 1 1
      src/main/java/com/diagbot/dto/ExportExcelCaseDTO.java
  12. 2 2
      src/main/java/com/diagbot/dto/HomePageImproveDTO.java
  13. 1 1
      src/main/java/com/diagbot/dto/HomePageNumDTO.java
  14. 1 1
      src/main/java/com/diagbot/dto/LevelStatisticsDTO.java
  15. 3 0
      src/main/java/com/diagbot/dto/QcCasesEntryDTO.java
  16. 1 1
      src/main/java/com/diagbot/dto/QcResultPercentDTO.java
  17. 11 0
      src/main/java/com/diagbot/dto/RecordContentDTO.java
  18. 271 0
      src/main/java/com/diagbot/entity/MedTransferRecord.java
  19. 1 1
      src/main/java/com/diagbot/entity/StrTransferOutNote.java
  20. 63 24
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java
  21. 3 3
      src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java
  22. 19 19
      src/main/java/com/diagbot/facade/ConsoleExportFacade.java
  23. 9 9
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  24. 2 2
      src/main/java/com/diagbot/facade/FilterFacade.java
  25. 13 0
      src/main/java/com/diagbot/facade/MedTransferRecordFacade.java
  26. 3 2
      src/main/java/com/diagbot/facade/QcCasesEntryHospitalFacade.java
  27. 6 1
      src/main/java/com/diagbot/facade/QcCasesFacade.java
  28. 16 0
      src/main/java/com/diagbot/mapper/MedTransferRecordMapper.java
  29. 16 0
      src/main/java/com/diagbot/service/MedTransferRecordService.java
  30. 9 4
      src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java
  31. 9 4
      src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java
  32. 20 0
      src/main/java/com/diagbot/service/impl/MedTransferRecordServiceImpl.java
  33. 6 1
      src/main/java/com/diagbot/vo/BehospitalPageVO.java
  34. 5 0
      src/main/java/com/diagbot/vo/DoctorAdviceVO.java
  35. 6 3
      src/main/java/com/diagbot/vo/ExportQcresultVO.java
  36. 1 1
      src/main/java/com/diagbot/vo/FilterMedicalCheckVO.java
  37. 2 2
      src/main/java/com/diagbot/vo/FilterOrderVO.java
  38. 4 0
      src/main/java/com/diagbot/vo/FilterPageVO.java
  39. 2 2
      src/main/java/com/diagbot/vo/FilterUnModifyMRVO.java
  40. 21 0
      src/main/java/com/diagbot/vo/QcCasesEntryVO.java
  41. 7 1
      src/main/java/com/diagbot/vo/QcResultPageVO.java
  42. 6 1
      src/main/java/com/diagbot/vo/QcResultShortPageVO.java
  43. 20 0
      src/main/java/com/diagbot/web/MedTransferRecordController.java
  44. 3 2
      src/main/java/com/diagbot/web/QcCasesEntryHospitalController.java
  45. 1 1
      src/main/resources/mapper/BasDeptInfoMapper.xml
  46. 193 112
      src/main/resources/mapper/BehospitalInfoMapper.xml
  47. 10 1
      src/main/resources/mapper/DoctorAdviceMapper.xml
  48. 3 1
      src/main/resources/mapper/MedLisInfoMapper.xml
  49. 3 1
      src/main/resources/mapper/MedPacsInfoMapper.xml
  50. 28 0
      src/main/resources/mapper/MedTransferRecordMapper.xml
  51. 1 0
      src/main/resources/mapper/QcCasesEntryMapper.xml
  52. 7 7
      src/main/resources/mapper/QcresultInfoMapper.xml

+ 29 - 0
doc/023.20200923v1.5.0/qc_initv1.5.0.sql

@@ -998,6 +998,35 @@ CREATE TABLE `str_ward_record` (
 
 SET FOREIGN_KEY_CHECKS = 1;
 
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+DROP TABLE IF EXISTS `med_transfer_record`;
+CREATE TABLE `med_transfer_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` int(20) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(50) NOT NULL COMMENT '病历号',
+  `name` varchar(32) DEFAULT NULL COMMENT '姓名',
+  `sex` varchar(2) DEFAULT NULL COMMENT '性别',
+  `age` int(5) DEFAULT NULL COMMENT '年龄',
+  `dept_name` varchar(255) DEFAULT NULL COMMENT '科别',
+  `transfer_out_date` datetime DEFAULT NULL COMMENT '转出日期',
+  `transfer_in_date` datetime DEFAULT NULL COMMENT '转入日期',
+  `transfer_out_dept` varchar(255) DEFAULT NULL COMMENT '转出科室',
+  `transfer_in_dept` varchar(255) DEFAULT NULL COMMENT '转入科室',
+  `rec_doctor` varchar(255) DEFAULT NULL COMMENT '记录医生',
+  `rec_date` datetime DEFAULT NULL COMMENT '记录时间',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `is_deleted` varchar(3) DEFAULT 'N' COMMENT '是否删除',
+  `gmt_create` datetime DEFAULT NULL COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT NULL COMMENT '记录修改时间',
+  `creator` varchar(60) DEFAULT NULL COMMENT '创建人',
+  `modifier` varchar(60) DEFAULT NULL COMMENT '修改人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='转入转出记录(标记时间)';
+
+SET FOREIGN_KEY_CHECKS = 1;
+
 
 
 

+ 36 - 0
doc/026.20201123v1.4.8/qc_initv1.4.8.sql

@@ -0,0 +1,36 @@
+use `qc`;
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+DROP TABLE IF EXISTS `med_transfer_record`;
+CREATE TABLE `med_transfer_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `hospital_id` int(20) NOT NULL COMMENT '医院ID',
+  `behospital_code` varchar(50) NOT NULL COMMENT '病历号',
+  `name` varchar(32) DEFAULT NULL COMMENT '姓名',
+  `sex` varchar(2) DEFAULT NULL COMMENT '性别',
+  `age` int(5) DEFAULT NULL COMMENT '年龄',
+  `dept_name` varchar(255) DEFAULT NULL COMMENT '科别',
+  `transfer_out_date` datetime DEFAULT NULL COMMENT '转出日期',
+  `transfer_in_date` datetime DEFAULT NULL COMMENT '转入日期',
+  `transfer_out_dept` varchar(255) DEFAULT NULL COMMENT '转出科室',
+  `transfer_in_dept` varchar(255) DEFAULT NULL COMMENT '转入科室',
+  `rec_doctor` varchar(255) DEFAULT NULL COMMENT '记录医生',
+  `rec_date` datetime DEFAULT NULL COMMENT '记录时间',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `is_deleted` varchar(3) DEFAULT 'N' COMMENT '是否删除',
+  `gmt_create` datetime DEFAULT NULL COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT NULL COMMENT '记录修改时间',
+  `creator` varchar(60) DEFAULT NULL COMMENT '创建人',
+  `modifier` varchar(60) DEFAULT NULL COMMENT '修改人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='转入转出记录(标记时间)';
+
+SET FOREIGN_KEY_CHECKS = 1;
+
+
+-- 索引脚本
+ALTER TABLE `med_home_page` ADD INDEX index_home_page_id ( `home_page_id` );
+ALTER TABLE `med_home_page` ADD INDEX index_hospital_id ( `hospital_id` );
+ALTER TABLE `med_home_page` ADD INDEX index_behospital_code ( `behospital_code` );
+ALTER TABLE `med_home_operation_info` ADD INDEX index_home_page_id ( `home_page_id` );

+ 2 - 0
doc/027.20201130_5.4.1云平台/qc_initv20201130_5.4.1.sql

@@ -0,0 +1,2 @@
+use `qc`;
+ALTER TABLE `qc_type` ADD   `parent_type_id` VARCHAR(4) DEFAULT NULL COMMENT '父类质控id' AFTER `default_module`;

+ 1 - 1
src/main/java/com/diagbot/dto/AverageStatisticsDTO.java

@@ -13,7 +13,7 @@ import lombok.Setter;
 @Setter
 public class AverageStatisticsDTO {
     private String id;
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String name;
     private Integer num = 0;
     private Integer sameNum = 0; //同期num

+ 2 - 2
src/main/java/com/diagbot/dto/AverageStatisticsFeeDTO.java

@@ -13,7 +13,7 @@ import lombok.Setter;
 @Setter
 public class AverageStatisticsFeeDTO {
     private String id;
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String name;
     private Integer num;
     @Excel(name = "本年平均住院花费(元)", width = 15, orderNum = "2")
@@ -26,4 +26,4 @@ public class AverageStatisticsFeeDTO {
     private Double lastYearAverageValue = 0d;
     //科室分类
     private String deptClass;
-}
+}

+ 2 - 2
src/main/java/com/diagbot/dto/AverageStatisticsFeeMonthDTO.java

@@ -13,7 +13,7 @@ import lombok.Setter;
 @Setter
 public class AverageStatisticsFeeMonthDTO {
     private String id;
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String name;
     private Integer num;
     @Excel(name = "本月平均住院花费(元)", width = 15, orderNum = "2")
@@ -27,4 +27,4 @@ public class AverageStatisticsFeeMonthDTO {
     private Double lastYearAverageValue = 0d;
     //科室分类
     private String deptClass;
-}
+}

+ 2 - 2
src/main/java/com/diagbot/dto/AverageStatisticsMonthDTO.java

@@ -13,7 +13,7 @@ import lombok.Setter;
 @Setter
 public class AverageStatisticsMonthDTO {
     private String id;
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String name;
     private Integer num;
     @Excel(name = "本月平均住院天数(天)", width = 15, orderNum = "2")
@@ -27,4 +27,4 @@ public class AverageStatisticsMonthDTO {
     private Double lastYearAverageValue = 0d;
     //科室分类
     private String deptClass;
-}
+}

+ 1 - 1
src/main/java/com/diagbot/dto/EntryNumDTO.java

@@ -28,7 +28,7 @@ public class EntryNumDTO {
     /**
      * 模块名称
      */
-    @Excel(name = "所属模块", width = 20, orderNum = "1")
+    @Excel(name = "模块名称", width = 20, orderNum = "1")
     private String casesName;
     /**
      * 条目缺陷总数

+ 1 - 1
src/main/java/com/diagbot/dto/EntryNumGroupDTO.java

@@ -28,7 +28,7 @@ public class EntryNumGroupDTO {
     /**
      * 模块名称
      */
-    @Excel(name = "所属模块", width = 20, orderNum = "1")
+    @Excel(name = "模块名称", width = 20, orderNum = "1")
     private String casesName;
     /**
      * 条目缺陷总数

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

@@ -19,7 +19,7 @@ public class EntryStatisticsDTO {
     /**
      * 科室名称
      */
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String deptName;
     /**
      * 未在24小时内完成会诊数
@@ -174,4 +174,4 @@ public class EntryStatisticsDTO {
      * 病人住院超过30天的病历数
      */
     private Integer stageSummaryMRNum = 0;
-}
+}

+ 1 - 1
src/main/java/com/diagbot/dto/ExportExcelCaseDTO.java

@@ -15,7 +15,7 @@ import java.util.List;
 @Getter
 @Setter
 public class ExportExcelCaseDTO {
-    @Excel(name = "错误所属区块", needMerge = true)
+    @Excel(name = "模块名称", needMerge = true)
     private String caseName;
     @ExcelCollection(name = "")
     private List<ExportExcelMsgDTO> exportExcelMsgDTOS;

+ 2 - 2
src/main/java/com/diagbot/dto/HomePageImproveDTO.java

@@ -19,7 +19,7 @@ public class HomePageImproveDTO {
     /**
      * 科室
      */
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String deptName;
     /**
      * 质控总数(总病历数)
@@ -85,4 +85,4 @@ public class HomePageImproveDTO {
      */
     @Excel(name = "改善至满分率", width = 15, orderNum = "9")
     private String improveToFullPercentStr = "0.00%";
-}
+}

+ 1 - 1
src/main/java/com/diagbot/dto/HomePageNumDTO.java

@@ -19,7 +19,7 @@ public class HomePageNumDTO {
     /**
      * 科室名称
      */
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String deptName;
     /**
      * 主管医生id

+ 1 - 1
src/main/java/com/diagbot/dto/LevelStatisticsDTO.java

@@ -20,7 +20,7 @@ public class LevelStatisticsDTO {
     /**
      * 科室名称
      */
-    @Excel(name = "科室名称", width = 30, orderNum = "2")
+    @Excel(name = "科室", width = 30, orderNum = "2")
     private String deptName;
     /**
      * 主管医生id

+ 3 - 0
src/main/java/com/diagbot/dto/QcCasesEntryDTO.java

@@ -19,4 +19,7 @@ public class QcCasesEntryDTO {
     private String code;
 
     private String msg;
+
+    private String precond;
+
 }

+ 1 - 1
src/main/java/com/diagbot/dto/QcResultPercentDTO.java

@@ -13,7 +13,7 @@ import lombok.Setter;
 @Setter
 public class QcResultPercentDTO {
     private String deptId;
-    @Excel(name = "科室名称", width = 30, orderNum = "1")
+    @Excel(name = "科室", width = 30, orderNum = "1")
     private String deptName;
     private Integer totleNum;
     private Integer firstLevelNum;

+ 11 - 0
src/main/java/com/diagbot/dto/RecordContentDTO.java

@@ -3,6 +3,9 @@ package com.diagbot.dto;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -70,4 +73,12 @@ public class RecordContentDTO implements Serializable {
      *是否从结构化表中取数据(0-从文文书取 1-从结构化取)
      */
     private int isParsed = 0;
+    /**
+     *转出时间集合-qc作判断
+     */
+    List<LocalDateTime> transferOutDate = new ArrayList<>();
+    /**
+     *转入时间集合-qc作判断
+     */
+    List<LocalDateTime> transferInDate = new ArrayList<>();
 }

+ 271 - 0
src/main/java/com/diagbot/entity/MedTransferRecord.java

@@ -0,0 +1,271 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 转入转出记录(标记时间)
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-12-01
+ */
+public class MedTransferRecord implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 医院ID
+     */
+    private Integer hospitalId;
+
+    /**
+     * 病历号
+     */
+    private String behospitalCode;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 年龄
+     */
+    private Integer age;
+
+    /**
+     * 科别
+     */
+    private String deptName;
+
+    /**
+     * 转出日期
+     */
+    private LocalDateTime transferOutDate;
+
+    /**
+     * 转入日期
+     */
+    private LocalDateTime transferInDate;
+
+    /**
+     * 转出科室
+     */
+    private String transferOutDept;
+
+    /**
+     * 转入科室
+     */
+    private String transferInDept;
+
+    /**
+     * 记录医生
+     */
+    private String recDoctor;
+
+    /**
+     * 记录时间
+     */
+    private LocalDateTime recDate;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人
+     */
+    private String creator;
+
+    /**
+     * 修改人
+     */
+    private String modifier;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public Integer getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Integer hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getBehospitalCode() {
+        return behospitalCode;
+    }
+
+    public void setBehospitalCode(String behospitalCode) {
+        this.behospitalCode = behospitalCode;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+    public Integer getAge() {
+        return age;
+    }
+
+    public void setAge(Integer age) {
+        this.age = age;
+    }
+    public String getDeptName() {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+    public LocalDateTime getTransferOutDate() {
+        return transferOutDate;
+    }
+
+    public void setTransferOutDate(LocalDateTime transferOutDate) {
+        this.transferOutDate = transferOutDate;
+    }
+    public LocalDateTime getTransferInDate() {
+        return transferInDate;
+    }
+
+    public void setTransferInDate(LocalDateTime transferInDate) {
+        this.transferInDate = transferInDate;
+    }
+    public String getTransferOutDept() {
+        return transferOutDept;
+    }
+
+    public void setTransferOutDept(String transferOutDept) {
+        this.transferOutDept = transferOutDept;
+    }
+    public String getTransferInDept() {
+        return transferInDept;
+    }
+
+    public void setTransferInDept(String transferInDept) {
+        this.transferInDept = transferInDept;
+    }
+    public String getRecDoctor() {
+        return recDoctor;
+    }
+
+    public void setRecDoctor(String recDoctor) {
+        this.recDoctor = recDoctor;
+    }
+    public LocalDateTime getRecDate() {
+        return recDate;
+    }
+
+    public void setRecDate(LocalDateTime recDate) {
+        this.recDate = recDate;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    @Override
+    public String toString() {
+        return "MedTransferRecord{" +
+            "id=" + id +
+            ", hospitalId=" + hospitalId +
+            ", behospitalCode=" + behospitalCode +
+            ", name=" + name +
+            ", sex=" + sex +
+            ", age=" + age +
+            ", deptName=" + deptName +
+            ", transferOutDate=" + transferOutDate +
+            ", transferInDate=" + transferInDate +
+            ", transferOutDept=" + transferOutDept +
+            ", transferInDept=" + transferInDept +
+            ", recDoctor=" + recDoctor +
+            ", recDate=" + recDate +
+            ", remark=" + remark +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 1 - 1
src/main/java/com/diagbot/entity/StrTransferOutNote.java

@@ -66,7 +66,7 @@ public class StrTransferOutNote implements Serializable {
     private String recTitle;
 
     /**
-     * 转入日期
+     * 转入日期   --实际转出日期 !!不能改动
      */
     private Date transferInDate;
 

+ 63 - 24
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -43,6 +43,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
@@ -155,6 +156,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     StrTransferOutNoteFacade strTransferOutNoteFacade;
     @Autowired
     StrWardRecordFacade strWardRecordFacade;
+    @Autowired
+    MedTransferRecordFacade medTransferRecordFacade;
 
 
     /**
@@ -487,6 +490,25 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 .orderByAsc("rec_date")
         );
 
+        List<LocalDateTime> transferOutDate = new ArrayList<>();
+        List<LocalDateTime> transferInDate = new ArrayList<>();
+        Map<String, List<LocalDateTime>> transferMap = new HashMap<>();
+
+        //转入转出时间表
+        List<MedTransferRecord> medTransferRecordList = medTransferRecordFacade.list(new QueryWrapper<MedTransferRecord>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId)
+                .eq("behospital_code", analyzeVO.getBehospitalCode())
+                .orderByDesc("id"));
+        if(ListUtil.isNotEmpty(medTransferRecordList)){
+            medTransferRecordList.forEach(medTransferRecord -> {
+                transferOutDate.add(medTransferRecord.getTransferOutDate());
+                transferInDate.add(medTransferRecord.getTransferInDate());
+            });
+        }
+        transferMap.put("转出时间",transferOutDate);
+        transferMap.put("转入时间",transferInDate);
+
         // 转入记录
         List<StrTransferInNote> strTransferInNoteList = strTransferInNoteFacade.list(new QueryWrapper<StrTransferInNote>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -608,30 +630,30 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         // 会诊记录
         if (ListUtil.isNotEmpty(strConsultationRecordList)) {
-            specialData("会诊", strConsultationRecordList, recMap, medrecVoList, "会诊记录");
+            specialData("会诊", strConsultationRecordList, recMap, medrecVoList, "会诊记录",null);
         } else {
             specialDataWithKey("会诊", recMap, medrecVoList, "会诊记录",
-                    Arrays.asList("会诊记录"));
+                    Arrays.asList("会诊记录"),null);
         }
 
         //会诊申请单
         if (ListUtil.isNotEmpty(strConsultationApplyList)) {
-            specialData("会诊", strConsultationApplyList, recMap, medrecVoList, "会诊申请单");
+            specialData("会诊", strConsultationApplyList, recMap, medrecVoList, "会诊申请单",null);
         } else {
             specialDataWithKey("会诊", recMap, medrecVoList, "会诊申请单",
-                    Arrays.asList("会诊申请单"));
+                    Arrays.asList("会诊申请单"),null);
         }
         //会诊结果单
         if (ListUtil.isNotEmpty(strConsultationResultList)) {
-            specialData("会诊", strConsultationResultList, recMap, medrecVoList, "会诊结果单");
+            specialData("会诊", strConsultationResultList, recMap, medrecVoList, "会诊结果单",null);
         } else {
             specialDataWithKey("会诊", recMap, medrecVoList, "会诊结果单",
-                    Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"));
+                    Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"),null);
         }
 
         //会诊单(申请和结果)
         if (ListUtil.isNotEmpty(strConsultationNoteList)) {
-            specialData("会诊", strConsultationNoteList, recMap, medrecVoList, "会诊单(申请和结果)");
+            specialData("会诊", strConsultationNoteList, recMap, medrecVoList, "会诊单(申请和结果)",null);
         }
         //入院记录
         if (ListUtil.isNotEmpty(strAdmissionNoteList)) {
@@ -713,18 +735,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         //术后首程
         if (ListUtil.isNotEmpty(strOperativeFirstRecordList)) {
-            specialData("手术", strOperativeFirstRecordList, recMap, medrecVoList, "术后首次病程及谈话记录");
+            specialData("手术", strOperativeFirstRecordList, recMap, medrecVoList, "术后首次病程及谈话记录",null);
         } else {
             specialDataWithKey("手术", recMap, medrecVoList, "术后首次病程及谈话记录",
-                    null);
+                    null,null);
         }
 
         //手术记录
         if (ListUtil.isNotEmpty(strOperativeNoteList)) {
-            specialData("手术", strOperativeNoteList, recMap, medrecVoList, "手术记录");
+            specialData("手术", strOperativeNoteList, recMap, medrecVoList, "手术记录",null);
         } else {
             specialDataWithKey("手术", recMap, medrecVoList, "手术记录",
-                    null);
+                    null,null);
         }
 
         //阶段小结
@@ -736,10 +758,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         //术前讨论小结
         if (ListUtil.isNotEmpty(strPreoperativeDiscussionList)) {
-            specialData("手术", strPreoperativeDiscussionList, recMap, medrecVoList, "术前讨论、术前小结");
+            specialData("手术", strPreoperativeDiscussionList, recMap, medrecVoList, "术前讨论、术前小结",null);
         } else {
             specialDataWithKey("手术", recMap, medrecVoList, "术前讨论、术前小结",
-                    null);
+                    null,null);
         }
 
 
@@ -752,18 +774,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         //转入记录
         if (ListUtil.isNotEmpty(strTransferInNoteList)) {
-            specialData("转科", strTransferInNoteList, recMap, medrecVoList, "转入记录");
+            specialData("转科", strTransferInNoteList, recMap, medrecVoList, "转入记录",transferMap);
         } else {
             specialDataWithKey("转科", recMap, medrecVoList, "转入记录",
-                    null);
+                    null,transferMap);
         }
 
         //转出记录
         if (ListUtil.isNotEmpty(strTransferOutNoteList)) {
-            specialData("转科", strTransferOutNoteList, recMap, medrecVoList, "转出记录");
+            specialData("转科", strTransferOutNoteList, recMap, medrecVoList, "转出记录",transferMap);
         } else {
             specialDataWithKey("转科", recMap, medrecVoList, "转出记录",
-                    null);
+                    null,transferMap);
         }
 
         //查房记录
@@ -775,10 +797,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         //==============非结构化表拥有,文书单独查出来====================
         specialDataWithKey("手术", recMap, medrecVoList, "手术知情同意书",
-                null);
+                null,null);
 
         specialDataWithKey("手术", recMap, medrecVoList, "手术安全核查表",
-                null);
+                null,null);
 
 
 //=========================================
@@ -930,8 +952,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param recMap
      * @param medrecVoList
      */
-    public void specialDataWithKey(String key, Map<String, List<RecordContentDTO>> recMap,
-                                   List<MedrecVo> medrecVoList, String keyTagert, List<String> keyList) {
+    public void specialDataWithKey(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList,
+                                   String keyTagert, List<String> keyList,Map<String, List<LocalDateTime>> transferMap) {
         MedrecVo medrecVo = new MedrecVo();
         Map<String, List<RecordContentDTO>> specialContent = new HashMap<String, List<RecordContentDTO>>();
         Map<String, Object> content = new HashMap<>();
@@ -945,21 +967,32 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
 
         }
+        //设置特殊属性
         List<RecordContentDTO> recordContentDTOS = recMap.get(keyTagert);
-        List<RecordContentDTO> recordContentList = recMap.get("会诊申请单");
         if(ListUtil.isNotEmpty(recordContentDTOS)){
             for (RecordContentDTO recordContentDTO : recordContentDTOS) {
+                if(null != transferMap){
+                    recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
+                    recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
+                }
                 recordContentDTO.setIsParsed(0);
             }
         }
 
+        //用来复制申请单
+        List<RecordContentDTO> recordContentList = recMap.get("会诊申请单");
         if(ListUtil.isNotEmpty(recordContentList)){
             for (RecordContentDTO recordContentDTO : recordContentList) {
+                if(null != transferMap){
+                    recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
+                    recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
+                }
                 recordContentDTO.setIsParsed(0);
             }
         }
 
         for (MedrecVo medrec : medrecVoList) {
+//            存在标题
             if (key.equals(medrec.getTitle())) {
                 Map<String, Object> keyContent = medrec.getContent();
                 specialContent = JSON.parseObject(JSON.toJSONString(keyContent.get("content")), new TypeReference<Map<String, List<RecordContentDTO>>>() {
@@ -984,6 +1017,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
 
+        //没有第一标题
         if (!flag) {
             if (ListUtil.isNotEmpty(keyList) && keyList.size() == 3) {
                 if (Map.get("会诊申请单") != null && Map.get("会诊结果单") == null && ListUtil.isNotEmpty(recordContentDTOS)) {
@@ -1147,7 +1181,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
      * @param list
      * @param medrecVoList
      */
-    public <T> void specialData(String key, List<T> list, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList, String keyTagert) {
+    public <T> void specialData(String key, List<T> list, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList, String keyTagert,
+                                Map<String, List<LocalDateTime>> transferMap) {
         MedrecVo medrecVo = new MedrecVo();
         Map<String, Object> content = new HashMap<String, Object>();
         Map<String,  List<RecordContentDTO>> specialContent = new HashMap<>();
@@ -1175,6 +1210,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             Boolean flag = true;
             List<RecordContentDTO> recordContentDTOS = recMap.get(keyTagert);
             for (RecordContentDTO recordContentDTO : recordContentDTOS) {
+                if(null != transferMap){
+                    recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
+                    recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
+                }
                 if (ListUtil.isNotEmpty(contents)) {
                     for (RePlaceData rePlaceData : contents) {
                         if (StringUtil.isNotEmpty(recordContentDTO.getRecId()) &&
@@ -1359,7 +1398,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         for (QcCasesEntryDTO qc : qcCasesEntryDTOList) {
             Map<String, String> map = new HashMap<>();
             map.put("code", qc.getCode());
-            map.put("precond", null);
+            map.put("precond", qc.getPrecond());
             map.put("name", qc.getMsg());
             res.put(qc.getCode(), map);
         }

+ 3 - 3
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -501,8 +501,8 @@ public class ConsoleByDeptFacade {
         filterFacade.filterOrderByDeptVOSet(filterOrderByDeptVO);
         List<HomePageNumDTO> records = behospitalInfoFacade.homePageLevelStatisticsByDept(filterOrderByDeptVO);
         //没有医生过滤时增加全科室数据
-        if (StringUtil.isBlank(filterOrderByDeptVO.getName())
-                || filterOrderByDeptVO.getName().equals(filterOrderByDeptVO.getDeptName())) {
+        if (StringUtil.isBlank(filterOrderByDeptVO.getDeptName())
+                || filterOrderByDeptVO.getDeptName().equals(filterOrderByDeptVO.getDeptName())) {
             HomePageNumDTO item = getGlobleRecord(records, filterOrderByDeptVO.getDeptName());
             if (item != null) {
                 records.add(0, item);
@@ -657,4 +657,4 @@ public class ConsoleByDeptFacade {
         IPage<QcResultShortDTO> page = behospitalInfoFacade.qcResultShortByDeptPage(qcResultShortPageVO);
         return page;
     }
-}
+}

+ 19 - 19
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -222,9 +222,9 @@ public class ConsoleExportFacade {
     public void qcResultShortPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
@@ -254,9 +254,9 @@ public class ConsoleExportFacade {
     public void leaveHosMrPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
@@ -298,9 +298,9 @@ public class ConsoleExportFacade {
     public void unModifyMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
@@ -330,9 +330,9 @@ public class ConsoleExportFacade {
     public void badLevelPagePageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
@@ -368,7 +368,7 @@ public class ConsoleExportFacade {
     public void unModifyMRStatisticsExport(HttpServletResponse response, FilterUnModifyMRVO filterUnModifyMRVO) {
         filterFacade.filterUnModifyMRVOSet(filterUnModifyMRVO);
         List<ExcelExportEntity> colList = Lists.newLinkedList();
-        ExcelExportEntity deptNameCol = new ExcelExportEntity("科室名称", "deptName");
+        ExcelExportEntity deptNameCol = new ExcelExportEntity("科室", "deptName");
         deptNameCol.setWidth(50);
         colList.add(deptNameCol);
 
@@ -428,9 +428,9 @@ public class ConsoleExportFacade {
     public void hmImproveMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+    if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
@@ -460,9 +460,9 @@ public class ConsoleExportFacade {
     public void qcCheckMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         qcResultShortPageVO.setHospitalId(hospitalId);
-        if (StringUtil.isNotBlank(qcResultShortPageVO.getBehDeptName())
-                && qcResultShortPageVO.getBehDeptName().equals("全部")) {
-            qcResultShortPageVO.setBehDeptName("");
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();

+ 9 - 9
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -584,7 +584,7 @@ public class ConsoleFacade {
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStatisticsDTO> records = behospitalInfoFacade.levelStatistics(filterOrderVO);
         //没有科室过滤时增加全院数据
-        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+        if (StringUtil.isBlank(filterOrderVO.getDeptName()) || filterOrderVO.getDeptName().equals("全院")) {
             LevelStatisticsDTO item = getGlobleTitle(records);
             if (item != null) {
                 records.add(0, item);
@@ -608,7 +608,7 @@ public class ConsoleFacade {
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStatisticsDTO> records = behospitalInfoFacade.levelStatistics(filterOrderVO);
         //没有科室过滤时增加全院数据
-        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+        if (StringUtil.isBlank(filterOrderVO.getDeptName()) || filterOrderVO.getDeptName().equals("全院")) {
             LevelStatisticsDTO item = getGlobleTitle(records);
             if (item != null) {
                 records.add(0, item);
@@ -817,7 +817,7 @@ public class ConsoleFacade {
     public List<LevelStatisticsTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO) {
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStatisticsTZDTO> records = behospitalInfoFacade.levelStatisticsByDeptClass_TZ(filterOrderVO);
-        if( StringUtil.isBlank(filterOrderVO.getName())){
+        if( StringUtil.isBlank(filterOrderVO.getDeptName())){
             LevelStatisticsTZDTO item = getGlobleRecords(records,filterOrderVO);
             if (item != null) {
                 records.add(0, item);
@@ -841,7 +841,7 @@ public class ConsoleFacade {
     public List<LevelStatisticsTZDTO> levelStatisticsByDeptClass_TZ(FilterOrderVO filterOrderVO) {
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStatisticsTZDTO> records = behospitalInfoFacade.levelStatisticsByDeptClass_TZ(filterOrderVO);
-            if( StringUtil.isBlank(filterOrderVO.getName())){
+            if( StringUtil.isBlank(filterOrderVO.getDeptName())){
                 LevelStatisticsTZDTO item = getGlobleRecords(records,filterOrderVO);
                 if (item != null) {
                     records.add(0, item);
@@ -1236,7 +1236,7 @@ public class ConsoleFacade {
         filterFacade.filterOrderVOSet(filterOrderVO);
         List<HomePageNumDTO> records = behospitalInfoFacade.homePageLevelStatistics(filterOrderVO);
         //没有科室过滤时增加全院数据
-        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+        if (StringUtil.isBlank(filterOrderVO.getDeptName()) || filterOrderVO.getDeptName().equals("全院")) {
             HomePageNumDTO item = getGlobleRecord(records);
             if (item != null) {
                 records.add(0, item);
@@ -1591,7 +1591,7 @@ public class ConsoleFacade {
         filterFacade.filterOrderVOSet(filterOrderVO);
         List<HomePageImproveDTO> records = behospitalInfoFacade.qcCheckStatistics(filterOrderVO);
         //增加全院数据
-        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+        if (StringUtil.isBlank(filterOrderVO.getDeptName()) || filterOrderVO.getDeptName().equals("全院")) {
             HomePageImproveDTO item = getGlobleRecord_improve(records);
             if (item != null) {
                 records.add(0, item);
@@ -1731,7 +1731,7 @@ public class ConsoleFacade {
         ColumnDTO columnDeptName = new ColumnDTO();
         columnDeptName.setOrderNo(orderNo);
         columnDeptName.setFieldName("deptName");
-        columnDeptName.setColumnName("科室名称");
+        columnDeptName.setColumnName("科室");
         columnDeptName.setIsShow(1);
         columns.add(columnDeptName);
         orderNo++;
@@ -1873,8 +1873,8 @@ public class ConsoleFacade {
         });
         //增加全院数据
         if (ListUtil.isNotEmpty(retList) &&
-                (StringUtil.isBlank(filterUnModifyMRVO.getName())
-                        || filterUnModifyMRVO.getName().equals("全院"))) {
+                (StringUtil.isBlank(filterUnModifyMRVO.getDeptName())
+                        || filterUnModifyMRVO.getDeptName().equals("全院"))) {
             try {
 
                 Object globleObj = new Object();

+ 2 - 2
src/main/java/com/diagbot/facade/FilterFacade.java

@@ -387,8 +387,8 @@ public class FilterFacade {
         String userId = SysUserUtils.getCurrentPrincipleID();
         qcResultPageVO.setHospitalId(hospitalId);
         qcResultPageVO.setUserId(Long.valueOf(userId));
-        if (qcResultPageVO.getBehDeptName().equals("全院")|| StringUtils.isEmpty(qcResultPageVO.getBehDeptName())) {
-            qcResultPageVO.setBehDeptName("");
+        if (qcResultPageVO.getDeptName().equals("全院")|| StringUtils.isEmpty(qcResultPageVO.getDeptName())) {
+            qcResultPageVO.setDeptName("");
         }
         /*long interval = qcResultShortPageVO.getEndDate().getTime() + 1000;
         qcResultShortPageVO.setEndDate(new Date(Long.valueOf(interval)));*/

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

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.MedTransferRecordServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/23 11:39
+ */
+@Component
+public class MedTransferRecordFacade extends MedTransferRecordServiceImpl {
+}

+ 3 - 2
src/main/java/com/diagbot/facade/QcCasesEntryHospitalFacade.java

@@ -16,6 +16,7 @@ import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.QcCasesEntryFindVO;
 import com.diagbot.vo.QcCasesEntryHospitalVO;
 import com.diagbot.vo.QcCasesEntryUpdataVO;
+import com.diagbot.vo.QcCasesEntryVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -81,8 +82,8 @@ public class QcCasesEntryHospitalFacade extends QcCasesEntryHospitalServiceImpl
      *
      * @return
      */
-    public List<QcCasesAllDTO> getQcCasesAlls() {
-        return  qcCasesFacade.getQcCasesAlls();
+    public List<QcCasesAllDTO> getQcCasesAlls(QcCasesEntryVO qcCasesEntryVO) {
+        return  qcCasesFacade.getQcCasesAlls(qcCasesEntryVO);
     }
 
     /**

+ 6 - 1
src/main/java/com/diagbot/facade/QcCasesFacade.java

@@ -12,9 +12,11 @@ import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.QcCasesEntryVO;
 import com.diagbot.vo.QcCasesQueryVO;
 import com.diagbot.vo.QcCasesSaveListVO;
 import com.diagbot.vo.QcCasesSaveVO;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -72,9 +74,12 @@ public class QcCasesFacade extends QcCasesServiceImpl {
      *
      * @return 基础模块数据信息列表
      */
-    public List<QcCasesAllDTO> getQcCasesAlls() {
+    public List<QcCasesAllDTO> getQcCasesAlls(QcCasesEntryVO qcCasesEntryVO) {
         QueryWrapper<QcCases> qc = new QueryWrapper<>();
         qc.eq("is_deleted", IsDeleteEnum.N.getKey());
+        if(StringUtils.isNotBlank(qcCasesEntryVO.getCasesName())){
+            qc.like("name", qcCasesEntryVO.getCasesName());
+        }
         List<QcCases> data = list(qc);
         List<QcCasesAllDTO> dataNew = new ArrayList<QcCasesAllDTO>();
         dataNew = BeanUtil.listCopyTo(data, QcCasesAllDTO.class);

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedTransferRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 转入转出记录(标记时间) Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-12-01
+ */
+public interface MedTransferRecordMapper extends BaseMapper<MedTransferRecord> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedTransferRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 转入转出记录(标记时间) 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-12-01
+ */
+public interface MedTransferRecordService extends IService<MedTransferRecord> {
+
+}

+ 9 - 4
src/main/java/com/diagbot/service/impl/MedLisInfoServiceImpl.java

@@ -13,6 +13,7 @@ import com.diagbot.vo.CheckInfoVO;
 import com.diagbot.vo.DoctorAdviceVO;
 import com.diagbot.vo.ExamineInfoVO;
 import com.diagbot.vo.ExamineSonInfoVO;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
@@ -54,10 +55,14 @@ public class MedLisInfoServiceImpl extends ServiceImpl<MedLisInfoMapper, MedLisI
         //获取病人进出院时间
         Map<String, Object> timeMap = this.baseMapper.getTime(examineInfoVO.getBehospitalCode());
         if (null != timeMap) {
-            Date behospital_date = (Date) timeMap.get("behospital_date");
-            examineInfoVO.setBehospitalDate(behospital_date);
-            Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
-            examineInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            if(!ObjectUtils.isEmpty( timeMap.get("behospital_date"))){
+                Date behospital_date = (Date) timeMap.get("behospital_date");
+                examineInfoVO.setBehospitalDate(behospital_date);
+            }
+            if(!ObjectUtils.isEmpty(timeMap.get("leave_hospital_date"))){
+                Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
+                examineInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            }
         }
 
         String behospitalCode = examineInfoVO.getBehospitalCode();

+ 9 - 4
src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java

@@ -7,6 +7,7 @@ import com.diagbot.mapper.MedPacsInfoMapper;
 import com.diagbot.service.MedPacsInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.vo.CheckInfoVO;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.stereotype.Service;
 
 import javax.validation.constraints.NotBlank;
@@ -48,10 +49,14 @@ public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPa
         //获取病人进出院时间
         Map<String, Object> timeMap = this.baseMapper.getTime(checkInfoVO.getBehospitalCode());
         if (null != timeMap) {
-            Date behospital_date = (Date) timeMap.get("behospital_date");
-            checkInfoVO.setBehospitalDate(behospital_date);
-            Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
-            checkInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            if(!ObjectUtils.isEmpty( timeMap.get("behospital_date"))){
+                Date behospital_date = (Date) timeMap.get("behospital_date");
+                checkInfoVO.setBehospitalDate(behospital_date);
+            }
+            if(!ObjectUtils.isEmpty(timeMap.get("leave_hospital_date"))){
+                Date leaveHospitalDate = (Date) timeMap.get("leave_hospital_date");
+                checkInfoVO.setLeaveHospitalDate(leaveHospitalDate);
+            }
         }
         String behospitalCode = checkInfoVO.getBehospitalCode();
         if(2l == checkInfoVO.getHospitalId()){

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedTransferRecord;
+import com.diagbot.mapper.MedTransferRecordMapper;
+import com.diagbot.service.MedTransferRecordService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 转入转出记录(标记时间) 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-12-01
+ */
+@Service
+public class MedTransferRecordServiceImpl extends ServiceImpl<MedTransferRecordMapper, MedTransferRecord> implements MedTransferRecordService {
+
+}

+ 6 - 1
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -69,7 +69,12 @@ public class BehospitalPageVO extends Page implements Serializable {
     /**
      * 住院科室名称
      */
-    private String deptId;
+    private String deptName;
+
+    /**
+     * 主诊断
+     */
+    private String diagnose;
 
     /**
      * 医生姓名

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

@@ -39,6 +39,11 @@ public class DoctorAdviceVO extends Page {
      */
     private String doctorAdviceType;
 
+    /**
+     * 药品类型(0.普药 1.抗生素 2.激素)
+     */
+    private String medicineType;
+
     /**
      * 医嘱项目名称
      */

+ 6 - 3
src/main/java/com/diagbot/vo/ExportQcresultVO.java

@@ -29,12 +29,15 @@ public class ExportQcresultVO {
     private String hospitalId;
     @ApiModelProperty(hidden = true)
     private Long userId;
-
+    /**
+     * 主诊断
+     */
+    private String diagnose;
     private String behospitalCode;
     private String level;
     private String doctorName;
     private String doctorCode;
-    private String deptId;
+    private String deptName;
     private String name;
     private Integer checkStatus;
     private Integer mrStatus;
@@ -49,4 +52,4 @@ public class ExportQcresultVO {
      * 是否归档(0:未归档,1:已归档)
      */
     private String isPlacefile = "1";
-}
+}

+ 1 - 1
src/main/java/com/diagbot/vo/FilterMedicalCheckVO.java

@@ -40,7 +40,7 @@ public class FilterMedicalCheckVO extends Page {
     /**
      * 科室名称
      */
-    private String name;
+    private String deptName;
 
     /**
      * 是否归档(0:未归档,1:已归档)

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

@@ -27,9 +27,9 @@ public class FilterOrderVO extends FilterVO {
     private String desc;
 
     /**
-     * 科室名称/主管医生名称
+     * 科室名称
      */
-    private String name;
+    private String deptName;
     /**
      * 去年同期起始时间
      */

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

@@ -40,6 +40,10 @@ public class FilterPageVO extends Page {
      */
     @ApiModelProperty(hidden = true)
     private Long userId;
+
+    /**
+     * 缺陷名称
+     */
     private String name;
 
     /**

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

@@ -46,7 +46,7 @@ public class FilterUnModifyMRVO {
     /**
      * 科室名称
      */
-    private String name;
+    private String deptName;
 
     /**
      * 排序(升序)
@@ -62,4 +62,4 @@ public class FilterUnModifyMRVO {
      * 是否归档(0:未归档,1:已归档)
      */
     private String isPlacefile = "1";
-}
+}

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

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-05-15 15:19
+ */
+@Setter
+@Getter
+public class QcCasesEntryVO {
+
+
+    private String casesName;
+
+    private String isPlacefile = "1";
+}

+ 7 - 1
src/main/java/com/diagbot/vo/QcResultPageVO.java

@@ -39,6 +39,12 @@ public class QcResultPageVO extends Page {
      * 条目名称
      */
     private String casesEntryName;
+
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
     /**
      * 条目id
      */
@@ -54,7 +60,7 @@ public class QcResultPageVO extends Page {
     /**
      * 科室名称
      */
-    private String behDeptName;
+    private String deptName;
     /**
      * 医生姓名
      */

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

@@ -33,6 +33,11 @@ public class QcResultShortPageVO extends Page {
      */
     private String casesEntryName;
 
+    /**
+     * 主诊断
+     */
+    private String diagnose;
+
     /**
      * title名称
      */
@@ -53,7 +58,7 @@ public class QcResultShortPageVO extends Page {
     /**
      * 科室名称
      */
-    private String behDeptName;
+    private String deptName;
     /**
      * 医生姓名
      */

+ 20 - 0
src/main/java/com/diagbot/web/MedTransferRecordController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 转入转出记录(标记时间) 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-12-01
+ */
+@Controller
+@RequestMapping("/medTransferRecord")
+public class MedTransferRecordController {
+
+}

+ 3 - 2
src/main/java/com/diagbot/web/QcCasesEntryHospitalController.java

@@ -11,6 +11,7 @@ import com.diagbot.facade.QcCasesEntryHospitalFacade;
 import com.diagbot.vo.QcCasesEntryFindVO;
 import com.diagbot.vo.QcCasesEntryHospitalVO;
 import com.diagbot.vo.QcCasesEntryUpdataVO;
+import com.diagbot.vo.QcCasesEntryVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -62,8 +63,8 @@ public class QcCasesEntryHospitalController {
             notes = "")
     @PostMapping("/getQcCasesAll")
     @SysLogger("getQcCasesAll")
-    public RespDTO<List<QcCasesAllDTO>> getQcCasesAlls() {
-        return RespDTO.onSuc(qcCasesEntryHospitalFacade.getQcCasesAlls());
+    public RespDTO<List<QcCasesAllDTO>> getQcCasesAlls(@RequestBody @Valid QcCasesEntryVO qcCasesEntryVO) {
+        return RespDTO.onSuc(qcCasesEntryHospitalFacade.getQcCasesAlls(qcCasesEntryVO));
     }
 
     @ApiOperation(value = "模糊查询医院模块条目列表[by:wangfeng]",

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

@@ -30,7 +30,7 @@
         AND t.station = '住院'
         AND t.hospital_id = #{hospitalId}
         <if test="inputStr !=null and inputStr != ''">
-            AND (UPPER(t.spell) LIKE CONCAT('%', UPPER(TRIM(#{inputStr})),'%') OR UPPER(t.dept_name) LIKE CONCAT('%', UPPER(TRIM(#{inputStr})),'%'));
+            AND (UPPER(t.spell) LIKE CONCAT('%', UPPER(TRIM(#{inputStr})),'%') OR UPPER(t.dept_name) LIKE CONCAT('%', UPPER(TRIM(#{inputStr})),'%'))
         </if>
         ORDER BY t.dept_name ASC
     </select>

+ 193 - 112
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -69,8 +69,11 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
-        <if test="deptId != null and deptId != ''">
-            and t.beh_dept_id = #{deptId}
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
+        <if test="deptName != null and deptName != ''">
+            and t.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="doctorName != null and doctorName != ''">
             and CONCAT(
@@ -372,8 +375,11 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
-        <if test="deptId != null and deptId != ''">
-            and t.beh_dept_id = #{deptId}
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
+        <if test="deptName != null and deptName != ''">
+            and t.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="doctorName != null and doctorName != ''">
             and CONCAT(
@@ -501,8 +507,11 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         WHERE t.is_deleted = 'N'
-        <if test="deptId != null and deptId != ''">
-            and t.beh_dept_id = #{deptId}
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
+        <if test="deptName != null and deptName != ''">
+            and t.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="name != null and name != ''">
             and t.name like CONCAT('%',#{name},'%')
@@ -602,8 +611,8 @@
         and c1.id = #{userId}
         )
         )
-        <if test="deptId != null and deptId != ''">
-            and t.beh_dept_id = #{deptId}
+        <if test="diagnose != null and diagnose != ''">
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
         <if test="doctorName != null and doctorName != ''">
             and (t.doctor_name like CONCAT('%',#{doctorName},'%')
@@ -1406,8 +1415,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -1460,8 +1469,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -1537,8 +1546,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -1591,8 +1600,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -1769,8 +1778,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         <if test="deptClass != null and deptClass != ''">
             and e.dept_name = #{deptClass}
@@ -1838,8 +1847,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         <if test="deptClass != null and deptClass != ''">
             and g.dept_name = #{deptClass}
@@ -2022,8 +2031,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) tt1
         LEFT JOIN bas_dept_info e ON tt1.parentDeptId = e.dept_id
@@ -2099,8 +2108,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) tt2
         LEFT JOIN bas_dept_info g ON tt2.parentDeptId = g.dept_id
@@ -2203,8 +2212,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) tt1
         LEFT JOIN bas_dept_info e ON tt1.parentDeptId = e.dept_id
@@ -2280,8 +2289,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) tt2
         LEFT JOIN bas_dept_info g ON tt2.parentDeptId = g.dept_id
@@ -2446,8 +2455,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -2502,8 +2511,8 @@
         <if test="level != null and level != ''">
             and c.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -2573,8 +2582,8 @@
         <if test="level != null and level != ''">
             and b.level = #{level}
         </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -3292,6 +3301,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3320,8 +3332,8 @@
             OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
-        <if test="deptId != null and deptId != ''">
-            AND a.beh_dept_id = #{deptId}
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3347,6 +3359,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3375,8 +3390,8 @@
             OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
-        <if test="deptId != null and deptId != ''">
-            AND a.beh_dept_id = #{deptId}
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3451,7 +3466,7 @@
         t1.leaveHospitalDate,
         t1.score,
         t2.avgScore,
-        t1.scoreBn,
+        e.score_res as scoreBn,
         t1.msg,
         t1.caseName
         FROM
@@ -3464,7 +3479,6 @@
         a.behospital_date AS behospitalDate,
         a.leave_hospital_date AS leaveHospitalDate,
         b.score_res AS score,
-        e.score_res as scoreBn,
         c.msg AS msg,
         d.NAME AS caseName,
         a.beh_dept_id AS behDeptId,
@@ -3489,6 +3503,9 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.id
         AND a.beh_dept_id = e.dept_id
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3527,8 +3544,8 @@
             OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
-        <if test="deptId != null and deptId != ''">
-            AND a.beh_dept_id = #{deptId}
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3556,6 +3573,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3594,8 +3614,8 @@
             OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
-        <if test="deptId != null and deptId != ''">
-            AND a.beh_dept_id = #{deptId}
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3670,6 +3690,7 @@
         t1.leaveHospitalDate,
         t1.score,
         t2.avgScore,
+        e.score_res as scoreBn,
         t1.msg,
         t1.caseName
         FROM
@@ -3718,6 +3739,9 @@
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="behosDateStart != null">
             <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
         </if>
@@ -3752,7 +3776,11 @@
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
         </if>
-        ) t1,
+        ) t1 LEFT JOIN med_qcresult_cases e
+        on  t1.behospitalCode = e.behospital_code
+        and t1.hospital_id = e.hospital_id
+        AND e.is_deleted = 'N'
+        and e.cases_id = 243,
         (
         SELECT
         ROUND( AVG( b.score_res ), 2 ) AS avgScore,
@@ -3776,6 +3804,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
+        <if test="diagnose != null and diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+        </if>
         <if test="isPlacefile != null and isPlacefile != ''">
             and a.is_placefile = #{isPlacefile}
         </if>
@@ -3981,8 +4012,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -4455,7 +4489,7 @@
             </if>
         </if>
         <if test="deptName != null and deptName != ''">
-            AND a.beh_dept_name = #{deptName}
+            AND a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) c
         LEFT JOIN med_qcresult_detail d ON d.is_deleted = 'N'
@@ -4523,7 +4557,7 @@
             </if>
         </if>
         <if test="deptName != null and deptName != ''">
-            AND a.beh_dept_name = #{deptName}
+            AND a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) d
         LEFT JOIN med_qcresult_detail e ON e.is_deleted = 'N'
@@ -4587,7 +4621,7 @@
             </if>
         </if>
         <if test="deptName != null and deptName != ''">
-            AND a.beh_dept_name = #{deptName}
+            AND a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) c
         LEFT JOIN med_qcresult_detail d ON d.is_deleted = 'N'
@@ -4651,7 +4685,7 @@
             </if>
         </if>
         <if test="deptName != null and deptName != ''">
-            AND a.beh_dept_name = #{deptName}
+            AND a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) b
         LEFT JOIN med_qcresult_detail c ON c.is_deleted = 'N'
@@ -4715,7 +4749,7 @@
             </if>
         </if>
         <if test="deptName != null and deptName != ''">
-            AND a.beh_dept_name = #{deptName}
+            AND a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         ) b
         GROUP BY
@@ -5280,8 +5314,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
@@ -5612,8 +5649,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -5661,8 +5698,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -5708,8 +5745,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -5773,8 +5810,8 @@
                 <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND m1.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            and m1.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         GROUP BY
         m1.behospital_code
@@ -5816,8 +5853,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -6019,8 +6056,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
@@ -6247,8 +6287,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
@@ -6493,8 +6536,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
+
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -6758,8 +6805,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -6987,8 +7037,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{filterVO.endDate}]]>
             </if>
         </if>
-        <if test="filterVO.name != null and filterVO.name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{filterVO.name}, '%')
+        <if test="filterVO.deptName != null and filterVO.deptName != ''">
+            AND a.beh_dept_name like CONCAT('%', #{filterVO.deptName}, '%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -7133,8 +7183,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{filterVO.endDate}]]>
             </if>
         </if>
-        <if test="filterVO.name != null and filterVO.name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{filterVO.name}, '%')
+        <if test="filterVO.deptName != null and filterVO.deptName != ''">
+            AND a.beh_dept_name like CONCAT('%', #{filterVO.deptName}, '%')
         </if>
         GROUP BY
         a.beh_dept_id,
@@ -7187,8 +7237,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
             </if>
         </if>
-        <if test="name != null and name != ''">
-            AND a.beh_dept_name like CONCAT('%', #{name}, '%')
+        <if test="deptName != null and deptName != ''">
+            AND a.beh_dept_name like CONCAT('%', #{deptName}, '%')
         </if>
         <if test="casesEntryIds != null and casesEntryIds.size()>0">
             AND c.cases_entry_id IN
@@ -7317,10 +7367,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
+        <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultPageVO.deptName != null and qcResultPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultPageVO.deptName}, '%' )
         </if>
-
         <if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
         </if>
@@ -7415,10 +7467,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
+        <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultPageVO.deptName != null and qcResultPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultPageVO.deptName}, '%' )
         </if>
-
         <if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
         </if>
@@ -7580,8 +7634,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
+
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -7816,8 +7874,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
@@ -8034,8 +8095,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
             AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
@@ -8274,8 +8338,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -8484,8 +8551,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND b.`level` = #{qcResultShortPageVO.level}
@@ -9054,8 +9124,8 @@
                 <![CDATA[ AND m1.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.behDeptName}, '%')
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.deptName}, '%')
         </if>
         GROUP BY
         m1.behospital_code
@@ -9101,8 +9171,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}
@@ -9279,8 +9349,11 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}
@@ -9509,8 +9582,8 @@
                 <![CDATA[ AND m1.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.behDeptName}, '%')
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.deptName}, '%')
         </if>
         GROUP BY
         m1.behospital_code
@@ -9556,8 +9629,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}
@@ -9757,8 +9830,8 @@
                 <![CDATA[ AND m1.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.behDeptName}, '%')
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND m1.beh_dept_name like CONCAT('%', #{qcResultShortPageVO.deptName}, '%')
         </if>
         GROUP BY
         m1.behospital_code
@@ -9804,8 +9877,8 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}
@@ -10029,8 +10102,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
+
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}
@@ -10210,8 +10287,12 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
             </if>
         </if>
-        <if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
-            AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
+        <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
+            AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
+        </if>
+        <if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
+            AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
+
         </if>
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND c.`level` = #{qcResultShortPageVO.level}

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

@@ -62,6 +62,15 @@
         <if test="doctorAdviceVO.hospitalId != null">
             and t.hospital_id = #{doctorAdviceVO.hospitalId}
         </if>
+        <if test="doctorAdviceVO.medicineType != null and doctorAdviceVO.medicineType != '' and doctorAdviceVO.medicineType == 0"  >
+            and (t.medicine_type = "普药" or t.medicine_type = #{doctorAdviceVO.medicineType})
+        </if>
+        <if test="doctorAdviceVO.medicineType != null and doctorAdviceVO.medicineType != '' and doctorAdviceVO.medicineType == 1 "  >
+            and (t.medicine_type = "抗生素" or t.medicine_type = #{doctorAdviceVO.medicineType})
+        </if>
+        <if test="doctorAdviceVO.medicineType != null and doctorAdviceVO.medicineType != '' and doctorAdviceVO.medicineType == 2 "  >
+            and (t.medicine_type = "激素" or t.medicine_type = #{doctorAdviceVO.medicineType})
+        </if>
         <if test="doctorAdviceVO.behospitalCode != null and doctorAdviceVO.behospitalCode != ''">
             and t.behospital_code = #{doctorAdviceVO.behospitalCode}
         </if>
@@ -86,7 +95,7 @@
                 </foreach>
             </if>
             <if test="infos = null || infos.size() == 0">
-                and b.info in('000000ASDQWEZXC@#$%')
+                and 1 = 2
             </if>
         </if>
         <if test="doctorAdviceVO.adviceType != null and doctorAdviceVO.adviceType == 2 ">

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

@@ -82,8 +82,10 @@
             </if>
         </if>
         <if test="examineInfoVO.isPlacefile != null and examineInfoVO.isPlacefile == 0">
-            <if test="examineInfoVO.leaveHospitalDate != null and examineInfoVO.behospitalDate != null">
+            <if test="examineInfoVO.leaveHospitalDate != null">
                 <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= #{examineInfoVO.leaveHospitalDate}]]>
+            </if>
+            <if test="examineInfoVO.behospitalDate != null">
                 <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= #{examineInfoVO.behospitalDate}]]>
             </if>
         </if>

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

@@ -84,8 +84,10 @@
             </if>
         </if>
         <if test="checkInfoVO.isPlacefile != null and checkInfoVO.isPlacefile == 0">
-            <if test="checkInfoVO.leaveHospitalDate != null and checkInfoVO.behospitalDate != null">
+            <if test="checkInfoVO.leaveHospitalDate != null">
                 <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') <= #{checkInfoVO.leaveHospitalDate}]]>
+            </if>
+            <if test="checkInfoVO.behospitalDate != null">
                 <![CDATA[ AND date_format (t1.check_date,'%Y-%m-%d %H:%i:%s') >= #{checkInfoVO.behospitalDate}]]>
             </if>
         </if>

+ 28 - 0
src/main/resources/mapper/MedTransferRecordMapper.xml

@@ -0,0 +1,28 @@
+<?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.MedTransferRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedTransferRecord">
+        <id column="id" property="id" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="behospital_code" property="behospitalCode" />
+        <result column="name" property="name" />
+        <result column="sex" property="sex" />
+        <result column="age" property="age" />
+        <result column="dept_name" property="deptName" />
+        <result column="transfer_out_date" property="transferOutDate" />
+        <result column="transfer_in_date" property="transferInDate" />
+        <result column="transfer_out_dept" property="transferOutDept" />
+        <result column="transfer_in_dept" property="transferInDept" />
+        <result column="rec_doctor" property="recDoctor" />
+        <result column="rec_date" property="recDate" />
+        <result column="remark" property="remark" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+    </resultMap>
+
+</mapper>

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

@@ -29,6 +29,7 @@
         SELECT DISTINCT
         t4.`code`,
         t4.mode_id,
+        t4.precond,
         t3.msg
         FROM
         med_behospital_info t1,

+ 7 - 7
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -493,7 +493,7 @@
             AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
         </if>
         <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
-            AND tt2.cases_name = #{filterPageVO.casesName}
+            AND tt2.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
         </if>
 
     </select>
@@ -1542,8 +1542,8 @@
         WHERE
         e.is_deleted = 'N'
         AND d.casesId = e.id
-        <if test="filterPageVO.name != null and filterPageVO.name != ''">
-            AND e.name like CONCAT('%', #{filterPageVO.name},'%')
+        <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
+            AND e.name like CONCAT('%', #{filterPageVO.casesName},'%')
         </if>
         ) t1,
         (
@@ -1596,8 +1596,8 @@
         a.is_deleted = 'N'
         AND b.is_deleted = 'N'
         AND a.id = b.cases_id
-        <if test="filterPageVO.name != null and filterPageVO.name != ''">
-            AND a.name like CONCAT('%', #{filterPageVO.name},'%')
+        <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
+            AND a.name like CONCAT('%', #{filterPageVO.casesName},'%')
         </if>
         GROUP BY
         a.id,
@@ -1693,7 +1693,7 @@
         AND tt1.cases_id = tt2.cases_id
         AND tt1.cases_entry_id = tt2.id
         <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
-            AND tt2.cases_name = #{filterPageVO.casesName}
+            AND tt2.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
         </if>
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
             AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
@@ -1749,7 +1749,7 @@
             AND d.cases_id = #{filterPageVO.casesId}
         </if>
         <if test="filterPageVO.casesName != null and filterPageVO.casesName != ''">
-            AND e.cases_name = #{filterPageVO.casesName}
+            AND e.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
         </if>
         <if test="filterPageVO.ruleType != null">
             AND e.rule_type = #{filterPageVO.ruleType}