Просмотр исходного кода

Merge remote-tracking branch 'origin/dev/cdssman20200727_init' into debug

zhaops 4 лет назад
Родитель
Сommit
26a21238f5
82 измененных файлов с 3651 добавлено и 74 удалено
  1. 39 0
      cdssman-service/src/main/java/com/diagbot/client/CdssCoreClient.java
  2. 46 0
      cdssman-service/src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java
  3. 43 0
      cdssman-service/src/main/java/com/diagbot/dto/ConceptDetailDTO.java
  4. 57 0
      cdssman-service/src/main/java/com/diagbot/dto/ConceptInfoDTO.java
  5. 48 0
      cdssman-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java
  6. 4 0
      cdssman-service/src/main/java/com/diagbot/dto/PlanDetailDTO.java
  7. 35 0
      cdssman-service/src/main/java/com/diagbot/dto/PlanInfoDefaultDTO.java
  8. 1 1
      cdssman-service/src/main/java/com/diagbot/dto/PlanInfoPagesDTO.java
  9. 45 0
      cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java
  10. 43 0
      cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeDetailDTO.java
  11. 46 0
      cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java
  12. 39 0
      cdssman-service/src/main/java/com/diagbot/dto/UserRoleInfoFindDTO.java
  13. 186 0
      cdssman-service/src/main/java/com/diagbot/entity/ConceptDetail.java
  14. 169 0
      cdssman-service/src/main/java/com/diagbot/entity/ConceptInfo.java
  15. 178 0
      cdssman-service/src/main/java/com/diagbot/entity/DeptConfig.java
  16. 88 0
      cdssman-service/src/main/java/com/diagbot/entity/DictionaryInfo.java
  17. 7 7
      cdssman-service/src/main/java/com/diagbot/entity/HospitalInfo.java
  18. 10 0
      cdssman-service/src/main/java/com/diagbot/entity/PlanDetail.java
  19. 54 0
      cdssman-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java
  20. 13 0
      cdssman-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java
  21. 366 0
      cdssman-service/src/main/java/com/diagbot/facade/ConceptInfoFacade.java
  22. 275 0
      cdssman-service/src/main/java/com/diagbot/facade/DeptConfigFacade.java
  23. 34 0
      cdssman-service/src/main/java/com/diagbot/facade/DictionaryFacade.java
  24. 125 0
      cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java
  25. 64 28
      cdssman-service/src/main/java/com/diagbot/facade/PlanDetailFacade.java
  26. 96 5
      cdssman-service/src/main/java/com/diagbot/facade/PlanFacade.java
  27. 8 0
      cdssman-service/src/main/java/com/diagbot/facade/TokenPermissionFacade.java
  28. 35 0
      cdssman-service/src/main/java/com/diagbot/facade/UserRoleFacade.java
  29. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/ConceptDetailMapper.java
  30. 26 0
      cdssman-service/src/main/java/com/diagbot/mapper/ConceptInfoMapper.java
  31. 35 0
      cdssman-service/src/main/java/com/diagbot/mapper/DeptConfigMapper.java
  32. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java
  33. 12 2
      cdssman-service/src/main/java/com/diagbot/mapper/HospitalInfoMapper.java
  34. 5 0
      cdssman-service/src/main/java/com/diagbot/mapper/UserRoleMapper.java
  35. 16 0
      cdssman-service/src/main/java/com/diagbot/service/ConceptDetailService.java
  36. 26 0
      cdssman-service/src/main/java/com/diagbot/service/ConceptInfoService.java
  37. 35 0
      cdssman-service/src/main/java/com/diagbot/service/DeptConfigService.java
  38. 16 0
      cdssman-service/src/main/java/com/diagbot/service/DictionaryInfoService.java
  39. 11 1
      cdssman-service/src/main/java/com/diagbot/service/HospitalInfoService.java
  40. 5 0
      cdssman-service/src/main/java/com/diagbot/service/UserRoleService.java
  41. 20 0
      cdssman-service/src/main/java/com/diagbot/service/impl/ConceptDetailServiceImpl.java
  42. 33 0
      cdssman-service/src/main/java/com/diagbot/service/impl/ConceptInfoServiceImpl.java
  43. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DeptConfigServiceImpl.java
  44. 20 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DictionaryInfoServiceImpl.java
  45. 15 3
      cdssman-service/src/main/java/com/diagbot/service/impl/HospitalInfoServiceImpl.java
  46. 8 0
      cdssman-service/src/main/java/com/diagbot/service/impl/UserRoleServiceImpl.java
  47. 16 0
      cdssman-service/src/main/java/com/diagbot/vo/ChangeStatusVO.java
  48. 47 0
      cdssman-service/src/main/java/com/diagbot/vo/ConceptDetailVO.java
  49. 33 0
      cdssman-service/src/main/java/com/diagbot/vo/ConceptInfoPageVO.java
  50. 45 0
      cdssman-service/src/main/java/com/diagbot/vo/ConceptInfoVO.java
  51. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/DeptConfigListVO.java
  52. 40 0
      cdssman-service/src/main/java/com/diagbot/vo/DeptConfigPageVO.java
  53. 32 0
      cdssman-service/src/main/java/com/diagbot/vo/HasStaticKnowledgeVO.java
  54. 18 0
      cdssman-service/src/main/java/com/diagbot/vo/HospitalInfoListVO.java
  55. 44 0
      cdssman-service/src/main/java/com/diagbot/vo/HospitalInfoPageVO.java
  56. 4 0
      cdssman-service/src/main/java/com/diagbot/vo/HospitalPlanDetailSaveVO.java
  57. 3 1
      cdssman-service/src/main/java/com/diagbot/vo/HospitalSetVO.java
  58. 1 1
      cdssman-service/src/main/java/com/diagbot/vo/PlanDetailSaveVO.java
  59. 53 0
      cdssman-service/src/main/java/com/diagbot/vo/PlanDetailSubSaveVO.java
  60. 28 0
      cdssman-service/src/main/java/com/diagbot/vo/StaticKnowledgeHISVO.java
  61. 26 0
      cdssman-service/src/main/java/com/diagbot/vo/StaticKnowledgeIndexVO.java
  62. 30 0
      cdssman-service/src/main/java/com/diagbot/vo/StaticKnowledgeVO.java
  63. 22 0
      cdssman-service/src/main/java/com/diagbot/vo/UserRoleInfoCancelVO.java
  64. 15 0
      cdssman-service/src/main/java/com/diagbot/vo/UserRoleInfoFindVO.java
  65. 22 0
      cdssman-service/src/main/java/com/diagbot/web/ConceptDetailController.java
  66. 109 0
      cdssman-service/src/main/java/com/diagbot/web/ConceptInfoController.java
  67. 171 0
      cdssman-service/src/main/java/com/diagbot/web/DeptConfigController.java
  68. 80 1
      cdssman-service/src/main/java/com/diagbot/web/HospitalInfoController.java
  69. 21 3
      cdssman-service/src/main/java/com/diagbot/web/PlanController.java
  70. 24 0
      cdssman-service/src/main/java/com/diagbot/web/UserRoleController.java
  71. 21 0
      cdssman-service/src/main/resources/mapper/ConceptDetailMapper.xml
  72. 63 0
      cdssman-service/src/main/resources/mapper/ConceptInfoMapper.xml
  73. 58 0
      cdssman-service/src/main/resources/mapper/DeptConfigMapper.xml
  74. 24 0
      cdssman-service/src/main/resources/mapper/HospitalInfoMapper.xml
  75. 1 0
      cdssman-service/src/main/resources/mapper/PlanDetailMapper.xml
  76. 1 0
      cdssman-service/src/main/resources/mapper/PlanMapper.xml
  77. 16 11
      cdssman-service/src/main/resources/mapper/TokenPermissionMapper.xml
  78. 35 10
      cdssman-service/src/main/resources/mapper/UserRoleMapper.xml
  79. 4 0
      config-server/src/main/resources/shared/cdssman-service-dev.yml
  80. 4 0
      config-server/src/main/resources/shared/cdssman-service-local.yml
  81. 5 0
      config-server/src/main/resources/shared/cdssman-service-pre.yml
  82. 5 0
      config-server/src/main/resources/shared/cdssman-service-pro.yml

+ 39 - 0
cdssman-service/src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -0,0 +1,39 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.CdssCoreHystrix;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.vo.HasStaticKnowledgeVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 10:59
+ */
+@FeignClient(name = "cdss-core", url = "${cdss-core.url}", fallback = CdssCoreHystrix.class)
+public interface CdssCoreClient {
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @PostMapping("/retrieval/staticKnowledgeIndex")
+    RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO);
+
+    /**
+     * 更新是否有静态知识状态
+     *
+     * @param hasStaticKnowledgeVO
+     * @return
+     */
+    @PostMapping("/staticKnowledge/updateHasInfoStatus")
+    RespDTO<Boolean> updateHasInfoStatus(@Valid @RequestBody HasStaticKnowledgeVO hasStaticKnowledgeVO);
+}

+ 46 - 0
cdssman-service/src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -0,0 +1,46 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.vo.HasStaticKnowledgeVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 10:59
+ */
+@Component
+@Slf4j
+public class CdssCoreHystrix implements CdssCoreClient {
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        log.error("【hystrix】调用{}异常", "staticKnowledgeIndex");
+        return null;
+    }
+
+    /**
+     * 更新是否有静态知识状态
+     *
+     * @param hasStaticKnowledgeVO
+     * @return
+     */
+    @Override
+    public RespDTO<Boolean> updateHasInfoStatus(@Valid @RequestBody HasStaticKnowledgeVO hasStaticKnowledgeVO) {
+        log.error("【hystrix】调用{}异常", "updateHasInfoStatus");
+        return null;
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/dto/ConceptDetailDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/21 10:28
+ */
+@Getter
+@Setter
+public class ConceptDetailDTO {
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String contentType;
+}

+ 57 - 0
cdssman-service/src/main/java/com/diagbot/dto/ConceptInfoDTO.java

@@ -0,0 +1,57 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/21 10:33
+ */
+@Getter
+@Setter
+public class ConceptInfoDTO {
+    /**
+     * 术语id
+     */
+    private Long id;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 术语类型(词性)
+     */
+    private String type;
+    /**
+     * 术语类型(词性)
+     */
+    private String typeName;
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+    /**
+     * 修改时间
+     */
+    private Date gmtModified;
+    /**
+     * 修改人
+     */
+    private String modifier;
+    /**
+     * 启用状态
+     */
+    private String isDeleted;
+    /**
+     * 明细
+     */
+    List<ConceptDetailDTO> details;
+}

+ 48 - 0
cdssman-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java

@@ -0,0 +1,48 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * icss字典表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@Getter
+@Setter
+public class DictionaryInfoDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 分组(值自定义)
+     */
+    private Long groupType;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 值
+     */
+    private String val;
+
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 4 - 0
cdssman-service/src/main/java/com/diagbot/dto/PlanDetailDTO.java

@@ -3,6 +3,8 @@ package com.diagbot.dto;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * @author wangfeng
  * @Description:
@@ -22,6 +24,7 @@ public class PlanDetailDTO {
      * 方案编号
      */
     private Long planId;
+    private Long parentId;
 
     /**
      * 配置名称
@@ -55,4 +58,5 @@ public class PlanDetailDTO {
      */
     private String remark;
 
+    private List<PlanDetailDTO> planDetails;
 }

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/dto/PlanInfoDefaultDTO.java

@@ -0,0 +1,35 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-14 14:29
+ */
+@Setter
+@Getter
+public class PlanInfoDefaultDTO {
+
+    private Long id;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+    /**
+     * 方案编号
+     */
+    private String planName;
+
+    private String planCode;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<PlanDetailDTO> planDetailDefault;
+}
+

+ 1 - 1
cdssman-service/src/main/java/com/diagbot/dto/PlanInfoPagesDTO.java

@@ -30,5 +30,5 @@ public class PlanInfoPagesDTO {
      */
     private String remark;
 
-    private List<PlanDetailDTO> planDetails;
+    private List<PlanDetailDTO> sysSetInfo;
 }

+ 45 - 0
cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java

@@ -0,0 +1,45 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 15:51
+ */
+@Getter
+@Setter
+public class StaticKnowledgeDTO {
+    /**
+     * 标准术语id
+     */
+    private Long id;
+    /**
+     * 标准术语
+     */
+    private String name;
+
+    /**
+     * 词性
+     */
+    private String type;
+
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    /**
+     * 静态知识明细
+     */
+    private Map<String, List<StaticKnowledgeDetailDTO>> details;
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeDetailDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 15:52
+ */
+@Getter
+@Setter
+public class StaticKnowledgeDetailDTO {
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String contentType;
+}

+ 46 - 0
cdssman-service/src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java

@@ -0,0 +1,46 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 15:59
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexDTO {
+    /**
+     * 术语id
+     */
+    private Long id;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 词性
+     */
+    private Integer type;
+    /**
+     * 词性
+     */
+    private String typeName;
+    /**
+     * 同义词
+     */
+    private String retrievalName;
+    /**
+     * 是否有静态知识
+     */
+    private Integer hasInfomation = 0;
+    /**
+     * 是否有临床路径
+     */
+    private Integer hasClinicalPathway = 0;
+    /**
+     * 是否有注意事项
+     */
+    private Integer hasNotice = 0;
+}

+ 39 - 0
cdssman-service/src/main/java/com/diagbot/dto/UserRoleInfoFindDTO.java

@@ -0,0 +1,39 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-11 18:43
+ */
+@Setter
+@Getter
+public class UserRoleInfoFindDTO {
+
+    private Long id;
+    /**
+     * 用户名
+     */
+    private Long usernId;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+
+    /**
+     * 联系人
+     */
+    private String linkman;
+
+    /**
+     * 是否启用(0:停用,1:启用)
+     */
+    private Integer status ;
+
+    private Long hospitalId;
+
+}

+ 186 - 0
cdssman-service/src/main/java/com/diagbot/entity/ConceptDetail.java

@@ -0,0 +1,186 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 静态知识内容表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@TableName("graph_concept_detail")
+public class ConceptDetail 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
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String contentType;
+
+    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 getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    @Override
+    public String toString() {
+        return "ConceptDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", conceptId=" + conceptId +
+            ", title=" + title +
+            ", content=" + content +
+            ", text=" + text +
+            ", orderNo=" + orderNo +
+            ", contentType=" + contentType +
+        "}";
+    }
+}

+ 169 - 0
cdssman-service/src/main/java/com/diagbot/entity/ConceptInfo.java

@@ -0,0 +1,169 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 静态知识标准术语表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@TableName("graph_concept_info")
+public class ConceptInfo 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;
+
+    /**
+     * 标准术语
+     */
+    private String name;
+
+    /**
+     * 词性
+     */
+    private String type;
+
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    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 String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getClinicalPathwayName() {
+        return clinicalPathwayName;
+    }
+
+    public void setClinicalPathwayName(String clinicalPathwayName) {
+        this.clinicalPathwayName = clinicalPathwayName;
+    }
+
+    public String getNoticeName() {
+        return noticeName;
+    }
+
+    public void setNoticeName(String noticeName) {
+        this.noticeName = noticeName;
+    }
+
+    @Override
+    public String toString() {
+        return "ConceptInfo{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", name=" + name +
+                ", type=" + type +
+                ", clinicalPathwayName=" + clinicalPathwayName +
+                ", noticeName=" + noticeName +
+                "}";
+    }
+}

+ 178 - 0
cdssman-service/src/main/java/com/diagbot/entity/DeptConfig.java

@@ -0,0 +1,178 @@
+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 java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 科室映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-12
+ */
+@TableName("tran_dept_config")
+public class DeptConfig 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
+     */
+    private Long hospitalId;
+
+    /**
+     * 医院项目名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 医院项目编码
+     */
+    @Excel(name = "HIS编码", width = 40)
+    private String hisCode;
+
+    /**
+     * 标准名称
+     */
+    @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 getHisCode() {
+        return hisCode;
+    }
+
+    public void setHisCode(String hisCode) {
+        this.hisCode = hisCode;
+    }
+    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 "DeptConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", hisCode=" + hisCode +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 88 - 0
cdssman-service/src/main/java/com/diagbot/entity/DictionaryInfo.java

@@ -0,0 +1,88 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * CDSS字典表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@TableName("sys_dictionary_info")
+@Getter
+@Setter
+public class DictionaryInfo 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;
+
+    /**
+     * 分组(值自定义)
+     */
+    private Long groupType;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 值
+     */
+    private String val;
+
+    /**
+     * 返回类型(0: 都返回,1:后台维护返回 2:icss界面返回)
+     */
+    private Integer returnType;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 7 - 7
cdssman-service/src/main/java/com/diagbot/entity/HospitalInfo.java

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -34,12 +34,12 @@ public class HospitalInfo implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -107,19 +107,19 @@ public class HospitalInfo implements Serializable {
         this.isDeleted = isDeleted;
     }
 
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
 
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
 

+ 10 - 0
cdssman-service/src/main/java/com/diagbot/entity/PlanDetail.java

@@ -61,6 +61,8 @@ public class PlanDetail implements Serializable {
      */
     private Long planId;
 
+    private Long parentId;
+
     /**
      * 配置名称
      */
@@ -90,6 +92,14 @@ public class PlanDetail implements Serializable {
 
     private String remark;
 
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
     public Long getId() {
         return id;
     }

+ 54 - 0
cdssman-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -0,0 +1,54 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 16:30
+ */
+public enum ConceptTypeEnum implements KeyedNamed {
+    All(0, "全部"),
+    Disease(1, "诊断"),
+    Drug(2, "药品"),
+    Lis(3, "检验套餐"),
+    LisPack(4, "检验明细"),
+    Pacs(5, "检查"),
+    Opeartion(6, "手术和操作");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    ConceptTypeEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ConceptTypeEnum getEnum(int key) {
+        for (ConceptTypeEnum item : ConceptTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        ConceptTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.ConceptDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/19 14:19
+ */
+@Component
+public class ConceptDetailFacade extends ConceptDetailServiceImpl {
+}

+ 366 - 0
cdssman-service/src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -0,0 +1,366 @@
+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.client.CdssCoreClient;
+import com.diagbot.dto.ConceptDetailDTO;
+import com.diagbot.dto.ConceptInfoDTO;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.ConceptDetailService;
+import com.diagbot.service.impl.ConceptInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.ChangeStatusVO;
+import com.diagbot.vo.ConceptInfoPageVO;
+import com.diagbot.vo.ConceptInfoVO;
+import com.diagbot.vo.HasStaticKnowledgeVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+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/8/19 14:17
+ */
+@Component
+public class ConceptInfoFacade extends ConceptInfoServiceImpl {
+    @Autowired
+    private CdssCoreClient cdssCoreClient;
+    @Autowired
+    private DictionaryFacade dictionaryFacade;
+    @Autowired
+    private ConceptDetailFacade conceptDetailFacade;
+    @Autowired
+    @Qualifier("conceptDetailServiceImpl")
+    private ConceptDetailService conceptDetailService;
+
+    /**
+     * 返回不带静态知识的检索结果
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndexWithoutInfo(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = staticKnowledgeIndex(staticKnowledgeIndexVO);
+        //过滤没有静态知识的检索结果
+        staticKnowledgeIndexDTOList = staticKnowledgeIndexDTOList
+                .stream()
+                .filter(i -> i.getHasInfomation().equals(0)
+                        && i.getHasNotice().equals(0)
+                        && i.getHasClinicalPathway().equals(0))
+                .collect(Collectors.toList());
+        return staticKnowledgeIndexDTOList;
+    }
+
+    /**
+     * 医学知识(静态信息)检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
+        //静态知识检索顺序
+        List<DictionaryInfoDTO> dicStaticIndexList = dictionaryFacade.getListByGroupType(7);
+        //页面术语类型和图谱映射
+        List<DictionaryInfoDTO> dicTypeMappingList = dictionaryFacade.getListByGroupType(8);
+
+        List<StaticKnowledgeIndexDTO> staticKnowledgeIndexDTOList = Lists.newLinkedList();
+        RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        RespDTOUtil.respNGDealCover(respDTO, "检索失败");
+        staticKnowledgeIndexDTOList = respDTO.data;
+        if (ListUtil.isNotEmpty(staticKnowledgeIndexDTOList)) {
+            //typeName转换
+            staticKnowledgeIndexDTOList.forEach(item -> {
+                item.setTypeName(convertTypeName(item.getTypeName(), 2, dicTypeMappingList));
+            });
+            //是否有静态知识
+            List<String> conNameList = staticKnowledgeIndexDTOList
+                    .stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+            conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("name", conNameList);
+            List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
+            if (ListUtil.isNotEmpty(conceptInfoList)) {
+                //typeName转换
+                conceptInfoList.forEach(item -> {
+                    item.setType(convertTypeName(item.getType(), 2, dicTypeMappingList));
+                });
+                Map<String, ConceptInfo> infoMap
+                        = EntityUtil.makeEntityMapByKeys(conceptInfoList, "_", "name", "type");
+                for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                    if (infoMap.containsKey(item.getName() + "_" + item.getTypeName())) {
+                        item.setId(infoMap.get(item.getName() + "_" + item.getTypeName()).getId());
+                    }
+                }
+                List<Long> conceptIdList = conceptInfoList.stream()
+                        .map(i -> i.getId())
+                        .collect(Collectors.toList());
+                if (ListUtil.isNotEmpty(conceptIdList)) {
+                    QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+                    conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                            .in("concept_id", conceptIdList);
+                    List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
+                    Map<Long, List<ConceptDetail>> detailMap
+                            = EntityUtil.makeEntityListMap(conceptDetailList, "conceptId");
+                    for (StaticKnowledgeIndexDTO item : staticKnowledgeIndexDTOList) {
+                        if (item.getId() == null
+                                || !detailMap.containsKey(item.getId())) {
+                            item.setHasInfomation(0);
+                            item.setHasClinicalPathway(0);
+                            item.setHasNotice((0));
+                            continue;
+                        }
+                        for (ConceptDetail detail : detailMap.get(item.getId())) {
+                            List<String> contentTypeList = Arrays.asList(detail.getContentType().split(","));
+                            if (contentTypeList.contains("1")) {
+                                item.setHasInfomation(1);
+                            }
+                            if (contentTypeList.contains("2")) {
+                                item.setHasNotice(1);
+                            }
+                            if (contentTypeList.contains("3")) {
+                                item.setHasClinicalPathway(1);
+                            }
+                        }
+                    }
+                }
+            }
+
+            //排序
+            Map<String, List<StaticKnowledgeIndexDTO>> map
+                    = EntityUtil.makeEntityListMap(staticKnowledgeIndexDTOList, "typeName");
+            for (DictionaryInfoDTO dic : dicStaticIndexList) {
+                if (dic.getName().equals("检验")) {
+                    if (map.containsKey("检验套餐")) {
+                        retList.addAll(map.get("检验套餐"));
+                    }
+                    if (map.containsKey("检验明细")) {
+                        retList.addAll(map.get("检验明细"));
+                    }
+                } else if (map.containsKey(dic.getName())) {
+                    retList.addAll(map.get(dic.getName()));
+                }
+            }
+        }
+        return retList;
+    }
+
+    /**
+     * 页面术语类型和图谱标签名称相互转换
+     *
+     * @param typeName
+     * @param flag     1-页面术语类型转图谱标签名称,2- 图谱标签名称转页面术语类型
+     * @param dicList
+     * @return
+     */
+    public String convertTypeName(String typeName, Integer flag, List<DictionaryInfoDTO> dicList) {
+        if (ListUtil.isNotEmpty(dicList)) {
+            Map<String, String> nameValMap = new HashMap<>();
+            if (flag.equals(1)) {
+                nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "name", "val");
+            } else if (flag.equals(2)) {
+                nameValMap = EntityUtil.makeMapWithKeyValue(dicList, "val", "name");
+            }
+            if (nameValMap.containsKey(typeName)) {
+                return nameValMap.get(typeName);
+            }
+        }
+        return typeName;
+    }
+
+    /**
+     * 列表
+     *
+     * @param conceptInfoPageVO
+     * @return
+     */
+    public IPage<ConceptInfoDTO> getPage(ConceptInfoPageVO conceptInfoPageVO) {
+        List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
+        if (StringUtil.isNotBlank(conceptInfoPageVO.getType())) {
+            String typeName
+                    = convertTypeName(ConceptTypeEnum.getName(Integer.valueOf(conceptInfoPageVO.getType())), 1, dicList);
+            conceptInfoPageVO.setTypeName(typeName);
+        }
+        IPage<ConceptInfoDTO> page = super.getPage(conceptInfoPageVO);
+        List<ConceptInfoDTO> records = page.getRecords();
+        if (ListUtil.isNotEmpty(records)) {
+            records.forEach(record -> {
+                record.setTypeName(convertTypeName(record.getTypeName(), 2, dicList));
+            });
+        }
+        page.setRecords(records);
+        return page;
+    }
+
+    /**
+     * 保存记录(新增or修改)
+     *
+     * @param conceptInfoVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(ConceptInfoVO conceptInfoVO) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
+        //术语类型转换
+        String typeName = convertTypeName(ConceptTypeEnum.getName(Integer.valueOf(conceptInfoVO.getType())), 1, dicList);
+        conceptInfoVO.setTypeName(typeName);
+        if (conceptInfoVO.getId() == null) {
+            QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+            conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("name", conceptInfoVO.getName())
+                    .eq("type", typeName);
+            ConceptInfo conceptInfo = this.getOne(conceptInfoQueryWrapper, false);
+            //术语不存在,保存术语信息
+            if (conceptInfo == null) {
+                conceptInfo = new ConceptInfo();
+                BeanUtil.copyProperties(conceptInfoVO, conceptInfo);
+                conceptInfo.setType(typeName);
+                conceptInfo.setCreator(userId);
+                conceptInfo.setGmtCreate(now);
+                conceptInfo.setModifier(userId);
+                conceptInfo.setGmtModified(now);
+                this.save(conceptInfo);
+            }
+            conceptInfoVO.setId(conceptInfo.getId());
+        }
+
+        //是否包含静态信息,包含启用和禁用
+        QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+        conceptDetailQueryWrapper.eq("concept_id", conceptInfoVO.getId());
+        List<ConceptDetail> oldDetails = conceptDetailFacade.list(conceptDetailQueryWrapper);
+        if (ListUtil.isEmpty(oldDetails)
+                && ListUtil.isNotEmpty(conceptInfoVO.getDetails())) {
+            //TODO 更新图谱是否有静态信息
+            HasStaticKnowledgeVO hasStaticKnowledgeVO = new HasStaticKnowledgeVO();
+            hasStaticKnowledgeVO.setName(conceptInfoVO.getName());
+            hasStaticKnowledgeVO.setType(typeName);
+            hasStaticKnowledgeVO.setHasInfo(1);
+            RespDTO<Boolean> respDTO = cdssCoreClient.updateHasInfoStatus(hasStaticKnowledgeVO);
+            //更新失败
+            if (RespDTOUtil.respIsNG(respDTO)) {
+
+            }
+        }
+
+        //删除已有静态信息
+        conceptDetailFacade.remove(conceptDetailQueryWrapper);
+        //插入新的静态信息
+        List<ConceptDetail> conceptDetailList = Lists.newLinkedList();
+        if (ListUtil.isNotEmpty(conceptInfoVO.getDetails())) {
+            conceptInfoVO.getDetails().forEach(detail -> {
+                ConceptDetail conceptDetail = new ConceptDetail();
+                BeanUtil.copyProperties(detail, conceptDetail);
+                conceptDetail.setConceptId(conceptInfoVO.getId());
+                conceptDetail.setCreator(userId);
+                conceptDetail.setGmtCreate(now);
+                conceptDetail.setModifier(userId);
+                conceptDetail.setGmtModified(now);
+                conceptDetailList.add(conceptDetail);
+            });
+            conceptDetailService.saveBatch(conceptDetailList);
+        }
+        return true;
+    }
+
+    /**
+     * 启用禁用
+     *
+     * @param changeStatusVO
+     * @return
+     */
+    public Boolean changeStatus(ChangeStatusVO changeStatusVO) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        UpdateWrapper<ConceptDetail> conceptDetailUpdateWrapper = new UpdateWrapper<>();
+        conceptDetailUpdateWrapper.eq("concept_id", changeStatusVO.getId())
+                .set("gmt_modified", now)
+                .set("modifier", userId)
+                .set("is_deleted", changeStatusVO.getIsDeleted());
+        conceptDetailService.update(conceptDetailUpdateWrapper);
+        return true;
+    }
+
+    /**
+     * 是否已存在
+     *
+     * @param conceptInfoVO
+     * @return
+     */
+    public Boolean isExist(ConceptInfoVO conceptInfoVO) {
+        List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
+        //术语类型转换
+        String typeName = convertTypeName(ConceptTypeEnum.getName(Integer.valueOf(conceptInfoVO.getType())), 1, dicList);
+        conceptInfoVO.setTypeName(typeName);
+        QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
+        conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("name", conceptInfoVO.getName())
+                .eq("type", typeName);
+        ConceptInfo conceptInfo = this.getOne(conceptInfoQueryWrapper, false);
+        if (conceptInfo == null) {
+            return false;
+        }
+        QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+        conceptDetailQueryWrapper.eq("concept_id", conceptInfo.getId());
+        List<ConceptDetail> conceptDetailList = conceptDetailService.list(conceptDetailQueryWrapper);
+        if (ListUtil.isEmpty(conceptDetailList)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 根据术语id获取静态信息
+     *
+     * @param idVO
+     * @return
+     */
+    public ConceptInfoDTO getRecordById(IdVO idVO) {
+        ConceptInfoDTO conceptInfoDTO = new ConceptInfoDTO();
+        ConceptInfo conceptInfo = this.getById(idVO.getId());
+        if (conceptInfo == null) {
+            return null;
+        }
+        BeanUtil.copyProperties(conceptInfo, conceptInfoDTO);
+        QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
+        conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("concept_id", idVO.getId())
+                .orderByAsc("order_no");
+        List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(conceptDetailQueryWrapper);
+        if (ListUtil.isNotEmpty(conceptDetailList)) {
+            List<ConceptDetailDTO> details = BeanUtil.listCopyTo(conceptDetailList, ConceptDetailDTO.class);
+            conceptInfoDTO.setDetails(details);
+            //启用状态、修改人、修改时间为明细的内容
+            conceptInfoDTO.setModifier(conceptDetailList.get(0).getModifier());
+            conceptInfoDTO.setGmtModified(conceptDetailList.get(0).getGmtModified());
+            conceptInfoDTO.setIsDeleted(conceptDetailList.get(0).getIsDeleted());
+        }
+        return conceptInfoDTO;
+    }
+}

+ 275 - 0
cdssman-service/src/main/java/com/diagbot/facade/DeptConfigFacade.java

@@ -0,0 +1,275 @@
+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.dto.HosRelationNumDTO;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.DeptConfigService;
+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.DeptConfigListVO;
+import com.diagbot.vo.DeptConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+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/8/12 14:25
+ */
+@Component
+public class DeptConfigFacade {
+    @Autowired
+    private DeptConfigService deptConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param deptConfig
+     * @return
+     */
+    public Boolean isExistRecord(DeptConfig deptConfig) {
+        QueryWrapper<DeptConfig> queryWrapper = new QueryWrapper<>();
+        DeptConfig oldRecord = new DeptConfig();
+        if (deptConfig.getId() != null) {
+            oldRecord = deptConfigService.getById(deptConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(deptConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", deptConfig.getHospitalId())
+                    .eq("his_name", deptConfig.getHisName())
+                    .eq("unique_name", deptConfig.getUniqueName());
+            oldRecord = deptConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param deptConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(DeptConfig deptConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        deptConfig.setModifier(userId);
+        deptConfig.setGmtModified(now);
+        //新增数据
+        if (deptConfig.getId() == null) {
+            deptConfig.setCreator(userId);
+            deptConfig.setGmtCreate(now);
+        }
+        if (deptConfig.getIsDeleted() == null) {
+            deptConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        deptConfigService.saveOrUpdate(deptConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param deptConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(DeptConfigListVO deptConfigListVO) {
+        if (ListUtil.isEmpty(deptConfigListVO.getDeptConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(deptConfigListVO.getDeptConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param deptConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<DeptConfig> deptConfigList) {
+        if (ListUtil.isEmpty(deptConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        deptConfigList = deptConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(deptConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = deptConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        deptConfigList.forEach(deptConfig -> {
+            deptConfig.setModifier(userId);
+            deptConfig.setGmtModified(now);
+            if (deptConfig.getId() == null) {
+                if (configMap.containsKey(deptConfig.getHisName())) {
+                    deleteIds.add(configMap.get(deptConfig.getHisName()).get(deptConfig.getUniqueName()));
+                }
+                deptConfig.setCreator(userId);
+                deptConfig.setGmtCreate(now);
+            }
+            if (deptConfig.getIsDeleted() == null) {
+                deptConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        deptConfigService.saveOrUpdateBatch(deptConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<DeptConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        deptConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<DeptConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        deptConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param deptConfigPageVO
+     * @return
+     */
+    public IPage<DeptConfig> getPage(DeptConfigPageVO deptConfigPageVO) {
+        return deptConfigService.getPage(deptConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<DeptConfig> deptConfigList = ExcelUtils.importExcel(file, 0, 1, DeptConfig.class);
+        if (ListUtil.isNotEmpty(deptConfigList)) {
+            deptConfigList.forEach(deptConfig -> {
+                deptConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(deptConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @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<DeptConfig> 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<DeptConfig> records = deptConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<DeptConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<DeptConfig>> 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<DeptConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<DeptConfig> records = deptConfigService.list(queryWrapper);
+        String fileName = "科室映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", DeptConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return deptConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 34 - 0
cdssman-service/src/main/java/com/diagbot/facade/DictionaryFacade.java

@@ -0,0 +1,34 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.DictionaryInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2018/11/23 11:37
+ */
+@Component
+public class DictionaryFacade extends DictionaryInfoServiceImpl {
+    /**
+     * 返回指定字典信息
+     *
+     * @param groupType
+     * @return
+     */
+    public List<DictionaryInfoDTO> getListByGroupType(Integer groupType) {
+        List<DictionaryInfo> list = this.list(new QueryWrapper<DictionaryInfo>()
+                .eq("group_type", groupType)
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByAsc("order_no"));
+        List<DictionaryInfoDTO> listRes = BeanUtil.listCopyTo(list, DictionaryInfoDTO.class);
+        return listRes;
+    }
+}

+ 125 - 0
cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -1,14 +1,29 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.HospitalInfoDTO;
+import com.diagbot.entity.DiseaseConfig;
 import com.diagbot.entity.HospitalInfo;
 import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.HospitalInfoService;
 import com.diagbot.service.impl.HospitalInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalInfoListVO;
+import com.diagbot.vo.HospitalInfoPageVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,6 +33,9 @@ import java.util.List;
  */
 @Component
 public class HospitalInfoFacade extends HospitalInfoServiceImpl {
+    @Autowired
+    @Qualifier("hospitalInfoServiceImpl")
+    private HospitalInfoService hospitalInfoService;
 
     public List<HospitalInfoDTO> getHospitalInfo() {
         QueryWrapper<HospitalInfo> hospitalInfo = new QueryWrapper<>();
@@ -27,4 +45,111 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
         data = BeanUtil.listCopyTo(list, HospitalInfoDTO.class);
         return data;
     }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param hospitalInfo
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(HospitalInfo hospitalInfo) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        hospitalInfo.setModifier(userId);
+        hospitalInfo.setGmtModified(now);
+        //新增数据
+        if (hospitalInfo.getId() == null) {
+            hospitalInfo.setCreator(userId);
+            hospitalInfo.setGmtCreate(now);
+        }
+        if (hospitalInfo.getIsDeleted() == null) {
+            hospitalInfo.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        this.saveOrUpdate(hospitalInfo);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param hospitalInfoListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(HospitalInfoListVO hospitalInfoListVO) {
+        if (ListUtil.isEmpty(hospitalInfoListVO.getHospitalInfoList())) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        hospitalInfoListVO.getHospitalInfoList().forEach(item -> {
+            item.setModifier(userId);
+            item.setGmtModified(now);
+            if (item.getId() == null) {
+                item.setCreator(userId);
+                item.setGmtCreate(now);
+            }
+        });
+        hospitalInfoService.saveOrUpdateBatch(hospitalInfoListVO.getHospitalInfoList());
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        HospitalInfo hospitalInfo = hospitalInfoService.getById(idVO.getId());
+        if (hospitalInfo == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "数据不存在");
+        }
+        if (hospitalInfo.getIsDeleted().equals(IsDeleteEnum.Y.getKey())) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "数据已删除");
+        }
+        hospitalInfo.setIsDeleted(IsDeleteEnum.Y.getKey());
+        hospitalInfo.setModifier(userId);
+        hospitalInfo.setGmtModified(now);
+        hospitalInfoService.updateById(hospitalInfo);
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        List<HospitalInfo> hospitalInfoList = new ArrayList<>(hospitalInfoService.listByIds(idListVO.getIds()));
+
+        if (ListUtil.isEmpty(hospitalInfoList)) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "数据不存在");
+        }
+
+        hospitalInfoList.forEach(hospitalInfo -> {
+            hospitalInfo.setIsDeleted(IsDeleteEnum.Y.getKey());
+            hospitalInfo.setModifier(userId);
+            hospitalInfo.setGmtModified(now);
+        });
+        hospitalInfoService.updateBatchById(hospitalInfoList);
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param hospitalInfoPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(HospitalInfoPageVO hospitalInfoPageVO) {
+        return hospitalInfoService.getPage(hospitalInfoPageVO);
+    }
 }

+ 64 - 28
cdssman-service/src/main/java/com/diagbot/facade/PlanDetailFacade.java

@@ -20,12 +20,15 @@ import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.PlanDetailCancelVO;
 import com.diagbot.vo.PlanDetailRevStopVO;
 import com.diagbot.vo.PlanDetailSaveVO;
+import com.diagbot.vo.PlanDetailSubSaveVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author wangfeng
@@ -40,13 +43,33 @@ public class PlanDetailFacade extends PlanDetailServiceImpl {
 
     public List<PlanDetailDTO> getSysSetInfoData(HospitalSetVO hospitalSetVO) {
         QueryWrapper<PlanDetail> sysSetInfo = new QueryWrapper<>();
-        sysSetInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
-        sysSetInfo.eq("hospital_id", hospitalSetVO.getHospitalId());
-        sysSetInfo.eq("plan_id", hospitalSetVO.getPlanId());
-        sysSetInfo.eq(StringUtil.isNotBlank(hospitalSetVO.getCode()), "code", hospitalSetVO.getCode());
+        sysSetInfo.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalSetVO.getHospitalId())
+                .eq(StringUtil.isNotBlank(hospitalSetVO.getCode()), "code", hospitalSetVO.getCode())
+                .in("plan_id", hospitalSetVO.getPlanId())
+                .orderByAsc("plan_id", "order_no");
         List<PlanDetail> sysSetData = list(sysSetInfo);
-        List<PlanDetailDTO> data = BeanUtil.listCopyTo(sysSetData, PlanDetailDTO.class);
-        return data;
+        List<PlanDetailDTO> sysSetInfoData = BeanUtil.listCopyTo(sysSetData, PlanDetailDTO.class);
+        List<PlanDetailDTO> planDetailParent = new ArrayList<>();//父级数据
+        List<PlanDetailDTO> planDetailSub = new ArrayList<>();//子级数据
+        //分离数据,-1分父级菜单
+        for (PlanDetailDTO dataDeta : sysSetInfoData) {
+            if (dataDeta.getParentId() == (-1)) {
+                planDetailParent.add(dataDeta);
+            } else {
+                planDetailSub.add(dataDeta);
+            }
+        }
+        //把子级数据,放在父级下
+        Map<Long, List<PlanDetailDTO>> mapParentId = planDetailSub.stream().collect(Collectors.groupingBy(PlanDetailDTO::getParentId));
+        for (Long key : mapParentId.keySet()) {
+            for (PlanDetailDTO sysPlanInfos : planDetailParent) {
+                if (sysPlanInfos.getId().equals(key)) {
+                    sysPlanInfos.setPlanDetails(mapParentId.get(key));
+                }
+            }
+        }
+        return planDetailParent;
     }
 
     public List<PlanDetailDTO> getByPlanIds(List<Long> planIds) {
@@ -66,31 +89,44 @@ public class PlanDetailFacade extends PlanDetailServiceImpl {
     }
 
     public boolean savePlanDetail(PlanDetailSaveVO planDetailSaveVO) {
+        boolean res = false;
         Date now = DateUtil.now();
-        UpdateWrapper<PlanDetail> planDetailUpdate = new UpdateWrapper<>();
-        planDetailUpdate.eq("plan_id", planDetailSaveVO.getPlanId())
+        QueryWrapper<PlanDetail> planDetailQuery = new QueryWrapper<>();
+        planDetailQuery.eq("plan_id", planDetailSaveVO.getPlanId())
                 .eq("hospital_id", planDetailSaveVO.getHospitalId())//医院id
-                .eq("is_deleted", IsDeleteEnum.N.getKey())
-                .set("is_deleted", IsDeleteEnum.Y.getKey())
-                .set("gmt_modified",now)
-                .set("gmt_create", now)
-                .set("creator",UserUtils.getCurrentPrincipleID())
-                .set("modifier",UserUtils.getCurrentPrincipleID());
-        update(new PlanDetail(), planDetailUpdate);
-        List<PlanDetail> planDetailList = new ArrayList<>();
-        List<HospitalPlanDetailSaveVO> planDetailData = planDetailSaveVO.getPlanDetail();
-        Long planId = planDetailSaveVO.getPlanId();
-        for (HospitalPlanDetailSaveVO planDetailVO : planDetailData) {
-            PlanDetail planDetail = new PlanDetail();
-            BeanUtil.copyProperties(planDetailVO, planDetail);
-            planDetail.setPlanId(planId);
-            planDetail.setGmtCreate(now);
-            planDetail.setCreator(UserUtils.getCurrentPrincipleID());
-            planDetail.setModifier(UserUtils.getCurrentPrincipleID());
-            planDetail.setGmtModified(now);
-            planDetailList.add(planDetail);
+                .eq("is_deleted", IsDeleteEnum.N.getKey());
+        // 删除所有的配置
+        res = remove(planDetailQuery);
+        //先保存父类
+        List<PlanDetail> planDetailParentNew = new ArrayList<>();
+        List<HospitalPlanDetailSaveVO> planDetailParent = planDetailSaveVO.getPlanDetailParent();
+        for (HospitalPlanDetailSaveVO planDetailSave : planDetailParent) {
+            PlanDetail planDetails = new PlanDetail();
+            BeanUtil.copyProperties(planDetailSave, planDetails);
+            planDetails.setParentId(-1L);
+            planDetails.setGmtCreate(now);
+            planDetails.setCreator(UserUtils.getCurrentPrincipleID());
+            planDetails.setModifier(UserUtils.getCurrentPrincipleID());
+            planDetails.setGmtModified(now);
+            List<PlanDetailSubSaveVO> data = planDetailSave.getPlanDetailSub();
+            planDetailService.save(planDetails);
+            List<PlanDetail> planDetailList = new ArrayList<>();
+            //再保存子类
+            for (PlanDetailSubSaveVO planDetailVO : data) {
+                PlanDetail planDetail = new PlanDetail();
+                BeanUtil.copyProperties(planDetailVO, planDetail);
+                planDetail.setPlanId(planDetailSaveVO.getPlanId());
+                planDetail.setParentId(planDetails.getId());
+                planDetail.setGmtCreate(now);
+                planDetail.setCreator(UserUtils.getCurrentPrincipleID());
+                planDetail.setModifier(UserUtils.getCurrentPrincipleID());
+                planDetail.setGmtModified(now);
+                planDetailList.add(planDetail);
+            }
+            res = planDetailService.saveBatch(planDetailList);
         }
-        return planDetailService.saveBatch(planDetailList);
+
+        return res;
     }
 
     public boolean cancelPlanDetail(PlanDetailCancelVO planDetailCancelVO) {

+ 96 - 5
cdssman-service/src/main/java/com/diagbot/facade/PlanFacade.java

@@ -4,6 +4,7 @@ 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.dto.PlanDetailDTO;
+import com.diagbot.dto.PlanInfoDefaultDTO;
 import com.diagbot.dto.PlanInfoPagesDTO;
 import com.diagbot.entity.Plan;
 import com.diagbot.enums.IsDeleteEnum;
@@ -15,10 +16,13 @@ import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.HospitalPlanCancelVO;
 import com.diagbot.vo.HospitalPlanPageVO;
 import com.diagbot.vo.HospitalPlanSaveVO;
+import com.diagbot.vo.HospitalPlanVO;
+import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.PlanRevStopVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -28,6 +32,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author wangfeng
@@ -62,10 +67,10 @@ public class PlanFacade extends PlanServiceImpl {
             UpdateWrapper<Plan> planQuery = new UpdateWrapper<>();
             planQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
                     .eq("id", hospitalPlanSaveVO.getId())
-                    .set("gmt_modified",now)
+                    .set("gmt_modified", now)
                     .set("gmt_create", now)
-                    .set("creator",UserUtils.getCurrentPrincipleID())
-                    .set("modifier",UserUtils.getCurrentPrincipleID())
+                    .set("creator", UserUtils.getCurrentPrincipleID())
+                    .set("modifier", UserUtils.getCurrentPrincipleID())
                     .set("hospital_id", hospitalPlanSaveVO.getHospitalId())
                     .set("plan_name", hospitalPlanSaveVO.getPlanName())
                     .set("plan_code", hospitalPlanSaveVO.getPlanCode())
@@ -95,14 +100,35 @@ public class PlanFacade extends PlanServiceImpl {
             }
             // 获取明细信息
             List<PlanDetailDTO> PlanDetailDatas = planDetailFacade.getByPlanIds(ids);
+            List<PlanDetailDTO> sysSetInfoData = BeanUtil.listCopyTo(PlanDetailDatas, PlanDetailDTO.class);
+            List<PlanDetailDTO> planDetailParent = new ArrayList<>();//父级数据
+            List<PlanDetailDTO> planDetailSub = new ArrayList<>();//子级数据
+            //分离数据,-1分父级菜单
+            for (PlanDetailDTO dataDeta : sysSetInfoData) {
+                if (dataDeta.getParentId() == (-1)) {
+                    planDetailParent.add(dataDeta);
+                } else {
+                    planDetailSub.add(dataDeta);
+                }
+            }
+            //把子级数据,放在父级下
+            Map<Long, List<PlanDetailDTO>> mapParentId = planDetailSub.stream().collect(Collectors.groupingBy(PlanDetailDTO::getParentId));
+            for (Long key : mapParentId.keySet()) {
+                for (PlanDetailDTO sysPlanInfos : planDetailParent) {
+                    if (sysPlanInfos.getId().equals(key)) {
+                        sysPlanInfos.setPlanDetails(mapParentId.get(key));
+                    }
+                }
+            }
+
             Map<Long, List<PlanDetailDTO>> map = new HashMap<>();
             // 获取所有用户开通的产品信息
-            map = EntityUtil.makeEntityListMap(PlanDetailDatas, "planId");
+            map = EntityUtil.makeEntityListMap(planDetailParent, "planId");
             if (map.size() > 0) {
                 for (PlanInfoPagesDTO planInfo : planInfos) {
                     List<PlanDetailDTO> planDetails = map.get(planInfo.getId());
                     if (ListUtil.isNotEmpty(planDetails)) {
-                        planInfo.setPlanDetails(planDetails);
+                        planInfo.setSysSetInfo(planDetails);
                     }
                 }
             }
@@ -155,4 +181,69 @@ public class PlanFacade extends PlanServiceImpl {
     }
 
 
+    public PlanInfoDefaultDTO getPlansDefaults() {
+        PlanInfoDefaultDTO data = new PlanInfoDefaultDTO();
+        QueryWrapper<Plan> planFand = new QueryWrapper<>();
+        planFand.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("plan_code", "plan_default")
+                .eq("hospital_id", 0L);
+        Plan plan = getOne(planFand, false);
+        BeanUtil.copyProperties(plan, data);
+        List<Long> planId = new ArrayList<>();
+        planId.add(plan.getId());
+        HospitalSetVO hospitalSetVO = new HospitalSetVO();
+        hospitalSetVO.setHospitalId(0L);
+        hospitalSetVO.setPlanId(planId);
+        List<PlanDetailDTO> sysSetInfoData = planDetailFacade.getSysSetInfoData(hospitalSetVO);
+        data.setPlanDetailDefault(sysSetInfoData);
+        return data;
+    }
+
+    public List<PlanInfoPagesDTO> getSysPlanInfoData(HospitalPlanVO hospitalPlanVO) {
+        //查询该医院有没有相关方案配置, 要是没有取默认的
+        List<PlanInfoPagesDTO> sysPlanInfoDTO = new ArrayList<>();
+        QueryWrapper<Plan> sysPlanInfo = new QueryWrapper<>();
+        sysPlanInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
+        sysPlanInfo.eq("hospital_id", hospitalPlanVO.getHospitalId());
+        sysPlanInfo.eq(StringUtil.isNotBlank(hospitalPlanVO.getPlanCode()), "plan_code", hospitalPlanVO.getPlanCode());
+        sysPlanInfo.eq("plan_status", StatusEnum.Enable.getKey());
+        List<Plan> sysPlanInfoData = list(sysPlanInfo);
+        List<Long> planId = new ArrayList<>();
+        Long hospitalId = hospitalPlanVO.getHospitalId();
+        if (ListUtil.isNotEmpty(sysPlanInfoData)) {
+            sysPlanInfoDTO = BeanUtil.listCopyTo(sysPlanInfoData, PlanInfoPagesDTO.class);
+            for (PlanInfoPagesDTO data : sysPlanInfoDTO) {
+                planId.add(data.getId());
+            }
+        } else {
+            QueryWrapper<Plan> sysPlandefault = new QueryWrapper<>();
+            sysPlandefault.eq("is_deleted", IsDeleteEnum.N.getKey());
+            sysPlandefault.eq("hospital_id", -1);
+            sysPlandefault.eq(StringUtil.isNotBlank(hospitalPlanVO.getPlanCode()), "plan_code", hospitalPlanVO.getPlanCode());
+            sysPlandefault.eq("plan_status", StatusEnum.Enable.getKey());
+            List<Plan> sysPlandefaultData = list(sysPlandefault);
+            if (ListUtil.isNotEmpty(sysPlandefaultData)) {
+                sysPlanInfoDTO = BeanUtil.listCopyTo(sysPlandefaultData, PlanInfoPagesDTO.class);
+                for (PlanInfoPagesDTO data : sysPlanInfoDTO) {
+                    planId.add(data.getId());
+                }
+            }
+            hospitalId = -1L;
+        }
+        HospitalSetVO hospitalSetVO = new HospitalSetVO();
+        hospitalSetVO.setHospitalId(hospitalId);
+        hospitalSetVO.setPlanId(planId);
+        List<PlanDetailDTO> sysSetInfoData = planDetailFacade.getSysSetInfoData(hospitalSetVO);
+        //把父级数据放在方案下
+        Map<Long, List<PlanDetailDTO>> dataMap = sysSetInfoData.stream().collect(Collectors.groupingBy(PlanDetailDTO::getPlanId));
+        for (Long key : dataMap.keySet()) {
+            for (PlanInfoPagesDTO sysPlanInfos : sysPlanInfoDTO) {
+                if (sysPlanInfos.getId().equals(key)) {
+                    sysPlanInfos.setSysSetInfo(dataMap.get(key));
+                }
+            }
+        }
+
+        return sysPlanInfoDTO;
+    }
 }

+ 8 - 0
cdssman-service/src/main/java/com/diagbot/facade/TokenPermissionFacade.java

@@ -44,6 +44,14 @@ public class TokenPermissionFacade extends TokenPermissionServiceImpl {
     public Boolean boundPermissionTokens(PermissionTokenAllVO permissionTokenAllVO) {
         Date now = DateUtil.now();
         Long tokenId = tokenHospitalFacade.getHospitalTokenId(permissionTokenAllVO.getHospitalId());
+        QueryWrapper<TokenPermission> tokenPermissionQuery = new QueryWrapper<>();
+        tokenPermissionQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("token_id", tokenId)
+                .eq("permission_id", permissionTokenAllVO.getPermissionId());
+        int count = count(tokenPermissionQuery);
+        if(count>0){
+            throw new CommonException(CommonErrorCode.IS_EXISTS, "该数据已存在");
+        }
         TokenPermission tokenPermission = new TokenPermission();
         BeanUtil.copyProperties(permissionTokenAllVO, tokenPermission);
         tokenPermission.setCreator(UserUtils.getCurrentPrincipleID());

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/facade/UserRoleFacade.java

@@ -1,7 +1,11 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.UserRoleInfoFindDTO;
 import com.diagbot.entity.User;
+import com.diagbot.entity.UserHospital;
 import com.diagbot.entity.UserRole;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.UserRoleService;
 import com.diagbot.service.impl.UserRoleServiceImpl;
 import com.diagbot.util.BeanUtil;
@@ -9,11 +13,14 @@ import com.diagbot.util.DateUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.UserHospitalInfoVO;
 import com.diagbot.vo.UserInfoVO;
+import com.diagbot.vo.UserRoleInfoCancelVO;
+import com.diagbot.vo.UserRoleInfoFindVO;
 import com.diagbot.vo.UserRoleInfoVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author wangfeng
@@ -55,4 +62,32 @@ public class UserRoleFacade extends UserRoleServiceImpl {
         }
         return res;
     }
+
+    public List<UserRoleInfoFindDTO> getUserRoles(UserRoleInfoFindVO userRoleInfoFindVO) {
+        List<UserRoleInfoFindDTO> data = userRoleService.getUserRoleAlls(userRoleInfoFindVO);
+        return data;
+    }
+
+    /**
+     * @param userRoleInfoCancelVO
+     * @return
+     */
+    public boolean cancelUserRole(UserRoleInfoCancelVO userRoleInfoCancelVO) {
+        UpdateWrapper<UserRole> userRoleUpdate = new UpdateWrapper<>();
+        userRoleUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", userRoleInfoCancelVO.getUserId())
+                .eq("id", userRoleInfoCancelVO.getId())
+                .eq("role_id", -1);
+        boolean res = userRoleService.remove(userRoleUpdate);
+        UpdateWrapper<User> userUpdate = new UpdateWrapper<>();
+        userUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", userRoleInfoCancelVO.getUserId());
+        res = userFacade.remove(userUpdate);
+        UpdateWrapper<UserHospital> userHospitalUpdate = new UpdateWrapper<>();
+        userHospitalUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("user_id", userRoleInfoCancelVO.getUserId())
+                .eq("hospital_id", userRoleInfoCancelVO.getHospitalId());
+        res = userHospitalFacade.remove(userHospitalUpdate);
+        return res;
+    }
 }

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/ConceptDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.ConceptDetail;
+
+/**
+ * <p>
+ * 静态知识内容表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptDetailMapper extends BaseMapper<ConceptDetail> {
+
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/mapper/ConceptInfoMapper.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.dto.ConceptInfoDTO;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.vo.ConceptInfoPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 静态知识标准术语表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptInfoMapper extends BaseMapper<ConceptInfo> {
+    /**
+     * 列表
+     *
+     * @param conceptInfoPageVO
+     * @return
+     */
+    IPage<ConceptInfoDTO> getPage(@Param("conceptInfoPageVO") ConceptInfoPageVO conceptInfoPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DeptConfigMapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.vo.DeptConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 科室映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-12
+ */
+public interface DeptConfigMapper extends BaseMapper<DeptConfig> {
+    /**
+     * 分页查询
+     *
+     * @param deptConfigPageVO
+     * @return
+     */
+    IPage<DeptConfig> getPage(@Param("deptConfigPageVO") DeptConfigPageVO deptConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.DictionaryInfo;
+
+/**
+ * <p>
+ * CDSS字典表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+public interface DictionaryInfoMapper extends BaseMapper<DictionaryInfo> {
+
+}

+ 12 - 2
cdssman-service/src/main/java/com/diagbot/mapper/HospitalInfoMapper.java

@@ -1,7 +1,11 @@
 package com.diagbot.mapper;
 
-import com.diagbot.entity.HospitalInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.entity.HospitalInfo;
+import com.diagbot.vo.HospitalInfoPageVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -12,5 +16,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @since 2020-08-06
  */
 public interface HospitalInfoMapper extends BaseMapper<HospitalInfo> {
-
+    /**
+     * 分页查询
+     *
+     * @param hospitalInfoPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("hospitalInfoPageVO") HospitalInfoPageVO hospitalInfoPageVO);
 }

+ 5 - 0
cdssman-service/src/main/java/com/diagbot/mapper/UserRoleMapper.java

@@ -1,7 +1,11 @@
 package com.diagbot.mapper;
 
+import com.diagbot.dto.UserRoleInfoFindDTO;
 import com.diagbot.entity.UserRole;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.UserRoleInfoFindVO;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface UserRoleMapper extends BaseMapper<UserRole> {
 
+    List<UserRoleInfoFindDTO> getUserRoleAlls(UserRoleInfoFindVO userRoleInfoFindVO);
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.ConceptDetail;
+
+/**
+ * <p>
+ * 静态知识内容表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptDetailService extends IService<ConceptDetail> {
+
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/service/ConceptInfoService.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.dto.ConceptInfoDTO;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.vo.ConceptInfoPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 静态知识标准术语表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+public interface ConceptInfoService extends IService<ConceptInfo> {
+    /**
+     * 列表
+     *
+     * @param conceptInfoPageVO
+     * @return
+     */
+    IPage<ConceptInfoDTO> getPage(@Param("conceptInfoPageVO") ConceptInfoPageVO conceptInfoPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/service/DeptConfigService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.vo.DeptConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 科室映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-12
+ */
+public interface DeptConfigService extends IService<DeptConfig> {
+    /**
+     * 分页查询
+     *
+     * @param deptConfigPageVO
+     * @return
+     */
+    IPage<DeptConfig> getPage(@Param("deptConfigPageVO") DeptConfigPageVO deptConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.DictionaryInfo;
+
+/**
+ * <p>
+ * CDSS字典表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+public interface DictionaryInfoService extends IService<DictionaryInfo> {
+
+}

+ 11 - 1
cdssman-service/src/main/java/com/diagbot/service/HospitalInfoService.java

@@ -1,7 +1,11 @@
 package com.diagbot.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.DiseaseConfig;
 import com.diagbot.entity.HospitalInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.HospitalInfoPageVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -12,5 +16,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2020-08-06
  */
 public interface HospitalInfoService extends IService<HospitalInfo> {
-
+    /**
+     * 分页查询
+     *
+     * @param hospitalInfoPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("hospitalInfoPageVO") HospitalInfoPageVO hospitalInfoPageVO);
 }

+ 5 - 0
cdssman-service/src/main/java/com/diagbot/service/UserRoleService.java

@@ -1,7 +1,11 @@
 package com.diagbot.service;
 
+import com.diagbot.dto.UserRoleInfoFindDTO;
 import com.diagbot.entity.UserRole;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.UserRoleInfoFindVO;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface UserRoleService extends IService<UserRole> {
 
+    List<UserRoleInfoFindDTO> getUserRoleAlls(UserRoleInfoFindVO userRoleInfoFindVO);
 }

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.ConceptDetail;
+import com.diagbot.mapper.ConceptDetailMapper;
+import com.diagbot.service.ConceptDetailService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 静态知识内容表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Service
+public class ConceptDetailServiceImpl extends ServiceImpl<ConceptDetailMapper, ConceptDetail> implements ConceptDetailService {
+
+}

+ 33 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/ConceptInfoServiceImpl.java

@@ -0,0 +1,33 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.ConceptInfoDTO;
+import com.diagbot.entity.ConceptInfo;
+import com.diagbot.mapper.ConceptInfoMapper;
+import com.diagbot.service.ConceptInfoService;
+import com.diagbot.vo.ConceptInfoPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 静态知识标准术语表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@Service
+public class ConceptInfoServiceImpl extends ServiceImpl<ConceptInfoMapper, ConceptInfo> implements ConceptInfoService {
+    /**
+     * 列表
+     *
+     * @param conceptInfoPageVO
+     * @return
+     */
+    @Override
+    public IPage<ConceptInfoDTO> getPage(@Param("conceptInfoPageVO") ConceptInfoPageVO conceptInfoPageVO) {
+        return baseMapper.getPage(conceptInfoPageVO);
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DeptConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.mapper.DeptConfigMapper;
+import com.diagbot.service.DeptConfigService;
+import com.diagbot.vo.DeptConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 科室映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-12
+ */
+@Service
+public class DeptConfigServiceImpl extends ServiceImpl<DeptConfigMapper, DeptConfig> implements DeptConfigService {
+    /**
+     * 分页查询
+     *
+     * @param deptConfigPageVO
+     * @return
+     */
+    public IPage<DeptConfig> getPage(@Param("deptConfigPageVO") DeptConfigPageVO deptConfigPageVO) {
+        return baseMapper.getPage(deptConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.mapper.DictionaryInfoMapper;
+import com.diagbot.service.DictionaryInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * CDSS字典表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@Service
+public class DictionaryInfoServiceImpl extends ServiceImpl<DictionaryInfoMapper, DictionaryInfo> implements DictionaryInfoService {
+
+}

+ 15 - 3
cdssman-service/src/main/java/com/diagbot/service/impl/HospitalInfoServiceImpl.java

@@ -1,9 +1,13 @@
 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.entity.HospitalInfo;
 import com.diagbot.mapper.HospitalInfoMapper;
 import com.diagbot.service.HospitalInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.HospitalInfoPageVO;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,5 +20,13 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class HospitalInfoServiceImpl extends ServiceImpl<HospitalInfoMapper, HospitalInfo> implements HospitalInfoService {
-
-}
+    /**
+     * 分页查询
+     *
+     * @param hospitalInfoPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(@Param("hospitalInfoPageVO") HospitalInfoPageVO hospitalInfoPageVO) {
+        return baseMapper.getPage(hospitalInfoPageVO);
+    }
+}

+ 8 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/UserRoleServiceImpl.java

@@ -1,11 +1,15 @@
 package com.diagbot.service.impl;
 
+import com.diagbot.dto.UserRoleInfoFindDTO;
 import com.diagbot.entity.UserRole;
 import com.diagbot.mapper.UserRoleMapper;
 import com.diagbot.service.UserRoleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.UserRoleInfoFindVO;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 系统用户角色关联表 服务实现类
@@ -17,4 +21,8 @@ import org.springframework.stereotype.Service;
 @Service
 public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
 
+    @Override
+    public List<UserRoleInfoFindDTO> getUserRoleAlls(UserRoleInfoFindVO userRoleInfoFindVO) {
+        return baseMapper.getUserRoleAlls(userRoleInfoFindVO);
+    }
 }

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/vo/ChangeStatusVO.java

@@ -0,0 +1,16 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/24 17:23
+ */
+@Getter
+@Setter
+public class ChangeStatusVO {
+    private Long id;
+    private String isDeleted;
+}

+ 47 - 0
cdssman-service/src/main/java/com/diagbot/vo/ConceptDetailVO.java

@@ -0,0 +1,47 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/24 16:06
+ */
+@Getter
+@Setter
+public class ConceptDetailVO {
+    /**
+     * 明细id
+     */
+    private Long id;
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径
+     */
+    private String contentType;
+}

+ 33 - 0
cdssman-service/src/main/java/com/diagbot/vo/ConceptInfoPageVO.java

@@ -0,0 +1,33 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/21 14:53
+ */
+@Getter
+@Setter
+public class ConceptInfoPageVO extends Page {
+    /**
+     * 标准术语
+     */
+    private String name;
+    /**
+     * 术语类型
+     */
+    private String type;
+    /**
+     * 术语类型
+     */
+    @ApiModelProperty(hidden = true)
+    private String typeName;
+    /**
+     * 启用状态
+     */
+    private String isDeleted;
+}

+ 45 - 0
cdssman-service/src/main/java/com/diagbot/vo/ConceptInfoVO.java

@@ -0,0 +1,45 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/24 16:04
+ */
+@Getter
+@Setter
+public class ConceptInfoVO {
+    private Long id;
+    /**
+     * 标准术语
+     */
+    private String name;
+    /**
+     * 术语类型
+     */
+    private String type;
+    /**
+     * 术语类型
+     */
+    @ApiModelProperty(hidden = true)
+    private String typeName;
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    /**
+     * 静态知识明细
+     */
+    private List<ConceptDetailVO> details;
+}

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

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.DeptConfig;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 11:44
+ */
+@Getter
+@Setter
+public class DeptConfigListVO {
+    private List<DeptConfig> deptConfigList;
+}

+ 40 - 0
cdssman-service/src/main/java/com/diagbot/vo/DeptConfigPageVO.java

@@ -0,0 +1,40 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 11:43
+ */
+@Getter
+@Setter
+public class DeptConfigPageVO extends Page {
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    private String hisName;
+    /**
+     * his编码
+     */
+    private String hisCode;
+
+    /**
+     * 标准名
+     */
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    private String uniqueCode;
+}

+ 32 - 0
cdssman-service/src/main/java/com/diagbot/vo/HasStaticKnowledgeVO.java

@@ -0,0 +1,32 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 14:02
+ */
+@Getter
+@Setter
+public class HasStaticKnowledgeVO {
+    /**
+     * 标准术语名称
+     */
+    @NotBlank(message = "请输入标准术语名称")
+    private String name;
+    /**
+     * 术语类型
+     */
+    @NotBlank(message = "请输入术语类型")
+    private String type;
+    /**
+     * 是否有静态知识:0-无,1-有
+     */
+    @NotNull(message = "请输入是否有静态信息(0-无,1-有)")
+    private Integer hasInfo;
+}

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

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.HospitalInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/11 16:08
+ */
+@Getter
+@Setter
+public class HospitalInfoListVO {
+    private List<HospitalInfo> hospitalInfoList;
+}

+ 44 - 0
cdssman-service/src/main/java/com/diagbot/vo/HospitalInfoPageVO.java

@@ -0,0 +1,44 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/11 16:16
+ */
+@Getter
+@Setter
+public class HospitalInfoPageVO extends Page {
+    /**
+     * 医院编码
+     */
+    private String code;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 状态:0.禁用1.启用
+     */
+    private Integer status;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+}

+ 4 - 0
cdssman-service/src/main/java/com/diagbot/vo/HospitalPlanDetailSaveVO.java

@@ -3,6 +3,8 @@ package com.diagbot.vo;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * @author wangfeng
  * @Description:
@@ -47,4 +49,6 @@ public class HospitalPlanDetailSaveVO {
      * 备注
      */
     private String remark;
+
+    private List<PlanDetailSubSaveVO> planDetailSub;
 }

+ 3 - 1
cdssman-service/src/main/java/com/diagbot/vo/HospitalSetVO.java

@@ -3,6 +3,8 @@ package com.diagbot.vo;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * @author wangfeng
  * @Description:
@@ -12,6 +14,6 @@ import lombok.Setter;
 @Getter
 public class HospitalSetVO  {
     private Long hospitalId;
-    private Long planId;
+    private List<Long> planId;
     private String code;
 }

+ 1 - 1
cdssman-service/src/main/java/com/diagbot/vo/PlanDetailSaveVO.java

@@ -14,5 +14,5 @@ import java.util.List;
 public class PlanDetailSaveVO {
     private Long hospitalId;
     private Long planId;
-    private  List<HospitalPlanDetailSaveVO> planDetail;
+    private  List<HospitalPlanDetailSaveVO> planDetailParent;
 }

+ 53 - 0
cdssman-service/src/main/java/com/diagbot/vo/PlanDetailSubSaveVO.java

@@ -0,0 +1,53 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-13 17:31
+ */
+@Setter
+@Getter
+public class PlanDetailSubSaveVO {
+    private Long planId;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+
+    /**
+     * 配置名称
+     */
+    private String name;
+
+
+
+    private String value;
+
+    /**
+     * 是否显示(1是,0否)
+     */
+    private Integer status;
+
+    /**
+     * 显示个数
+     */
+    private Integer number;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+    /**
+     * 配置编码
+     */
+    private String code;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}
+

+ 28 - 0
cdssman-service/src/main/java/com/diagbot/vo/StaticKnowledgeHISVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 14:54
+ */
+@Getter
+@Setter
+public class StaticKnowledgeHISVO extends StaticKnowledgeVO {
+    /**
+     * his名称
+     */
+    private String hisName;
+    /**
+     * his明细名称
+     */
+    private String hisDetailName;
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+}

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

@@ -0,0 +1,26 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 15:52
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexVO {
+    /**
+     * 检索内容
+     */
+    private String inputStr;
+    /**
+     * 检索类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作
+     */
+    @NotNull(message = "请输入检索类型")
+    private List<Integer> types;
+}

+ 30 - 0
cdssman-service/src/main/java/com/diagbot/vo/StaticKnowledgeVO.java

@@ -0,0 +1,30 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/20 14:50
+ */
+@Getter
+@Setter
+public class StaticKnowledgeVO {
+    /**
+     * 标准术语名称
+     */
+    private String name;
+    /**
+     * 术语类型
+     */
+    @NotNull(message = "请输入术语类型")
+    private Integer type;
+    /**
+     * 内容类型
+     */
+    private List<Integer> contentTypes;
+}

+ 22 - 0
cdssman-service/src/main/java/com/diagbot/vo/UserRoleInfoCancelVO.java

@@ -0,0 +1,22 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-11 19:36
+ */
+@Setter
+@Getter
+public class UserRoleInfoCancelVO {
+    @NotNull(message = "请输入id")
+    private Long id;
+    @NotNull(message = "请输入用户id")
+    private Long userId;
+    @NotNull(message = "请输入医院")
+    private Long hospitalId;
+}

+ 15 - 0
cdssman-service/src/main/java/com/diagbot/vo/UserRoleInfoFindVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-11 17:11
+ */
+@Setter
+@Getter
+public class UserRoleInfoFindVO {
+    private Long hospitalId;
+}

+ 22 - 0
cdssman-service/src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -0,0 +1,22 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 静态知识内容表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@RestController
+@RequestMapping("/conceptDetail")
+@Api(value = "静态知识内容相关API", tags = { "静态知识内容相关API" })
+@SuppressWarnings("unchecked")
+public class ConceptDetailController {
+
+}

+ 109 - 0
cdssman-service/src/main/java/com/diagbot/web/ConceptInfoController.java

@@ -0,0 +1,109 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.ConceptInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.StaticKnowledgeDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
+import com.diagbot.facade.ConceptInfoFacade;
+import com.diagbot.vo.ChangeStatusVO;
+import com.diagbot.vo.ConceptInfoPageVO;
+import com.diagbot.vo.ConceptInfoVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.StaticKnowledgeHISVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
+import com.diagbot.vo.StaticKnowledgeVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * <p>
+ * 静态知识标准术语表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-08-18
+ */
+@RestController
+@RequestMapping("/graph/conceptInfo")
+@Api(value = "静态知识标准术语相关API", tags = { "静态知识标准术语相关API" })
+@SuppressWarnings("unchecked")
+public class ConceptInfoController {
+
+    @Autowired
+    private ConceptInfoFacade conceptInfoFacade;
+
+    @ApiOperation(value = "医学术语检索-新增静态知识[zhaops]",
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作 <br>" +
+                    "inputStr: 检索内容<br>")
+    @PostMapping("/staticKnowledgeIndexWithoutInfo")
+    @SysLogger("staticKnowledgeIndexWithoutInfo")
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndexWithoutInfo(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        List<StaticKnowledgeIndexDTO> data = conceptInfoFacade.staticKnowledgeIndexWithoutInfo(staticKnowledgeIndexVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "获取静态知识列表[zhaops]",
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作 <br>" +
+                    "name: 术语名称<br>" +
+                    "isDeleted: 启用状态:N-启用中、Y-已删除<br>")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<IPage<ConceptInfoDTO>> getPage(@Valid @RequestBody ConceptInfoPageVO conceptInfoPageVO) {
+        IPage<ConceptInfoDTO> data = conceptInfoFacade.getPage(conceptInfoPageVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "保存静态知识-新增或修改[zhaops]",
+            notes = "id: id <br>" +
+                    "name: 术语名称 <br>" +
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作 <br>" +
+                    "clinicalPathwayName: 临床路径名称<br>" +
+                    "noticeName: 注意事项名称<br>" +
+                    "details: 明细<br>")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@Valid @RequestBody ConceptInfoVO conceptInfoVO) {
+        Boolean data = conceptInfoFacade.saveOrUpdateRecord(conceptInfoVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "静态知识启用禁用[zhaops]",
+            notes = "id: 术语id <br>" +
+                    "isDeleted: 启用状态:N-启用中、Y-已删除<br>")
+    @PostMapping("/changeStatus")
+    @SysLogger("changeStatus")
+    public RespDTO<Boolean> changeStatus(@Valid @RequestBody ChangeStatusVO changeStatusVO) {
+        Boolean data = conceptInfoFacade.changeStatus(changeStatusVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "静态知识是否存在[zhaops]",
+            notes = "name: 术语名称 <br>" +
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验明细、5-检查、6-手术和操作 <br>")
+    @PostMapping("/isExist")
+    @SysLogger("isExist")
+    public RespDTO<Boolean> isExist(@Valid @RequestBody ConceptInfoVO conceptInfoVO) {
+        Boolean data = conceptInfoFacade.isExist(conceptInfoVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "根据术语id获取静态信息[zhaops]",
+            notes = "id: 术语id <br>")
+    @PostMapping("/getRecordById")
+    @SysLogger("getRecordById")
+    public RespDTO<ConceptInfoDTO> getRecordById(@Valid @RequestBody IdVO idVO) {
+        ConceptInfoDTO data = conceptInfoFacade.getRecordById(idVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 171 - 0
cdssman-service/src/main/java/com/diagbot/web/DeptConfigController.java

@@ -0,0 +1,171 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DeptConfig;
+import com.diagbot.facade.DeptConfigFacade;
+import com.diagbot.vo.DeptConfigListVO;
+import com.diagbot.vo.DeptConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+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-08-12
+ */
+@RestController
+@RequestMapping("/tran/deptConfig")
+@Api(value = "科室公表映射API", tags = { "科室公表映射API" })
+public class DeptConfigController {
+    @Autowired
+    private DeptConfigFacade deptConfigFacade;
+
+    /**
+     * 映射关系是否已存在
+     *
+     * @param deptConfig
+     * @return
+     */
+    @ApiOperation(value = "映射关系是否已存在[by:zhaops]", notes = "")
+    @PostMapping("/isExistRecord")
+    @SysLogger("isExistRecord")
+    public RespDTO<Boolean> isExistRecord(@RequestBody @Valid DeptConfig deptConfig) {
+        Boolean data = deptConfigFacade.isExistRecord(deptConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param deptConfig
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid DeptConfig deptConfig) {
+        Boolean data = deptConfigFacade.saveOrUpdateRecord(deptConfig);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param deptConfigListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid DeptConfigListVO deptConfigListVO) {
+        Boolean data = deptConfigFacade.saveOrUpdateRecords(deptConfigListVO);
+        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 = deptConfigFacade.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 = deptConfigFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param deptConfigPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<DeptConfig> getPage(@RequestBody @Valid DeptConfigPageVO deptConfigPageVO) {
+        IPage<DeptConfig> data = deptConfigFacade.getPage(deptConfigPageVO);
+        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) {
+        deptConfigFacade.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) {
+        deptConfigFacade.exportExcel(response, hospitalIdVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    @ApiOperation(value = "各医院映射关系数列表[by:zhaops]",
+            notes = "")
+    @PostMapping("/getRelationNumPage")
+    @SysLogger("getRelationNumPage")
+    public RespDTO<IPage<HosRelationNumDTO>> getRelationNumPage(@RequestBody @Valid HosRelationNumPageVO hosRelationNumPageVO) {
+        IPage<HosRelationNumDTO> data = deptConfigFacade.getRelationNumPage(hosRelationNumPageVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 80 - 1
cdssman-service/src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -1,17 +1,26 @@
 package com.diagbot.web;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.entity.HospitalInfo;
 import com.diagbot.facade.HospitalInfoFacade;
+import com.diagbot.vo.HospitalInfoListVO;
+import com.diagbot.vo.HospitalInfoPageVO;
+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.RestController;
 
+import javax.validation.Valid;
 import java.util.List;
 
 /**
@@ -38,4 +47,74 @@ public class HospitalInfoController {
         List<HospitalInfoDTO> data = hospitalInfoFacade.getHospitalInfo();
         return RespDTO.onSuc(data);
     }
-}
+
+    /**
+     * 保存或修改映射关系
+     *
+     * @param hospitalInfo
+     * @return
+     */
+    @ApiOperation(value = "保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecord")
+    @SysLogger("saveOrUpdateRecord")
+    public RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid HospitalInfo hospitalInfo) {
+        Boolean data = hospitalInfoFacade.saveOrUpdateRecord(hospitalInfo);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 批量保存或修改映射关系
+     *
+     * @param hospitalInfoListVO
+     * @return
+     */
+    @ApiOperation(value = "批量保存或修改映射关系[by:zhaops]", notes = "")
+    @PostMapping("/saveOrUpdateRecords")
+    @SysLogger("saveOrUpdateRecords")
+    public RespDTO<Boolean> saveOrUpdateRecords(@RequestBody @Valid HospitalInfoListVO hospitalInfoListVO) {
+        Boolean data = hospitalInfoFacade.saveOrUpdateRecords(hospitalInfoListVO);
+        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 = hospitalInfoFacade.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 = hospitalInfoFacade.deleteRecords(idListVO);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param hospitalInfoPageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询[by:zhaops]", notes = "")
+    @PostMapping("/getPage")
+    @SysLogger("getPage")
+    public RespDTO<DiseaseConfig> getPage(@RequestBody @Valid HospitalInfoPageVO hospitalInfoPageVO) {
+        IPage<DiseaseConfig> data = hospitalInfoFacade.getPage(hospitalInfoPageVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 21 - 3
cdssman-service/src/main/java/com/diagbot/web/PlanController.java

@@ -3,12 +3,14 @@ package com.diagbot.web;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.PlanInfoDefaultDTO;
 import com.diagbot.dto.PlanInfoPagesDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PlanFacade;
 import com.diagbot.vo.HospitalPlanCancelVO;
 import com.diagbot.vo.HospitalPlanPageVO;
 import com.diagbot.vo.HospitalPlanSaveVO;
+import com.diagbot.vo.HospitalPlanVO;
 import com.diagbot.vo.PlanRevStopVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -17,15 +19,14 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * <p>
- *  前端控制器
+ * 前端控制器
  * </p>
  *
  * @author wangfeng
@@ -48,6 +49,14 @@ public class PlanController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "根据医院获取方案配置信息[by:wangfeng]", notes = "hospitalid :医院id  必填<br> ")
+    @PostMapping("/getSysPlanInfoDatas")
+    @SysLogger("getSysPlanInfoDatas")
+    public RespDTO<List<PlanInfoPagesDTO>> getSysPlanInfoDatas(@Valid @RequestBody HospitalPlanVO hospitalPlanVO) {
+        List<PlanInfoPagesDTO> data = planFacade.getSysPlanInfoData(hospitalPlanVO);
+        return RespDTO.onSuc(data);
+    }
+
     @ApiOperation(value = "保存更新方案配置信息[by:wangfeng]", notes = "保存更新方案配置信息")
     @PostMapping("/savePlanInfoDatas")
     @SysLogger("savePlanInfoDatas")
@@ -74,5 +83,14 @@ public class PlanController {
         boolean res = planFacade.revStopPlan(planRevStopVO);
         return RespDTO.onSuc(res);
     }
+
+    @ApiOperation(value = "获取默认方案配置[by:wangfeng]", notes = "获取默认方案配置")
+    @PostMapping("/getPlansDefault")
+    @SysLogger("getPlansDefault")
+    @Transactional
+    public RespDTO<PlanInfoDefaultDTO> getPlansDefault() {
+        PlanInfoDefaultDTO data = planFacade.getPlansDefaults();
+        return RespDTO.onSuc(data);
+    }
 }
 

+ 24 - 0
cdssman-service/src/main/java/com/diagbot/web/UserRoleController.java

@@ -5,12 +5,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.TokenHospitaDTO;
+import com.diagbot.dto.UserRoleInfoFindDTO;
 import com.diagbot.facade.UserRoleFacade;
 import com.diagbot.vo.TokenHospitalVO;
+import com.diagbot.vo.UserRoleInfoCancelVO;
+import com.diagbot.vo.UserRoleInfoFindVO;
 import com.diagbot.vo.UserRoleInfoVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -19,6 +23,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * <p>
@@ -39,8 +44,27 @@ public class UserRoleController {
     @ApiOperation(value = "添加医院管理员[by:wangfeng]",notes = "添加医院管理员")
     @PostMapping("/addUserRole")
     @SysLogger("addUserRole")
+    @Transactional
     public RespDTO<Boolean> addUserRole(@RequestBody @Valid UserRoleInfoVO userRoleInfoVO) {
         boolean res = userRoleFacade.addUserRoles(userRoleInfoVO);
         return RespDTO.onSuc(res);
     }
+
+    @ApiOperation(value = "获取医院管理员[by:wangfeng]",notes = "获取医院管理员")
+    @PostMapping("/getUserRole")
+    @SysLogger("getUserRole")
+    @Transactional
+    public RespDTO<List<UserRoleInfoFindDTO>> getUserRole(@RequestBody @Valid UserRoleInfoFindVO userRoleInfoFindVO) {
+        List<UserRoleInfoFindDTO> data = userRoleFacade.getUserRoles(userRoleInfoFindVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "删除医院管理员[by:wangfeng]",notes = "获取医院管理员")
+    @PostMapping("/cancelUserRole")
+    @SysLogger("cancelUserRole")
+    @Transactional
+    public RespDTO<Boolean> cancelUserRole(@RequestBody @Valid UserRoleInfoCancelVO userRoleInfoCancelVO) {
+        boolean res = userRoleFacade.cancelUserRole(userRoleInfoCancelVO);
+        return RespDTO.onSuc(res);
+    }
 }

+ 21 - 0
cdssman-service/src/main/resources/mapper/ConceptDetailMapper.xml

@@ -0,0 +1,21 @@
+<?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.ConceptDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ConceptDetail">
+        <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="concept_id" property="conceptId" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="text" property="text" />
+        <result column="order_no" property="orderNo" />
+        <result column="content_type" property="contentType" />
+    </resultMap>
+
+</mapper>

+ 63 - 0
cdssman-service/src/main/resources/mapper/ConceptInfoMapper.xml

@@ -0,0 +1,63 @@
+<?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.ConceptInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.ConceptInfo">
+        <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="name" property="name" />
+        <result column="type" property="type" />
+        <result column="clinical_pathway_name" property="clinicalPathwayName" />
+        <result column="notice_name" property="noticeName" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.dto.ConceptInfoDTO">
+        SELECT
+        t1.id,
+        t1.NAME,
+        t1.clinicalPathwayName,
+        t1.noticeName,
+        t1.type,
+        t1.isDeleted,
+        t1.title,
+        t1.gmtModified,
+        t2.linkman AS modifier
+        FROM
+        (
+        SELECT
+        a.id,
+        a.NAME,
+        a.clinical_pathway_name AS clinicalPathwayName,
+        a.notice_name AS noticeName,
+        a.type,
+        b.is_deleted AS isDeleted,
+        GROUP_CONCAT( b.title SEPARATOR '、' ) AS title,
+        b.gmt_modified AS gmtModified,
+        b.modifier
+        FROM
+        graph_concept_info a,
+        graph_concept_detail b
+        WHERE
+        a.id = b.concept_id
+        <if test="conceptInfoPageVO.isDeleted!=null and conceptInfoPageVO.isDeleted!=''">
+            AND b.is_deleted = #{conceptInfoPageVO.isDeleted}
+        </if>
+        <if test="conceptInfoPageVO.name!=null and conceptInfoPageVO.name!=''">
+            AND a.name like concat('%', #{conceptInfoPageVO.name},'%')
+        </if>
+        <if test="conceptInfoPageVO.typeName!=null and conceptInfoPageVO.typeName!=''">
+            AND a.type = #{conceptInfoPageVO.typeName}
+        </if>
+        GROUP BY
+        a.id
+        ) t1
+        LEFT JOIN sys_user t2 ON t1.modifier = t2.id
+    </select>
+
+</mapper>

+ 58 - 0
cdssman-service/src/main/resources/mapper/DeptConfigMapper.xml

@@ -0,0 +1,58 @@
+<?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.DeptConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.DeptConfig">
+        <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_code" property="hisCode" />
+        <result column="unique_name" property="uniqueName" />
+        <result column="unique_code" property="uniqueCode" />
+    </resultMap>
+
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.DeptConfig">
+        select a.*
+        from tran_dept_config a
+        where a.is_deleted='N'
+        <if test="deptConfigPageVO.hospitalId!=null">
+            and a.hospital_id=#{deptConfigPageVO.hospitalId}
+        </if>
+        <if test="deptConfigPageVO.hisName!=null and deptConfigPageVO.hisName!=''">
+            and a.his_name like concat("%",#{deptConfigPageVO.hisName},"%")
+        </if>
+        <if test="deptConfigPageVO.hisCode!=null and deptConfigPageVO.hisCode!=''">
+            and a.his_code like concat("%",#{deptConfigPageVO.hisCode},"%")
+        </if>
+        <if test="deptConfigPageVO.uniqueName!=null and deptConfigPageVO.uniqueName!=''">
+            and a.unique_name like concat("%",#{deptConfigPageVO.uniqueName},"%")
+        </if>
+        <if test="deptConfigPageVO.uniqueCode!=null and deptConfigPageVO.uniqueCode!=''">
+            and a.unique_code like concat("%",#{deptConfigPageVO.uniqueCode},"%")
+        </if>
+    </select>
+
+    <!-- 各医院映射关系数列表 -->
+    <select id="getRelationNumPage" resultType="com.diagbot.dto.HosRelationNumDTO">
+        SELECT
+        a.id,
+        a.NAME,
+        sum( b.id IS NOT NULL ) AS num
+        FROM
+        tran_hospital_info a
+        LEFT JOIN tran_dept_config b ON a.id = b.hospital_id
+        AND b.is_deleted = 'N'
+        WHERE
+        a.is_deleted = 'N'
+        GROUP BY
+        a.id
+    </select>
+
+</mapper>

+ 24 - 0
cdssman-service/src/main/resources/mapper/HospitalInfoMapper.xml

@@ -20,4 +20,28 @@
         <result column="remark" property="remark" />
     </resultMap>
 
+    <!-- 分页查询 -->
+    <select id="getPage" resultType="com.diagbot.entity.HospitalInfo">
+        select a.*
+        from tran_hospital_info a
+        where a.is_deleted='N'
+        <if test="hospitalInfoPageVO.code!=null and hospitalInfoPageVO.code!=''">
+            and a.code like concat("%",#{hospitalInfoPageVO.code},"%")
+        </if>
+        <if test="hospitalInfoPageVO.name!=null and hospitalInfoPageVO.name!=''">
+            and a.name like concat("%",#{hospitalInfoPageVO.name},"%")
+        </if>
+        <if test="hospitalInfoPageVO.address!=null and hospitalInfoPageVO.address!=''">
+            and a.address like concat("%",#{hospitalInfoPageVO.address},"%")
+        </if>
+        <if test="hospitalInfoPageVO.spell!=null and hospitalInfoPageVO.spell!=''">
+            and a.spell like concat("%",#{hospitalInfoPageVO.spell},"%")
+        </if>
+        <if test="hospitalInfoPageVO.status!=null">
+            and a.status = #{hospitalInfoPageVO.status}
+        </if>
+        <if test="hospitalInfoPageVO.connect!=null">
+            and a.connect = #{hospitalInfoPageVO.connect}
+        </if>
+    </select>
 </mapper>

+ 1 - 0
cdssman-service/src/main/resources/mapper/PlanDetailMapper.xml

@@ -12,6 +12,7 @@
         <result column="modifier" property="modifier" />
         <result column="hospital_id" property="hospitalId" />
         <result column="plan_id" property="planId" />
+        <result column="parent_id" property="parentId" />
         <result column="name" property="name" />
         <result column="status" property="status" />
         <result column="number" property="number" />

+ 1 - 0
cdssman-service/src/main/resources/mapper/PlanMapper.xml

@@ -25,6 +25,7 @@
         plan_status as planStatus
         FROM tran_plan u
         WHERE u.is_deleted = 'N'
+        and hospital_id != -1
         <if test="hospitalId !=null">
           and hospital_id =#{hospitalId}
         </if>

+ 16 - 11
cdssman-service/src/main/resources/mapper/TokenPermissionMapper.xml

@@ -19,24 +19,29 @@
     <select id="getPermissionAll" resultType="com.diagbot.dto.PermissionAllDTO">
         SELECT
         a.id ,
-        a.`param_key` AS param_Key,
-        a.`param_value` AS paramValue,
-        a.`permission_id` AS permissionId,
-        a.`token_id`AS tokenId,
-        c.`name` AS permissionName,
-        c.`permissionUrl` AS permissionUrl,
-        d.`id` AS hospitalId,
-        d.`name` AS hospitalName
+        a.param_key AS paramKey,
+        a.param_value AS paramValue,
+        a.permission_id AS permissionId,
+        a.token_id AS tokenId,
+        c.name AS permissionName,
+        c.permissionUrl AS permissionUrl,
+        d.id AS hospitalId,
+        d.name AS hospitalName
         FROM
         sys_token_permission a ,
         sys_token_hospital b ,
         sys_permission c,
         tran_hospital_info d
-        WHERE a.token_id = b.id
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        and a.token_id = b.id
         AND a.permission_id = c.id
         AND d.id = b.hospital_id
-        <if test="hospitalId!=nulll">
-            b.hospital_id = #{hospitalId}
+        <if test="hospitalId!=null">
+            and b.hospital_id = #{hospitalId}
         </if>
     </select>
 

+ 35 - 10
cdssman-service/src/main/resources/mapper/UserRoleMapper.xml

@@ -4,15 +4,40 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.UserRole">
-        <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="user_id" property="userId" />
-        <result column="role_id" property="roleId" />
-        <result column="remark" property="remark" />
+        <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="user_id" property="userId"/>
+        <result column="role_id" property="roleId"/>
+        <result column="remark" property="remark"/>
     </resultMap>
-
+    <select id="getUserRoleAlls" resultType="com.diagbot.dto.UserRoleInfoFindDTO">
+        SELECT
+        c.id AS id,
+        a.username AS username,
+        a.linkman AS linkman,
+        c.user_id AS userId,
+        d.id AS hospitalId,
+        d.name AS hospitalName,
+        a.status AS STATUS
+        FROM
+        sys_user a,
+        sys_user_hospital b,
+        sys_user_role c ,
+        tran_hospital_info d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.id =b.user_id
+        AND a.id =c.user_id
+        AND b.hospital_id = d.id
+        <if test="hospitalId !=null">
+            and hospital_id = #{hospitalId}
+        </if>
+    </select>
 </mapper>

+ 4 - 0
config-server/src/main/resources/shared/cdssman-service-dev.yml

@@ -83,3 +83,7 @@ mybatis-plus:
 
 imageUrl:
   prefix: http://192.168.2.236:82
+
+#CDSS核心地址
+cdss-core:
+  url: http://192.168.2.236:7010

+ 4 - 0
config-server/src/main/resources/shared/cdssman-service-local.yml

@@ -83,3 +83,7 @@ mybatis-plus:
 
 imageUrl:
   prefix: http://192.168.2.236:82
+
+#CDSS核心地址
+cdss-core:
+  url: http://192.168.2.236:7010

+ 5 - 0
config-server/src/main/resources/shared/cdssman-service-pre.yml

@@ -83,3 +83,8 @@ mybatis-plus:
 
 imageUrl:
   prefix: http://192.168.2.121:82
+
+#CDSS核心地址
+cdss-core:
+  url: http://192.168.2.121:7010
+

+ 5 - 0
config-server/src/main/resources/shared/cdssman-service-pro.yml

@@ -83,3 +83,8 @@ mybatis-plus:
 
 imageUrl:
   prefix: http://192.168.2.122:82
+
+#CDSS核心地址
+cdss-core:
+  url: http://192.168.2.122:7010
+