Browse Source

Merge branch 'master' into 122run

gaodm 5 years ago
parent
commit
16a16d2638
100 changed files with 5496 additions and 252 deletions
  1. 24 1
      aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java
  2. 6 0
      aipt-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java
  3. 30 0
      aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalExtDTO.java
  4. 16 0
      aipt-service/src/main/java/com/diagbot/dto/UsualDTO.java
  5. 78 0
      aipt-service/src/main/java/com/diagbot/entity/KlSymptom.java
  6. 2 1
      aipt-service/src/main/java/com/diagbot/entity/Symptom.java
  7. 89 1
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  8. 10 0
      aipt-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java
  9. 21 11
      aipt-service/src/main/java/com/diagbot/facade/PartFacade.java
  10. 49 2
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  11. 16 0
      aipt-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java
  12. 16 0
      aipt-service/src/main/java/com/diagbot/service/KlSymptomService.java
  13. 20 0
      aipt-service/src/main/java/com/diagbot/service/impl/KlSymptomServiceImpl.java
  14. 26 0
      aipt-service/src/main/java/com/diagbot/web/ConceptController.java
  15. 14 0
      aipt-service/src/main/java/com/diagbot/web/PushController.java
  16. 16 0
      common/src/main/java/com/diagbot/biz/push/entity/FeatureRateWithExplain.java
  17. 25 0
      common/src/main/java/com/diagbot/biz/push/entity/ResponseDataWithExplain.java
  18. 59 43
      config-server/src/main/resources/shared/mrman-service-dev.yml
  19. 59 43
      config-server/src/main/resources/shared/mrman-service-local.yml
  20. 59 43
      config-server/src/main/resources/shared/mrman-service-pre.yml
  21. 59 43
      config-server/src/main/resources/shared/mrman-service-pro.yml
  22. 59 42
      config-server/src/main/resources/shared/mrman-service-test.yml
  23. 8 0
      config-server/src/main/resources/shared/tran-service-dev.yml
  24. 8 0
      config-server/src/main/resources/shared/tran-service-local.yml
  25. 8 0
      config-server/src/main/resources/shared/tran-service-pre.yml
  26. 8 0
      config-server/src/main/resources/shared/tran-service-pro.yml
  27. 8 0
      config-server/src/main/resources/shared/tran-service-test.yml
  28. 27 0
      docs/031.2020-03-20智能分诊初始化脚本/init_med.sql
  29. 1412 0
      docs/031.2020-03-20智能分诊初始化脚本/init_tran.sql
  30. 4 4
      icss-service/src/test/java/com/diagbot/CodeGeneration.java
  31. 14 2
      knowledgeman-service/src/main/java/com/diagbot/dto/GetConceptInfoDTO.java
  32. 78 0
      knowledgeman-service/src/main/java/com/diagbot/entity/KlSymptom.java
  33. 32 1
      knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  34. 10 0
      knowledgeman-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java
  35. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java
  36. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/KlSymptomService.java
  37. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/KlSymptomServiceImpl.java
  38. 11 8
      knowledgeman-service/src/main/java/com/diagbot/vo/AddConceptInfoVO.java
  39. 22 0
      knowledgeman-service/src/main/java/com/diagbot/vo/SymptomExtVO.java
  40. 19 0
      knowledgeman-service/src/main/resources/mapper/KlSymptomMapper.xml
  41. 4 4
      knowledgeman-service/src/test/java/com/diagbot/CodeGeneration.java
  42. 16 1
      mrman-service/pom.xml
  43. 2 1
      mrman-service/src/main/java/com/diagbot/MrmanServiceApplication.java
  44. 19 0
      mrman-service/src/main/java/com/diagbot/dto/ModuleMappingDTO.java
  45. 31 0
      mrman-service/src/main/java/com/diagbot/dto/QcAllInputcasesDTO.java
  46. 53 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesAllDTO.java
  47. 17 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesDTO.java
  48. 25 0
      mrman-service/src/main/java/com/diagbot/dto/QcHospitalInfoAllDTO.java
  49. 123 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesAllDTO.java
  50. 43 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesMappingDTO.java
  51. 157 0
      mrman-service/src/main/java/com/diagbot/entity/CasesNumber.java
  52. 133 0
      mrman-service/src/main/java/com/diagbot/entity/Mode.java
  53. 160 0
      mrman-service/src/main/java/com/diagbot/entity/ModelMapping.java
  54. 132 0
      mrman-service/src/main/java/com/diagbot/entity/QcCases.java
  55. 145 0
      mrman-service/src/main/java/com/diagbot/entity/QcCasesEntry.java
  56. 212 0
      mrman-service/src/main/java/com/diagbot/entity/QcHospitalInfo.java
  57. 313 0
      mrman-service/src/main/java/com/diagbot/entity/QcInputcases.java
  58. 172 0
      mrman-service/src/main/java/com/diagbot/entity/QcInputcasesMapping.java
  59. 72 0
      mrman-service/src/main/java/com/diagbot/facade/QcCasesFacade.java
  60. 35 0
      mrman-service/src/main/java/com/diagbot/facade/QcHospitalInfoFacade.java
  61. 451 0
      mrman-service/src/main/java/com/diagbot/facade/QcInputcasesFacade.java
  62. 11 0
      mrman-service/src/main/java/com/diagbot/mapper/ArRechomeMapper.java
  63. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/CasesNumberMapper.java
  64. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/ModeMapper.java
  65. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/ModelMappingMapper.java
  66. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/QcCasesEntryMapper.java
  67. 20 0
      mrman-service/src/main/java/com/diagbot/mapper/QcCasesMapper.java
  68. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/QcHospitalInfoMapper.java
  69. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMapper.java
  70. 22 0
      mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMappingMapper.java
  71. 13 0
      mrman-service/src/main/java/com/diagbot/service/ArRechomeService.java
  72. 2 0
      mrman-service/src/main/java/com/diagbot/service/BrRecdiagnoseService.java
  73. 2 0
      mrman-service/src/main/java/com/diagbot/service/BrRecinhosService.java
  74. 16 0
      mrman-service/src/main/java/com/diagbot/service/CasesNumberService.java
  75. 16 0
      mrman-service/src/main/java/com/diagbot/service/ModeService.java
  76. 16 0
      mrman-service/src/main/java/com/diagbot/service/ModelMappingService.java
  77. 2 0
      mrman-service/src/main/java/com/diagbot/service/MrMedicalrecordsService.java
  78. 2 0
      mrman-service/src/main/java/com/diagbot/service/MrMrcontentService.java
  79. 18 0
      mrman-service/src/main/java/com/diagbot/service/QcCasesEntryService.java
  80. 22 0
      mrman-service/src/main/java/com/diagbot/service/QcCasesService.java
  81. 16 0
      mrman-service/src/main/java/com/diagbot/service/QcHospitalInfoService.java
  82. 23 0
      mrman-service/src/main/java/com/diagbot/service/QcInputcasesMappingService.java
  83. 18 0
      mrman-service/src/main/java/com/diagbot/service/QcInputcasesService.java
  84. 13 0
      mrman-service/src/main/java/com/diagbot/service/impl/ArRechomeServiceImpl.java
  85. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/CasesNumberServiceImpl.java
  86. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/ModeServiceImpl.java
  87. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/ModelMappingServiceImpl.java
  88. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcCasesEntryServiceImpl.java
  89. 27 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcCasesServiceImpl.java
  90. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcHospitalInfoServiceImpl.java
  91. 31 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesMappingServiceImpl.java
  92. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesServiceImpl.java
  93. 11 0
      mrman-service/src/main/java/com/diagbot/vo/BAZYPageVO.java
  94. 30 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputMappingSaveVO.java
  95. 19 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesAllVO.java
  96. 17 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesByIdVO.java
  97. 102 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesSaveVO.java
  98. 11 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesVO.java
  99. 11 1
      mrman-service/src/main/java/com/diagbot/web/ArRechomeController.java
  100. 0 0
      mrman-service/src/main/java/com/diagbot/web/BrRecdiagnoseController.java

+ 24 - 1
aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java

@@ -13,8 +13,10 @@ import com.diagbot.config.CryptConfiguer;
 import com.diagbot.dto.ConceptPushDTO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.entity.Concept;
+import com.diagbot.entity.KlSymptom;
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.facade.ClinicalFacade;
 import com.diagbot.facade.ConceptFacade;
 import com.diagbot.facade.TranEnDeFacade;
@@ -148,7 +150,8 @@ public class PushItemAggregate {
 
     @DataProvider("setSymptom")
     public List<ConceptPushDTO> setSymptom(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
-                                           @InvokeParameter("data") ResponseData data) {
+                                           @InvokeParameter("data") ResponseData data,
+                                           @InvokeParameter("sysType") Integer sysType) {
         List<ConceptPushDTO> symptomRes = ListUtil.newArrayList();
         //症状 概念列表
         if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
@@ -160,6 +163,26 @@ public class PushItemAggregate {
                         .collect(Collectors.toList());
                 if (ListUtil.isNotEmpty(nameList)) {
                     symptomRes = getConceptDTOList(nameList, LexiconTypeEnum.SYMPTOM.getKey());
+                    if (sysType.equals(SysTypeEnum.TRIAGE_SERVICE.getKey())
+                            || sysType.equals(SysTypeEnum.PREC_SERVICE.getKey())) {
+                        Map<String, KlSymptom> klSymptomMap
+                                = conceptFacade.getSymptomWithExplain(nameList, LexiconTypeEnum.SYMPTOM.getKey());
+                        if (klSymptomMap != null) {
+                            symptomRes.forEach(conceptPushDTO -> {
+                                if (klSymptomMap.containsKey(conceptPushDTO.getName())) {
+                                    conceptPushDTO
+                                            .setDescription(klSymptomMap.get(conceptPushDTO.getName()).getDescription());
+                                    conceptPushDTO
+                                            .setExplains(klSymptomMap.get(conceptPushDTO.getName()).getExplains());
+                                    if (StringUtil.isBlank(klSymptomMap.get(conceptPushDTO.getName()).getExplains())) {
+                                        conceptPushDTO.setHasExplain(0);
+                                    } else {
+                                        conceptPushDTO.setHasExplain(1);
+                                    }
+                                }
+                            });
+                        }
+                    }
                 }
             }
         }

+ 6 - 0
aipt-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java

@@ -17,4 +17,10 @@ public class ConceptPushDTO extends ConceptBaseDTO {
     //数据服务模式调用方名称
     private List<String> clientNames;
     private Integer type;
+    //客户端界面描述
+    private String description;
+    //是否详细阐述
+    private Integer hasExplain = 0;
+    //详细阐述
+    private String explains;
 }

+ 30 - 0
aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalExtDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import com.diagbot.annotation.CryptField;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2019/5/10 10:20
+ */
+@Getter
+@Setter
+public class ConceptRetrievalExtDTO {
+
+    private Long selfId;//本身概念id
+    @CryptField
+    private String selfName;//本身名称
+    private Long parentId;//父级id
+    @CryptField
+    private String parentName;//父级名称
+    @CryptField
+    private String sameName;//同义词名称
+    private Long showType;//显示类型(1本体,0同义词)
+    private Long libTypeId;//标签类型id
+    private String libTypeName;//标签类型名称
+    private Integer type;//questionType
+    private String description;
+    private String explains;
+}

+ 16 - 0
aipt-service/src/main/java/com/diagbot/dto/UsualDTO.java

@@ -0,0 +1,16 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 概念出参基础实体类
+ * @author: zhoutg
+ * @time: 2019/5/7 9:44
+ */
+@Getter
+@Setter
+public class UsualDTO extends ConceptBaseDTO{
+    private String description; // 描述
+    private String explains;   // 详细说明
+}

+ 78 - 0
aipt-service/src/main/java/com/diagbot/entity/KlSymptom.java

@@ -0,0 +1,78 @@
+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>
+ * 症状扩展表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+@TableName("kl_symptom")
+@Getter
+@Setter
+public class KlSymptom 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 description;
+
+    /**
+     * 详细阐述
+     */
+    private String explains;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 2 - 1
aipt-service/src/main/java/com/diagbot/entity/Symptom.java

@@ -19,5 +19,6 @@ public class Symptom extends ConceptBaseDTO {
 
     @JsonIgnore
     private Long partConceptId;
-    private String desc = ""; //简述
+    private String description;
+    private String explains;
 }

+ 89 - 1
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.config.CryptConfiguer;
 import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.ConceptRetrievalDTO;
+import com.diagbot.dto.ConceptRetrievalExtDTO;
 import com.diagbot.dto.ConceptWithOrderRes;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.UsualDTO;
 import com.diagbot.entity.Concept;
+import com.diagbot.entity.KlSymptom;
 import com.diagbot.entity.wrapper.ConceptWrapper;
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.IsDeleteEnum;
@@ -50,6 +53,8 @@ public class ConceptFacade extends ConceptServiceImpl {
     ConceptDetailFacade conceptDetailFacade;
     @Autowired
     CryptConfiguer configuer;
+    @Autowired
+    KlSymptomFacade klSymptomFacade;
 
     /**
      * 验证存在并且获取概念基本信息
@@ -223,7 +228,7 @@ public class ConceptFacade extends ConceptServiceImpl {
             conceptExistVO.setLibType(libType);
         }
 
-        if (configuer.cryptFlag){
+        if (configuer.cryptFlag) {
             CryptUtil.encryptList(conceptExistVO.getNameList());
         }
         //获取结构
@@ -283,6 +288,36 @@ public class ConceptFacade extends ConceptServiceImpl {
         return list;
     }
 
+
+    /**
+     * 获取常用标签包含通俗解释和详细说明
+     *
+     * @param conceptUsualVO
+     * @return
+     */
+    public List<UsualDTO> getConceptExtUsual(ConceptUsualVO conceptUsualVO) {
+        List<UsualDTO> res = new ArrayList<>();
+        List<ConceptBaseDTO> list = getConceptUsual(conceptUsualVO);
+        if (ListUtil.isNotEmpty(list)) {
+            List<KlSymptom> klSymptomList = klSymptomFacade.list(new QueryWrapper<KlSymptom>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("concept_id", list.stream().map(r -> r.getConceptId()).collect(Collectors.toList()))
+            );
+            Map<Long, KlSymptom> map = klSymptomList.stream().collect(Collectors.toMap(r -> r.getConceptId(), r -> r));
+            for (ConceptBaseDTO conceptBaseDTO : list) {
+                UsualDTO usualDTO = new UsualDTO();
+                BeanUtil.copyProperties(conceptBaseDTO, usualDTO);
+                if (map != null && map.get(conceptBaseDTO.getConceptId()) != null) {
+                    usualDTO.setDescription(map.get(conceptBaseDTO.getConceptId()).getDescription());
+                    usualDTO.setExplains(map.get(conceptBaseDTO.getConceptId()).getExplains());
+                }
+                res.add(usualDTO);
+            }
+        }
+        return res;
+    }
+
+
     /**
      * 概念id检索
      *
@@ -375,6 +410,35 @@ public class ConceptFacade extends ConceptServiceImpl {
     }
 
 
+    /**
+     * 概念id检索,附带通俗解释和详细说明
+     *
+     * @param retrievalVO
+     * @urn
+     */
+    public List<ConceptRetrievalExtDTO> retrivelConceptInfoExt(RetrievalVO retrievalVO) {
+        List<ConceptRetrievalExtDTO> res = new ArrayList<>();
+        List<ConceptRetrievalDTO> list = retrivelConceptInfo(retrievalVO);
+        if (ListUtil.isNotEmpty(list)) {
+            List<KlSymptom> klSymptomList = klSymptomFacade.list(new QueryWrapper<KlSymptom>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("concept_id", list.stream().map(r -> r.getSelfId()).collect(Collectors.toList()))
+            );
+            Map<Long, KlSymptom> map = klSymptomList.stream().collect(Collectors.toMap(r -> r.getConceptId(), r -> r));
+            for (ConceptRetrievalDTO conceptBaseDTO : list) {
+                ConceptRetrievalExtDTO conceptRetrievalExtDTO = new ConceptRetrievalExtDTO();
+                BeanUtil.copyProperties(conceptBaseDTO, conceptRetrievalExtDTO);
+                if (map != null && conceptBaseDTO.getSelfId() != null && map.get(conceptBaseDTO.getSelfId()) != null) {
+                    conceptRetrievalExtDTO.setDescription(map.get(conceptBaseDTO.getSelfId()).getDescription());
+                    conceptRetrievalExtDTO.setExplains(map.get(conceptBaseDTO.getSelfId()).getExplains());
+                }
+                res.add(conceptRetrievalExtDTO);
+            }
+        }
+        return res;
+    }
+
+
     /**
      * 静态知识标签检索
      *
@@ -435,4 +499,28 @@ public class ConceptFacade extends ConceptServiceImpl {
     public List<ConceptBaseDTO> indexConceptFac(ConceptBaseVO conceptBaseVO) {
         return this.indexConcept(conceptBaseVO);
     }
+
+    /**
+     * 查询带名词解释的症状术语
+     *
+     * @param names
+     * @return
+     */
+    public Map<String, KlSymptom> getSymptomWithExplain(List<String> names, Integer type) {
+        List<Concept> concepts = this.list(new QueryWrapper<Concept>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("lib_type", type)
+                .in(ListUtil.isNotEmpty(names), "lib_name", names));
+        List<Long> conceptIds = concepts.stream().map(item -> item.getId()).collect(Collectors.toList());
+        List<KlSymptom> klSymptoms = klSymptomFacade.list(new QueryWrapper<KlSymptom>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .in(ListUtil.isNotEmpty(conceptIds), "concept_id", conceptIds));
+        Map<Long, KlSymptom> klSymptomMap
+                = klSymptoms.stream().collect(Collectors.toMap(item -> item.getConceptId(), item -> item));
+        Map<String, KlSymptom> retMap = new HashMap<>();
+        for (Concept concept : concepts) {
+            retMap.put(concept.getLibName(), klSymptomMap.get(concept.getId()));
+        }
+        return retMap;
+    }
 }

+ 10 - 0
aipt-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java

@@ -0,0 +1,10 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.KlSymptomServiceImpl;
+import org.springframework.stereotype.Component;
+
+@Component
+public class KlSymptomFacade extends KlSymptomServiceImpl {
+
+
+}

+ 21 - 11
aipt-service/src/main/java/com/diagbot/facade/PartFacade.java

@@ -6,7 +6,7 @@ import com.diagbot.dto.ConceptWithOrderRes;
 import com.diagbot.dto.PartDTO;
 import com.diagbot.dto.PartSymptomDTO;
 import com.diagbot.entity.Concept;
-import com.diagbot.entity.ConceptDetail;
+import com.diagbot.entity.KlSymptom;
 import com.diagbot.entity.Symptom;
 import com.diagbot.entity.wrapper.ConceptWrapper;
 import com.diagbot.enums.IsDeleteEnum;
@@ -21,9 +21,8 @@ import com.diagbot.vo.PartSymptomVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Field;
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -42,6 +41,8 @@ public class PartFacade {
     ConceptDetailFacade conceptDetailFacade;
     @Autowired
     private CryptConfiguer cryptConfiguer;
+    @Autowired
+    KlSymptomFacade klSymptomFacade;
 
     /**
      * 根据已选部位返回对应的症状
@@ -79,6 +80,14 @@ public class PartFacade {
                 .in("lib_name", partList)
         );
 
+        // 正常数据有2条,将全身区域放到最下面
+        String areaStr = cryptConfiguer.cryptFlag ?
+                CryptUtil.encrypt_char( "全身区域") : "全身区域";
+        if (ListUtil.isNotEmpty(conceptList) && conceptList.size() == 2
+                && areaStr.equals(conceptList.get(0).getLibName())) {
+            Collections.reverse(conceptList);
+        }
+
         // 设置部位区域
         for (Concept c : conceptList) {
             PartSymptomDTO partSymptomDTO = new PartSymptomDTO();
@@ -124,14 +133,14 @@ public class PartFacade {
         List<ConceptWithOrderRes> symptomList = conceptFacade.getConceptWithOrder(wrapper);
         Map<Long, List<ConceptWithOrderRes>> symptomMap = EntityUtil.makeEntityListMap(symptomList, "startId");
 
-        // 获取症状的简述信息
-        List<ConceptDetail> conceptDetailList = conceptDetailFacade.list(
-                new QueryWrapper<ConceptDetail>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .in("concept_id", symptomList.stream().map(row -> row.getEndId()).distinct().collect(Collectors.toList()))
-                        .apply("find_in_set({0},position)", 7));
-        Map<Long, String> descMap = conceptDetailList.stream().collect(Collectors.toMap(row -> row.getConceptId(), row -> row.getText()));
 
+        // TODO 获取症状的简述信息
+        List<KlSymptom> klSymptomList = klSymptomFacade.list(new QueryWrapper<KlSymptom>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .in("concept_id",
+                        symptomList.stream().map(row -> row.getEndId()).distinct().collect(Collectors.toList()))
+        );
+        Map<Long, KlSymptom> descMap = klSymptomList.stream().collect(Collectors.toMap(row -> row.getConceptId(), row -> row));
 
         // 设置部位下的症状
         for (PartSymptomDTO partSymptomDTO : res) {
@@ -146,7 +155,8 @@ public class PartFacade {
                         bean.setName(conceptWithOrderRes.getEndName());
                         bean.setPartConceptId(conceptWithOrderRes.getStartId());
                         if (descMap.get(conceptWithOrderRes.getEndId()) != null) {
-                            bean.setDesc(descMap.get(conceptWithOrderRes.getEndId()));
+                            bean.setDescription(descMap.get(conceptWithOrderRes.getEndId()).getDescription());
+                            bean.setExplains(descMap.get(conceptWithOrderRes.getEndId()).getExplains());
                         }
                         symptoms.add(bean);
                     }

+ 49 - 2
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,15 +1,22 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
+import com.diagbot.biz.push.entity.FeatureRate;
+import com.diagbot.biz.push.entity.FeatureRateWithExplain;
 import com.diagbot.biz.push.entity.Item;
 import com.diagbot.biz.push.entity.ResponseData;
-import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.biz.push.entity.ResponseDataWithExplain;
 import com.diagbot.biz.push.entity.Treat;
 import com.diagbot.biz.push.enums.FeatureTypeEnum;
+import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.dto.PushDTO;
+import com.diagbot.entity.KlSymptom;
+import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,8 +25,10 @@ import org.springframework.stereotype.Component;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * @Description:
@@ -36,6 +45,8 @@ public class PushFacade {
     private TransferFacade transferFacade;
     @Autowired
     DataBeanAggregateQueryFacade dataBeanAggregateQueryFacade;
+    @Autowired
+    private ConceptFacade conceptFacade;
 
     /**
      * 推理接口
@@ -60,11 +71,12 @@ public class PushFacade {
 
         try {
             Map<String, Object> invokeParams = new HashMap<>();
-            invokeParams.put("pushDTO",pushDTO);
+            invokeParams.put("pushDTO", pushDTO);
             invokeParams.put("featureTypeSet", featureTypeSet);
             invokeParams.put("data", data);
             invokeParams.put("isConnect", isConnect);
             invokeParams.put("hosCode", searchVO.getHosCode());
+            invokeParams.put("sysType", searchVO.getSysType());
             pushDTO
                     = dataBeanAggregateQueryFacade.get("setAll", invokeParams, PushDTO.class);
         } catch (Exception e) {
@@ -78,6 +90,41 @@ public class PushFacade {
         return pushDTO;
     }
 
+    /**
+     * 推理结果带名词解释
+     *
+     * @param searchVO
+     * @return
+     */
+    public ResponseDataWithExplain pushWithExplain(SearchVO searchVO) {
+        ResponseDataWithExplain responseData = new ResponseDataWithExplain();
+        ResponseData data = clinicalFacade.processClinicalData(searchVO);
+        List<FeatureRate> symptom = data.getSymptom();
+        if (ListUtil.isNotEmpty(symptom)
+                && (searchVO.getSysType().equals(SysTypeEnum.PREC_SERVICE.getKey())
+                || searchVO.getSysType().equals(SysTypeEnum.TRIAGE_SERVICE.getKey()))) {
+            List<String> names = symptom.stream().map(item -> item.getFeatureName()).collect(Collectors.toList());
+            Map<String, KlSymptom> klSymptomMap
+                    = conceptFacade.getSymptomWithExplain(names, LexiconTypeEnum.SYMPTOM.getKey());
+            List<FeatureRateWithExplain> featureRateWithExplains
+                    = BeanUtil.listCopyTo(symptom, FeatureRateWithExplain.class);
+            if (klSymptomMap != null) {
+                for (FeatureRateWithExplain featureRateWithExplain : featureRateWithExplains) {
+                    if (klSymptomMap.containsKey(featureRateWithExplain.getFeatureName())) {
+                        featureRateWithExplain
+                                .setDescription(klSymptomMap.get(featureRateWithExplain.getFeatureName()).getDescription());
+                        featureRateWithExplain
+                                .setExplains(klSymptomMap.get(featureRateWithExplain.getFeatureName()).getExplains());
+                    }
+                }
+            }
+            responseData.setSymptom(featureRateWithExplains);
+        }
+        responseData.setDis(data.getDis());
+        return responseData;
+    }
+
+
     /**
      * 获取治疗方案
      *

+ 16 - 0
aipt-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.KlSymptom;
+
+/**
+ * <p>
+ * 症状扩展表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+public interface KlSymptomMapper extends BaseMapper<KlSymptom> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.KlSymptom;
+
+/**
+ * <p>
+ * 症状扩展表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+public interface KlSymptomService extends IService<KlSymptom> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.KlSymptom;
+import com.diagbot.mapper.KlSymptomMapper;
+import com.diagbot.service.KlSymptomService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 症状扩展表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+@Service
+public class KlSymptomServiceImpl extends ServiceImpl<KlSymptomMapper, KlSymptom> implements KlSymptomService {
+
+}

+ 26 - 0
aipt-service/src/main/java/com/diagbot/web/ConceptController.java

@@ -4,8 +4,10 @@ package com.diagbot.web;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.ConceptRetrievalDTO;
+import com.diagbot.dto.ConceptRetrievalExtDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.UsualDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.facade.ConceptFacade;
 import com.diagbot.util.ParamConvertUtil;
@@ -57,6 +59,18 @@ public class ConceptController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "知识库标准化-常用标签——根据科室获取常用标签包含通俗解释和详细说明[by:zhoutg]",
+            notes = "deptName:科室名称<br>" +
+                    "age:年龄<br>" +
+                    "sexType: 性别<br>" +
+                    "type:类型(1:症状 3:其他史 4:查体,5:化验 6:辅检 7:诊断),必填<br>")
+    @PostMapping("/getConceptExtUsual")
+    @SysLogger("getConceptExtUsual")
+    public RespDTO<List<UsualDTO>> getConceptExtUsual(@RequestBody @Valid ConceptUsualVO conceptUsualVO) {
+        List<UsualDTO> data = conceptFacade.getConceptExtUsual(conceptUsualVO);
+        return RespDTO.onSuc(data);
+    }
+
     /**
      * 根据概念Id列表获取概念列表Map
      *
@@ -121,6 +135,18 @@ public class ConceptController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "知识库标准化-标签检索,附带通俗解释和详细说明[by:zhoutg]",
+            notes = "type:类型(1:症状 3:其他史 4:查体,5:化验 6:辅检 7:诊断),必填<br>" +
+                    "age:年龄,必填<br>" +
+                    "inputStr:检索内容,必填<br>" +
+                    "sexType:性别,必填<br>" +
+                    "inputIds:需要去重的id<br>")
+    @PostMapping("/retrivelConceptInfoExt")
+    @SysLogger("retrivelConceptInfoExt")
+    public RespDTO<List<ConceptRetrievalExtDTO>> retrivelConceptInfoExt(@RequestBody @Valid RetrievalVO retrievalVO) {
+        List<ConceptRetrievalExtDTO> data = conceptFacade.retrivelConceptInfoExt(retrievalVO);
+        return RespDTO.onSuc(data);
+    }
 
     /**
      * 根据名称和类型获取概念列表Map

+ 14 - 0
aipt-service/src/main/java/com/diagbot/web/PushController.java

@@ -1,6 +1,7 @@
 package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.biz.push.entity.ResponseDataWithExplain;
 import com.diagbot.biz.push.vo.SearchVO;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
@@ -87,4 +88,17 @@ public class PushController {
         PushDTO data = pushFacade.pushInner(searchVO);
         return RespDTO.onSuc(data);
     }
+
+    @ApiOperation(value = "知识库标准化-推理接口[by:zhaops]",
+            notes = "hosCode: 医院编码<br>" +
+                    "featureType:类型(必填多选),1:症状,7:诊断,多项用逗号分开,String<br>" +
+                    "age: 年龄(必填)<br>" +
+                    "sex:性别(必填),1:男,2:女,Integer<br>" +
+                    "symptom:现病史,String<br>")
+    @PostMapping("/pushWithExplain")
+    @SysLogger("pushWithExplain")
+    public RespDTO<ResponseDataWithExplain> pushWithExplain(@Valid @RequestBody SearchVO searchVO) {
+        ResponseDataWithExplain data = pushFacade.pushWithExplain(searchVO);
+        return RespDTO.onSuc(data);
+    }
 }

+ 16 - 0
common/src/main/java/com/diagbot/biz/push/entity/FeatureRateWithExplain.java

@@ -0,0 +1,16 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:推理返回类型带名词解释
+ * @Author:zhaops
+ * @time: 2020/3/23 10:44
+ */
+@Getter
+@Setter
+public class FeatureRateWithExplain extends FeatureRate {
+    private String description;
+    private String explains;
+}

+ 25 - 0
common/src/main/java/com/diagbot/biz/push/entity/ResponseDataWithExplain.java

@@ -0,0 +1,25 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:推理结果带名词解释
+ * @Author:zhaops
+ * @time: 2020/3/23 10:45
+ */
+@Getter
+@Setter
+public class ResponseDataWithExplain {
+    /**
+     * 症状
+     */
+    private List<FeatureRateWithExplain> symptom = new ArrayList<>(10);
+    /**
+     * 诊断
+     */
+    private List<FeatureRate> dis = new ArrayList<>(10);
+}

+ 59 - 43
config-server/src/main/resources/shared/mrman-service-dev.yml

@@ -4,51 +4,67 @@ server:
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: oracle.jdbc.driver.OracleDriver
-      platform: oracle
-      url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
-      username: ETRACKMRQC
-      password: ETRACKMRQC
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        share-prepared-statements: true
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
 
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      # 数据库配置
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-qctest?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: oracle.jdbc.driver.OracleDriver
+          platform: oracle
+          url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
+          username: ETRACKMRQC
+          password: ETRACKMRQC
+          druid:
+            initial-size: 5
 
   cloud:
     stream:

+ 59 - 43
config-server/src/main/resources/shared/mrman-service-local.yml

@@ -4,51 +4,67 @@ server:
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: oracle.jdbc.driver.OracleDriver
-      platform: oracle
-      url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
-      username: ETRACKMRQC
-      password: ETRACKMRQC
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        share-prepared-statements: true
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
 
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      # 数据库配置
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: oracle.jdbc.driver.OracleDriver
+          platform: oracle
+          url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
+          username: ETRACKMRQC
+          password: ETRACKMRQC
+          druid:
+            initial-size: 5
 
   cloud:
     stream:

+ 59 - 43
config-server/src/main/resources/shared/mrman-service-pre.yml

@@ -4,51 +4,67 @@ server:
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: oracle.jdbc.driver.OracleDriver
-      platform: oracle
-      url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
-      username: ETRACKMRQC
-      password: ETRACKMRQC
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        share-prepared-statements: true
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
 
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      # 数据库配置
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: oracle.jdbc.driver.OracleDriver
+          platform: oracle
+          url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
+          username: ETRACKMRQC
+          password: ETRACKMRQC
+          druid:
+            initial-size: 5
 
   cloud:
     stream:

+ 59 - 43
config-server/src/main/resources/shared/mrman-service-pro.yml

@@ -4,51 +4,67 @@ server:
 # 驱动配置信息
 spring:
   datasource:
-    druid:
-      driver-class-name: oracle.jdbc.driver.OracleDriver
-      platform: oracle
-      url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
-      username: ETRACKMRQC
-      password: ETRACKMRQC
-      # 连接池的配置信息
-      # 初始化大小,最小,最大
-      initialSize: 5
-      minIdle: 5
-      maxActive: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      validationQuery: SELECT 1 FROM DUAL
-      testWhileIdle: true
-      testOnBorrow: false
-      testOnReturn: false
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters.commons-log.connection-logger-name: wall,log4j
-      filter:
-        stat:
+    dynamic:
+      primary: master
+      druid:
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        initialSize: 5
+        minIdle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters.commons-log.connection-logger-name: wall,log4j
+        share-prepared-statements: true
+        filter:
+          stat:
+            enabled: true
+            mergeSql: true
+            log-slow-sql: true
+            slow-sql-millis: 2000
+        #监控配置
+        web-stat-filter:
           enabled: true
-          mergeSql: true
-          log-slow-sql: true
-          slow-sql-millis: 2000
-      #监控配置
-      web-stat-filter:
-        enabled: true
-        url-pattern: /*
-        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+          url-pattern: /*
+          exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
 
-      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
-      stat-view-servlet:
-        enabled: true
-        url-pattern: /druid/*
-        reset-enable: false
-        login-username: root
-        login-password: root
+        # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+        stat-view-servlet:
+          enabled: true
+          url-pattern: /druid/*
+          reset-enable: false
+          login-username: root
+          login-password: root
+      # 数据库配置
+      datasource:
+        master:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: oracle.jdbc.driver.OracleDriver
+          platform: oracle
+          url: jdbc:oracle:thin:@192.168.2.246:1521:orcl
+          username: ETRACKMRQC
+          password: ETRACKMRQC
+          druid:
+            initial-size: 5
 
   cloud:
     stream:

+ 59 - 42
config-server/src/main/resources/shared/mrman-service-test.yml

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

+ 8 - 0
config-server/src/main/resources/shared/tran-service-dev.yml

@@ -110,3 +110,11 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+nalizx:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-feature5/gateway
+  appKey: ngari5e7dd28111dc391a
+  appSecret: 11dc391a123e1002

+ 8 - 0
config-server/src/main/resources/shared/tran-service-local.yml

@@ -110,3 +110,11 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+nalizx:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-feature5/gateway
+  appKey: ngari5e7dd28111dc391a
+  appSecret: 11dc391a123e1002

+ 8 - 0
config-server/src/main/resources/shared/tran-service-pre.yml

@@ -110,3 +110,11 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+nalizx:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-feature5/gateway
+  appKey: ngari5e7dd28111dc391a
+  appSecret: 11dc391a123e1002

+ 8 - 0
config-server/src/main/resources/shared/tran-service-pro.yml

@@ -110,3 +110,11 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+nalizx:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-feature5/gateway
+  appKey: ngari5e7dd28111dc391a
+  appSecret: 11dc391a123e1002

+ 8 - 0
config-server/src/main/resources/shared/tran-service-test.yml

@@ -110,3 +110,11 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
 
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12
+
+nalizx:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-feature5/gateway
+  appKey: ngari5e7dd28111dc391a
+  appSecret: 11dc391a123e1002

+ 27 - 0
docs/031.2020-03-20智能分诊初始化脚本/init_med.sql

@@ -0,0 +1,27 @@
+use `med`;
+drop table if exists `kl_symptom`;
+CREATE TABLE `kl_symptom` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `concept_id` bigint(20) NOT NULL COMMENT '术语概念id',
+  `description` varchar(500) NOT NULL DEFAULT '' COMMENT '描述',
+  `explains` text DEFAULT NULL COMMENT '详细阐述',
+  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `CONCEPT_ID_INDEX` (`concept_id`) USING BTREE COMMENT '概念id全表唯一'
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='症状扩展表';
+
+insert into `med`.kl_symptom(`concept_id`)
+select DISTINCT id from `med`.kl_concept where lib_type = 1;
+
+update `med`.kl_symptom t,
+    (select b.id, a.description, a.explains from `sys-prec`.prec_question_info a, `med`.kl_concept b
+    where a.is_deleted = 'N' and b.is_deleted = 'N' and  b.lib_type = 1 and a.type = 1 and a.tag_type = 4
+    and Encrypt_char(a.tag_name) = b.lib_name) m
+set t.description = m.description, t.explains = m.explains
+where t.concept_id = m.id;
+

File diff suppressed because it is too large
+ 1412 - 0
docs/031.2020-03-20智能分诊初始化脚本/init_tran.sql


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

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("wangfeng");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -49,14 +49,14 @@ public class CodeGeneration {
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
         dsc.setPassword("lantone");
-        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/sys-icss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
+        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/sys-mrqc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
-        strategy.setTablePrefix(new String[] { "icss_" });// 此处可以修改为您的表前缀
+        strategy.setTablePrefix(new String[] { "" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "icss_template_folder","icss_folder_mapping","icss_template_classify","icss_classify_mapping" }); // 需要生成的表
+        strategy.setInclude(new String[] {"qc_hospital_info","qc_inputcases"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);

+ 14 - 2
knowledgeman-service/src/main/java/com/diagbot/dto/GetConceptInfoDTO.java

@@ -1,11 +1,11 @@
 package com.diagbot.dto;
 
-import java.util.List;
-
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.util.List;
+
 /**
  * @Description
  * @author rgb
@@ -68,5 +68,17 @@ public class GetConceptInfoDTO {
      */
     @ApiModelProperty(value="诊断类型")
     private String classify;
+
+    /**
+     * 通俗解释
+     */
+    @ApiModelProperty(value="通俗解释")
+    private String description;
+
+    /**
+     * 详细说明
+     */
+    @ApiModelProperty(value="详细说明")
+    private String explains;
     
 }

+ 78 - 0
knowledgeman-service/src/main/java/com/diagbot/entity/KlSymptom.java

@@ -0,0 +1,78 @@
+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>
+ * 症状扩展表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+@TableName("kl_symptom")
+@Getter
+@Setter
+public class KlSymptom 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 description;
+
+    /**
+     * 详细阐述
+     */
+    private String explains;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 32 - 1
knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -21,6 +21,7 @@ import com.diagbot.entity.Disease;
 import com.diagbot.entity.Lexicon;
 import com.diagbot.entity.LibraryInfo;
 import com.diagbot.entity.Relation;
+import com.diagbot.entity.KlSymptom;
 import com.diagbot.entity.wrapper.ConceptWrapper;
 import com.diagbot.enums.DiseaseClassifyEnum;
 import com.diagbot.enums.IsDeleteEnum;
@@ -60,6 +61,7 @@ import com.diagbot.vo.IndexLexiconVO;
 import com.diagbot.vo.IndexVO;
 import com.diagbot.vo.KLQuestionVO;
 import com.diagbot.vo.RemoveConceptInfoVO;
+import com.diagbot.vo.SymptomExtVO;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import org.apache.commons.lang.time.DateFormatUtils;
@@ -122,6 +124,8 @@ public class ConceptFacade extends ConceptServiceImpl {
     private CryptConfiguer cryptConfiguer;
     @Autowired
     private IcssManRpcFacade icssManRpcFacade;
+    @Autowired
+    private KlSymptomFacade klSymptomFacade;
 
     /**
      * 获取所有化验公表项
@@ -548,6 +552,14 @@ public class ConceptFacade extends ConceptServiceImpl {
                 getConceptInfoDTO.setDeptId(disease.getDeptId());
                 getConceptInfoDTO.setClassify(disease.getClassify());
             }
+        } else if (LexiconTypeEnum.SYMPTOM.getKey() == concept.getLibType().intValue()) {
+            KlSymptom klSymptom = klSymptomFacade.getOne(new QueryWrapper<KlSymptom>()
+                    .eq("concept_id", concept.getId())
+                    .eq("is_deleted", IsDeleteEnum.N.getKey()), false);
+            if (klSymptom != null) {
+                getConceptInfoDTO.setDescription(klSymptom.getDescription());
+                getConceptInfoDTO.setExplains(klSymptom.getExplains());
+            }
         }
 
         return getConceptInfoDTO;
@@ -746,6 +758,7 @@ public class ConceptFacade extends ConceptServiceImpl {
             conceptCommonFacade.saveOrUpdate(conceptCommon);
         }
 
+        // 诊断扩展属性
         if (lexicon.getName().equals(LexiconTypeEnum.DIAGNOSIS.getName())) {
             QueryWrapper<Disease> diseaseQe = new QueryWrapper<>();
             diseaseQe.eq("concept_id", conceptId);
@@ -769,10 +782,28 @@ public class ConceptFacade extends ConceptServiceImpl {
             } else {
                 BeanUtil.copyProperties(addConceptInfoVO.getAddCptDiseaseExtVO(), disease);
             }
-
             diseaseFacade.saveOrUpdate(disease);
         }
 
+        // 症状扩展属性
+        if (lexicon.getName().equals(LexiconTypeEnum.SYMPTOM.getName())) {
+            KlSymptom klSymptom = klSymptomFacade.getOne(new QueryWrapper<KlSymptom>()
+                    .eq("concept_id", conceptId), false);
+            if (klSymptom == null) {
+                klSymptom = new KlSymptom();
+                klSymptom.setGmtCreate(now);
+                klSymptom.setCreator(currentUser);
+            }
+            klSymptom.setConceptId(conceptId);
+            klSymptom.setGmtModified(now);
+            klSymptom.setModifier(currentUser);
+            SymptomExtVO smpVo = addConceptInfoVO.getSymptomExtVO();
+            if (smpVo != null) {
+                klSymptom.setDescription(smpVo.getDescription());
+                klSymptom.setExplains(smpVo.getExplains());
+            }
+            klSymptomFacade.saveOrUpdate(klSymptom);
+        }
         return true;
     }
 

+ 10 - 0
knowledgeman-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java

@@ -0,0 +1,10 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.KlSymptomServiceImpl;
+import org.springframework.stereotype.Component;
+
+@Component
+public class KlSymptomFacade extends KlSymptomServiceImpl {
+
+
+}

+ 16 - 0
knowledgeman-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.KlSymptom;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 症状扩展表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+public interface KlSymptomMapper extends BaseMapper<KlSymptom> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.KlSymptom;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 症状扩展表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+public interface KlSymptomService extends IService<KlSymptom> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.KlSymptom;
+import com.diagbot.mapper.KlSymptomMapper;
+import com.diagbot.service.KlSymptomService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 症状扩展表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-20
+ */
+@Service
+public class KlSymptomServiceImpl extends ServiceImpl<KlSymptomMapper, KlSymptom> implements KlSymptomService {
+
+}

+ 11 - 8
knowledgeman-service/src/main/java/com/diagbot/vo/AddConceptInfoVO.java

@@ -1,20 +1,17 @@
 package com.diagbot.vo;
 
-import java.util.List;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotEmpty;
-
 import com.diagbot.annotation.CryptField;
-import org.hibernate.validator.constraints.Range;
-
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptCommon;
 import com.diagbot.entity.LibraryInfo;
-
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
+import org.hibernate.validator.constraints.Range;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
 
 /**
  * @Description
@@ -58,6 +55,12 @@ public class AddConceptInfoVO {
 	 */
 	@ApiModelProperty(value="诊断类型术语扩展")
 	private AddCptDiseaseExtVO addCptDiseaseExtVO;
+
+	/**
+	 * 症状扩展属性
+	 */
+	@ApiModelProperty(value="症状扩展属性")
+	private SymptomExtVO symptomExtVO;
 	
 	/**
      * 性别:1:男, 2:女, 3:通用

+ 22 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/SymptomExtVO.java

@@ -0,0 +1,22 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description 症状扩展表
+ * @author zhoutg
+ * @time 2019-03
+ */
+@Getter
+@Setter
+public class SymptomExtVO {
+
+	@ApiModelProperty(value="症状描述")
+    private String description;
+
+	@ApiModelProperty(value="详细阐述")
+    private String explains;
+	
+}

+ 19 - 0
knowledgeman-service/src/main/resources/mapper/KlSymptomMapper.xml

@@ -0,0 +1,19 @@
+<?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.KlSymptomMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.KlSymptom">
+        <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="description" property="description" />
+        <result column="explains" property="explains" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

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

@@ -48,15 +48,15 @@ public class CodeGeneration {
         dsc.setDbType(DbType.MYSQL);
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("diagbot@20180822");
-        dsc.setUrl("jdbc:mysql://192.168.2.235:3306/med-man?useUnicode=true&characterEncoding=utf-8");
+        dsc.setPassword("lantone");
+        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/med?useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
-        strategy.setTablePrefix(new String[] { "kl_" });// 此处可以修改为您的表前缀
+        strategy.setTablePrefix(new String[] { "" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "kl_diagnose_question"}); // 需要生成的表
+        strategy.setInclude(new String[] { "kl_symptom"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);

+ 16 - 1
mrman-service/pom.xml

@@ -89,12 +89,20 @@
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger-ui</artifactId>
         </dependency>
-        <!--database-->
+        <!--oracle-database-->
         <dependency>
             <groupId>com.oracle</groupId>
             <artifactId>ojdbc6</artifactId>
             <version>11.2.0.3</version>
         </dependency>
+
+        <!--mysql-database-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
         <!--security-->
         <dependency>
             <groupId>org.springframework.cloud</groupId>
@@ -149,6 +157,13 @@
             <version>${mybatis-spring-boot.version}</version>
         </dependency>
 
+        <!--多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-stream-rabbit</artifactId>

+ 2 - 1
mrman-service/src/main/java/com/diagbot/MrmanServiceApplication.java

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

+ 19 - 0
mrman-service/src/main/java/com/diagbot/dto/ModuleMappingDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2020/3/23 18:30
+ */
+@Getter
+@Setter
+public class ModuleMappingDTO {
+    private Long modeId;
+    private String name;
+    private List<String> text;
+}

+ 31 - 0
mrman-service/src/main/java/com/diagbot/dto/QcAllInputcasesDTO.java

@@ -0,0 +1,31 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: wangyu
+ * @time: 2020/3/23 17:56
+ */
+@Getter
+@Setter
+public class QcAllInputcasesDTO {
+    private Long id;
+    private String isDeleted;
+    private Date gmtCreate;
+    private Date gmtModified;
+    private String creator;
+    private String modifier;
+    private String hospitalId;
+    private String hospitalName;
+    private String caseNumber;
+    private String isTag;
+    private List<ModuleMappingDTO> moduleMappingDTOList;
+    private List<QcInputcasesMappingDTO> qcInputcasesMapping;
+    private String remark;
+
+}

+ 53 - 0
mrman-service/src/main/java/com/diagbot/dto/QcCasesAllDTO.java

@@ -0,0 +1,53 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.QcCasesEntry;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 16:45
+ */
+@Setter
+@Getter
+public class QcCasesAllDTO {
+
+    private Long id;
+
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<QcCasesEntry> qcCasesEntry;
+}

+ 17 - 0
mrman-service/src/main/java/com/diagbot/dto/QcCasesDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:00
+ */
+@Getter
+@Setter
+public class QcCasesDTO  {
+    private Long Id ;
+    private String name;
+    private String remark;
+}

+ 25 - 0
mrman-service/src/main/java/com/diagbot/dto/QcHospitalInfoAllDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.diagbot.entity.QcHospitalInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-17 13:49
+ */
+@Setter
+@Getter
+public class QcHospitalInfoAllDTO  {
+    private Long id;
+    /**
+     * 医院名称
+     */
+    private String name;
+
+}

+ 123 - 0
mrman-service/src/main/java/com/diagbot/dto/QcInputcasesAllDTO.java

@@ -0,0 +1,123 @@
+package com.diagbot.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 18:58
+ */
+@Setter
+@Getter
+public class QcInputcasesAllDTO {
+    /**
+     * 主键
+     */
+    private Long id;
+
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    private Integer hospitalId;
+
+    /**
+     * 入院记录
+     */
+    private String text;
+
+    /**
+     * 临床用血审核
+     */
+    private String clinicalBlood;
+
+    /**
+     * 会诊
+     */
+    private String consultation;
+
+    /**
+     * 死亡病例讨论
+     */
+    private String deathCaseDiscuss;
+
+    /**
+     * 死亡记录
+     */
+    private String deathRecord;
+
+    /**
+     * 疑难病例讨论
+     */
+    private String difficultCaseDiscuss;
+
+    /**
+     * 值班交接班
+     */
+    private String dutyShiftSystem;
+
+    /**
+     * 首次病程录
+     */
+    private String firstCourseRecord;
+
+    /**
+     * 出院小结
+     */
+    private String leaveHospital;
+
+    /**
+     * 分级护理
+     */
+    private String nursingSystem;
+
+    /**
+     * 手术期间讨论
+     */
+    private String operationDiscussion;
+
+    /**
+     * 术前讨论
+     */
+    private String preOperativeDiscussion;
+
+    /**
+     * 三级查房
+     */
+    private String threeLevelWard;
+
+    /**
+     * 危急值报告
+     */
+    private String criticalValue;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<QcInputcasesMappingDTO> qcInputcasesMapping;
+}

+ 43 - 0
mrman-service/src/main/java/com/diagbot/dto/QcInputcasesMappingDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 19:02
+ */
+@Setter
+@Getter
+public class QcInputcasesMappingDTO {
+
+
+    private Long id;
+
+    /**
+     * 病历文本id
+     */
+    private Long textId;
+
+
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+    private String casesName;
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+    private String EntryName;
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+    private String caseNumberId;
+
+
+}

+ 157 - 0
mrman-service/src/main/java/com/diagbot/entity/CasesNumber.java

@@ -0,0 +1,157 @@
+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 wangyu
+ * @since 2020-03-23
+ */
+@TableName("qc_cases_number")
+public class CasesNumber 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 String hospitalId;
+
+    /**
+     * 病历号
+     */
+    private String caseNumber;
+
+    private String isTag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(String hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getCaseNumber() {
+        return caseNumber;
+    }
+
+    public void setCaseNumber(String caseNumber) {
+        this.caseNumber = caseNumber;
+    }
+    public String getIsTag() {
+        return isTag;
+    }
+
+    public void setIsTag(String isTag) {
+        this.isTag = isTag;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "CasesNumber{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", caseNumber=" + caseNumber +
+            ", isTag=" + isTag +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 133 - 0
mrman-service/src/main/java/com/diagbot/entity/Mode.java

@@ -0,0 +1,133 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 病历
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+@TableName("qc_mode")
+public class Mode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Mode{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", name=" + name +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 160 - 0
mrman-service/src/main/java/com/diagbot/entity/ModelMapping.java

@@ -0,0 +1,160 @@
+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 wangyu
+ * @since 2020-03-23
+ */
+@TableName("qc_model_mapping")
+public class ModelMapping 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 caseNumberId;
+
+    /**
+     * 数据类型id
+     */
+    private Long modeId;
+
+    /**
+     * 内容
+     */
+    private String text;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 getCaseNumberId() {
+        return caseNumberId;
+    }
+
+    public void setCaseNumberId(Long caseNumberId) {
+        this.caseNumberId = caseNumberId;
+    }
+    public Long getModeId() {
+        return modeId;
+    }
+
+    public void setModeId(Long modeId) {
+        this.modeId = modeId;
+    }
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "ModelMapping{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", caseNumberId=" + caseNumberId +
+            ", modeId=" + modeId +
+            ", text=" + text +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 132 - 0
mrman-service/src/main/java/com/diagbot/entity/QcCases.java

@@ -0,0 +1,132 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 病历
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcCases implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCases{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", name=" + name +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 145 - 0
mrman-service/src/main/java/com/diagbot/entity/QcCasesEntry.java

@@ -0,0 +1,145 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 病历条目
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcCasesEntry implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 条目
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getCasesId() {
+        return casesId;
+    }
+
+    public void setCasesId(Long casesId) {
+        this.casesId = casesId;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCasesEntry{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", casesId=" + casesId +
+            ", name=" + name +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 212 - 0
mrman-service/src/main/java/com/diagbot/entity/QcHospitalInfo.java

@@ -0,0 +1,212 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 医院信息表
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-17
+ */
+@TableName("qc_hospital_info")
+public class QcHospitalInfo 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 code;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 状态:0.禁用1.启用
+     */
+    private Integer status;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public Integer getConnect() {
+        return connect;
+    }
+
+    public void setConnect(Integer connect) {
+        this.connect = connect;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcHospitalInfo{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", code=" + code +
+            ", name=" + name +
+            ", address=" + address +
+            ", spell=" + spell +
+            ", status=" + status +
+            ", orderNo=" + orderNo +
+            ", connect=" + connect +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 313 - 0
mrman-service/src/main/java/com/diagbot/entity/QcInputcases.java

@@ -0,0 +1,313 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病历录入
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-17
+ */
+@TableName("qc_inputcases")
+public class QcInputcases 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 Integer hospitalId;
+
+    /**
+     * 入院记录
+     */
+    private String text;
+
+    /**
+     * 临床用血审核
+     */
+    private String clinicalBlood;
+
+    /**
+     * 会诊
+     */
+    private String consultation;
+
+    /**
+     * 死亡病例讨论
+     */
+    private String deathCaseDiscuss;
+
+    /**
+     * 死亡记录
+     */
+    private String deathRecord;
+
+    /**
+     * 疑难病例讨论
+     */
+    private String difficultCaseDiscuss;
+
+    /**
+     * 值班交接班
+     */
+    private String dutyShiftSystem;
+
+    /**
+     * 首次病程录
+     */
+    private String firstCourseRecord;
+
+    /**
+     * 出院小结
+     */
+    private String leaveHospital;
+
+    /**
+     * 分级护理
+     */
+    private String nursingSystem;
+
+    /**
+     * 手术期间讨论
+     */
+    private String operationDiscussion;
+
+    /**
+     * 术前讨论
+     */
+    private String preOperativeDiscussion;
+
+    /**
+     * 三级查房
+     */
+    private String threeLevelWard;
+
+    /**
+     * 危急值报告
+     */
+    private String criticalValue;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    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 Integer getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Integer hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public String getClinicalBlood() {
+        return clinicalBlood;
+    }
+
+    public void setClinicalBlood(String clinicalBlood) {
+        this.clinicalBlood = clinicalBlood;
+    }
+    public String getConsultation() {
+        return consultation;
+    }
+
+    public void setConsultation(String consultation) {
+        this.consultation = consultation;
+    }
+    public String getDeathCaseDiscuss() {
+        return deathCaseDiscuss;
+    }
+
+    public void setDeathCaseDiscuss(String deathCaseDiscuss) {
+        this.deathCaseDiscuss = deathCaseDiscuss;
+    }
+    public String getDeathRecord() {
+        return deathRecord;
+    }
+
+    public void setDeathRecord(String deathRecord) {
+        this.deathRecord = deathRecord;
+    }
+    public String getDifficultCaseDiscuss() {
+        return difficultCaseDiscuss;
+    }
+
+    public void setDifficultCaseDiscuss(String difficultCaseDiscuss) {
+        this.difficultCaseDiscuss = difficultCaseDiscuss;
+    }
+    public String getDutyShiftSystem() {
+        return dutyShiftSystem;
+    }
+
+    public void setDutyShiftSystem(String dutyShiftSystem) {
+        this.dutyShiftSystem = dutyShiftSystem;
+    }
+    public String getFirstCourseRecord() {
+        return firstCourseRecord;
+    }
+
+    public void setFirstCourseRecord(String firstCourseRecord) {
+        this.firstCourseRecord = firstCourseRecord;
+    }
+    public String getLeaveHospital() {
+        return leaveHospital;
+    }
+
+    public void setLeaveHospital(String leaveHospital) {
+        this.leaveHospital = leaveHospital;
+    }
+    public String getNursingSystem() {
+        return nursingSystem;
+    }
+
+    public void setNursingSystem(String nursingSystem) {
+        this.nursingSystem = nursingSystem;
+    }
+    public String getOperationDiscussion() {
+        return operationDiscussion;
+    }
+
+    public void setOperationDiscussion(String operationDiscussion) {
+        this.operationDiscussion = operationDiscussion;
+    }
+    public String getPreOperativeDiscussion() {
+        return preOperativeDiscussion;
+    }
+
+    public void setPreOperativeDiscussion(String preOperativeDiscussion) {
+        this.preOperativeDiscussion = preOperativeDiscussion;
+    }
+    public String getThreeLevelWard() {
+        return threeLevelWard;
+    }
+
+    public void setThreeLevelWard(String threeLevelWard) {
+        this.threeLevelWard = threeLevelWard;
+    }
+    public String getCriticalValue() {
+        return criticalValue;
+    }
+
+    public void setCriticalValue(String criticalValue) {
+        this.criticalValue = criticalValue;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcInputcases{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", text=" + text +
+            ", clinicalBlood=" + clinicalBlood +
+            ", consultation=" + consultation +
+            ", deathCaseDiscuss=" + deathCaseDiscuss +
+            ", deathRecord=" + deathRecord +
+            ", difficultCaseDiscuss=" + difficultCaseDiscuss +
+            ", dutyShiftSystem=" + dutyShiftSystem +
+            ", firstCourseRecord=" + firstCourseRecord +
+            ", leaveHospital=" + leaveHospital +
+            ", nursingSystem=" + nursingSystem +
+            ", operationDiscussion=" + operationDiscussion +
+            ", preOperativeDiscussion=" + preOperativeDiscussion +
+            ", threeLevelWard=" + threeLevelWard +
+            ", criticalValue=" + criticalValue +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 172 - 0
mrman-service/src/main/java/com/diagbot/entity/QcInputcasesMapping.java

@@ -0,0 +1,172 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病历录入关系
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcInputcasesMapping 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 caseNumberId;
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+    private String remark;
+
+    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 getCasesId() {
+        return casesId;
+    }
+
+    public void setCasesId(Long casesId) {
+        this.casesId = casesId;
+    }
+    public Long getCasesEntryId() {
+        return casesEntryId;
+    }
+
+    public void setCasesEntryId(Long casesEntryId) {
+        this.casesEntryId = casesEntryId;
+    }
+    public Integer getPass() {
+        return pass;
+    }
+
+    public void setPass(Integer pass) {
+        this.pass = pass;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Long getCaseNumberId() {
+        return caseNumberId;
+    }
+
+    public void setCaseNumberId(Long caseNumberId) {
+        this.caseNumberId = caseNumberId;
+    }
+
+    @Override
+    public String toString() {
+        return "QcInputcasesMapping{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", caseNumberId=" + caseNumberId +
+            ", casesId=" + casesId +
+            ", casesEntryId=" + casesEntryId +
+            ", pass=" + pass +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 72 - 0
mrman-service/src/main/java/com/diagbot/facade/QcCasesFacade.java

@@ -0,0 +1,72 @@
+package com.diagbot.facade;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.QcCasesAllDTO;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.dto.QcHospitalInfoAllDTO;
+import com.diagbot.entity.QcCases;
+import com.diagbot.entity.QcCasesEntry;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.QcCasesEntryService;
+import com.diagbot.service.QcCasesService;
+import com.diagbot.service.impl.QcCasesServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 16:32
+ */
+@Component
+public class QcCasesFacade extends QcCasesServiceImpl {
+
+    @Autowired
+    QcCasesService qcCasesService;
+    @Autowired
+    QcCasesEntryService qcCasesEntryService;
+
+    public List<QcCasesAllDTO> getAlls() {
+        //查出所有病例
+        QueryWrapper<QcCases> qcCasesQuery = new QueryWrapper<>();
+        qcCasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        List<QcCases> data = list(qcCasesQuery);
+        List<QcCasesAllDTO> dataNew = new ArrayList<QcCasesAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcCasesAllDTO.class);
+        // 查出所有病例病例类型
+        QueryWrapper<QcCasesEntry> qcCasesEntryQuery = new QueryWrapper<>();
+        qcCasesEntryQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        List<QcCasesEntry> dataEntry = qcCasesEntryService.list(qcCasesEntryQuery);
+       // 然后把所有病例类型放进去
+        Map<Long, List<QcCasesEntry>> map
+                = EntityUtil.makeEntityListMap(dataEntry, "casesId");
+      //List<QcCases> data = qcCasesService.list();
+        //把模板放进文件夹中
+        if (dataNew.size() > 0) {
+            for (QcCasesAllDTO ts : dataNew) {
+                List<QcCasesEntry> tmp = map.get(ts.getId());
+                if (ListUtil.isNotEmpty(tmp)) {
+                    ts.setQcCasesEntry(tmp);
+                }
+            }
+        }
+        return dataNew;
+    }
+
+    public List<QcCasesDTO> getCasesAll() {
+        List<QcCases> data = qcCasesService.list();
+        List<QcCasesDTO> dataNew = new ArrayList<QcCasesDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcCasesDTO.class);
+        return dataNew;
+    }
+}

+ 35 - 0
mrman-service/src/main/java/com/diagbot/facade/QcHospitalInfoFacade.java

@@ -0,0 +1,35 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.QcHospitalInfoAllDTO;
+import com.diagbot.entity.QcHospitalInfo;
+import com.diagbot.service.QcHospitalInfoService;
+import com.diagbot.service.impl.QcHospitalInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-17 13:47
+ */
+@Component
+public class QcHospitalInfoFacade extends QcHospitalInfoServiceImpl {
+
+    @Autowired
+    QcHospitalInfoService qcHospitalInfoService;
+
+    /**
+     *
+     * @return
+     */
+    public List<QcHospitalInfoAllDTO> getHospitalInfoAll() {
+        List<QcHospitalInfo> data = qcHospitalInfoService.list();
+        List<QcHospitalInfoAllDTO> dataNew = new ArrayList<QcHospitalInfoAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcHospitalInfoAllDTO.class);
+        return dataNew;
+    }
+}

+ 451 - 0
mrman-service/src/main/java/com/diagbot/facade/QcInputcasesFacade.java

@@ -0,0 +1,451 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.ModuleMappingDTO;
+import com.diagbot.dto.QcAllInputcasesDTO;
+import com.diagbot.dto.QcInputcasesAllDTO;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.CasesNumber;
+import com.diagbot.entity.Mode;
+import com.diagbot.entity.ModelMapping;
+import com.diagbot.entity.QcHospitalInfo;
+import com.diagbot.entity.QcInputcases;
+import com.diagbot.entity.QcInputcasesMapping;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.CasesNumberService;
+import com.diagbot.service.ModeService;
+import com.diagbot.service.ModelMappingService;
+import com.diagbot.service.QcInputcasesMappingService;
+import com.diagbot.service.QcInputcasesService;
+import com.diagbot.service.impl.QcInputcasesServiceImpl;
+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.vo.QcInputMappingSaveVO;
+import com.diagbot.vo.QcInputcasesAllVO;
+import com.diagbot.vo.QcInputcasesByIdVO;
+import com.diagbot.vo.QcInputcasesSaveVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:17
+ */
+@Component
+public class QcInputcasesFacade extends QcInputcasesServiceImpl {
+
+    @Autowired
+    QcInputcasesService qcInputcasesService;
+    @Autowired
+    QcInputcasesMappingService qcInputcasesMappingService;
+    @Autowired
+    CasesNumberService casesNumberService;
+    @Autowired
+    ModelMappingService modelMappingService;
+    @Autowired
+    ModeService modeService;
+    @Autowired
+    QcHospitalInfoFacade qcHospitalInfoFacade;
+
+   /* public List<QcInputcasesAllDTO> getInputcasesAlls(Long textId) {
+        //查出所有病例
+        QueryWrapper<QcInputcases> qcInputcasesQuery = new QueryWrapper<>();
+        qcInputcasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified")
+                .last("limit 30");
+        if (textId != null && textId != 0) {
+            qcInputcasesQuery.eq("id", textId);
+        }
+        List<QcInputcases> data = list(qcInputcasesQuery);
+        List<QcInputcasesAllDTO> dataNew = new ArrayList<QcInputcasesAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcInputcasesAllDTO.class);
+        // 查出所有病例病例类型
+        List<QcInputcasesMappingDTO> qcInputcasesMapping = qcInputcasesMappingService.getQcInputMappings(textId);
+        // 然后把所有病例类型放进去
+        Map<Long, List<QcInputcasesMappingDTO>> map
+                = EntityUtil.makeEntityListMap(qcInputcasesMapping, "textId");
+        if (dataNew.size() > 0) {
+            for (QcInputcasesAllDTO ts : dataNew) {
+                List<QcInputcasesMappingDTO> tmp = map.get(ts.getId());
+                if (ListUtil.isNotEmpty(tmp)) {
+                    ts.setQcInputcasesMapping(tmp);
+                }
+            }
+        }
+        return dataNew;
+    }*/
+
+    /**
+     * @param qcInputcasesSaveVO
+     * @return
+     */
+    public boolean saveAndUpdatas(QcInputcasesSaveVO qcInputcasesSaveVO) {
+        boolean res = false;
+        if (qcInputcasesSaveVO.getId() != null && qcInputcasesSaveVO.getId() != 0) {
+            //校验数据是否存在
+            QueryWrapper<QcInputcases> qcQuery = new QueryWrapper<>();
+            Map<String, Object> mapAll = new HashMap<>();
+            mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAll.put("id", qcInputcasesSaveVO.getId());
+            qcQuery.allEq(mapAll);
+            int sum = count(qcQuery);
+            if (sum == 0) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病例不存在");
+            }
+            UpdateWrapper<QcInputcases> qcInputcasesQuery = new UpdateWrapper<>();
+            qcInputcasesQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("id", qcInputcasesSaveVO.getId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("creator", qcInputcasesSaveVO.getCreator())
+                    .set("text", qcInputcasesSaveVO.getText())
+                    .set("clinical_blood", qcInputcasesSaveVO.getClinicalBlood())
+                    .set("consultation", qcInputcasesSaveVO.getConsultation())
+                    .set("death_case_discuss", qcInputcasesSaveVO.getDeathCaseDiscuss())
+                    .set("death_record", qcInputcasesSaveVO.getDeathRecord())
+                    .set("difficult_case_discuss", qcInputcasesSaveVO.getDifficultCaseDiscuss())
+                    .set("duty_shift_system", qcInputcasesSaveVO.getDutyShiftSystem())
+                    .set("first_course_record", qcInputcasesSaveVO.getFirstCourseRecord())
+                    .set("leave_hospital", qcInputcasesSaveVO.getLeaveHospital())
+                    .set("nursing_system", qcInputcasesSaveVO.getNursingSystem())
+                    .set("operation_discussion", qcInputcasesSaveVO.getOperationDiscussion())
+                    .set("pre_operative_discussion", qcInputcasesSaveVO.getPreOperativeDiscussion())
+                    .set("three_level_ward", qcInputcasesSaveVO.getThreeLevelWard())
+                    .set("critical_value", qcInputcasesSaveVO.getCriticalValue());
+            res = update(qcInputcasesQuery);
+            UpdateWrapper<QcInputcasesMapping> qcMappingQuery = new UpdateWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("text_id", qcInputcasesSaveVO.getId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = qcInputcasesMappingService.update(qcMappingQuery);
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+
+            List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+            for (QcInputMappingSaveVO t : inputMapping) {
+                QcInputcasesMapping qcList = new QcInputcasesMapping();
+                qcList.setCasesEntryId(t.getCasesEntryId());
+                qcList.setCreator(qcInputcasesSaveVO.getCreator());
+                qcList.setCasesId(t.getCasesId());
+                qcList.setPass(t.getPass());
+               /* qcList.setTextId(qcInputcasesSaveVO.getId());*/
+                qcList.setGmtModified(DateUtil.now());
+                qcMappingList.add(qcList);
+            }
+            res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+        } else {
+            /*QueryWrapper<QcInputcases> qcInputcasesQuery = new QueryWrapper<>();
+            Map<String, Object> mapAll = new HashMap<>();
+            mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAll.put("text", qcInputcasesSaveVO.getText());
+            qcInputcasesQuery.allEq(mapAll);
+            int sum = count(qcInputcasesQuery);
+            if (sum != 0) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病例存在");
+            }*/
+            QcInputcases qcInputcases = new QcInputcases();
+           /* qcInputcases.setText(qcInputcasesSaveVO.getText());
+            qcInputcases.setClinicalBlood(qcInputcasesSaveVO.getClinicalBlood());
+            qcInputcases.setConsultation(qcInputcasesSaveVO.getConsultation());
+            qcInputcases.setCriticalValue(qcInputcasesSaveVO.getCriticalValue());
+            qcInputcases.setDeathCaseDiscuss(qcInputcasesSaveVO.getDeathCaseDiscuss());
+            qcInputcases.setDeathRecord(qcInputcasesSaveVO.getDeathRecord());
+            qcInputcases.setDifficultCaseDiscuss(qcInputcasesSaveVO.getDifficultCaseDiscuss());
+            qcInputcases.setDutyShiftSystem(qcInputcasesSaveVO.getDutyShiftSystem());
+            qcInputcases.setFirstCourseRecord(qcInputcasesSaveVO.getFirstCourseRecord());
+            qcInputcases.setLeaveHospital(qcInputcasesSaveVO.getLeaveHospital());
+            qcInputcases.setNursingSystem(qcInputcasesSaveVO.getNursingSystem());
+            qcInputcases.setOperationDiscussion(qcInputcasesSaveVO.getOperationDiscussion());
+            qcInputcases.setPreOperativeDiscussion(qcInputcasesSaveVO.getPreOperativeDiscussion());
+            qcInputcases.setThreeLevelWard(qcInputcasesSaveVO.getThreeLevelWard());
+            qcInputcases.setCreator(qcInputcasesSaveVO.getCreator());
+            qcInputcases.setGmtModified(DateUtil.now());*/
+            BeanUtil.copyProperties(qcInputcasesSaveVO,qcInputcases);
+            qcInputcases.setGmtModified(DateUtil.now());
+            res = save(qcInputcases);
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+            if (res) {
+                List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+                for (QcInputMappingSaveVO t : inputMapping) {
+                    QcInputcasesMapping qcList = new QcInputcasesMapping();
+                    qcList.setCasesEntryId(t.getCasesEntryId());
+                    qcList.setCreator(qcInputcasesSaveVO.getCreator());
+                    qcList.setCasesId(t.getCasesId());
+                    qcList.setPass(t.getPass());
+                   /* qcList.setTextId(qcInputcases.getId());*/
+                    qcMappingList.add(qcList);
+                }
+                res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+            }
+        }
+
+        return res;
+    }
+
+    /**
+     * @param qcInputcasesByIdVO
+     * @return
+     */
+    public boolean cancelByIds(QcInputcasesByIdVO qcInputcasesByIdVO) {
+        boolean res = false;
+        UpdateWrapper<QcInputcases> qcInputcasesQuery = new UpdateWrapper<>();
+        qcInputcasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", qcInputcasesByIdVO.getTextId())
+                .set("modifier", qcInputcasesByIdVO.getCreator())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        res = update(qcInputcasesQuery);
+        if (res) {
+            UpdateWrapper<QcInputcasesMapping> qcMappingQuery = new UpdateWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("text_id", qcInputcasesByIdVO.getTextId())
+                    .set("modifier", qcInputcasesByIdVO.getCreator())
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = qcInputcasesMappingService.update(qcMappingQuery);
+        }
+        return res;
+    }
+
+    public List<QcAllInputcasesDTO> getAllInputcases(QcInputcasesAllVO qcInputcasesAllVO){
+        List<Long> hospitalIds = new ArrayList<>();
+        if (StringUtil.isNotEmpty(qcInputcasesAllVO.getHospitalName())){
+            QueryWrapper<QcHospitalInfo> qcHospitalInfoQueryWrapper = new QueryWrapper<>();
+            qcHospitalInfoQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
+                    .like("name",qcInputcasesAllVO.getHospitalName());
+            hospitalIds = qcHospitalInfoFacade.list().stream().map(QcHospitalInfo::getId).collect(Collectors.toList());
+        }
+        //病例
+        QueryWrapper<CasesNumber> casesNumberQueryWrapper = new QueryWrapper<>();
+        casesNumberQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        if(StringUtil.isNotEmpty(qcInputcasesAllVO.getCaseNumber())){
+            casesNumberQueryWrapper.like("case_number",qcInputcasesAllVO.getCaseNumber());
+        }
+        if(StringUtil.isNotEmpty(qcInputcasesAllVO.getHospitalName())){
+            casesNumberQueryWrapper.in("hospital_id",hospitalIds);
+        }
+        List<CasesNumber> casesNumbers = casesNumberService.list(casesNumberQueryWrapper);
+        List<QcAllInputcasesDTO> res = new ArrayList<>();
+        //病例内容
+        QueryWrapper<ModelMapping> modelMappingQueryWrapper = new QueryWrapper<>();
+        modelMappingQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
+        List<ModelMapping> modelMappings = modelMappingService.list();
+        Map<Long, List<ModelMapping>> modelMap
+                = EntityUtil.makeEntityListMap(modelMappings, "modeId");
+        //病例列表
+        QueryWrapper<Mode> modelQueryWrapper = new QueryWrapper<>();
+        modelQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
+        List<Mode> modes = modeService.list();
+        Map<Long,String> modeMap = new HashMap<>();
+        modeMap = modes.stream().collect(Collectors.toMap(Mode::getId,mode -> mode.getName()));
+        //病例列表
+        QueryWrapper<QcHospitalInfo> hospitalInfoQueryWrapper = new QueryWrapper<>();
+        hospitalInfoQueryWrapper.eq("is_deleted",IsDeleteEnum.N.getKey());
+        List<QcHospitalInfo> qcHospitalInfos = qcHospitalInfoFacade.list();
+        Map<Long,String> hospitalMap = new HashMap<>();
+        hospitalMap = qcHospitalInfos.stream().collect(Collectors.toMap(QcHospitalInfo::getId,hospitalInfo -> hospitalInfo.getName()));
+        //将病例内容放入出参
+        res = BeanUtil.listCopyTo(casesNumbers,QcAllInputcasesDTO.class);
+        List<ModuleMappingDTO> moduleMappingDTOS = new ArrayList<>();
+        List<Long> modIds = new ArrayList<>();
+        ModuleMappingDTO moduleMappingDTO = new ModuleMappingDTO();
+        List<String> modeList = new ArrayList();
+        for (QcAllInputcasesDTO qcAllInputcasesDTO : res) {
+            moduleMappingDTOS = new ArrayList<>();
+            for (Mode mode : modes) {
+                moduleMappingDTO = new ModuleMappingDTO();
+                moduleMappingDTO.setModeId(mode.getId());
+                moduleMappingDTO.setName(mode.getName());
+                if(modelMap.get(mode.getId()) != null){
+                    modeList = new ArrayList();
+                    for (ModelMapping modelMapping: modelMap.get(mode.getId())) {
+                        if (modelMapping.getCaseNumberId().intValue() == qcAllInputcasesDTO.getId()){
+                            modeList.add(modelMapping.getText());
+                            moduleMappingDTO.setText(modeList);
+                        }
+                    }
+                }
+                moduleMappingDTOS.add(moduleMappingDTO);
+            }
+            qcAllInputcasesDTO.setHospitalName(hospitalMap.get(Long.parseLong(qcAllInputcasesDTO.getHospitalId())));
+            qcAllInputcasesDTO.setModuleMappingDTOList(moduleMappingDTOS);
+        }
+       /* for (QcAllInputcasesDTO qcAllInputcasesDTO : res) {
+            for (ModelMapping modelMapping : modelMappings) {
+                if (qcAllInputcasesDTO.getId().intValue() == modelMapping.getCaseNumberId().intValue()){
+                        if(!modIds.contains(modelMapping.getModeId())){
+                            moduleMappingDTO = new ModuleMappingDTO();
+                            moduleMappingDTO.setModeId(modelMapping.getModeId());
+                            moduleMappingDTO.setName(modeMap.get(modelMapping.getModeId()));
+                            moduleMappingDTO.setText(modelMapping.getText());
+                            moduleMappingDTOS.add(moduleMappingDTO);
+                            modIds.add(modelMapping.getModeId());
+                        }
+                }
+            }
+            qcAllInputcasesDTO.setHospitalName(hospitalMap.get(Long.parseLong(qcAllInputcasesDTO.getHospitalId())));
+            qcAllInputcasesDTO.setModuleMappingDTOList(moduleMappingDTOS);
+        }*/
+
+        // 查出所有病例病例类型
+        List<QcInputcasesMappingDTO> qcInputcasesMapping = qcInputcasesMappingService.getInputMapping(qcInputcasesAllVO.getCaseNumber());
+        // 然后把所有病例类型放进去
+        Map<Long, List<QcInputcasesMappingDTO>> map
+                = EntityUtil.makeEntityListMap(qcInputcasesMapping, "caseNumberId");
+        if (res.size() > 0) {
+            for (QcAllInputcasesDTO ts : res) {
+                List<QcInputcasesMappingDTO> tmp = map.get(ts.getId().toString());
+                if (ListUtil.isNotEmpty(tmp)) {
+                    ts.setQcInputcasesMapping(tmp);
+                }
+            }
+        }
+
+        return  res;
+    }
+
+    /**
+     * @param qcInputcasesByIdVO
+     * @return
+     */
+    public boolean deleteById(QcInputcasesByIdVO qcInputcasesByIdVO) {
+        boolean res = false;
+        UpdateWrapper<QcInputcases> qcInputcasesQuery = new UpdateWrapper<>();
+        qcInputcasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", qcInputcasesByIdVO.getCaseNumberId())
+                .set("modifier", qcInputcasesByIdVO.getCreator())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        res = update(qcInputcasesQuery);
+        if (res) {
+            UpdateWrapper<QcInputcasesMapping> qcMappingQuery = new UpdateWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("case_number_id", qcInputcasesByIdVO.getCaseNumberId())
+                    .set("modifier", qcInputcasesByIdVO.getCreator())
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = qcInputcasesMappingService.update(qcMappingQuery);
+        }
+        if (res) {
+            UpdateWrapper<ModelMapping> modelMappingUpdateWrapper = new UpdateWrapper<>();
+            modelMappingUpdateWrapper
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("case_number_id", qcInputcasesByIdVO.getCaseNumberId())
+                    .set("modifier", qcInputcasesByIdVO.getCreator())
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = modelMappingService.update(modelMappingUpdateWrapper);
+        }
+        return res;
+    }
+
+    /**
+     * @param qcInputcasesSaveVO
+     * @return
+     */
+    public boolean saveOrUpdata(QcInputcasesSaveVO qcInputcasesSaveVO) {
+        boolean res = false;
+        if (qcInputcasesSaveVO.getCaseNumberId() != null && qcInputcasesSaveVO.getCaseNumberId() != 0) {
+            //校验数据是否存在
+            QueryWrapper<CasesNumber> casesNumberQueryWrapper = new QueryWrapper<>();
+            Map<String, Object> mapAll = new HashMap<>();
+            mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAll.put("id", qcInputcasesSaveVO.getCaseNumberId());
+            casesNumberQueryWrapper.allEq(mapAll);
+            int sum = casesNumberService.count(casesNumberQueryWrapper);
+            if (sum == 0) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病例不存在");
+            }
+            UpdateWrapper<CasesNumber> casesNumberUpdateWrapper = new UpdateWrapper<>();
+            casesNumberUpdateWrapper
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("id", qcInputcasesSaveVO.getCaseNumberId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("creator", qcInputcasesSaveVO.getCreator())
+                    .set("hospital_id", qcInputcasesSaveVO.getHospitalId())
+                    .set("case_number", qcInputcasesSaveVO.getCaseNumber())
+                    .set("is_tag", qcInputcasesSaveVO.getIsTag());
+            res = casesNumberService.update(casesNumberUpdateWrapper);
+           /* UpdateWrapper<ModelMapping> modelMappingUpdateWrapper = new UpdateWrapper<>();
+            modelMappingUpdateWrapper
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("case_number_id", qcInputcasesSaveVO.getId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("creator", qcInputcasesSaveVO.getCreator())
+                    .set("mode_id", qcInputcasesSaveVO.getModeId())
+                    .set("text", qcInputcasesSaveVO.getText());
+            res = modelMappingService.update(modelMappingUpdateWrapper);*/
+            QueryWrapper<QcInputcasesMapping> qcMappingQuery = new QueryWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("case_number_id", qcInputcasesSaveVO.getCaseNumberId());
+            res = qcInputcasesMappingService.remove(qcMappingQuery);
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+
+            List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+            for (QcInputMappingSaveVO t : inputMapping) {
+                QcInputcasesMapping qcList = new QcInputcasesMapping();
+                qcList.setCasesEntryId(t.getCasesEntryId());
+                qcList.setCreator(qcInputcasesSaveVO.getCreator());
+                qcList.setCasesId(t.getCasesId());
+                qcList.setPass(t.getPass());
+                qcList.setCaseNumberId(qcInputcasesSaveVO.getCaseNumberId());
+                qcList.setGmtModified(DateUtil.now());
+                qcMappingList.add(qcList);
+            }
+            res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+        } else {
+            CasesNumber casesNumber = new CasesNumber();
+            casesNumber.setGmtModified(DateUtil.now());
+            casesNumber.setCreator(qcInputcasesSaveVO.getCreator());
+            casesNumber.setCaseNumber(qcInputcasesSaveVO.getCaseNumber());
+            casesNumber.setHospitalId(qcInputcasesSaveVO.getHospitalId().toString());
+            casesNumber.setIsTag(qcInputcasesSaveVO.getIsTag());
+            casesNumber.setId(qcInputcasesSaveVO.getCaseNumberId());
+            res = casesNumberService.save(casesNumber);
+           /* ModelMapping modelMapping = new ModelMapping();
+            modelMapping.setCaseNumberId(qcInputcasesSaveVO.getCaseNumberId());
+            modelMapping.setCreator(qcInputcasesSaveVO.getCreator());
+            modelMapping.setGmtCreate(DateUtil.now());
+            modelMapping.setModeId(qcInputcasesSaveVO.getModeId());
+            modelMapping.setText(qcInputcasesSaveVO.getText());
+            res = modelMappingService.save(modelMapping);*/
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+            if (res) {
+                List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+                for (QcInputMappingSaveVO t : inputMapping) {
+                    QcInputcasesMapping qcList = new QcInputcasesMapping();
+                    qcList.setCasesEntryId(t.getCasesEntryId());
+                    qcList.setCreator(qcInputcasesSaveVO.getCreator());
+                    qcList.setCasesId(t.getCasesId());
+                    qcList.setPass(t.getPass());
+                    qcList.setCaseNumberId(casesNumber.getId());
+                    qcMappingList.add(qcList);
+                }
+                res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+            }
+        }
+
+        return res;
+    }
+}

+ 11 - 0
mrman-service/src/main/java/com/diagbot/mapper/ArRechomeMapper.java

@@ -1,10 +1,13 @@
 package com.diagbot.mapper;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.BABLDTO;
 import com.diagbot.dto.BABLDetailDTO;
 import com.diagbot.entity.ArRechome;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.diagbot.vo.BABLVO;
+import com.diagbot.vo.BAZYPageVO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -31,4 +34,12 @@ public interface ArRechomeMapper extends BaseMapper<ArRechome> {
      * @return
      */
     BABLDetailDTO getBABLDetail(BABLVO bablvo);
+
+    /**
+     * 病案病历记录分页查询
+     *
+     * @param bazyPageVO
+     * @return
+     */
+    IPage<BABLDTO> getBAZYPage(@Param("bazyPageVO") BAZYPageVO bazyPageVO);
 }

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/CasesNumberMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.CasesNumber;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 病历 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface CasesNumberMapper extends BaseMapper<CasesNumber> {
+
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/ModeMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Mode;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 病历 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface ModeMapper extends BaseMapper<Mode> {
+
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/ModelMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.ModelMapping;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 病历内容 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface ModelMappingMapper extends BaseMapper<ModelMapping> {
+
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcCasesEntryMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QcCasesEntry;
+
+/**
+ * <p>
+ * 病历条目 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcCasesEntryMapper extends BaseMapper<QcCasesEntry> {
+
+}

+ 20 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcCasesMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcCasesMapper extends BaseMapper<QcCases> {
+
+    List<QcCasesDTO> getCasesList(Long casesId);
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcHospitalInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QcHospitalInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 医院信息表 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-17
+ */
+public interface QcHospitalInfoMapper extends BaseMapper<QcHospitalInfo> {
+
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * <p>
+ * 病历录入 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcInputcasesMapper extends BaseMapper<QcInputcases> {
+
+}

+ 22 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMappingMapper.java

@@ -0,0 +1,22 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcInputcasesMappingMapper extends BaseMapper<QcInputcasesMapping> {
+
+    public List<QcInputcasesMappingDTO> getQcInputMapping(Long textId);
+
+    public List<QcInputcasesMappingDTO> getInputMapping(String caseNumberId);
+}

+ 13 - 0
mrman-service/src/main/java/com/diagbot/service/ArRechomeService.java

@@ -1,10 +1,14 @@
 package com.diagbot.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.BABLDTO;
 import com.diagbot.dto.BABLDetailDTO;
 import com.diagbot.entity.ArRechome;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.vo.BABLVO;
+import com.diagbot.vo.BAZYPageVO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -16,6 +20,7 @@ import java.util.List;
  * @author gaodm
  * @since 2020-01-17
  */
+@DS("slave")
 public interface ArRechomeService extends IService<ArRechome> {
     /**
      * 获取病案病历记录列表
@@ -31,4 +36,12 @@ public interface ArRechomeService extends IService<ArRechome> {
      * @return
      */
     BABLDetailDTO getBABLDetail(BABLVO bablvo);
+
+    /**
+     * 病案病历记录分页查询
+     *
+     * @param bazyPageVO
+     * @return
+     */
+    IPage<BABLDTO> getBAZYPage(@Param("bazyPageVO") BAZYPageVO bazyPageVO);
 }

+ 2 - 0
mrman-service/src/main/java/com/diagbot/service/BrRecdiagnoseService.java

@@ -1,5 +1,6 @@
 package com.diagbot.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.diagbot.entity.BrRecdiagnose;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @author gaodm
  * @since 2020-01-17
  */
+@DS("slave")
 public interface BrRecdiagnoseService extends IService<BrRecdiagnose> {
 
 }

+ 2 - 0
mrman-service/src/main/java/com/diagbot/service/BrRecinhosService.java

@@ -1,5 +1,6 @@
 package com.diagbot.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.diagbot.entity.BrRecinhos;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @author gaodm
  * @since 2020-01-17
  */
+@DS("slave")
 public interface BrRecinhosService extends IService<BrRecinhos> {
 
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.CasesNumber;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 病历 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface CasesNumberService extends IService<CasesNumber> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Mode;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 病历 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface ModeService extends IService<Mode> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.ModelMapping;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 病历内容 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+public interface ModelMappingService extends IService<ModelMapping> {
+
+}

+ 2 - 0
mrman-service/src/main/java/com/diagbot/service/MrMedicalrecordsService.java

@@ -1,5 +1,6 @@
 package com.diagbot.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.diagbot.dto.BLJLDetailDTO;
 import com.diagbot.entity.MrMedicalrecords;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -15,6 +16,7 @@ import java.util.List;
  * @author gaodm
  * @since 2020-01-17
  */
+@DS("slave")
 public interface MrMedicalrecordsService extends IService<MrMedicalrecords> {
     /**
      * 获取病历记录列表

+ 2 - 0
mrman-service/src/main/java/com/diagbot/service/MrMrcontentService.java

@@ -1,5 +1,6 @@
 package com.diagbot.service;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.diagbot.entity.MrMrcontent;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @author gaodm
  * @since 2020-01-17
  */
+@DS("slave")
 public interface MrMrcontentService extends IService<MrMrcontent> {
 
 }

+ 18 - 0
mrman-service/src/main/java/com/diagbot/service/QcCasesEntryService.java

@@ -0,0 +1,18 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QcCasesEntry;
+
+/**
+ * <p>
+ * 病历条目 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcCasesEntryService extends IService<QcCasesEntry> {
+
+}

+ 22 - 0
mrman-service/src/main/java/com/diagbot/service/QcCasesService.java

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcCasesService extends IService<QcCases> {
+
+    public  List<QcCasesDTO>  getCasesLists(Long casesId);
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QcHospitalInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 医院信息表 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-17
+ */
+public interface QcHospitalInfoService extends IService<QcHospitalInfo> {
+
+}

+ 23 - 0
mrman-service/src/main/java/com/diagbot/service/QcInputcasesMappingService.java

@@ -0,0 +1,23 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcInputcasesMappingService extends IService<QcInputcasesMapping> {
+
+    public List<QcInputcasesMappingDTO> getQcInputMappings(Long textId);
+
+    public List<QcInputcasesMappingDTO> getInputMapping(String caseNumberId);
+}

+ 18 - 0
mrman-service/src/main/java/com/diagbot/service/QcInputcasesService.java

@@ -0,0 +1,18 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * <p>
+ * 病历录入 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcInputcasesService extends IService<QcInputcases> {
+
+}

+ 13 - 0
mrman-service/src/main/java/com/diagbot/service/impl/ArRechomeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.BABLDTO;
 import com.diagbot.dto.BABLDetailDTO;
 import com.diagbot.entity.ArRechome;
@@ -7,6 +8,8 @@ import com.diagbot.mapper.ArRechomeMapper;
 import com.diagbot.service.ArRechomeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.vo.BABLVO;
+import com.diagbot.vo.BAZYPageVO;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -39,4 +42,14 @@ public class ArRechomeServiceImpl extends ServiceImpl<ArRechomeMapper, ArRechome
     public BABLDetailDTO getBABLDetail(BABLVO bablvo) {
         return this.baseMapper.getBABLDetail(bablvo);
     }
+
+    /**
+     * 病案病历记录分页查询
+     *
+     * @param bazyPageVO
+     * @return
+     */
+    public IPage<BABLDTO> getBAZYPage(@Param("bazyPageVO") BAZYPageVO bazyPageVO) {
+        return this.baseMapper.getBAZYPage(bazyPageVO);
+    }
 }

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.CasesNumber;
+import com.diagbot.mapper.CasesNumberMapper;
+import com.diagbot.service.CasesNumberService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+@Service
+public class CasesNumberServiceImpl extends ServiceImpl<CasesNumberMapper, CasesNumber> implements CasesNumberService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Mode;
+import com.diagbot.mapper.ModeMapper;
+import com.diagbot.service.ModeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+@Service
+public class ModeServiceImpl extends ServiceImpl<ModeMapper, Mode> implements ModeService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.ModelMapping;
+import com.diagbot.mapper.ModelMappingMapper;
+import com.diagbot.service.ModelMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历内容 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2020-03-23
+ */
+@Service
+public class ModelMappingServiceImpl extends ServiceImpl<ModelMappingMapper, ModelMapping> implements ModelMappingService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.QcCasesEntry;
+import com.diagbot.mapper.QcCasesEntryMapper;
+import com.diagbot.service.QcCasesEntryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历条目 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcCasesEntryServiceImpl extends ServiceImpl<QcCasesEntryMapper, QcCasesEntry> implements QcCasesEntryService {
+
+}

+ 27 - 0
mrman-service/src/main/java/com/diagbot/service/impl/QcCasesServiceImpl.java

@@ -0,0 +1,27 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+import com.diagbot.mapper.QcCasesMapper;
+import com.diagbot.service.QcCasesService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcCasesServiceImpl extends ServiceImpl<QcCasesMapper, QcCases> implements QcCasesService {
+
+
+    public List<QcCasesDTO> getCasesLists(Long casesId) {
+        return baseMapper.getCasesList(casesId);
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QcHospitalInfo;
+import com.diagbot.mapper.QcHospitalInfoMapper;
+import com.diagbot.service.QcHospitalInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 医院信息表 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-17
+ */
+@Service
+public class QcHospitalInfoServiceImpl extends ServiceImpl<QcHospitalInfoMapper, QcHospitalInfo> implements QcHospitalInfoService {
+
+}

+ 31 - 0
mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesMappingServiceImpl.java

@@ -0,0 +1,31 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+import com.diagbot.mapper.QcInputcasesMappingMapper;
+import com.diagbot.service.QcInputcasesMappingService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcInputcasesMappingServiceImpl extends ServiceImpl<QcInputcasesMappingMapper, QcInputcasesMapping> implements QcInputcasesMappingService {
+
+    @Override
+    public List<QcInputcasesMappingDTO> getInputMapping(String caseNumberId) {
+        return baseMapper.getInputMapping(caseNumberId);
+    }
+
+    public List<QcInputcasesMappingDTO> getQcInputMappings(Long textId){
+        return  baseMapper.getQcInputMapping(textId);
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.QcInputcases;
+import com.diagbot.mapper.QcInputcasesMapper;
+import com.diagbot.service.QcInputcasesService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历录入 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcInputcasesServiceImpl extends ServiceImpl<QcInputcasesMapper, QcInputcases> implements QcInputcasesService {
+
+}

+ 11 - 0
mrman-service/src/main/java/com/diagbot/vo/BAZYPageVO.java

@@ -0,0 +1,11 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class BAZYPageVO extends Page {
+    private String brbaxm;
+}

+ 30 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputMappingSaveVO.java

@@ -0,0 +1,30 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 9:01
+ */
+@Setter
+@Getter
+public class QcInputMappingSaveVO {
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+}

+ 19 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesAllVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 10:43
+ */
+@Setter
+@Getter
+public class QcInputcasesAllVO {
+    private  Long textId;
+
+    private String caseNumber;
+
+    private String hospitalName;
+}

+ 17 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesByIdVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 11:13
+ */
+@Setter
+@Getter
+public class QcInputcasesByIdVO {
+    private  String creator;
+    private  Long textId;
+    private  Long caseNumberId;
+}

+ 102 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesSaveVO.java

@@ -0,0 +1,102 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 8:57
+ */
+@Setter
+@Getter
+public class QcInputcasesSaveVO {
+
+    /**
+     * 病例id
+     */
+    private Long id;
+    private Integer hospitalId;
+    /**
+     * 病历文本
+     */
+    private String text;
+
+    private String creator;
+    /**
+     * 临床用血审核
+     */
+    private String clinicalBlood;
+
+    /**
+     * 会诊
+     */
+    private String consultation;
+
+    /**
+     * 死亡病例讨论
+     */
+    private String deathCaseDiscuss;
+
+    /**
+     * 死亡记录
+     */
+    private String deathRecord;
+
+    /**
+     * 疑难病例讨论
+     */
+    private String difficultCaseDiscuss;
+
+    /**
+     * 值班交接班
+     */
+    private String dutyShiftSystem;
+
+    /**
+     * 首次病程录
+     */
+    private String firstCourseRecord;
+
+    /**
+     * 出院小结
+     */
+    private String leaveHospital;
+
+    /**
+     * 分级护理
+     */
+    private String nursingSystem;
+
+    /**
+     * 手术期间讨论
+     */
+    private String operationDiscussion;
+
+    /**
+     * 术前讨论
+     */
+    private String preOperativeDiscussion;
+
+    /**
+     * 三级查房
+     */
+    private String threeLevelWard;
+
+    /**
+     * 危急值报告
+     */
+    private String criticalValue;
+
+    private List<QcInputMappingSaveVO> qcInputMappingSaveVO;
+
+    private Long caseNumberId;
+
+    private String caseNumber;
+
+    private Long modeId;
+
+    private String isTag;
+}

+ 11 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesVO.java

@@ -0,0 +1,11 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:19
+ */
+public class QcInputcasesVO extends QcInputcases {
+}

+ 11 - 1
mrman-service/src/main/java/com/diagbot/web/ArRechomeController.java

@@ -1,6 +1,7 @@
 package com.diagbot.web;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.BABLDTO;
 import com.diagbot.dto.BABLDetailDTO;
@@ -11,6 +12,7 @@ import com.diagbot.facade.ArRechomeFacade;
 import com.diagbot.facade.MrMrcontentFacade;
 import com.diagbot.vo.BABLDetailVO;
 import com.diagbot.vo.BABLVO;
+import com.diagbot.vo.BAZYPageVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,7 +32,7 @@ import java.util.List;
  * @since 2020-01-17
  */
 @RestController
-@Api(value = "病案首页信息API", tags = { "病案首页信息API" })
+@Api(value = "ORACLE-病案首页信息API", tags = { "ORACLE-病案首页信息API" })
 @RequestMapping("/arRechome")
 @SuppressWarnings("unchecked")
 public class ArRechomeController {
@@ -63,6 +65,14 @@ public class ArRechomeController {
         return RespDTO.onSuc(arRechomeFacade.getAllList());
     }
 
+    @ApiOperation(value = "病案病历记录分页查询[by:zhaops]",
+            notes = "病案病历记录分页查询")
+    @PostMapping("/getBAZYPage")
+    @SysLogger("getBAZYPage")
+    public RespDTO<IPage<BABLDTO>> getBAZYPage(@RequestBody BAZYPageVO bazyPageVO) {
+        return RespDTO.onSuc(arRechomeFacade.getBAZYPage(bazyPageVO));
+    }
+
     @ApiOperation(value = "获取病案详情[by:zhaops]",
             notes = "获取病案详情")
     @PostMapping("/getBABLContent")

+ 0 - 0
mrman-service/src/main/java/com/diagbot/web/BrRecdiagnoseController.java


Some files were not shown because too many files changed in this diff