Kaynağa Gözat

基础术语映射

zhaops 4 yıl önce
ebeveyn
işleme
16715c77a2
54 değiştirilmiş dosya ile 4179 ekleme ve 0 silme
  1. 6 0
      cdssman-service/pom.xml
  2. 40 0
      cdssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  3. 40 0
      cdssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  4. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/DiseaseConfig.java
  5. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/DrugConfig.java
  6. 185 0
      cdssman-service/src/main/java/com/diagbot/entity/LisConfig.java
  7. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java
  8. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/PacsConfig.java
  9. 256 0
      cdssman-service/src/main/java/com/diagbot/facade/DiseaseConfigFacade.java
  10. 263 0
      cdssman-service/src/main/java/com/diagbot/facade/DrugConfigFacade.java
  11. 303 0
      cdssman-service/src/main/java/com/diagbot/facade/LisConfigFacade.java
  12. 265 0
      cdssman-service/src/main/java/com/diagbot/facade/OperationConfigFacade.java
  13. 263 0
      cdssman-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
  14. 26 0
      cdssman-service/src/main/java/com/diagbot/mapper/DiseaseConfigMapper.java
  15. 25 0
      cdssman-service/src/main/java/com/diagbot/mapper/DrugConfigMapper.java
  16. 26 0
      cdssman-service/src/main/java/com/diagbot/mapper/LisConfigMapper.java
  17. 25 0
      cdssman-service/src/main/java/com/diagbot/mapper/OperationConfigMapper.java
  18. 25 0
      cdssman-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java
  19. 25 0
      cdssman-service/src/main/java/com/diagbot/service/DiseaseConfigService.java
  20. 25 0
      cdssman-service/src/main/java/com/diagbot/service/DrugConfigService.java
  21. 26 0
      cdssman-service/src/main/java/com/diagbot/service/LisConfigService.java
  22. 25 0
      cdssman-service/src/main/java/com/diagbot/service/OperationConfigService.java
  23. 25 0
      cdssman-service/src/main/java/com/diagbot/service/PacsConfigService.java
  24. 31 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DiseaseConfigServiceImpl.java
  25. 31 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DrugConfigServiceImpl.java
  26. 31 0
      cdssman-service/src/main/java/com/diagbot/service/impl/LisConfigServiceImpl.java
  27. 31 0
      cdssman-service/src/main/java/com/diagbot/service/impl/OperationConfigServiceImpl.java
  28. 31 0
      cdssman-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java
  29. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/DiseaseConfigListVO.java
  30. 36 0
      cdssman-service/src/main/java/com/diagbot/vo/DiseaseConfigPageVO.java
  31. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/DrugConfigListVO.java
  32. 36 0
      cdssman-service/src/main/java/com/diagbot/vo/DrugConfigPageVO.java
  33. 21 0
      cdssman-service/src/main/java/com/diagbot/vo/HospitalIdVO.java
  34. 17 0
      cdssman-service/src/main/java/com/diagbot/vo/IdListVO.java
  35. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/IdVO.java
  36. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/LisConfigListVO.java
  37. 38 0
      cdssman-service/src/main/java/com/diagbot/vo/LisConfigPageVO.java
  38. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/OperationConfigListVO.java
  39. 37 0
      cdssman-service/src/main/java/com/diagbot/vo/OperationConfigPageVO.java
  40. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/PacsConfigListVO.java
  41. 37 0
      cdssman-service/src/main/java/com/diagbot/vo/PacsConfigPageVO.java
  42. 154 0
      cdssman-service/src/main/java/com/diagbot/web/DiseaseConfigController.java
  43. 154 0
      cdssman-service/src/main/java/com/diagbot/web/DrugConfigController.java
  44. 152 0
      cdssman-service/src/main/java/com/diagbot/web/LisConfigController.java
  45. 155 0
      cdssman-service/src/main/java/com/diagbot/web/OperationConfigController.java
  46. 156 0
      cdssman-service/src/main/java/com/diagbot/web/PacsConfigController.java
  47. 38 0
      cdssman-service/src/main/resources/mapper/DiseaseConfigMapper.xml
  48. 38 0
      cdssman-service/src/main/resources/mapper/DrugConfigMapper.xml
  49. 41 0
      cdssman-service/src/main/resources/mapper/LisConfigMapper.xml
  50. 37 0
      cdssman-service/src/main/resources/mapper/OperationConfigMapper.xml
  51. 37 0
      cdssman-service/src/main/resources/mapper/PacsConfigMapper.xml
  52. 8 0
      common/pom.xml
  53. 178 0
      common/src/main/java/com/diagbot/util/ExcelUtils.java
  54. 8 0
      pom.xml

+ 6 - 0
cdssman-service/pom.xml

@@ -123,6 +123,12 @@
             <artifactId>spring-cloud-starter-bus-amqp</artifactId>
         </dependency>
 
+        <!-- easypoi -->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>${easypoi.version}</version>
+        </dependency>
 
         <!-- springboot整合mybatis(核心就这一个) -->
         <!-- 注意顺序,这个一定要放在最下面 -->

+ 40 - 0
cdssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -26,6 +26,46 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .csrf().disable()
                 .authorizeRequests()
                 .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+                .antMatchers("/tran/lisConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/lisConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/lisConfig/saveOrUpdateRecords").permitAll()
+                .antMatchers("/tran/lisConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/lisConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/lisConfig/getPage").permitAll()
+                .antMatchers("/tran/lisConfig/importExcel").permitAll()
+                .antMatchers("/tran/lisConfig/exportExcel").permitAll()
+                .antMatchers("/tran/pacsConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/pacsConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/pacsConfig/saveOrUpdateRecords").permitAll()
+                .antMatchers("/tran/pacsConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/pacsConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/pacsConfig/getPage").permitAll()
+                .antMatchers("/tran/pacsConfig/importExcel").permitAll()
+                .antMatchers("/tran/pacsConfig/exportExcel").permitAll()
+                .antMatchers("/tran/diseaseConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/diseaseConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/diseaseConfig/saveOrUpdateRecords").permitAll()
+                .antMatchers("/tran/diseaseConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/diseaseConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/diseaseConfig/getPage").permitAll()
+                .antMatchers("/tran/diseaseConfig/importExcel").permitAll()
+                .antMatchers("/tran/diseaseConfig/exportExcel").permitAll()
+                .antMatchers("/tran/drugConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/drugConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/drugConfig/saveOrUpdateRecords").permitAll()
+                .antMatchers("/tran/drugConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/drugConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/drugConfig/getPage").permitAll()
+                .antMatchers("/tran/drugConfig/importExcel").permitAll()
+                .antMatchers("/tran/drugConfig/exportExcel").permitAll()
+                .antMatchers("/tran/operationConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/operationConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/operationConfig/saveOrUpdateRecords").permitAll()
+                .antMatchers("/tran/operationConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/operationConfig/deleteRecords").permitAll()
+                .antMatchers("/tran/operationConfig/getPage").permitAll()
+                .antMatchers("/tran/operationConfig/importExcel").permitAll()
+                .antMatchers("/tran/operationConfig/exportExcel").permitAll()
 //                .antMatchers("/**").authenticated();
                 .antMatchers("/**").permitAll();
     }

+ 40 - 0
cdssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -65,6 +65,46 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/druid/**", request)
                 || matchers("/actuator/**", request)
                 || matchers("/hystrix/**", request)
+                || matchers("/tran/lisConfig/isExistRecord", request)
+                || matchers("/tran/lisConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/lisConfig/saveOrUpdateRecords", request)
+                || matchers("/tran/lisConfig/deleteRecord", request)
+                || matchers("/tran/lisConfig/deleteRecords", request)
+                || matchers("/tran/lisConfig/getPage", request)
+                || matchers("/tran/lisConfig/importExcel", request)
+                || matchers("/tran/lisConfig/exportExcel", request)
+                || matchers("/tran/pacsConfig/isExistRecord", request)
+                || matchers("/tran/pacsConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/pacsConfig/saveOrUpdateRecords", request)
+                || matchers("/tran/pacsConfig/deleteRecord", request)
+                || matchers("/tran/pacsConfig/deleteRecords", request)
+                || matchers("/tran/pacsConfig/getPage", request)
+                || matchers("/tran/pacsConfig/importExcel", request)
+                || matchers("/tran/pacsConfig/exportExcel", request)
+                || matchers("/tran/diseaseConfig/isExistRecord", request)
+                || matchers("/tran/diseaseConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/diseaseConfig/saveOrUpdateRecords", request)
+                || matchers("/tran/diseaseConfig/deleteRecord", request)
+                || matchers("/tran/diseaseConfig/deleteRecords", request)
+                || matchers("/tran/diseaseConfig/getPage", request)
+                || matchers("/tran/diseaseConfig/importExcel", request)
+                || matchers("/tran/diseaseConfig/exportExcel", request)
+                || matchers("/tran/drugConfig/isExistRecord", request)
+                || matchers("/tran/drugConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/drugConfig/saveOrUpdateRecords", request)
+                || matchers("/tran/drugConfig/deleteRecord", request)
+                || matchers("/tran/drugConfig/deleteRecords", request)
+                || matchers("/tran/drugConfig/getPage", request)
+                || matchers("/tran/drugConfig/importExcel", request)
+                || matchers("/tran/drugConfig/exportExcel", request)
+                || matchers("/tran/operationConfig/isExistRecord", request)
+                || matchers("/tran/operationConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/operationConfig/saveOrUpdateRecords", request)
+                || matchers("/tran/operationConfig/deleteRecord", request)
+                || matchers("/tran/operationConfig/deleteRecords", request)
+                || matchers("/tran/operationConfig/getPage", request)
+                || matchers("/tran/operationConfig/importExcel", request)
+                || matchers("/tran/operationConfig/exportExcel", request)
                 || matchers("/", request)) {
             return true;
         }

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/DiseaseConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 诊断映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_disease_config")
+public class DiseaseConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * ICD编码
+     */
+    @Excel(name="ICD编码", width = 40)
+    private String icdCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getIcdCode() {
+        return icdCode;
+    }
+
+    public void setIcdCode(String icdCode) {
+        this.icdCode = icdCode;
+    }
+
+    @Override
+    public String toString() {
+        return "DiseaseConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", icdCode=" + icdCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/DrugConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 药品映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_drug_config")
+public class DrugConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "DrugConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 185 - 0
cdssman-service/src/main/java/com/diagbot/entity/LisConfig.java

@@ -0,0 +1,185 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 化验公表映射
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Data
+@TableName("tran_lis_config")
+public class LisConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    @Excel(name = "his大项名称", width = 40)
+    @NotBlank(message = "请输入大项名称")
+    private String hisName;
+
+    /**
+     * his小项名称
+     */
+    @Excel(name = "his小项名称", width = 40)
+    private String hisDetailName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名", width = 40)
+    @NotBlank(message = "请输入公表名称")
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name = "标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getHisDetailName() {
+        return hisDetailName;
+    }
+
+    public void setHisDetailName(String hisDetailName) {
+        this.hisDetailName = hisDetailName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "LisConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", hisDetailName=" + hisDetailName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 手术映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_operation_config")
+public class OperationConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "OperationConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/PacsConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 检查公表映射
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_pacs_config")
+public class PacsConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "PacsConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 256 - 0
cdssman-service/src/main/java/com/diagbot/facade/DiseaseConfigFacade.java

@@ -0,0 +1,256 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.DiseaseConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DiseaseConfigListVO;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:05
+ */
+@Component
+public class DiseaseConfigFacade {
+    @Autowired
+    private DiseaseConfigService diseaseConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    public Boolean isExistRecord(DiseaseConfig diseaseConfig) {
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        DiseaseConfig oldRecord = new DiseaseConfig();
+        if (diseaseConfig.getId() != null) {
+            oldRecord = diseaseConfigService.getById(diseaseConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        //hisName:uniqueName 1:n
+        if (StringUtil.isNotBlank(diseaseConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", diseaseConfig.getHospitalId())
+                    .eq("his_name", diseaseConfig.getHisName())
+                    .eq("unique_name", diseaseConfig.getUniqueName());
+            oldRecord = diseaseConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(DiseaseConfig diseaseConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        diseaseConfig.setModifier(userId);
+        diseaseConfig.setGmtModified(now);
+        //新增数据
+        if (diseaseConfig.getId() == null) {
+            diseaseConfig.setCreator(userId);
+            diseaseConfig.setGmtCreate(now);
+        }
+        if (diseaseConfig.getIsDeleted() == null) {
+            diseaseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        diseaseConfigService.saveOrUpdate(diseaseConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param diseaseConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(DiseaseConfigListVO diseaseConfigListVO) {
+        if (ListUtil.isEmpty(diseaseConfigListVO.getDiseaseConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(diseaseConfigListVO.getDiseaseConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param diseaseConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<DiseaseConfig> diseaseConfigList) {
+        if (ListUtil.isEmpty(diseaseConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        diseaseConfigList = diseaseConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(diseaseConfigList)) {
+            return false;
+        }
+        Long hospitalId = diseaseConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        diseaseConfigList.forEach(diseaseConfig -> {
+            diseaseConfig.setModifier(userId);
+            diseaseConfig.setGmtModified(now);
+            if (diseaseConfig.getId() == null) {
+                if (configMap.containsKey(diseaseConfig.getHisName())) {
+                    deleteIds.add(configMap.get(diseaseConfig.getHisName()).get(diseaseConfig.getUniqueName()));
+                }
+                diseaseConfig.setCreator(userId);
+                diseaseConfig.setGmtCreate(now);
+            }
+            if (diseaseConfig.getIsDeleted() == null) {
+                diseaseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        diseaseConfigService.saveOrUpdateBatch(diseaseConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        diseaseConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        diseaseConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(DiseaseConfigPageVO diseaseConfigPageVO) {
+        return diseaseConfigService.getPage(diseaseConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<DiseaseConfig> diseaseConfigList = ExcelUtils.importExcel(file, 0, 1, DiseaseConfig.class);
+        if (ListUtil.isNotEmpty(diseaseConfigList)) {
+            diseaseConfigList.forEach(diseaseConfig -> {
+                diseaseConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(diseaseConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<DiseaseConfig> records = diseaseConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<DiseaseConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<DiseaseConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<DiseaseConfig> records = diseaseConfigService.list(queryWrapper);
+        String fileName = "疾病映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", DiseaseConfig.class, fileName, response, 12.8f);
+    }
+}

+ 263 - 0
cdssman-service/src/main/java/com/diagbot/facade/DrugConfigFacade.java

@@ -0,0 +1,263 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.DrugConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DrugConfigListVO;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:04
+ */
+@Component
+public class DrugConfigFacade {
+    @Autowired
+    private DrugConfigService drugConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param drugConfig
+     * @return
+     */
+    public Boolean isExistRecord(DrugConfig drugConfig) {
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        DrugConfig oldRecord = new DrugConfig();
+        if (drugConfig.getId() != null) {
+            oldRecord = drugConfigService.getById(drugConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(drugConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", drugConfig.getHospitalId())
+                    .eq("his_name", drugConfig.getHisName())
+                    .eq("unique_name", drugConfig.getUniqueName());
+            oldRecord = drugConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param drugConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(DrugConfig drugConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        drugConfig.setModifier(userId);
+        drugConfig.setGmtModified(now);
+        //新增数据
+        if (drugConfig.getId() == null) {
+            drugConfig.setCreator(userId);
+            drugConfig.setGmtCreate(now);
+        }
+        if (drugConfig.getIsDeleted() == null) {
+            drugConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        drugConfigService.saveOrUpdate(drugConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param drugConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(DrugConfigListVO drugConfigListVO) {
+        if (ListUtil.isEmpty(drugConfigListVO.getDrugConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(drugConfigListVO.getDrugConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param drugConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<DrugConfig> drugConfigList) {
+        if (ListUtil.isEmpty(drugConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        drugConfigList = drugConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(drugConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = drugConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        drugConfigList.forEach(drugConfig -> {
+            drugConfig.setModifier(userId);
+            drugConfig.setGmtModified(now);
+            if (drugConfig.getId() == null) {
+                if (configMap.containsKey(drugConfig.getHisName())) {
+                    deleteIds.add(configMap.get(drugConfig.getHisName()).get(drugConfig.getUniqueName()));
+                }
+                drugConfig.setCreator(userId);
+                drugConfig.setGmtCreate(now);
+            }
+            if (drugConfig.getIsDeleted() == null) {
+                drugConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        drugConfigService.saveOrUpdateBatch(drugConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<DrugConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        drugConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<DrugConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        drugConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    public IPage<DrugConfig> getPage(DrugConfigPageVO drugConfigPageVO) {
+        return drugConfigService.getPage(drugConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 0, 1, DrugConfig.class);
+        if (ListUtil.isNotEmpty(drugConfigList)) {
+            drugConfigList.forEach(drugConfig -> {
+                drugConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(drugConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<DrugConfig> records = drugConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<DrugConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<DrugConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<DrugConfig> records = drugConfigService.list(queryWrapper);
+        String fileName = "药品映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", DrugConfig.class, fileName, response, 12.8f);
+    }
+}

+ 303 - 0
cdssman-service/src/main/java/com/diagbot/facade/LisConfigFacade.java

@@ -0,0 +1,303 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.LisConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.LisConfigListVO;
+import com.diagbot.vo.LisConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class LisConfigFacade{
+    @Autowired
+    private LisConfigService lisConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param lisConfig
+     * @return
+     */
+    public Boolean isExistRecord(LisConfig lisConfig) {
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        LisConfig oldRecord = new LisConfig();
+        if (lisConfig.getId() != null) {
+            oldRecord = lisConfigService.getById(lisConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        } else if (StringUtil.isNotBlank(lisConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", lisConfig.getHospitalId())
+                    .eq("his_name", lisConfig.getHisName())
+                    .eq("unique_name", lisConfig.getUniqueName());
+            if (StringUtil.isBlank(lisConfig.getHisDetailName())) {
+                queryWrapper
+                        .isNull("his_detail_name")
+                        .or()
+                        .eq("his_detail_name", "");
+            } else {
+                queryWrapper
+                        .eq("his_detail_name", lisConfig.getHisDetailName());
+            }
+            oldRecord = lisConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param lisConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(LisConfig lisConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        lisConfig.setModifier(userId);
+        lisConfig.setGmtModified(now);
+        //新增数据
+        if (lisConfig.getId() == null) {
+            lisConfig.setCreator(userId);
+            lisConfig.setGmtCreate(now);
+        }
+        if (lisConfig.getIsDeleted() == null) {
+            lisConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        lisConfigService.saveOrUpdate(lisConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param lisConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(LisConfigListVO lisConfigListVO) {
+        if (ListUtil.isEmpty(lisConfigListVO.getLisConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(lisConfigListVO.getLisConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param lisConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<LisConfig> lisConfigList) {
+        if (ListUtil.isEmpty(lisConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤套餐或公表名为空的数据,hospitalId不允许为空
+        lisConfigList = lisConfigList
+                .stream()
+                .filter(i->i.getHospitalId()!=null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if(ListUtil.isEmpty(lisConfigList)){
+            return false;
+        }
+        Long hosptialId=lisConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Map<String, Long>>> configMap
+                = getConfigMap(hosptialId, null, null);
+        lisConfigList.forEach(lisConfig -> {
+            lisConfig.setModifier(userId);
+            lisConfig.setGmtModified(now);
+            if (lisConfig.getId() == null) {
+                if (configMap.containsKey(lisConfig.getHisName())) {
+                    if (lisConfig.getHisDetailName() == null
+                            && configMap.get(lisConfig.getHisName()).containsKey("")) {
+                        if (configMap.get(lisConfig.getHisName()).get("").containsKey(lisConfig.getUniqueName())) {
+                            deleteIds.add(configMap.get(lisConfig.getHisName()).get("").get(lisConfig.getUniqueName()));
+                        }
+                    } else if (configMap.get(lisConfig.getHisName()).containsKey(lisConfig.getHisDetailName())) {
+                        if (configMap.get(lisConfig.getHisName()).get(lisConfig.getHisDetailName()).containsKey(lisConfig.getUniqueName())) {
+                            deleteIds.add(configMap
+                                    .get(lisConfig.getHisName())
+                                    .get(lisConfig.getHisDetailName())
+                                    .get(lisConfig.getUniqueName()));
+                        }
+                    }
+                }
+                lisConfig.setCreator(userId);
+                lisConfig.setGmtCreate(now);
+            }
+            if (lisConfig.getIsDeleted() == null) {
+                lisConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+
+        lisConfigService.saveOrUpdateBatch(lisConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<LisConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        lisConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<LisConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        lisConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    public IPage<LisConfig> getPage(LisConfigPageVO lisConfigPageVO) {
+        return lisConfigService.getPage(lisConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        //从Excel读取数据
+        List<LisConfig> lisConfigList = ExcelUtils.importExcel(file, 0, 1, LisConfig.class);
+        if (ListUtil.isNotEmpty(lisConfigList)) {
+            lisConfigList.forEach(lisConfig -> {
+                lisConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(lisConfigList);
+        }
+    }
+
+
+    /**
+     * 获取映射关系-id
+     * Map<hisName,Map<hisDetailName,Map<uniqueName,id>>>
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Map<String, Long>>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Map<String, Long>>> retMap = new HashMap<>();
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<LisConfig> records = lisConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+
+        records.forEach(lisConfig -> {
+            if (lisConfig.getHisDetailName() == null) {
+                lisConfig.setHisDetailName("");
+            }
+        });
+
+        Map<String, List<LisConfig>> hisNameMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<LisConfig>> entry : hisNameMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                Map<String, Map<String, Long>> detailNameMap = new HashMap<>();
+                //his名称映射到标准词,1:n
+                Map<String, List<LisConfig>> hisDetailNameMap
+                        = EntityUtil.makeEntityListMap(entry.getValue(), "hisDetailName");
+                for (Map.Entry<String, List<LisConfig>> detailEntry : hisDetailNameMap.entrySet()) {
+                    if (ListUtil.isNotEmpty(detailEntry.getValue())) {
+                        detailNameMap.put(detailEntry.getKey(),
+                                EntityUtil.makeMapWithKeyValue(detailEntry.getValue(), "uniqueName", "id"));
+                    }
+                }
+                retMap.put(entry.getKey(), detailNameMap);
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<LisConfig> records = lisConfigService.list(queryWrapper);
+        String fileName = "检验映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", LisConfig.class, fileName, response, 12.8f);
+    }
+}

+ 265 - 0
cdssman-service/src/main/java/com/diagbot/facade/OperationConfigFacade.java

@@ -0,0 +1,265 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.OperationConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.OperationConfigListVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:05
+ */
+@Component
+public class OperationConfigFacade {
+    @Autowired
+    private OperationConfigService operationConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param operationConfig
+     * @return
+     */
+    public Boolean isExistRecord(OperationConfig operationConfig) {
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        OperationConfig oldRecord = new OperationConfig();
+        if (operationConfig.getId() != null) {
+            oldRecord = operationConfigService.getById(operationConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(operationConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id",operationConfig.getHospitalId())
+                    .eq("his_name", operationConfig.getHisName())
+                    .eq("unique_name", operationConfig.getUniqueName());
+            oldRecord = operationConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param operationConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(OperationConfig operationConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        operationConfig.setModifier(userId);
+        operationConfig.setGmtModified(now);
+        //新增数据
+        if (operationConfig.getId() == null) {
+            operationConfig.setCreator(userId);
+            operationConfig.setGmtCreate(now);
+        }
+        if (operationConfig.getIsDeleted() == null) {
+            operationConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        operationConfigService.saveOrUpdate(operationConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param operationConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(OperationConfigListVO operationConfigListVO) {
+        if (ListUtil.isEmpty(operationConfigListVO.getOperationConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(operationConfigListVO.getOperationConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param operationConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<OperationConfig> operationConfigList) {
+        if (ListUtil.isEmpty(operationConfigList)) {
+            return false;
+        }
+
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        operationConfigList = operationConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+
+        if (ListUtil.isEmpty(operationConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = operationConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        operationConfigList.forEach(operationConfig -> {
+            operationConfig.setModifier(userId);
+            operationConfig.setGmtModified(now);
+            if (operationConfig.getId() == null) {
+                if (configMap.containsKey(operationConfig.getHisName())) {
+                    deleteIds.add(configMap.get(operationConfig.getHisName()).get(operationConfig.getUniqueName()));
+                }
+                operationConfig.setCreator(userId);
+                operationConfig.setGmtCreate(now);
+            }
+            if (operationConfig.getIsDeleted() == null) {
+                operationConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        operationConfigService.saveOrUpdateBatch(operationConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<OperationConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        operationConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<OperationConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        operationConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    public IPage<OperationConfig> getPage(OperationConfigPageVO operationConfigPageVO) {
+        return operationConfigService.getPage(operationConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<OperationConfig> operationConfigList = ExcelUtils.importExcel(file, 0, 1, OperationConfig.class);
+        if (ListUtil.isNotEmpty(operationConfigList)) {
+            operationConfigList.forEach(operationConfig -> {
+                operationConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(operationConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<OperationConfig> records = operationConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<OperationConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<OperationConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<OperationConfig> records = operationConfigService.list(queryWrapper);
+        String fileName = "手术映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", OperationConfig.class, fileName, response, 12.8f);
+    }
+}

+ 263 - 0
cdssman-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -0,0 +1,263 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.PacsConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.PacsConfigListVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class PacsConfigFacade {
+    @Autowired
+    private PacsConfigService pacsConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param pacsConfig
+     * @return
+     */
+    public Boolean isExistRecord(PacsConfig pacsConfig) {
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        PacsConfig oldRecord = new PacsConfig();
+        if (pacsConfig.getId() != null) {
+            oldRecord = pacsConfigService.getById(pacsConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(pacsConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", pacsConfig.getHospitalId())
+                    .eq("his_name", pacsConfig.getHisName())
+                    .eq("unique_name", pacsConfig.getUniqueName());
+            oldRecord = pacsConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param pacsConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(PacsConfig pacsConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        pacsConfig.setModifier(userId);
+        pacsConfig.setGmtModified(now);
+        //新增数据
+        if (pacsConfig.getId() == null) {
+            pacsConfig.setCreator(userId);
+            pacsConfig.setGmtCreate(now);
+        }
+        if (pacsConfig.getIsDeleted() == null) {
+            pacsConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        pacsConfigService.saveOrUpdate(pacsConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param pacsConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(PacsConfigListVO pacsConfigListVO) {
+        if (ListUtil.isEmpty(pacsConfigListVO.getPacsConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(pacsConfigListVO.getPacsConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param pacsConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<PacsConfig> pacsConfigList) {
+        if (ListUtil.isEmpty(pacsConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        pacsConfigList = pacsConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(pacsConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = pacsConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        pacsConfigList.forEach(pacsConfig -> {
+            pacsConfig.setModifier(userId);
+            pacsConfig.setGmtModified(now);
+            if (pacsConfig.getId() == null) {
+                if (configMap.containsKey(pacsConfig.getHisName())) {
+                    deleteIds.add(configMap.get(pacsConfig.getHisName()).get(pacsConfig.getUniqueName()));
+                }
+                pacsConfig.setCreator(userId);
+                pacsConfig.setGmtCreate(now);
+            }
+            if (pacsConfig.getIsDeleted() == null) {
+                pacsConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        pacsConfigService.saveOrUpdateBatch(pacsConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<PacsConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        pacsConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<PacsConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        pacsConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    public IPage<PacsConfig> getPage(PacsConfigPageVO pacsConfigPageVO) {
+        return pacsConfigService.getPage(pacsConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<PacsConfig> pacsConfigList = ExcelUtils.importExcel(file, 0, 1, PacsConfig.class);
+        if (ListUtil.isNotEmpty(pacsConfigList)) {
+            pacsConfigList.forEach(pacsConfig -> {
+                pacsConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(pacsConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<PacsConfig> records = pacsConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<PacsConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<PacsConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<PacsConfig> records = pacsConfigService.list(queryWrapper);
+        String fileName = "检查映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", PacsConfig.class, fileName, response, 12.8f);
+    }
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DiseaseConfigMapper.java

@@ -0,0 +1,26 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 诊断映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DiseaseConfigMapper extends BaseMapper<DiseaseConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DrugConfigMapper.java

@@ -0,0 +1,25 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.vo.DrugConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 药品映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DrugConfigMapper extends BaseMapper<DrugConfig> {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO);
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/mapper/LisConfigMapper.java

@@ -0,0 +1,26 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 化验公表映射 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface LisConfigMapper extends BaseMapper<LisConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/mapper/OperationConfigMapper.java

@@ -0,0 +1,25 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 手术映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface OperationConfigMapper extends BaseMapper<OperationConfig> {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java

@@ -0,0 +1,25 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 检查公表映射 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface PacsConfigMapper extends BaseMapper<PacsConfig> {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/service/DiseaseConfigService.java

@@ -0,0 +1,25 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 诊断映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DiseaseConfigService extends IService<DiseaseConfig> {
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/service/DrugConfigService.java

@@ -0,0 +1,25 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.vo.DrugConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 药品映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DrugConfigService extends IService<DrugConfig> {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO);
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/service/LisConfigService.java

@@ -0,0 +1,26 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 化验公表映射 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface LisConfigService extends IService<LisConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/service/OperationConfigService.java

@@ -0,0 +1,25 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 手术映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface OperationConfigService extends IService<OperationConfig> {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO);
+}

+ 25 - 0
cdssman-service/src/main/java/com/diagbot/service/PacsConfigService.java

@@ -0,0 +1,25 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 检查公表映射 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface PacsConfigService extends IService<PacsConfig> {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO);
+}

+ 31 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DiseaseConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.mapper.DiseaseConfigMapper;
+import com.diagbot.service.DiseaseConfigService;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 诊断映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class DiseaseConfigServiceImpl extends ServiceImpl<DiseaseConfigMapper, DiseaseConfig> implements DiseaseConfigService {
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO){
+        return baseMapper.getPage(diseaseConfigPageVO);
+    }
+}

+ 31 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DrugConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.mapper.DrugConfigMapper;
+import com.diagbot.service.DrugConfigService;
+import com.diagbot.vo.DrugConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 药品映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class DrugConfigServiceImpl extends ServiceImpl<DrugConfigMapper, DrugConfig> implements DrugConfigService {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    public IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO){
+        return baseMapper.getPage(drugConfigPageVO);
+    }
+}

+ 31 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/LisConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.mapper.LisConfigMapper;
+import com.diagbot.service.LisConfigService;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 化验公表映射 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class LisConfigServiceImpl extends ServiceImpl<LisConfigMapper, LisConfig> implements LisConfigService {
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    public IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO) {
+        return baseMapper.getPage(lisConfigPageVO);
+    }
+}

+ 31 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/OperationConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.mapper.OperationConfigMapper;
+import com.diagbot.service.OperationConfigService;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 手术映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class OperationConfigServiceImpl extends ServiceImpl<OperationConfigMapper, OperationConfig> implements OperationConfigService {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    public IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO){
+        return baseMapper.getPage(operationConfigPageVO);
+    }
+}

+ 31 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.mapper.PacsConfigMapper;
+import com.diagbot.service.PacsConfigService;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 检查公表映射 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class PacsConfigServiceImpl extends ServiceImpl<PacsConfigMapper, PacsConfig> implements PacsConfigService {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    public IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO) {
+        return baseMapper.getPage(pacsConfigPageVO);
+    }
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/DiseaseConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.DiseaseConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/31 9:38
+ */
+@Getter
+@Setter
+public class DiseaseConfigListVO {
+    private List<DiseaseConfig> diseaseConfigList;
+}

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/vo/DiseaseConfigPageVO.java

@@ -0,0 +1,36 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 15:54
+ */
+@Getter
+@Setter
+public class DiseaseConfigPageVO {
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * icd编码
+     */
+    private String icdCode;
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/DrugConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.DrugConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/31 9:37
+ */
+@Getter
+@Setter
+public class DrugConfigListVO {
+    private List<DrugConfig> drugConfigList;
+}

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/vo/DrugConfigPageVO.java

@@ -0,0 +1,36 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 15:53
+ */
+@Getter
+@Setter
+public class DrugConfigPageVO {
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 21 - 0
cdssman-service/src/main/java/com/diagbot/vo/HospitalIdVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/5 11:10
+ */
+@Getter
+@Setter
+public class HospitalIdVO {
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+}

+ 17 - 0
cdssman-service/src/main/java/com/diagbot/vo/IdListVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 13:26
+ */
+@Getter
+@Setter
+public class IdListVO {
+    private List<Long> ids;
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/IdVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 13:26
+ */
+@Getter
+@Setter
+public class IdVO {
+    @NotNull(message = "请输入id")
+    private Long id;
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/LisConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.LisConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 13:21
+ */
+@Getter
+@Setter
+public class LisConfigListVO {
+    private List<LisConfig> lisConfigList;
+}

+ 38 - 0
cdssman-service/src/main/java/com/diagbot/vo/LisConfigPageVO.java

@@ -0,0 +1,38 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 13:47
+ */
+@Getter
+@Setter
+public class LisConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+    /**
+     * his大项名称
+     */
+    private String hisName;
+
+    /**
+     * his小项名称
+     */
+    private String hisDetailName;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/OperationConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.OperationConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/31 9:37
+ */
+@Getter
+@Setter
+public class OperationConfigListVO {
+    private List<OperationConfig> operationConfigList;
+}

+ 37 - 0
cdssman-service/src/main/java/com/diagbot/vo/OperationConfigPageVO.java

@@ -0,0 +1,37 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 15:49
+ */
+@Getter
+@Setter
+public class OperationConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 18 - 0
cdssman-service/src/main/java/com/diagbot/vo/PacsConfigListVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.PacsConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 16:20
+ */
+@Getter
+@Setter
+public class PacsConfigListVO {
+    private List<PacsConfig> pacsConfigList;
+}

+ 37 - 0
cdssman-service/src/main/java/com/diagbot/vo/PacsConfigPageVO.java

@@ -0,0 +1,37 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/30 15:48
+ */
+@Getter
+@Setter
+public class PacsConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 154 - 0
cdssman-service/src/main/java/com/diagbot/web/DiseaseConfigController.java

@@ -0,0 +1,154 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.facade.DiseaseConfigFacade;
+import com.diagbot.vo.DiseaseConfigListVO;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 诊断映射表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@RestController
+@RequestMapping("/tran/diseaseConfig")
+@Api(value = "诊断公表映射API", tags = { "诊断公表映射API" })
+@SuppressWarnings("unchecked")
+public class DiseaseConfigController {
+    @Autowired
+    private DiseaseConfigFacade diseaseConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid DiseaseConfig diseaseConfig) {
+        Boolean data = diseaseConfigFacade.isExistRecord(diseaseConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid DiseaseConfig diseaseConfig) {
+        Boolean data = diseaseConfigFacade.saveOrUpdateRecord(diseaseConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param diseaseConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid DiseaseConfigListVO diseaseConfigListVO) {
+        Boolean data = diseaseConfigFacade.saveOrUpdateRecords(diseaseConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = diseaseConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = diseaseConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<DiseaseConfig> getPage(@RequestBody @Valid DiseaseConfigPageVO diseaseConfigPageVO) {
+        IPage<DiseaseConfig> data = diseaseConfigFacade.getPage(diseaseConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    public void importExcel(@RequestParam("file") MultipartFile file, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        diseaseConfigFacade.importExcel(file, hospitalIdVO);
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        diseaseConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+}

+ 154 - 0
cdssman-service/src/main/java/com/diagbot/web/DrugConfigController.java

@@ -0,0 +1,154 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.facade.DrugConfigFacade;
+import com.diagbot.vo.DrugConfigListVO;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 药品映射表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@RestController
+@RequestMapping("/tran/drugConfig")
+@Api(value = "药品公表映射API", tags = { "药品公表映射API" })
+@SuppressWarnings("unchecked")
+public class DrugConfigController {
+    @Autowired
+    private DrugConfigFacade drugConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param drugConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid DrugConfig drugConfig) {
+        Boolean data = drugConfigFacade.isExistRecord(drugConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param drugConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid DrugConfig drugConfig) {
+        Boolean data = drugConfigFacade.saveOrUpdateRecord(drugConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param drugConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid DrugConfigListVO drugConfigListVO) {
+        Boolean data = drugConfigFacade.saveOrUpdateRecords(drugConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = drugConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = drugConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<DrugConfig> getPage(@RequestBody @Valid DrugConfigPageVO drugConfigPageVO) {
+        IPage<DrugConfig> data = drugConfigFacade.getPage(drugConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     * @return
+     */
+    @ApiOperation(value = "数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    public void importExcel(@RequestParam("file") MultipartFile file, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        drugConfigFacade.importExcel(file, hospitalIdVO);
+    }
+
+    /**
+     * 数据导出
+     * @param response
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        drugConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+}

+ 152 - 0
cdssman-service/src/main/java/com/diagbot/web/LisConfigController.java

@@ -0,0 +1,152 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.facade.LisConfigFacade;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.LisConfigListVO;
+import com.diagbot.vo.LisConfigPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * 化验公表映射
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@RestController
+@RequestMapping("/tran/lisConfig")
+@Api(value = "化验公表映射API", tags = { "化验公表映射API" })
+@SuppressWarnings("unchecked")
+public class LisConfigController {
+    @Autowired
+    private LisConfigFacade lisConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param lisConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid LisConfig lisConfig) {
+        Boolean data = lisConfigFacade.isExistRecord(lisConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param lisConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid LisConfig lisConfig) {
+        Boolean data = lisConfigFacade.saveOrUpdateRecord(lisConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param lisConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid LisConfigListVO lisConfigListVO) {
+        Boolean data = lisConfigFacade.saveOrUpdateRecords(lisConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = lisConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = lisConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<LisConfig> getPage(@RequestBody @Valid LisConfigPageVO lisConfigPageVO) {
+        IPage<LisConfig> data = lisConfigFacade.getPage(lisConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "化验公表数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    public void importExcel(@RequestParam("file") MultipartFile file, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        lisConfigFacade.importExcel(file, hospitalIdVO);
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        lisConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+}

+ 155 - 0
cdssman-service/src/main/java/com/diagbot/web/OperationConfigController.java

@@ -0,0 +1,155 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.facade.OperationConfigFacade;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.OperationConfigListVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 手术映射表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@RestController
+@RequestMapping("/tran/operationConfig")
+@Api(value = "手术公表映射API", tags = { "手术公表映射API" })
+@SuppressWarnings("unchecked")
+public class OperationConfigController {
+    @Autowired
+    private OperationConfigFacade operationConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param operationConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid OperationConfig operationConfig) {
+        Boolean data = operationConfigFacade.isExistRecord(operationConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param operationConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid OperationConfig operationConfig) {
+        Boolean data = operationConfigFacade.saveOrUpdateRecord(operationConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param operationConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid OperationConfigListVO operationConfigListVO) {
+        Boolean data = operationConfigFacade.saveOrUpdateRecords(operationConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = operationConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = operationConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<OperationConfig> getPage(@RequestBody @Valid OperationConfigPageVO operationConfigPageVO) {
+        IPage<OperationConfig> data = operationConfigFacade.getPage(operationConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     * @return
+     */
+    @ApiOperation(value = "数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    public void importExcel(@RequestParam("file") MultipartFile file, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        operationConfigFacade.importExcel(file, hospitalIdVO);
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        operationConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+}

+ 156 - 0
cdssman-service/src/main/java/com/diagbot/web/PacsConfigController.java

@@ -0,0 +1,156 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.facade.PacsConfigFacade;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.PacsConfigListVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 检查公表映射 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@RestController
+@RequestMapping("/tran/pacsConfig")
+@Api(value = "辅检公表映射API", tags = { "辅检公表映射API" })
+@SuppressWarnings("unchecked")
+public class PacsConfigController {
+
+    @Autowired
+    private PacsConfigFacade pacsConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param pacsConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid PacsConfig pacsConfig) {
+        Boolean data = pacsConfigFacade.isExistRecord(pacsConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param pacsConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid PacsConfig pacsConfig) {
+        Boolean data = pacsConfigFacade.saveOrUpdateRecord(pacsConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param pacsConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid PacsConfigListVO pacsConfigListVO) {
+        Boolean data = pacsConfigFacade.saveOrUpdateRecords(pacsConfigListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 删除映射关系
+     *
+     * @param idVO
+     * @return
+     */
+    @ApiOperation(value = "删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO) {
+        Boolean data = pacsConfigFacade.deleteRecord(idVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量删除映射关系
+     *
+     * @param idListVO
+     * @return
+     */
+    @ApiOperation(value = "批量删除映射关系[by:zhaops]", notes = "")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO) {
+        Boolean data = pacsConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<PacsConfig> getPage(@RequestBody @Valid PacsConfigPageVO pacsConfigPageVO) {
+        IPage<PacsConfig> data = pacsConfigFacade.getPage(pacsConfigPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     * @return
+     */
+    @ApiOperation(value = "数据导入[by:zhaops]",
+            notes = "")
+    @PostMapping("/importExcel")
+    @SysLogger("importExcel")
+    public void importExcel(@RequestParam("file") MultipartFile file, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        pacsConfigFacade.importExcel(file, hospitalIdVO);
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    @ApiOperation(value = "数据导出[by:zhaops]",
+            notes = "")
+    @PostMapping("/exportExcel")
+    @SysLogger("exportExcel")
+    public void exportExcel(HttpServletResponse response, @RequestBody @Valid HospitalIdVO hospitalIdVO) {
+        pacsConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+}

+ 38 - 0
cdssman-service/src/main/resources/mapper/DiseaseConfigMapper.xml

@@ -0,0 +1,38 @@
+<?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.DiseaseConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.DiseaseConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="icd_code" property="icdCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.PacsConfig">
+        select a.*
+        from tran_disease_config a
+        where a.is_deleted='N'
+        <if test="diseaseConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{diseaseConfigPageVO.hospitalId}
+        </if>
+        <if test="diseaseConfigPageVO.hisName!=null and diseaseConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{diseaseConfigPageVO.hisName},"%")
+        </if>
+        <if test="diseaseConfigPageVO.uniqueName!=null and diseaseConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{diseaseConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="diseaseConfigPageVO.icdCode!=null and diseaseConfigPageVO.icdCode!=''">
+            and a.icd_code like concat("%",#{diseaseConfigPageVO.icdCode},"%")
+        </if>
+    </select>
+
+</mapper>

+ 38 - 0
cdssman-service/src/main/resources/mapper/DrugConfigMapper.xml

@@ -0,0 +1,38 @@
+<?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.DrugConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.DrugConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.PacsConfig">
+        select a.*
+        from tran_drug_config a
+        where a.is_deleted='N'
+        <if test="drugConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{drugConfigPageVO.hospitalId}
+        </if>
+        <if test="drugConfigPageVO.hisName!=null and drugConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{drugConfigPageVO.hisName},"%")
+        </if>
+        <if test="drugConfigPageVO.uniqueName!=null and drugConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{drugConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="drugConfigPageVO.uniqueCode!=null and drugConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{drugConfigPageVO.uniqueCode},"%")
+        </if>
+    </select>
+
+</mapper>

+ 41 - 0
cdssman-service/src/main/resources/mapper/LisConfigMapper.xml

@@ -0,0 +1,41 @@
+<?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.LisConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.LisConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="his_detail_name" property="hisDetailName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.LisConfig">
+        select a.*
+        from tran_lis_config a
+        where a.is_deleted='N'
+        <if test="lisConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{lisConfigPageVO.hospitalId}
+        </if>
+        <if test="lisConfigPageVO.hisName!=null and lisConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{lisConfigPageVO.hisName},"%")
+        </if>
+        <if test="lisConfigPageVO.hisDetailName!=null and lisConfigPageVO.hisDetailName!=''">
+            and a.his_detail_name like concat("%",#{lisConfigPageVO.hisDetailName},"%")
+        </if>
+        <if test="lisConfigPageVO.uniqueName!=null and lisConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{lisConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="lisConfigPageVO.uniqueCode!=null and lisConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{lisConfigPageVO.uniqueCode},"%")
+        </if>
+    </select>
+</mapper>

+ 37 - 0
cdssman-service/src/main/resources/mapper/OperationConfigMapper.xml

@@ -0,0 +1,37 @@
+<?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.OperationConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.OperationConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.PacsConfig">
+        select a.*
+        from tran_operation_config a
+        where a.is_deleted='N'
+        <if test="operationConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{operationConfigPageVO.hospitalId}
+        </if>
+        <if test="operationConfigPageVO.hisName!=null and operationConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{operationConfigPageVO.hisName},"%")
+        </if>
+        <if test="operationConfigPageVO.uniqueName!=null and operationConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{operationConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="operationConfigPageVO.uniqueCode!=null and operationConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{operationConfigPageVO.uniqueCode},"%")
+        </if>
+    </select>
+</mapper>

+ 37 - 0
cdssman-service/src/main/resources/mapper/PacsConfigMapper.xml

@@ -0,0 +1,37 @@
+<?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.PacsConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.PacsConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="his_name" property="hisName" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.PacsConfig">
+        select a.*
+        from tran_pacs_config a
+        where a.is_deleted='N'
+        <if test="pacsConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{pacsConfigPageVO.hospitalId}
+        </if>
+        <if test="pacsConfigPageVO.hisName!=null and pacsConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{pacsConfigPageVO.hisName},"%")
+        </if>
+        <if test="pacsConfigPageVO.uniqueName!=null and pacsConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{pacsConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="pacsConfigPageVO.uniqueCode!=null and pacsConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{pacsConfigPageVO.uniqueCode},"%")
+        </if>
+    </select>
+</mapper>

+ 8 - 0
common/pom.xml

@@ -100,6 +100,14 @@
             <scope>provided</scope>
         </dependency>
 
+        <!-- easypoi -->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+
         <dependency>
             <groupId>com.auth0</groupId>
             <artifactId>java-jwt</artifactId>

+ 178 - 0
common/src/main/java/com/diagbot/util/ExcelUtils.java

@@ -0,0 +1,178 @@
+package com.diagbot.util;
+
+
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+/**
+ * @Description: excel 导入导出工具类
+ * @author: gaodm
+ * @time: 2020/6/2 19:18
+ */
+public class ExcelUtils {
+    public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
+                                   boolean isCreateHeader, HttpServletResponse response) {
+        ExportParams exportParams = new ExportParams(title, sheetName);
+        exportParams.setCreateHeadRows(isCreateHeader);
+        defaultExport(list, pojoClass, fileName, response, exportParams);
+    }
+
+    public static void exportExcelDynamicCol(List<ExcelExportEntity> entityList, Collection<?> dataSet, String title, String sheetName, String fileName,
+                                    HttpServletResponse response) {
+        ExportParams exportParams = new ExportParams(title, sheetName);
+        dynamicColExport(entityList, dataSet, fileName, response, exportParams);
+    }
+
+    public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
+                                   HttpServletResponse response, float height) {
+        Boolean havTitle = false;
+        if (StringUtil.isNotBlank(title)) {
+            havTitle = true;
+        }
+        userExport2(list, pojoClass, fileName, response, new ExportParams(title, sheetName), height, havTitle);
+    }
+
+    public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
+                                   HttpServletResponse response) {
+        defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName));
+    }
+
+    public static void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) {
+        defaultExport(list, fileName, response);
+    }
+
+    private static void defaultExport(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response,
+                                      ExportParams exportParams) {
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
+        if (workbook != null) {
+            ;
+        }
+        downLoadExcel(fileName, response, workbook);
+    }
+
+    private static void dynamicColExport(List<ExcelExportEntity> entityList, Collection<?> dataSet, String fileName, HttpServletResponse response,
+                                         ExportParams exportParams) {
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams,entityList,dataSet);
+        if (workbook != null) {
+            ;
+        }
+        downLoadExcel(fileName, response, workbook);
+    }
+
+    private static void userExport(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response,
+                                   ExportParams exportParams) {
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
+        if (workbook != null) {
+            Sheet sheet = workbook.getSheetAt(0);
+            //列宽设置
+            sheet.setColumnWidth(8, 256 * 20);
+            sheet.setColumnWidth(9, 256 * 50);
+            int rowNum = sheet.getLastRowNum();
+            Row row = sheet.getRow(0);
+            for (int i = 1; i <= rowNum; i++) {
+                row = sheet.getRow(i);
+                row.setHeightInPoints(12.8f);
+            }
+        }
+        downLoadExcel(fileName, response, workbook);
+    }
+
+    private static void userExport2(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response,
+                                    ExportParams exportParams, float height, Boolean havTitle) {
+        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
+        if (workbook != null) {
+            Sheet sheet = workbook.getSheetAt(0);
+            int rowNum = sheet.getLastRowNum();
+            Row row = sheet.getRow(0);
+            int startRowNum = 1;
+            if (havTitle) {
+                startRowNum = 2;
+            }
+            for (int i = startRowNum; i <= rowNum; i++) {
+                row = sheet.getRow(i);
+                row.setHeightInPoints(height);
+            }
+        }
+        downLoadExcel(fileName, response, workbook);
+    }
+
+    private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) {
+        try {
+            response.setCharacterEncoding("UTF-8");
+            response.setHeader("content-Type", "application/vnd.ms-excel");
+            response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
+            workbook.write(response.getOutputStream());
+        } catch (IOException e) {
+            // throw new NormalException(e.getMessage());
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "导出Excel异常");
+        }
+    }
+
+    private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) {
+        Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF);
+        if (workbook != null) {
+            ;
+        }
+        downLoadExcel(fileName, response, workbook);
+    }
+
+    public static <T> List<T> importExcel(String filePath, Integer titleRows, Integer headerRows, Class<T> pojoClass) {
+        if (StringUtils.isBlank(filePath)) {
+            return null;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(titleRows);
+        params.setHeadRows(headerRows);
+        List<T> list = null;
+        try {
+            list = ExcelImportUtil.importExcel(new File(filePath), pojoClass, params);
+        } catch (NoSuchElementException e) {
+            // throw new NormalException("模板不能为空");
+        } catch (Exception e) {
+            e.printStackTrace();
+            // throw new NormalException(e.getMessage());
+        }
+        return list;
+    }
+
+    public static <T> List<T> importExcel(MultipartFile file, Integer titleRows, Integer headerRows,
+                                          Class<T> pojoClass) {
+        if (file == null) {
+            return null;
+        }
+        ImportParams params = new ImportParams();
+        params.setTitleRows(titleRows);
+        params.setHeadRows(headerRows);
+        List<T> list = null;
+        try {
+            list = ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, params);
+        } catch (NoSuchElementException e) {
+            // throw new NormalException("excel文件不能为空");
+        } catch (Exception e) {
+            // throw new NormalException(e.getMessage());
+            System.out.println(e.getMessage());
+        }
+        return list;
+    }
+
+}

+ 8 - 0
pom.xml

@@ -62,6 +62,7 @@
         <poi.version>4.1.1</poi.version>
         <aggregator.version>1.1.0</aggregator.version>
         <okhttp.version>4.2.2</okhttp.version>
+        <easypoi.version>4.2.0</easypoi.version>
         <docker-maven-plugin.version>1.2.1</docker-maven-plugin.version>
         <docker.image.prefix>192.168.2.236:5000/diagbotcloud</docker.image.prefix>
         <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
@@ -173,6 +174,13 @@
                 <version>${poi.version}</version>
             </dependency>
 
+            <!-- easypoi -->
+            <dependency>
+                <groupId>cn.afterturn</groupId>
+                <artifactId>easypoi-spring-boot-starter</artifactId>
+                <version>${easypoi.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>io.github.lvyahui8</groupId>
                 <artifactId>spring-boot-data-aggregator-starter</artifactId>