Prechádzať zdrojové kódy

Merge branch 'develop' into dev/mix20200327_operationOrder

gaodm 5 rokov pred
rodič
commit
8514c491b4
100 zmenil súbory, kde vykonal 4495 pridanie a 392 odobranie
  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. 48 1
      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. 2 2
      config-server/src/main/resources/shared/gateway-service-dev.yml
  19. 2 2
      config-server/src/main/resources/shared/gateway-service-local.yml
  20. 2 2
      config-server/src/main/resources/shared/gateway-service-pre.yml
  21. 2 2
      config-server/src/main/resources/shared/gateway-service-pro.yml
  22. 2 2
      config-server/src/main/resources/shared/gateway-service-test.yml
  23. 4 0
      config-server/src/main/resources/shared/ltkg-service-dev.yml
  24. 5 1
      config-server/src/main/resources/shared/ltkg-service-local.yml
  25. 4 0
      config-server/src/main/resources/shared/ltkg-service-pre.yml
  26. 4 0
      config-server/src/main/resources/shared/ltkg-service-pro.yml
  27. 4 0
      config-server/src/main/resources/shared/ltkg-service-test.yml
  28. 59 43
      config-server/src/main/resources/shared/mrman-service-dev.yml
  29. 59 43
      config-server/src/main/resources/shared/mrman-service-local.yml
  30. 59 43
      config-server/src/main/resources/shared/mrman-service-pre.yml
  31. 59 43
      config-server/src/main/resources/shared/mrman-service-pro.yml
  32. 59 42
      config-server/src/main/resources/shared/mrman-service-test.yml
  33. 8 0
      config-server/src/main/resources/shared/tran-service-dev.yml
  34. 8 0
      config-server/src/main/resources/shared/tran-service-local.yml
  35. 8 0
      config-server/src/main/resources/shared/tran-service-pre.yml
  36. 8 0
      config-server/src/main/resources/shared/tran-service-pro.yml
  37. 8 0
      config-server/src/main/resources/shared/tran-service-test.yml
  38. 6 0
      diagbotman-service/pom.xml
  39. 1 1
      diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  40. 1 0
      diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  41. 23 0
      diagbotman-service/src/main/java/com/diagbot/dto/ServiceFiltersDTO.java
  42. 50 0
      diagbotman-service/src/main/java/com/diagbot/entity/IpEntity.java
  43. 95 0
      diagbotman-service/src/main/java/com/diagbot/entity/OptInfo.java
  44. 4 4
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceFilter.java
  45. 41 0
      diagbotman-service/src/main/java/com/diagbot/facade/OptInfoFacade.java
  46. 11 3
      diagbotman-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java
  47. 16 0
      diagbotman-service/src/main/java/com/diagbot/mapper/OptInfoMapper.java
  48. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/OptInfoService.java
  49. 1 1
      diagbotman-service/src/main/java/com/diagbot/service/ServiceFilterService.java
  50. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/OptInfoServiceImpl.java
  51. 2 3
      diagbotman-service/src/main/java/com/diagbot/service/impl/ServiceFilterServiceImpl.java
  52. 106 0
      diagbotman-service/src/main/java/com/diagbot/util/IPUtil.java
  53. 35 0
      diagbotman-service/src/main/java/com/diagbot/vo/OptInfoVO.java
  54. 42 0
      diagbotman-service/src/main/java/com/diagbot/web/OptInfoController.java
  55. 3 3
      diagbotman-service/src/main/java/com/diagbot/web/ServiceFilterController.java
  56. BIN
      diagbotman-service/src/main/resources/ip2region.db
  57. 22 0
      diagbotman-service/src/main/resources/mapper/OptInfoMapper.xml
  58. 1 1
      diagbotman-service/src/main/resources/mapper/ServiceFilterMapper.xml
  59. 27 0
      docs/031.2020-03-20智能分诊初始化脚本/init_med.sql
  60. 1412 0
      docs/031.2020-03-20智能分诊初始化脚本/init_tran.sql
  61. 34 0
      docs/031.20200325记录产品操作记录/init_diagbotman.sql
  62. 20 0
      gateway-service/src/main/java/com/diagbot/dto/ServiceFilterDTO.java
  63. 23 0
      gateway-service/src/main/java/com/diagbot/dto/ServiceFiltersDTO.java
  64. 22 22
      gateway-service/src/main/java/com/diagbot/entity/HasPermissionDTO.java
  65. 55 0
      gateway-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java
  66. 111 93
      gateway-service/src/main/java/com/diagbot/filter/GlobalGatewayFilter.java
  67. 33 0
      gateway-service/src/main/java/com/diagbot/web/CacheController.java
  68. 4 4
      icss-service/src/test/java/com/diagbot/CodeGeneration.java
  69. 14 2
      knowledgeman-service/src/main/java/com/diagbot/dto/GetConceptInfoDTO.java
  70. 78 0
      knowledgeman-service/src/main/java/com/diagbot/entity/KlSymptom.java
  71. 32 1
      knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  72. 10 0
      knowledgeman-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java
  73. 16 0
      knowledgeman-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java
  74. 16 0
      knowledgeman-service/src/main/java/com/diagbot/service/KlSymptomService.java
  75. 20 0
      knowledgeman-service/src/main/java/com/diagbot/service/impl/KlSymptomServiceImpl.java
  76. 11 8
      knowledgeman-service/src/main/java/com/diagbot/vo/AddConceptInfoVO.java
  77. 22 0
      knowledgeman-service/src/main/java/com/diagbot/vo/SymptomExtVO.java
  78. 19 0
      knowledgeman-service/src/main/resources/mapper/KlSymptomMapper.xml
  79. 4 4
      knowledgeman-service/src/test/java/com/diagbot/CodeGeneration.java
  80. 19 0
      ltkg-service/src/main/java/com/diagbot/client/NLPServiceClient.java
  81. 23 0
      ltkg-service/src/main/java/com/diagbot/client/hystrix/NLPServiceHystrix.java
  82. 21 0
      ltkg-service/src/main/java/com/diagbot/facade/NlpFacade.java
  83. 18 0
      ltkg-service/src/main/java/com/diagbot/vo/NlpContent.java
  84. 17 0
      ltkg-service/src/main/java/com/diagbot/vo/NlpVO.java
  85. 39 0
      ltkg-service/src/main/java/com/diagbot/web/NlpController.java
  86. 16 1
      mrman-service/pom.xml
  87. 2 1
      mrman-service/src/main/java/com/diagbot/MrmanServiceApplication.java
  88. 19 0
      mrman-service/src/main/java/com/diagbot/dto/ModuleMappingDTO.java
  89. 31 0
      mrman-service/src/main/java/com/diagbot/dto/QcAllInputcasesDTO.java
  90. 53 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesAllDTO.java
  91. 17 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesDTO.java
  92. 25 0
      mrman-service/src/main/java/com/diagbot/dto/QcHospitalInfoAllDTO.java
  93. 123 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesAllDTO.java
  94. 43 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesMappingDTO.java
  95. 157 0
      mrman-service/src/main/java/com/diagbot/entity/CasesNumber.java
  96. 133 0
      mrman-service/src/main/java/com/diagbot/entity/Mode.java
  97. 160 0
      mrman-service/src/main/java/com/diagbot/entity/ModelMapping.java
  98. 132 0
      mrman-service/src/main/java/com/diagbot/entity/QcCases.java
  99. 145 0
      mrman-service/src/main/java/com/diagbot/entity/QcCasesEntry.java
  100. 0 0
      mrman-service/src/main/java/com/diagbot/entity/QcHospitalInfo.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);
                     }

+ 48 - 1
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;
 
     /**
      * 推理接口
@@ -65,6 +76,7 @@ public class PushFacade {
             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);
+}

+ 2 - 2
config-server/src/main/resources/shared/gateway-service-dev.yml

@@ -181,6 +181,6 @@ spring:
 server:
   port: 5050
 
+#网关是否验证产品线接口权限
 lantone:
-  product: triagett,143;icsstt,2
-
+  gateway-valid: true

+ 2 - 2
config-server/src/main/resources/shared/gateway-service-local.yml

@@ -181,6 +181,6 @@ spring:
 server:
   port: 5050
 
+#网关是否验证产品线接口权限
 lantone:
-  product: triage33,1;icsstt,2
-
+  gateway-valid: false

+ 2 - 2
config-server/src/main/resources/shared/gateway-service-pre.yml

@@ -191,6 +191,6 @@ spring:
 server:
   port: 5050
 
+#网关是否验证产品线接口权限
 lantone:
-  product: triagett,143;icsstt,2
-
+  gateway-valid: true

+ 2 - 2
config-server/src/main/resources/shared/gateway-service-pro.yml

@@ -181,6 +181,6 @@ spring:
 server:
   port: 5050
 
+#网关是否验证产品线接口权限
 lantone:
-  product: triagett,143;icsstt,2
-
+  gateway-valid: true

+ 2 - 2
config-server/src/main/resources/shared/gateway-service-test.yml

@@ -181,6 +181,6 @@ spring:
 server:
   port: 5050
 
+#网关是否验证产品线接口权限
 lantone:
-  product: triage33,1;icssyz,147
-
+  gateway-valid: true

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

@@ -47,3 +47,7 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456

+ 5 - 1
config-server/src/main/resources/shared/ltkg-service-local.yml

@@ -46,4 +46,8 @@ spring:
 #mybatis
 mybatis:
   type-aliases-package: com.diagbot.entity
-  mapper-locations: classpath:mapper/**/*.xml
+  mapper-locations: classpath:mapper/**/*.xml
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456

+ 4 - 0
config-server/src/main/resources/shared/ltkg-service-pre.yml

@@ -47,3 +47,7 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456

+ 4 - 0
config-server/src/main/resources/shared/ltkg-service-pro.yml

@@ -47,3 +47,7 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456

+ 4 - 0
config-server/src/main/resources/shared/ltkg-service-test.yml

@@ -47,3 +47,7 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456

+ 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

+ 6 - 0
diagbotman-service/pom.xml

@@ -164,6 +164,12 @@
             <groupId>org.apache.poi</groupId>
             <artifactId>poi-ooxml</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.lionsoul</groupId>
+            <artifactId>ip2region</artifactId>
+            <version>1.7.2</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -31,11 +31,11 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/productOrder/getInformationAvailableAll").permitAll()
                 .antMatchers("/productOrder/getUserWaitingRenewal").permitAll()
                 .antMatchers("/productOrder/getOrderByUserToAudit").permitAll()
+                .antMatchers("/optInfo/save").permitAll()
                 .antMatchers("/**").authenticated();
         //        .antMatchers("/**").permitAll();
     }
 
-
     @Override
     public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
         log.info("Configuring ResourceServerSecurityConfigurer ");

+ 1 - 0
diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -95,6 +95,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/productOrder/getInformationAvailableAll", request)
                 || matchers("/productOrder/getUserWaitingRenewal", request)
                 || matchers("/productOrder/getOrderByUserToAudit", request)
+                || matchers("/optInfo/save", request)
                 || matchers("/", request)) {
             return true;
         }

+ 23 - 0
diagbotman-service/src/main/java/com/diagbot/dto/ServiceFiltersDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/3/25 13:06
+ */
+@Getter
+@Setter
+public class ServiceFiltersDTO {
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * api前缀
+     */
+    private String name;
+}

+ 50 - 0
diagbotman-service/src/main/java/com/diagbot/entity/IpEntity.java

@@ -0,0 +1,50 @@
+package com.diagbot.entity;
+
+import lombok.Data;
+
+/**
+ * @description: ip基础类
+ * @author: zhoutg
+ * @time: 2020/3/25 9:39
+ */
+@Data
+public class IpEntity {
+
+    /**
+     * 国家
+     */
+    private String country;
+
+    /**
+     * 区域
+     */
+    private String area;
+
+    /**
+     * 省份
+     */
+    private String province;
+
+    /**
+     * 城市
+     */
+    private String city;
+
+    /**
+     * 运营商
+     */
+    private String operator;
+
+    public IpEntity() {
+    }
+
+    public IpEntity(String country, String area, String province, String city, String operator) {
+        this.country = country;
+        this.area = area;
+        this.province = province;
+        this.city = city;
+        this.operator = operator;
+    }
+
+
+}

+ 95 - 0
diagbotman-service/src/main/java/com/diagbot/entity/OptInfo.java

@@ -0,0 +1,95 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 产品操作记录表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+@TableName("diag_opt_info")
+@Data
+public class OptInfo 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;
+
+    /**
+     * 访问者的IP
+     */
+    private String ip;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 联系人
+     */
+    private String linkman;
+
+    /**
+     * 国家
+     */
+    private String country;
+
+    /**
+     * 省份
+     */
+    private String province;
+
+    /**
+     * 城市
+     */
+    private String city;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 4 - 4
diagbotman-service/src/main/java/com/diagbot/entity/ServiceFilter.java

@@ -50,14 +50,14 @@ public class ServiceFilter implements Serializable {
     private String modifier;
 
     /**
-     * 名称
+     * 产品id
      */
-    private String name;
+    private Long productId;
 
     /**
-     * 产品id
+     * api前缀
      */
-    private Long productId;
+    private String name;
 
     /**
      * 备注

+ 41 - 0
diagbotman-service/src/main/java/com/diagbot/facade/OptInfoFacade.java

@@ -0,0 +1,41 @@
+package com.diagbot.facade;
+
+import com.diagbot.entity.IpEntity;
+import com.diagbot.entity.OptInfo;
+import com.diagbot.service.impl.OptInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.IPUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.OptInfoVO;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2018/10/12 15:31
+ */
+@Component
+public class OptInfoFacade extends OptInfoServiceImpl {
+
+    public Boolean saveFac(OptInfoVO optInfoVO) {
+        String ip = HttpUtils.getIpAddress();
+        IpEntity ipEntity = IPUtil.getCityInfoWithEntity(ip);
+        // 赋值
+        OptInfo optInfo = new OptInfo();
+        BeanUtil.copyProperties(optInfoVO, optInfo);
+        optInfo.setCreator(UserUtils.getCurrentPrincipleID());
+        optInfo.setModifier(UserUtils.getCurrentPrincipleID());
+        optInfo.setIp(ip);
+        optInfo.setCountry(ipEntity.getCountry());
+        optInfo.setProvince(ipEntity.getProvince());
+        optInfo.setCity(ipEntity.getCity());
+        Date date = DateUtil.now();
+        optInfo.setGmtCreate(date);
+        optInfo.setGmtModified(date);
+        return this.save(optInfo);
+    }
+}

+ 11 - 3
diagbotman-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java

@@ -1,10 +1,13 @@
 package com.diagbot.facade;
 
-import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.ServiceFiltersDTO;
 import com.diagbot.entity.ServiceFilter;
 import com.diagbot.service.impl.ServiceFilterServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -20,7 +23,12 @@ public class ServiceFilterFacade extends ServiceFilterServiceImpl {
      *
      * @return 服务列表
      */
-    public RespDTO<List<ServiceFilter>> getServiceFilter() {
-        return this.getAll();
+    public List<ServiceFiltersDTO> getServiceFilter() {
+        List<ServiceFiltersDTO> res = new ArrayList<>();
+        List<ServiceFilter> list = this.getAll();
+        if (ListUtil.isNotEmpty(list)) {
+            res = BeanUtil.listCopyTo(list, ServiceFiltersDTO.class);
+        }
+        return res;
     }
 }

+ 16 - 0
diagbotman-service/src/main/java/com/diagbot/mapper/OptInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.OptInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 产品操作记录表 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+public interface OptInfoMapper extends BaseMapper<OptInfo> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.OptInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 产品操作记录表 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+public interface OptInfoService extends IService<OptInfo> {
+
+}

+ 1 - 1
diagbotman-service/src/main/java/com/diagbot/service/ServiceFilterService.java

@@ -18,5 +18,5 @@ public interface ServiceFilterService extends IService<ServiceFilter> {
      * @Author: ztg
      * @Date: 2018/9/18 14:57
      */
-    public RespDTO<List<ServiceFilter>> getAll();
+    public List<ServiceFilter> getAll();
 }

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.OptInfo;
+import com.diagbot.mapper.OptInfoMapper;
+import com.diagbot.service.OptInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 产品操作记录表 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+@Service
+public class OptInfoServiceImpl extends ServiceImpl<OptInfoMapper, OptInfo> implements OptInfoService {
+
+}

+ 2 - 3
diagbotman-service/src/main/java/com/diagbot/service/impl/ServiceFilterServiceImpl.java

@@ -24,9 +24,8 @@ public class ServiceFilterServiceImpl extends ServiceImpl<ServiceFilterMapper, S
      * @return
      */
     @Override
-    public RespDTO<List<ServiceFilter>> getAll() {
-        List<ServiceFilter> list = baseMapper.getAll();
-        return RespDTO.onSuc(list);
+    public List<ServiceFilter> getAll() {
+        return baseMapper.getAll();
     }
 
 

+ 106 - 0
diagbotman-service/src/main/java/com/diagbot/util/IPUtil.java

@@ -0,0 +1,106 @@
+package com.diagbot.util;
+
+import com.diagbot.entity.IpEntity;
+import org.lionsoul.ip2region.DataBlock;
+import org.lionsoul.ip2region.DbConfig;
+import org.lionsoul.ip2region.DbSearcher;
+import org.lionsoul.ip2region.Util;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.util.FileCopyUtils;
+
+import java.io.InputStream;
+import java.lang.reflect.Method;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/3/24 18:29
+ */
+public class IPUtil {
+
+    private static DbSearcher searcher;
+
+    /**
+     *  获取DbSearcher
+     * @return
+     */
+    public static DbSearcher getInstance () {
+        if (searcher != null) {
+            return searcher;
+        }
+        try {
+            DbConfig config = new DbConfig();
+            Resource resource = new ClassPathResource("ip2region.db"); // 远程获取资源文件
+            InputStream inputStream = resource.getInputStream();
+            searcher = new DbSearcher(config, FileCopyUtils.copyToByteArray(inputStream));
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.out.println("获取DbSearcher错误");
+        }
+        return searcher;
+    }
+
+
+    //国家,区域,省份,城市,运营商
+    public  static String getCityInfo(String ip) {
+        //查询算法
+        int algorithm = DbSearcher.MEMORY_ALGORITYM;
+         //DbSearcher.BTREE_ALGORITHM; //B-tree
+        //DbSearcher.BINARY_ALGORITHM //Binary
+        //DbSearcher.MEMORY_ALGORITYM //Memory
+        try {
+            // 初始化
+            getInstance();
+
+            //define the method
+            Method method = null;
+            switch (algorithm) {
+                case DbSearcher.BTREE_ALGORITHM:
+                    method = searcher.getClass().getMethod("btreeSearch", String.class);
+                    break;
+                case DbSearcher.BINARY_ALGORITHM:
+                    method = searcher.getClass().getMethod("binarySearch", String.class);
+                    break;
+                case DbSearcher.MEMORY_ALGORITYM:
+                    method = searcher.getClass().getMethod("memorySearch", String.class);
+                    break;
+            }
+
+            DataBlock dataBlock = null;
+            if (Util.isIpAddress(ip) == false) {
+                System.out.println("Error: Invalid ip address");
+            }
+
+            dataBlock = (DataBlock) method.invoke(searcher, ip);
+
+            return dataBlock.getRegion();
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.out.println("Ip解析错误");
+        }
+        return null;
+    }
+
+
+    /**
+     * 返回ip实体类
+     *
+     * @param ip
+     * @return ip实体类
+     */
+    public static IpEntity getCityInfoWithEntity(String ip) {
+        String ipStr = getCityInfo(ip);
+        String[] arr = ipStr.split("\\|");
+        if (arr != null && arr.length == 5) {
+            return new IpEntity(arr[0], arr[1], arr[2], arr[3], arr[4]);
+        }
+        return new IpEntity();
+    }
+
+    public static void main(String[] args) {
+        System.out.println(getCityInfo("223.93.170.82"));
+        System.out.println(getCityInfo("223.93.170.82"));
+    }
+}

+ 35 - 0
diagbotman-service/src/main/java/com/diagbot/vo/OptInfoVO.java

@@ -0,0 +1,35 @@
+package com.diagbot.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 产品操作记录表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+@Data
+public class OptInfoVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 联系人
+     */
+    private String linkman;
+
+}

+ 42 - 0
diagbotman-service/src/main/java/com/diagbot/web/OptInfoController.java

@@ -0,0 +1,42 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.OptInfoFacade;
+import com.diagbot.vo.OptInfoVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 产品操作记录表 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-03-25
+ */
+@RestController
+@RequestMapping("/optInfo")
+@Api(value = "产品操作记录API", tags = { "产品操作记录API" })
+public class OptInfoController {
+
+    @Autowired
+    OptInfoFacade optInfoFacade;
+
+    @ApiOperation(value = "保存记录[by:zhoutg]",
+            notes = "productId:产品id<br>" +
+                    "username:用户名<br>" +
+                    "linkman:联系人<br>")
+    @PostMapping("/save")
+    @SysLogger("save")
+    public RespDTO<Boolean> save(@RequestBody OptInfoVO optInfoVO) {
+        return RespDTO.onSuc(optInfoFacade.saveFac(optInfoVO));
+    }
+
+}

+ 3 - 3
diagbotman-service/src/main/java/com/diagbot/web/ServiceFilterController.java

@@ -1,7 +1,7 @@
 package com.diagbot.web;
 
 import com.diagbot.dto.RespDTO;
-import com.diagbot.entity.ServiceFilter;
+import com.diagbot.dto.ServiceFiltersDTO;
 import com.diagbot.facade.ServiceFilterFacade;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,8 +30,8 @@ public class ServiceFilterController {
     @ApiOperation(value = "获取需要appkey和secret的服务信息[by:zhoutg]",
             notes = "接口未用,直接从配置项中读取服务")
     @ApiIgnore
-    public RespDTO<List<ServiceFilter>> getServiceFilter() {
-        return serviceFilterFacade.getAll();
+    public RespDTO<List<ServiceFiltersDTO>> getServiceFilter() {
+        return RespDTO.onSuc(serviceFilterFacade.getServiceFilter());
     }
 
 

BIN
diagbotman-service/src/main/resources/ip2region.db


+ 22 - 0
diagbotman-service/src/main/resources/mapper/OptInfoMapper.xml

@@ -0,0 +1,22 @@
+<?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.OptInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.OptInfo">
+        <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="ip" property="ip" />
+        <result column="product_id" property="productId" />
+        <result column="user_id" property="userId" />
+        <result column="country" property="country" />
+        <result column="province" property="province" />
+        <result column="city" property="city" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 1 - 1
diagbotman-service/src/main/resources/mapper/ServiceFilterMapper.xml

@@ -11,8 +11,8 @@
         <result column="gmt_modified" property="gmtModified"/>
         <result column="creator" property="creator"/>
         <result column="modifier" property="modifier"/>
-        <result column="name" property="name"/>
         <result column="product_id" property="productId"/>
+        <result column="name" property="name"/>
         <result column="remark" property="remark"/>
     </resultMap>
 

+ 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;
+

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1412 - 0
docs/031.2020-03-20智能分诊初始化脚本/init_tran.sql


+ 34 - 0
docs/031.20200325记录产品操作记录/init_diagbotman.sql

@@ -0,0 +1,34 @@
+use `sys-diagbotman`;
+
+DROP TABLE IF EXISTS `diag_opt_info`;
+CREATE TABLE `diag_opt_info` (
+  `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则表示纪录未修改',
+  `ip` varchar(100) NOT NULL DEFAULT '' COMMENT '访问者的IP',
+  `product_id` bigint(20) NOT NULL COMMENT '产品id',
+  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
+  `linkman` varchar(255) NOT NULL DEFAULT '' COMMENT '联系人',
+  `country` varchar(50) NOT NULL DEFAULT '' COMMENT '国家',
+  `province` varchar(50) NOT NULL DEFAULT '' COMMENT '省份',
+  `city` varchar(50) NOT NULL DEFAULT '' COMMENT '城市',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='产品操作记录表';
+
+DROP TABLE IF EXISTS `diag_service_filter`;
+CREATE TABLE `diag_service_filter` (
+  `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则表示纪录未修改',
+  `product_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '产品id',
+  `name` varchar(20) NOT NULL DEFAULT '' COMMENT 'api前缀',
+  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品网关过滤(需要使用appkey和secret的url地址)';

+ 20 - 0
gateway-service/src/main/java/com/diagbot/dto/ServiceFilterDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/3/25 13:06
+ */
+@Getter
+@Setter
+public class ServiceFilterDTO implements Serializable {
+    private Set<String> apiMap;
+    private Map<Long, String> productMap;
+}

+ 23 - 0
gateway-service/src/main/java/com/diagbot/dto/ServiceFiltersDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/3/25 13:06
+ */
+@Getter
+@Setter
+public class ServiceFiltersDTO {
+    /**
+     * 产品id
+     */
+    private Long productId;
+
+    /**
+     * api前缀
+     */
+    private String name;
+}

+ 22 - 22
gateway-service/src/main/java/com/diagbot/entity/HasPermissionDTO.java

@@ -1,22 +1,22 @@
-//package com.diagbot.entity;
-//
-//import lombok.Getter;
-//import lombok.Setter;
-//
-//import java.io.Serializable;
-//
-///**
-// * @Description: 是否有权限返回类
-// * @Author: ztg
-// * @Date: 2018/9/20 10:32
-// */
-//
-//@Getter
-//@Setter
-//public class HasPermissionDTO implements Serializable {
-//
-//    private static final long serialVersionUID = 1L;
-//
-//    private Boolean hasPermission ;//标志
-//    private String userId;         //用户ID
-//}
+package com.diagbot.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 是否有权限返回类
+ * @Author: ztg
+ * @Date: 2018/9/20 10:32
+ */
+
+@Getter
+@Setter
+public class HasPermissionDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private Boolean hasPermission ;//标志
+    private String userId;         //用户ID
+}

+ 55 - 0
gateway-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java

@@ -0,0 +1,55 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.ServiceFilterDTO;
+import com.diagbot.dto.ServiceFiltersDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: 产品服务过滤
+ * @Author: ztg
+ * @Date: 2018/9/18 14:45
+ */
+@Component
+@Slf4j
+public class ServiceFilterFacade {
+    private static final String SERVICEFILTER = "ServiceFilter";
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    /**
+     * 获取需要appkey和secret的服务,未用
+     *
+     * @return 服务列表
+     */
+    @Cacheable(value = SERVICEFILTER, key = "'ServiceFilter'")
+    public ServiceFilterDTO getServiceFilter() {
+        ServiceFilterDTO serviceFilterDTO = new ServiceFilterDTO();
+        ResponseEntity<RespDTO<List<ServiceFiltersDTO>>> respDTOResponseEntity
+                = restTemplate.exchange("http://diagbotman-service/service_filter/getAll", HttpMethod.POST,
+                null, new ParameterizedTypeReference<RespDTO<List<ServiceFiltersDTO>>>() {
+                });
+        RespDTO<List<ServiceFiltersDTO>> resFilter = respDTOResponseEntity.getBody();
+        if (resFilter != null && RespDTO.TRUE_CODE.equals(resFilter.code)) {
+            Set<String> apiMap = resFilter.data.stream().distinct().map(ServiceFiltersDTO::getName).collect(Collectors.toSet());
+            Map<Long, String> productMap = resFilter.data.stream().collect(Collectors.toMap(ServiceFiltersDTO::getProductId, ServiceFiltersDTO::getName));
+            serviceFilterDTO.setApiMap(apiMap);
+            serviceFilterDTO.setProductMap(productMap);
+            log.info("读取了拦截产品线缓存!");
+        }
+        return serviceFilterDTO;
+    }
+}

+ 111 - 93
gateway-service/src/main/java/com/diagbot/filter/GlobalGatewayFilter.java

@@ -4,13 +4,17 @@ package com.diagbot.filter;
 
 import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.ServiceFilterDTO;
+import com.diagbot.entity.HasPermissionDTO;
 import com.diagbot.entity.ServiceFilter;
 import com.diagbot.entity.ServiceToken;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.facade.ServiceFilterFacade;
 import com.diagbot.rabbit.MySender;
 import com.diagbot.util.EnDecodeUtil;
 import com.diagbot.util.GsonUtil;
+import com.diagbot.util.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -19,8 +23,12 @@ import org.springframework.cloud.gateway.filter.GatewayFilterChain;
 import org.springframework.cloud.gateway.filter.GlobalFilter;
 import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.core.io.buffer.DataBuffer;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
 import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.server.ServerWebExchange;
@@ -32,12 +40,9 @@ import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
 
-//import com.diagbot.entity.HasPermissionDTO;
-
 /**
  * @Description: 全局过滤器
  * @author: gaodm
@@ -52,8 +57,8 @@ public class GlobalGatewayFilter implements GlobalFilter {
     private static Boolean IS_GENERATE = false;
     private static Map<String, Long> SERVICE_FILTER = new HashMap<>();
 
-    @Value("${lantone.product}")
-    private String lantonePrduct;
+    @Value("${lantone.gateway-valid}")
+    private Boolean gatewayValid;
 
     //    @Autowired
     //    DiagbotmanServiceClient diagbotmanServiceClient;
@@ -61,98 +66,108 @@ public class GlobalGatewayFilter implements GlobalFilter {
     private MySender mySender;
     @Autowired
     private RestTemplate restTemplate;
+    @Autowired
+    private ServiceFilterFacade serviceFilterFacade;
 
 
     @Override
+    @SuppressWarnings("unchecked")
     public Mono<Void> filter(ServerWebExchange serverWebExchange, GatewayFilterChain gatewayFilterChain) {
         log.info("check token and url permission....");
-        LinkedHashSet requiredAttribute
-                = serverWebExchange.getRequiredAttribute(ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR);
-        ServerHttpRequest request = serverWebExchange.getRequest();
-        String requestUri = request.getPath().pathWithinApplication().value();
-        String serviceName = "";
-        if (requiredAttribute != null) {
-            Iterator<URI> iterator = requiredAttribute.iterator();
-            while (iterator.hasNext()) {
-                URI next = iterator.next();
-                if (next.getPath().startsWith(GATE_WAY_PREFIX)) {
-                    requestUri = next.getPath().substring(GATE_WAY_PREFIX.length());
-                    serviceName = requestUri.substring(requestUri.indexOf('/') + 1,
-                            requestUri.indexOf('/', 2));
+
+        //网关验证产品线接口权限
+        if (gatewayValid) {
+            LinkedHashSet requiredAttribute
+                    = serverWebExchange.getRequiredAttribute(ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR);
+            ServerHttpRequest request = serverWebExchange.getRequest();
+            String requestUri = request.getPath().pathWithinApplication().value();
+            String serviceName = "";
+            if (requiredAttribute != null) {
+                Iterator<URI> iterator = requiredAttribute.iterator();
+                while (iterator.hasNext()) {
+                    URI next = iterator.next();
+                    if (next.getPath().startsWith(GATE_WAY_PREFIX)) {
+                        requestUri = next.getPath().substring(GATE_WAY_PREFIX.length());
+                        serviceName = requestUri.substring(requestUri.indexOf('/') + 1,
+                                requestUri.indexOf('/', 2));
+                    }
                 }
             }
-        }
-        //        log.info("APIURL:{}", requestUri);
-        //        log.info("SERVICENAME:{}", serviceName);
-
-        //        if(!IS_GENERATE) {
-        //            RespDTO<List<ServiceFilter>> filter = diagbotmanServiceClient.getAll();
-        //            if (filter != null){
-        //                List<ServiceFilter> list =  filter.data;
-        //                if (ListUtil.isNotEmpty(list)){
-        //                    for(ServiceFilter bean : list) {
-        //                        SERVICE_FILTER.put(bean.getName(), bean.getProductId());
-        //                    }
-        //                    IS_GENERATE = true;
-        //                }
-        //            }
-        //        }
-
-        Map<String, Long> serviceFilters = this.dealServiceFilter();
-        if (serviceFilters.get(serviceName) != null) {
-            String appkey = request.getHeaders().getFirst("appKeyId");
-            String secret = request.getHeaders().getFirst("appKeySecret");
-            String securityCode = request.getHeaders().getFirst("securityCode"); //防伪码
+
+            ServiceFilterDTO serviceFilterDTO = new ServiceFilterDTO();
             try {
-                String encodeTime = EnDecodeUtil.decode(securityCode);
-                Long time = Long.parseLong(encodeTime);
-                Long curTime = new Date().getTime();
-                // 防伪码主要是为了防止别人窃取url地址后直接长期使用,这边设了失效,目前暂定为24小时
-                // 前端实时获取当前时间跟系统时间作比较,如果时差超出24小时将会抛异常
-                if ((curTime - time) > 1000 * 3600 * 24) {
+                serviceFilterDTO = serviceFilterFacade.getServiceFilter();
+            } catch (Exception e) {
+                RespDTO respDTO = new RespDTO();
+                respDTO.code = CommonErrorCode.RPC_ERROR.getCode();
+                respDTO.msg = CommonErrorCode.RPC_ERROR.getMsg();
+                return getVoidMono(serverWebExchange, respDTO);
+            }
+            if (serviceFilterDTO.getApiMap().contains(serviceName)) {
+                String productIdStr = request.getHeaders().getFirst("productId");
+                if (StringUtil.isBlank(productIdStr)) {
+                    RespDTO respDTO = new RespDTO();
+                    respDTO.code = CommonErrorCode.PARAM_IS_NULL.getCode();
+                    respDTO.msg = "请传入产品ID";
+                    return getVoidMono(serverWebExchange, respDTO);
+                }
+                Long productId = Long.valueOf(productIdStr);
+                if (!serviceName.equals(serviceFilterDTO.getProductMap().get(productId))) {
+                    RespDTO respDTO = new RespDTO();
+                    respDTO.code = CommonErrorCode.NOPERMISSION_ERROR.getCode();
+                    respDTO.msg = CommonErrorCode.NOPERMISSION_ERROR.getMsg();
+                    return getVoidMono(serverWebExchange, respDTO);
+                }
+                String appkey = request.getHeaders().getFirst("appKeyId");
+                String secret = request.getHeaders().getFirst("appKeySecret");
+                String securityCode = request.getHeaders().getFirst("securityCode"); //防伪码
+                try {
+                    String encodeTime = EnDecodeUtil.decode(securityCode);
+                    Long time = Long.parseLong(encodeTime);
+                    Long curTime = new Date().getTime();
+                    // 防伪码主要是为了防止别人窃取url地址后直接长期使用,这边设了失效,目前暂定为24小时
+                    // 前端实时获取当前时间跟系统时间作比较,如果时差超出24小时将会抛异常
+                    if ((curTime - time) > 1000 * 3600 * 24) {
+                        RespDTO respDTO = new RespDTO();
+                        respDTO.code = CommonErrorCode.SECURITYCODE_ERROR.getCode();
+                        respDTO.msg = CommonErrorCode.SECURITYCODE_ERROR.getMsg();
+                        return getVoidMono(serverWebExchange, respDTO);
+                    }
+                } catch (Exception e) {
                     RespDTO respDTO = new RespDTO();
                     respDTO.code = CommonErrorCode.SECURITYCODE_ERROR.getCode();
                     respDTO.msg = CommonErrorCode.SECURITYCODE_ERROR.getMsg();
                     return getVoidMono(serverWebExchange, respDTO);
                 }
-            } catch (Exception e) {
-                RespDTO respDTO = new RespDTO();
-                respDTO.code = CommonErrorCode.SECURITYCODE_ERROR.getCode();
-                respDTO.msg = CommonErrorCode.SECURITYCODE_ERROR.getMsg();
-                return getVoidMono(serverWebExchange, respDTO);
-            }
-            Long productId = serviceFilters.get(serviceName);
-            //获取appkey,secret对应的权限信息
-            ServiceToken st = new ServiceToken();
-            st.setAppkey(appkey);
-            st.setSecret(secret);
-            st.setProductId(productId);
-            //            RespDTO<HasPermissionDTO> res = diagbotmanServiceClient.hasPermission(st);
-            RespDTO<LinkedHashMap> res = hasPermission(st);
-            if (res == null || !RespDTO.TRUE_CODE.equals(res.code)) {
-                return getVoidMono(serverWebExchange, res);
-            }
+                //获取appkey,secret对应的权限信息
+                ServiceToken st = new ServiceToken();
+                st.setAppkey(appkey);
+                st.setSecret(secret);
+                st.setProductId(productId);
+                //权限验证
+                RespDTO<HasPermissionDTO> res = hasPermission(st);
+                if (res == null || !RespDTO.TRUE_CODE.equals(res.code)) {
+                    return getVoidMono(serverWebExchange, res);
+                }
 
-            //记录日志
-            SysLog sysLog = new SysLog();
-            sysLog.setGmtCreate(new Date());
-            sysLog.setIp(request.getRemoteAddress().toString());
-            sysLog.setMethod(requestUri);
-            ServiceFilter serviceFilter = new ServiceFilter();
-            serviceFilter.setServiceName(serviceName);
-            serviceFilter.setProductId(productId);
-            sysLog.setOperation(GsonUtil.toJson(serviceFilter));
-            sysLog.setParams(requestUri);
-            sysLog.setSysType(SysTypeEnum.APPKEY.getKey());
-            LinkedHashMap<String, String> map = res.data;
-            sysLog.setUsername(map.get("userId"));
-            mySender.outputLogSend(sysLog);
+                //记录日志
+                SysLog sysLog = new SysLog();
+                sysLog.setGmtCreate(new Date());
+                sysLog.setIp(request.getRemoteAddress().toString());
+                sysLog.setMethod(requestUri);
+                ServiceFilter serviceFilter = new ServiceFilter();
+                serviceFilter.setServiceName(serviceName);
+                serviceFilter.setProductId(productId);
+                sysLog.setOperation(GsonUtil.toJson(serviceFilter));
+                sysLog.setParams(requestUri);
+                sysLog.setSysType(SysTypeEnum.APPKEY.getKey());
+                sysLog.setUsername(res.data.getUserId());
+                mySender.outputLogSend(sysLog);
 
+            }
         }
 
         ServerHttpRequest.Builder builder = serverWebExchange.getRequest().mutate();
-        //        builder.header("Authorization", "Authorization Bearer token");
-        //        gatewayFilterChain.filter(serverWebExchange.mutate().request(builder.build()).build());
         return gatewayFilterChain.filter(serverWebExchange.mutate().request(builder.build()).build());
     }
 
@@ -175,21 +190,24 @@ public class GlobalGatewayFilter implements GlobalFilter {
      *
      * @return 过滤的列表
      */
-    private Map<String, Long> dealServiceFilter() {
-        Map<String, Long> serviceFilters = new HashMap<>();
-        String[] set = lantonePrduct.split(";");
-        for (String s : set) {
-            String[] d = s.split(",");
-            serviceFilters.put(d[0], Long.valueOf(d[1]));
-        }
-        return serviceFilters;
-    }
-
-    public RespDTO<LinkedHashMap> hasPermission(ServiceToken st) {
+    //    private Map<String, Long> dealServiceFilter() {
+    //        Map<String, Long> serviceFilters = new HashMap<>();
+    //        String[] set = lantonePrduct.split(";");
+    //        for (String s : set) {
+    //            String[] d = s.split(",");
+    //            serviceFilters.put(d[0], Long.valueOf(d[1]));
+    //        }
+    //        return serviceFilters;
+    //    }
+    public RespDTO<HasPermissionDTO> hasPermission(ServiceToken st) {
         try {
-            RespDTO<LinkedHashMap> res
-                    = restTemplate.postForObject("http://diagbotman-service/serviceToken/hasPermission", st, RespDTO.class);
-            return res;
+            ResponseEntity<RespDTO<HasPermissionDTO>> respDTOResponseEntity
+                    = restTemplate.exchange("http://diagbotman-service/serviceToken/hasPermission",
+                    HttpMethod.POST,
+                    new HttpEntity<ServiceToken>(st),
+                    new ParameterizedTypeReference<RespDTO<HasPermissionDTO>>() {
+                    });
+            return respDTOResponseEntity.getBody();
         } catch (Exception ex) {
             return hasPermissionFallback(st);
         }

+ 33 - 0
gateway-service/src/main/java/com/diagbot/web/CacheController.java

@@ -0,0 +1,33 @@
+package com.diagbot.web;
+
+import com.diagbot.dto.RespDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description: 清理缓存控制层
+ * @Author:gaodm
+ * @time: 2019/5/22 15:07
+ */
+@RestController
+@RequestMapping("/cache")
+@Api(value = "缓存相关API", tags = { "缓存相关API" })
+@SuppressWarnings("unchecked")
+@Slf4j
+public class CacheController {
+    private static final String SERVICEFILTER = "ServiceFilter";
+
+    @ApiOperation(value = "清空缓存[by:gaodm]",
+            notes = "")
+    @GetMapping("/clear")
+    @CacheEvict(cacheNames = SERVICEFILTER, allEntries = true)
+    public RespDTO<Boolean> clearCache() {
+        log.info("清理了拦截产品线缓存!");
+        return RespDTO.onSuc(true);
+    }
+}

+ 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);

+ 19 - 0
ltkg-service/src/main/java/com/diagbot/client/NLPServiceClient.java

@@ -0,0 +1,19 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.NLPServiceHystrix;
+import com.diagbot.vo.NlpVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+/**
+ * @Description:调用NLP对接层服务
+ * @Author:zhoutg
+ * @time: 2019/4/2 15:31
+ */
+@FeignClient(name = "NLPREL", url = "${nlprel.server.address}", fallback = NLPServiceHystrix.class)
+public interface NLPServiceClient {
+
+    @PostMapping(value = "/api/mr_info_ex/entity_predict")
+    String getNlp(@RequestBody NlpVO nlpVO);
+}

+ 23 - 0
ltkg-service/src/main/java/com/diagbot/client/hystrix/NLPServiceHystrix.java

@@ -0,0 +1,23 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.NLPServiceClient;
+import com.diagbot.vo.NlpVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * @Description:调用NLP对接层服务
+ * @Author:zhoutg
+ * @time: 2019/4/2 15:36
+ */
+@Component
+@Slf4j
+public class NLPServiceHystrix implements NLPServiceClient {
+
+    @Override
+    public String getNlp(NlpVO nlpVO) {
+        log.error("【hystrix】调用{}异常", "getNlp");
+        return null;
+    }
+}

+ 21 - 0
ltkg-service/src/main/java/com/diagbot/facade/NlpFacade.java

@@ -0,0 +1,21 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.NLPServiceClient;
+import com.diagbot.vo.NlpVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: NLP实体识别和关系抽取API业务层
+ * @author: zhoutg
+ * @time: 2018/8/6 9:11
+ */
+@Component
+public class NlpFacade {
+    @Autowired
+    NLPServiceClient nlpServiceClient;
+
+    public String getNlp(NlpVO nlpVO) {
+        return nlpServiceClient.getNlp(nlpVO);
+    }
+}

+ 18 - 0
ltkg-service/src/main/java/com/diagbot/vo/NlpContent.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/3/16 9:47
+ */
+@Getter
+@Setter
+public class NlpContent {
+    private String medical_text_type;
+    private String content;
+    private String title;
+    private String detail_title;
+}

+ 17 - 0
ltkg-service/src/main/java/com/diagbot/vo/NlpVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/3/16 9:47
+ */
+@Getter
+@Setter
+public class NlpVO {
+    private List<NlpContent> data;
+}

+ 39 - 0
ltkg-service/src/main/java/com/diagbot/web/NlpController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.NlpFacade;
+import com.diagbot.vo.NlpVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description: nlp控制层
+ * @author: zhoutg
+ * @time: 2018/8/30 10:12
+ */
+@RestController
+@RequestMapping("/nlp")
+@Api(value = "NLP实体识别和关系抽取API", tags = { "NLP实体识别和关系抽取API" })
+@SuppressWarnings("unchecked")
+@Slf4j
+public class NlpController {
+
+    @Autowired
+    private NlpFacade nlpFacade;
+
+    @ApiOperation(value = "获取实体识别和关系抽取结果[zhoutg]", notes = "")
+    @PostMapping("/getNlp")
+    @SysLogger("getNlp")
+    public RespDTO<String> getNlp(@RequestBody NlpVO nlpVO) {
+        return RespDTO.onSuc(nlpFacade.getNlp(nlpVO));
+    }
+
+}
+

+ 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 +
+        "}";
+    }
+}

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


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov