Browse Source

Merge branch 'develop' into dev/mix20200217_config

gaodm 5 years atrás
parent
commit
f6921a5ec4
100 changed files with 5166 additions and 373 deletions
  1. 24 1
      aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java
  2. 36 9
      aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java
  3. 41 0
      aipt-service/src/main/java/com/diagbot/client/AINeoServiceClient.java
  4. 10 0
      aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java
  5. 49 0
      aipt-service/src/main/java/com/diagbot/client/hystrix/AINeoServiceHystrix.java
  6. 13 1
      aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  7. 6 0
      aipt-service/src/main/java/com/diagbot/dto/ConceptPushDTO.java
  8. 30 0
      aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalExtDTO.java
  9. 3 0
      aipt-service/src/main/java/com/diagbot/dto/FeatureConceptDTO.java
  10. 20 0
      aipt-service/src/main/java/com/diagbot/dto/FeatureDTO.java
  11. 16 0
      aipt-service/src/main/java/com/diagbot/dto/UsualDTO.java
  12. 78 0
      aipt-service/src/main/java/com/diagbot/entity/KlSymptom.java
  13. 2 1
      aipt-service/src/main/java/com/diagbot/entity/Symptom.java
  14. 89 1
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  15. 25 10
      aipt-service/src/main/java/com/diagbot/facade/FeatureFacade.java
  16. 75 0
      aipt-service/src/main/java/com/diagbot/facade/FeatureV2Facade.java
  17. 10 0
      aipt-service/src/main/java/com/diagbot/facade/KlSymptomFacade.java
  18. 21 11
      aipt-service/src/main/java/com/diagbot/facade/PartFacade.java
  19. 51 4
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  20. 91 0
      aipt-service/src/main/java/com/diagbot/facade/PushV2Facade.java
  21. 34 3
      aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java
  22. 12 1
      aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java
  23. 16 0
      aipt-service/src/main/java/com/diagbot/mapper/KlSymptomMapper.java
  24. 10 0
      aipt-service/src/main/java/com/diagbot/service/ConceptService.java
  25. 16 0
      aipt-service/src/main/java/com/diagbot/service/KlSymptomService.java
  26. 12 0
      aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java
  27. 20 0
      aipt-service/src/main/java/com/diagbot/service/impl/KlSymptomServiceImpl.java
  28. 18 0
      aipt-service/src/main/java/com/diagbot/vo/ConceptNameVO.java
  29. 15 0
      aipt-service/src/main/java/com/diagbot/vo/NLPVO.java
  30. 19 0
      aipt-service/src/main/java/com/diagbot/vo/OperationConfigVO.java
  31. 26 0
      aipt-service/src/main/java/com/diagbot/web/ConceptController.java
  32. 37 0
      aipt-service/src/main/java/com/diagbot/web/FeatureV2Controller.java
  33. 14 0
      aipt-service/src/main/java/com/diagbot/web/PushController.java
  34. 44 0
      aipt-service/src/main/java/com/diagbot/web/PushV2Controller.java
  35. 25 0
      aipt-service/src/main/resources/mapper/ConceptMapper.xml
  36. 18 0
      common/src/main/java/com/diagbot/biz/push/entity/FeatureRateV2.java
  37. 16 0
      common/src/main/java/com/diagbot/biz/push/entity/FeatureRateWithExplain.java
  38. 16 0
      common/src/main/java/com/diagbot/biz/push/entity/FeatureRateWithExplainV2.java
  39. 26 0
      common/src/main/java/com/diagbot/biz/push/entity/ResponseDataV2.java
  40. 25 0
      common/src/main/java/com/diagbot/biz/push/entity/ResponseDataWithExplain.java
  41. 25 0
      common/src/main/java/com/diagbot/biz/push/entity/ResponseDataWithExplainV2.java
  42. 5 1
      config-server/src/main/resources/shared/aipt-service-dev.yml
  43. 5 1
      config-server/src/main/resources/shared/aipt-service-local.yml
  44. 5 1
      config-server/src/main/resources/shared/aipt-service-pre.yml
  45. 5 1
      config-server/src/main/resources/shared/aipt-service-pro.yml
  46. 5 1
      config-server/src/main/resources/shared/aipt-service-test.yml
  47. 24 3
      config-server/src/main/resources/shared/application-dev.yml
  48. 24 3
      config-server/src/main/resources/shared/application-local.yml
  49. 24 3
      config-server/src/main/resources/shared/application-pre.yml
  50. 24 3
      config-server/src/main/resources/shared/application-pro.yml
  51. 24 3
      config-server/src/main/resources/shared/application-test.yml
  52. 2 2
      config-server/src/main/resources/shared/gateway-service-dev.yml
  53. 2 2
      config-server/src/main/resources/shared/gateway-service-local.yml
  54. 2 2
      config-server/src/main/resources/shared/gateway-service-pre.yml
  55. 2 2
      config-server/src/main/resources/shared/gateway-service-pro.yml
  56. 2 2
      config-server/src/main/resources/shared/gateway-service-test.yml
  57. 66 14
      config-server/src/main/resources/shared/ltkg-service-dev.yml
  58. 67 15
      config-server/src/main/resources/shared/ltkg-service-local.yml
  59. 66 14
      config-server/src/main/resources/shared/ltkg-service-pre.yml
  60. 66 14
      config-server/src/main/resources/shared/ltkg-service-pro.yml
  61. 66 14
      config-server/src/main/resources/shared/ltkg-service-test.yml
  62. 76 43
      config-server/src/main/resources/shared/mrman-service-dev.yml
  63. 76 43
      config-server/src/main/resources/shared/mrman-service-local.yml
  64. 76 43
      config-server/src/main/resources/shared/mrman-service-pre.yml
  65. 76 43
      config-server/src/main/resources/shared/mrman-service-pro.yml
  66. 76 42
      config-server/src/main/resources/shared/mrman-service-test.yml
  67. 12 0
      config-server/src/main/resources/shared/tran-service-dev.yml
  68. 12 0
      config-server/src/main/resources/shared/tran-service-local.yml
  69. 12 0
      config-server/src/main/resources/shared/tran-service-pre.yml
  70. 12 0
      config-server/src/main/resources/shared/tran-service-pro.yml
  71. 12 0
      config-server/src/main/resources/shared/tran-service-test.yml
  72. 6 0
      diagbotman-service/pom.xml
  73. 1 1
      diagbotman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  74. 1 0
      diagbotman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  75. 23 0
      diagbotman-service/src/main/java/com/diagbot/dto/ServiceFiltersDTO.java
  76. 50 0
      diagbotman-service/src/main/java/com/diagbot/entity/IpEntity.java
  77. 95 0
      diagbotman-service/src/main/java/com/diagbot/entity/OptInfo.java
  78. 4 4
      diagbotman-service/src/main/java/com/diagbot/entity/ServiceFilter.java
  79. 41 0
      diagbotman-service/src/main/java/com/diagbot/facade/OptInfoFacade.java
  80. 11 3
      diagbotman-service/src/main/java/com/diagbot/facade/ServiceFilterFacade.java
  81. 16 0
      diagbotman-service/src/main/java/com/diagbot/mapper/OptInfoMapper.java
  82. 16 0
      diagbotman-service/src/main/java/com/diagbot/service/OptInfoService.java
  83. 1 1
      diagbotman-service/src/main/java/com/diagbot/service/ServiceFilterService.java
  84. 20 0
      diagbotman-service/src/main/java/com/diagbot/service/impl/OptInfoServiceImpl.java
  85. 2 3
      diagbotman-service/src/main/java/com/diagbot/service/impl/ServiceFilterServiceImpl.java
  86. 106 0
      diagbotman-service/src/main/java/com/diagbot/util/IPUtil.java
  87. 35 0
      diagbotman-service/src/main/java/com/diagbot/vo/OptInfoVO.java
  88. 42 0
      diagbotman-service/src/main/java/com/diagbot/web/OptInfoController.java
  89. 3 3
      diagbotman-service/src/main/java/com/diagbot/web/ServiceFilterController.java
  90. BIN
      diagbotman-service/src/main/resources/ip2region.db
  91. 22 0
      diagbotman-service/src/main/resources/mapper/OptInfoMapper.xml
  92. 1 1
      diagbotman-service/src/main/resources/mapper/ServiceFilterMapper.xml
  93. 27 0
      docs/031.2020-03-20智能分诊初始化脚本/init_med.sql
  94. 1412 0
      docs/031.2020-03-20智能分诊初始化脚本/init_tran.sql
  95. 34 0
      docs/031.20200325记录产品操作记录/init_diagbotman.sql
  96. 1071 0
      docs/032.20200429质控标签模板/init_sys-user.sql
  97. 15 0
      docs/033.20200330手术开单合理项映射脚本/init_tran.sql
  98. 48 0
      docs/034.20200330官网知识平台二期/init_ltkg.sql
  99. 3 0
      docs/035.20190409智能分诊执行脚本/tran_alter.sql
  100. 0 0
      docs/035.20200420邵逸夫智能分诊数据追加脚本/init_tran.sql

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

+ 36 - 9
aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java

@@ -4,8 +4,8 @@ import com.diagbot.biz.push.entity.Item;
 import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.biz.push.entity.Pacs;
 import com.diagbot.biz.push.vo.SearchVO;
-import com.diagbot.config.CryptConfiguer;
 import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.facade.TransferFacade;
 import com.diagbot.util.ListUtil;
 import com.google.common.collect.Lists;
@@ -78,7 +78,10 @@ public class SearchItemAggregate {
     @DataProvider("setLis")
     public List<Lis> setLis(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Lis> lis = searchVO.getLis();
-        lis = transferFacade.addLisUniqueName(lis, searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            lis = transferFacade.addLisUniqueName(lis, searchVO.getHosCode());
+        }
         return lis;
     }
 
@@ -91,7 +94,10 @@ public class SearchItemAggregate {
     @DataProvider("setPacs")
     public List<Pacs> setPacs(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Pacs> pacs = searchVO.getPacs();
-        pacs = transferFacade.addPacsUniqueName(pacs, searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            pacs = transferFacade.addPacsUniqueName(pacs, searchVO.getHosCode());
+        }
         return pacs;
     }
 
@@ -104,7 +110,10 @@ public class SearchItemAggregate {
     @DataProvider("setDiag")
     public List<Item> setDiag(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Item> diag = searchVO.getDiag();
-        diag = transferFacade.addItemUniqueName(diag, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            diag = transferFacade.addItemUniqueName(diag, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        }
         return diag;
     }
 
@@ -130,7 +139,10 @@ public class SearchItemAggregate {
     @DataProvider("setLisOrder")
     public List<Lis> setLisOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Lis> lisOrder = searchVO.getLisOrder();
-        lisOrder = transferFacade.addLisUniqueName(lisOrder, searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            lisOrder = transferFacade.addLisUniqueName(lisOrder, searchVO.getHosCode());
+        }
         return lisOrder;
     }
 
@@ -143,7 +155,10 @@ public class SearchItemAggregate {
     @DataProvider("setPacsOrder")
     public List<Pacs> setPacsOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Pacs> pacsOrder = searchVO.getPacsOrder();
-        pacsOrder = transferFacade.addPacsUniqueName(pacsOrder, searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            pacsOrder = transferFacade.addPacsUniqueName(pacsOrder, searchVO.getHosCode());
+        }
         return pacsOrder;
     }
 
@@ -156,7 +171,11 @@ public class SearchItemAggregate {
     @DataProvider("setDiagOrder")
     public List<Item> setDiagOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Item> diagOrder = searchVO.getDiagOrder();
-        diagOrder = transferFacade.addItemUniqueName(diagOrder, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            diagOrder
+                    = transferFacade.addItemUniqueName(diagOrder, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        }
         return diagOrder;
     }
 
@@ -182,7 +201,12 @@ public class SearchItemAggregate {
     @DataProvider("setOperationOrder")
     public List<Item> setOperationOrder(@InvokeParameter("searchVO") SearchVO searchVO) {
         List<Item> operationOrder = searchVO.getOperationOrder();
-        operationOrder = transferFacade.addItemUniqueName(operationOrder, ConceptTypeEnum.OPERATION.getKey(), searchVO.getHosCode());
+        //数据引擎模式和页面推送模式对手术开单项入参做公表映射
+        if (searchVO.getSysType().intValue() == SysTypeEnum.DATA_SERVICE.getKey()
+                || searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            operationOrder
+                    = transferFacade.addItemUniqueName(operationOrder, ConceptTypeEnum.OPERATION.getKey(), searchVO.getHosCode());
+        }
         return operationOrder;
     }
 
@@ -211,7 +235,10 @@ public class SearchItemAggregate {
         }
         List<Item> diseaseItem = Lists.newLinkedList();
         diseaseItem.add(searchVO.getDiseaseName());
-        diseaseItem = transferFacade.addItemUniqueName(diseaseItem, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        //数据引擎模式映射数据
+        if (searchVO.getSysType().intValue() == SysTypeEnum.LTAPI_SERVICE.getKey()) {
+            diseaseItem = transferFacade.addItemUniqueName(diseaseItem, ConceptTypeEnum.Disease.getKey(), searchVO.getHosCode());
+        }
         if (ListUtil.isNotEmpty(diseaseItem)) {
             return diseaseItem.get(0);
         } else {

+ 41 - 0
aipt-service/src/main/java/com/diagbot/client/AINeoServiceClient.java

@@ -0,0 +1,41 @@
+package com.diagbot.client;
+
+import com.diagbot.biz.push.entity.ResponseDataV2;
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.SearchData;
+import com.diagbot.client.hystrix.AINeoServiceHystrix;
+import com.diagbot.dto.FeatureDTO;
+import com.diagbot.dto.RespDTO;
+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;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/16 16:27
+ */
+@FeignClient(name = "AINeo", url = "${aineo.server.address}", fallback = AINeoServiceHystrix.class)
+public interface AINeoServiceClient {
+
+    /**
+     * 推理
+     *
+     * @param searchData
+     * @return
+     */
+    @PostMapping(value = "/api/push")
+    Response<ResponseDataV2> push(@RequestBody SearchData searchData);
+
+    /**
+     * 特征词提取
+     *
+     * @param nlpvo
+     * @return
+     */
+    @PostMapping(value = "/api/extract")
+    RespDTO<List<FeatureDTO>> extract(@RequestBody NLPVO nlpvo);
+}

+ 10 - 0
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -18,6 +18,7 @@ import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.OperationConfigVO;
 import com.diagbot.vo.PacsConfigVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -97,6 +98,15 @@ public interface TranServiceClient {
     @PostMapping("/pacsConfig/getPacsConfig")
     RespDTO<Map<String, List<String>>> getPacsConfig(@RequestBody PacsConfigVO pacsConfigVO);
 
+    /**
+     * 获取手术映射关系
+     *
+     * @param operationConfigVO
+     * @return
+     */
+    @PostMapping("/operationConfig/getOperationConfig")
+    RespDTO<Map<String, List<String>>> getOperationConfig(@RequestBody OperationConfigVO operationConfigVO);
+
     /**
      * 根据医院编码获取提示信息标题映射关系
      *

+ 49 - 0
aipt-service/src/main/java/com/diagbot/client/hystrix/AINeoServiceHystrix.java

@@ -0,0 +1,49 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.biz.push.entity.ResponseDataV2;
+import com.diagbot.client.AINeoServiceClient;
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.SearchData;
+import com.diagbot.dto.FeatureDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.NLPVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/16 16:27
+ */
+@Component
+@Slf4j
+public class AINeoServiceHystrix implements AINeoServiceClient {
+
+    /**
+     * 推理
+     *
+     * @param searchData
+     * @return
+     */
+    @Override
+    public Response<ResponseDataV2> push(@RequestBody SearchData searchData) {
+        log.error("【hystrix】调用{}异常", "push");
+        return null;
+    }
+
+    /**
+     * 特征词提取
+     *
+     * @param nlpvo
+     * @return
+     */
+    @Override
+    public RespDTO<List<FeatureDTO>> extract(@RequestBody NLPVO nlpvo) {
+        log.error("【hystrix】调用{}异常", "extract");
+        return null;
+    }
+}

+ 13 - 1
aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -18,10 +18,10 @@ import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.OperationConfigVO;
 import com.diagbot.vo.PacsConfigVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
@@ -96,6 +96,18 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
+    /**
+     * 获取手术映射关系
+     *
+     * @param operationConfigVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, List<String>>> getOperationConfig(@RequestBody OperationConfigVO operationConfigVO) {
+        log.error("【hystrix】调用{}异常", "getOperationConfig");
+        return null;
+    }
+
     /**
      * 根据医院编码获取提示信息标题映射关系
      *

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

+ 3 - 0
aipt-service/src/main/java/com/diagbot/dto/FeatureConceptDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import com.diagbot.annotation.CryptField;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -14,4 +15,6 @@ public class FeatureConceptDTO extends ConceptBaseDTO {
     private Integer libType;
     private Integer type;
     private Integer chronicLabel; //是否慢病复诊标志
+    @CryptField
+    private String origin;
 }

+ 20 - 0
aipt-service/src/main/java/com/diagbot/dto/FeatureDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import com.diagbot.annotation.CryptField;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/26 13:42
+ */
+@Getter
+@Setter
+public class FeatureDTO {
+    private Long conceptId;
+    @CryptField
+    private String standard;
+    private Integer type;
+    private String origin;
+}

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

+ 25 - 10
aipt-service/src/main/java/com/diagbot/facade/FeatureFacade.java

@@ -1,12 +1,12 @@
 package com.diagbot.facade;
 
 import com.diagbot.dto.FeatureConceptDTO;
-import com.diagbot.entity.Concept;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ParamConvertUtil;
+import com.diagbot.vo.ConceptNameVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -41,24 +41,39 @@ public class FeatureFacade {
 
         Map<Integer, List<FeatureConceptDTO>> symptomMap
                 = EntityUtil.makeEntityListMap(symptomFeatureList, "libType");
-        Map<Integer, Map<String, Long>> map = new LinkedHashMap<>();
+        Map<Integer, Map<String, FeatureConceptDTO>> map = new LinkedHashMap<>();
         for (Map.Entry<Integer, List<FeatureConceptDTO>> entry : symptomMap.entrySet()) {
-            List<Concept> concepts
-                    = conceptFacade.getListByNamesAndType(entry.getValue()
+            List<String> names = entry.getValue()
                     .stream()
                     .map(i -> i.getName())
-                    .collect(Collectors.toList()), entry.getKey());
-            Map<String, Long> conceptMap
-                    = EntityUtil.makeMapWithKeyValue(concepts, "libName", "id");
+                    .collect(Collectors.toList());
+            ConceptNameVO conceptNameVO = new ConceptNameVO();
+            conceptNameVO.setNames(names);
+            conceptNameVO.setType(entry.getKey());
+            List<FeatureConceptDTO> featureConcepts = conceptFacade.getFeatureConcept(conceptNameVO);
+            Map<String, FeatureConceptDTO> conceptMap
+                    = EntityUtil.makeEntityMap(featureConcepts, "origin");
             map.put(entry.getKey(), conceptMap);
         }
 
         for (FeatureConceptDTO featureConceptDTO : symptomFeatureList) {
             if (null != featureConceptDTO.getLibType()) {
                 featureConceptDTO.setType(ParamConvertUtil.libConvert2Concept(featureConceptDTO.getLibType()));
-                featureConceptDTO.setConceptId(map
-                        .get(featureConceptDTO.getLibType())
-                        .get(featureConceptDTO.getName()));
+                if (map.containsKey(featureConceptDTO.getLibType())
+                        && map.get(featureConceptDTO.getLibType()).containsKey(featureConceptDTO.getName())) {
+                    featureConceptDTO.setConceptId(map
+                            .get(featureConceptDTO.getLibType())
+                            .get(featureConceptDTO.getName())
+                            .getConceptId());
+                    featureConceptDTO.setOrigin(map
+                            .get(featureConceptDTO.getLibType())
+                            .get(featureConceptDTO.getName())
+                            .getOrigin());
+                    featureConceptDTO.setName(map
+                            .get(featureConceptDTO.getLibType())
+                            .get(featureConceptDTO.getName())
+                            .getName());
+                }
             }
         }
         return symptomFeatureList;

+ 75 - 0
aipt-service/src/main/java/com/diagbot/facade/FeatureV2Facade.java

@@ -0,0 +1,75 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.AINeoServiceClient;
+import com.diagbot.dto.FeatureDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Concept;
+import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.NLPVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/26 13:46
+ */
+@Component
+public class FeatureV2Facade {
+    @Autowired
+    private AINeoServiceClient aiNeoServiceClient;
+    @Autowired
+    private ConceptFacade conceptFacade;
+
+    /**
+     * 特征词提取
+     *
+     * @param nlpvo
+     * @return
+     */
+    public List<FeatureDTO> extract(NLPVO nlpvo) {
+        RespDTO<List<FeatureDTO>> respDTO = aiNeoServiceClient.extract(nlpvo);
+        RespDTOUtil.respNGDealCover(respDTO, "特征词提取失败");
+        return respDTO.data;
+    }
+
+    /**
+     * 症状特征词提取
+     *
+     * @param nlpvo
+     * @return
+     */
+    public List<FeatureDTO> symptomFeatureV2(NLPVO nlpvo) {
+        List<FeatureDTO> featureList = extract(nlpvo);
+        if (ListUtil.isNotEmpty(featureList)) {
+            List<FeatureDTO> symptoms = featureList
+                    .stream()
+                    .filter(i -> i.getType().equals(1))
+                    .collect(Collectors.toList());
+            List<String> names = symptoms
+                    .stream()
+                    .map(i -> i.getStandard())
+                    .collect(Collectors.toList());
+            List<Concept> concepts = conceptFacade.getListByNamesAndType(names, LexiconTypeEnum.SYMPTOM.getKey());
+            Map<String, Long> conceptMap
+                    = EntityUtil.makeMapWithKeyValue(concepts, "libName", "id");
+            symptoms.forEach(symptom -> {
+                if (conceptMap.containsKey(symptom.getStandard())) {
+                    symptom.setConceptId(conceptMap.get(symptom.getStandard()));
+                }
+            });
+            return symptoms;
+        } else {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "未提取到症状特征");
+        }
+    }
+}

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

+ 51 - 4
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

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

+ 91 - 0
aipt-service/src/main/java/com/diagbot/facade/PushV2Facade.java

@@ -0,0 +1,91 @@
+package com.diagbot.facade;
+
+import com.diagbot.biz.push.entity.FeatureRate;
+import com.diagbot.biz.push.entity.FeatureRateV2;
+import com.diagbot.biz.push.entity.FeatureRateWithExplain;
+import com.diagbot.biz.push.entity.FeatureRateWithExplainV2;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.entity.ResponseDataV2;
+import com.diagbot.biz.push.entity.ResponseDataWithExplain;
+import com.diagbot.biz.push.entity.ResponseDataWithExplainV2;
+import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.client.AINeoServiceClient;
+import com.diagbot.client.bean.Response;
+import com.diagbot.client.bean.SearchData;
+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 org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/16 16:32
+ */
+@Component
+public class PushV2Facade {
+    @Autowired
+    private AINeoServiceClient aiNeoServiceClient;
+    @Autowired
+    private AssembleFacade assembleFacade;
+    @Autowired
+    private ConceptFacade conceptFacade;
+
+    /**
+     * 大数据原始推理结果
+     *
+     * @param searchVO
+     * @return
+     */
+    public ResponseDataV2 originalPush(SearchVO searchVO) {
+        SearchData searchData = assembleFacade.assembleData(searchVO);
+        Response<ResponseDataV2> res = aiNeoServiceClient.push(searchData);
+        if (res == null || res.getData() == null) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
+        }
+        return res.getData();
+    }
+
+    /**
+     * 推理结果带名词解释
+     *
+     * @param searchVO
+     * @return
+     */
+    public ResponseDataWithExplainV2 pushWithExplain(SearchVO searchVO) {
+        ResponseDataWithExplainV2 responseData = new ResponseDataWithExplainV2();
+        ResponseDataV2 data = this.originalPush(searchVO);
+        List<FeatureRateV2> 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<FeatureRateWithExplainV2> featureRateWithExplains
+                    = BeanUtil.listCopyTo(symptom, FeatureRateWithExplainV2.class);
+            if (klSymptomMap != null) {
+                for (FeatureRateWithExplainV2 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;
+    }
+}

+ 34 - 3
aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java

@@ -19,6 +19,7 @@ import com.diagbot.util.StringUtil;
 import com.diagbot.vo.DiseaseIcdVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.OperationConfigVO;
 import com.diagbot.vo.PacsConfigVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -226,7 +227,9 @@ public class TransferFacade {
                 if (StringUtil.isBlank(disease.getName())) {
                     continue;
                 } else {
-                    disease.setUniqueName(disMap.get(disease.getName()));
+                    if (StringUtil.isNotBlank(disMap.get(disease.getName()))) {
+                        disease.setUniqueName(disMap.get(disease.getName()));
+                    }
                 }
             }
             convertItems = BeanUtil.listCopyTo(items, Item.class);
@@ -234,8 +237,36 @@ public class TransferFacade {
             //暂无映射关系
             convertItems.addAll(items);
         } else if (type.equals(ConceptTypeEnum.OPERATION.getKey())) {
-            //暂无映射关系
-            convertItems.addAll(items);
+            OperationConfigVO operationConfigVO = new OperationConfigVO();
+            operationConfigVO.setHosCode(hosCode);
+            operationConfigVO.setNameList(items
+                    .stream()
+                    .map(operation -> operation.getName())
+                    .distinct()
+                    .collect(Collectors.toList()));
+            Map<String, List<String>> operationMap = new LinkedHashMap<>();
+            RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getOperationConfig(operationConfigVO);
+            if (RespDTOUtil.respIsOK(respDTO)) {
+                operationMap = respDTO.data;
+            }
+            for (Item item : items) {
+                if (StringUtil.isBlank(item.getName())) {
+                    convertItems.add(item);
+                    continue;
+                } else {
+                    if (ListUtil.isNotEmpty(operationMap.get(item.getName()))) {
+                        //外部一个项目对应到内部多个项目的数据,都保留
+                        for (String uniqueName : operationMap.get(item.getName())) {
+                            Item convertItem = new Item();
+                            BeanUtil.copyProperties(item, convertItem);
+                            convertItem.setUniqueName(uniqueName);
+                            convertItems.add(convertItem);
+                        }
+                    } else {
+                        convertItems.add(item);
+                    }
+                }
+            }
         }
         return convertItems;
     }

+ 12 - 1
aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java

@@ -5,11 +5,13 @@ import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.ConceptRes;
 import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.ConceptWithOrderRes;
+import com.diagbot.dto.FeatureConceptDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.wrapper.ConceptWrapper;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.ConceptFindVO;
+import com.diagbot.vo.ConceptNameVO;
 import com.diagbot.vo.RetrievalVO;
 
 import java.util.List;
@@ -60,9 +62,18 @@ public interface ConceptMapper extends BaseMapper<Concept> {
 
     /**
      * 获得诊断依据问题词的标准词
+     *
      * @return
      */
     List<String> getStandWord();
 
     public List<ConceptBaseDTO> indexConcept(ConceptBaseVO conceptBaseVO);
-}
+
+    /**
+     * 特征词提取相关
+     *
+     * @param conceptNameVO
+     * @return
+     */
+    public List<FeatureConceptDTO> getFeatureConcept(ConceptNameVO conceptNameVO);
+}

+ 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> {
+
+}

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

@@ -5,11 +5,13 @@ import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.ConceptRes;
 import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.ConceptWithOrderRes;
+import com.diagbot.dto.FeatureConceptDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.wrapper.ConceptWrapper;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.ConceptFindVO;
+import com.diagbot.vo.ConceptNameVO;
 import com.diagbot.vo.RetrievalVO;
 
 import java.util.List;
@@ -74,4 +76,12 @@ public interface ConceptService extends IService<Concept> {
      */
     public List<ConceptBaseDTO> indexConcept(ConceptBaseVO conceptBaseVO);
 
+    /**
+     * 特征词提取相关
+     *
+     * @param conceptNameVO
+     * @return
+     */
+    public List<FeatureConceptDTO> getFeatureConcept(ConceptNameVO conceptNameVO);
+
 }

+ 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> {
+
+}

+ 12 - 0
aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.ConceptBaseDTO;
 import com.diagbot.dto.ConceptRes;
 import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.ConceptWithOrderRes;
+import com.diagbot.dto.FeatureConceptDTO;
 import com.diagbot.dto.RetrievalDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.wrapper.ConceptWrapper;
@@ -13,6 +14,7 @@ import com.diagbot.service.ConceptService;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.ConceptFindVO;
+import com.diagbot.vo.ConceptNameVO;
 import com.diagbot.vo.RetrievalVO;
 import org.springframework.stereotype.Service;
 
@@ -103,4 +105,14 @@ public class ConceptServiceImpl extends ServiceImpl<ConceptMapper, Concept> impl
     public List<ConceptBaseDTO> indexConcept(ConceptBaseVO conceptBaseVO) {
         return baseMapper.indexConcept(conceptBaseVO);
     }
+
+    /**
+     * 特征词提取相关
+     *
+     * @param conceptNameVO
+     * @return
+     */
+    public List<FeatureConceptDTO> getFeatureConcept(ConceptNameVO conceptNameVO){
+        return baseMapper.getFeatureConcept(conceptNameVO);
+    }
 }

+ 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 {
+
+}

+ 18 - 0
aipt-service/src/main/java/com/diagbot/vo/ConceptNameVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/28 13:11
+ */
+@Getter
+@Setter
+public class ConceptNameVO {
+    private List<String> names;
+    private Integer type;
+}

+ 15 - 0
aipt-service/src/main/java/com/diagbot/vo/NLPVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/26 13:41
+ */
+@Getter
+@Setter
+public class NLPVO {
+    private String text;
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/vo/OperationConfigVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import com.diagbot.client.bean.HosCodeVO;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/3/27 15:45
+ */
+@Getter
+@Setter
+public class OperationConfigVO extends HosCodeVO {
+    private List<String> nameList;
+    private List<String> uniqueNameList;
+}

+ 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

+ 37 - 0
aipt-service/src/main/java/com/diagbot/web/FeatureV2Controller.java

@@ -0,0 +1,37 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.FeatureDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.FeatureV2Facade;
+import com.diagbot.vo.NLPVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/26 13:49
+ */
+@RestController
+@RequestMapping("/featureV2")
+@Api(value = "文本特征词提取V2相关API", tags = { "文本特征词提取V2相关API" })
+public class FeatureV2Controller {
+    @Autowired
+    private FeatureV2Facade featureV2Facade;
+
+    @ApiOperation(value = "知识库标准化-症状特征词提取", notes = "")
+    @PostMapping("/symptomFeatureV2")
+    @SysLogger("symptomFeatureV2")
+    public RespDTO<List<FeatureDTO>> symptomFeatureV2(@RequestBody NLPVO nlpvo) {
+        List<FeatureDTO> data = featureV2Facade.symptomFeatureV2(nlpvo);
+        return RespDTO.onSuc(data);
+    }
+}

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

+ 44 - 0
aipt-service/src/main/java/com/diagbot/web/PushV2Controller.java

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.biz.push.entity.ResponseData;
+import com.diagbot.biz.push.entity.ResponseDataV2;
+import com.diagbot.biz.push.entity.ResponseDataWithExplainV2;
+import com.diagbot.biz.push.vo.SearchVO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.PushV2Facade;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/16 16:34
+ */
+@RestController
+@RequestMapping("/pushV2")
+@Api(value = "推理V2相关API", tags = { "知识库标准化-推理V2相关API" })
+public class PushV2Controller {
+    @Autowired
+    private PushV2Facade pushV2Facade;
+
+    @PostMapping("/originalPush")
+    @SysLogger("originalPush")
+    public RespDTO<ResponseDataV2> originalPush(@Valid @RequestBody SearchVO searchVO) {
+        ResponseDataV2 data = pushV2Facade.originalPush(searchVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @PostMapping("/pushWithExplainV2")
+    @SysLogger("pushWithExplainV2")
+    public RespDTO<ResponseDataWithExplainV2> pushWithExplainV2(@Valid @RequestBody SearchVO searchVO) {
+        ResponseDataWithExplainV2 data = pushV2Facade.pushWithExplain(searchVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 25 - 0
aipt-service/src/main/resources/mapper/ConceptMapper.xml

@@ -1288,4 +1288,29 @@
         and a.type_id = #{libType} and b.lib_type = #{libType}
     </select>
 
+
+    <select id="getFeatureConcept" resultType="com.diagbot.dto.FeatureConceptDTO" parameterType="com.diagbot.vo.ConceptNameVO">
+        SELECT
+        a.NAME AS origin,
+        b.lib_name AS NAME,
+        b.id AS conceptId,
+        b.lib_type AS libType
+        FROM
+        kl_library_info a,
+        kl_concept b
+        WHERE
+        a.concept_id = b.id
+        AND a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        <if test="type!=null and type !=''">
+            AND a.type_id = #{type}
+            AND b.lib_type = #{type}
+        </if>
+        <if test="names!=null and names.size>0">
+            AND a.name IN
+            <foreach collection="names" item="name" open="(" close=")" separator=",">
+                #{name}
+            </foreach>
+        </if>
+    </select>
 </mapper>

+ 18 - 0
common/src/main/java/com/diagbot/biz/push/entity/FeatureRateV2.java

@@ -0,0 +1,18 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/17 10:19
+ */
+@Getter
+@Setter
+public class FeatureRateV2 extends FeatureRate {
+    /**
+     * 诊断分类
+     */
+    private String bigClass;
+}

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

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

@@ -0,0 +1,16 @@
+package com.diagbot.biz.push.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/17 10:24
+ */
+@Getter
+@Setter
+public class FeatureRateWithExplainV2 extends FeatureRateV2 {
+    private String description;
+    private String explains;
+}

+ 26 - 0
common/src/main/java/com/diagbot/biz/push/entity/ResponseDataV2.java

@@ -0,0 +1,26 @@
+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/4/17 10:13
+ */
+@Getter
+@Setter
+public class ResponseDataV2 {
+    /**
+     * 症状
+     */
+    private List<FeatureRateV2> symptom = new ArrayList<>(10);
+
+    /**
+     * 诊断
+     */
+    private List<FeatureRateV2> dis = new ArrayList<>(10);
+}

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

+ 25 - 0
common/src/main/java/com/diagbot/biz/push/entity/ResponseDataWithExplainV2.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/4/17 10:25
+ */
+@Getter
+@Setter
+public class ResponseDataWithExplainV2 {
+    /**
+     * 症状
+     */
+    private List<FeatureRateWithExplainV2> symptom = new ArrayList<>(10);
+    /**
+     * 诊断
+     */
+    private List<FeatureRateV2> dis = new ArrayList<>(10);
+}

+ 5 - 1
config-server/src/main/resources/shared/aipt-service-dev.yml

@@ -103,4 +103,8 @@ ai:
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.2.234:5002
+
+aineo:
+  server:
+    address: http://192.168.2.234:8888

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

@@ -103,4 +103,8 @@ ai:
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.2.234:5002
+
+aineo:
+  server:
+    address: http://192.168.2.234:8888

+ 5 - 1
config-server/src/main/resources/shared/aipt-service-pre.yml

@@ -103,4 +103,8 @@ ai:
 
 nlp:
   server:
-    address: http://192.168.2.186:5002
+    address: http://192.168.2.186:5002
+
+aineo:
+  server:
+    address: http://192.168.3.150:8888

+ 5 - 1
config-server/src/main/resources/shared/aipt-service-pro.yml

@@ -103,4 +103,8 @@ ai:
 
 nlp:
   server:
-    address: http://192.168.2.123:5002
+    address: http://192.168.2.123:5002
+
+aineo:
+  server:
+    address: http://192.168.2.123:8888

+ 5 - 1
config-server/src/main/resources/shared/aipt-service-test.yml

@@ -103,4 +103,8 @@ ai:
 
 nlp:
   server:
-    address: http://192.168.2.241:5002
+    address: http://192.168.2.241:5002
+
+aineo:
+  server:
+    address: http://192.168.3.150:8888

+ 24 - 3
config-server/src/main/resources/shared/application-dev.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-local.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-pre.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-pro.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-test.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 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

+ 66 - 14
config-server/src/main/resources/shared/ltkg-service-dev.yml

@@ -6,20 +6,32 @@ spring:
   profiles:
     active: local
   datasource:
-    driver-class-name: org.neo4j.jdbc.Driver
-    url: jdbc:neo4j:http://192.168.3.150:7474
-    username: neo4j
-    password: 12345678
-    #定义初始连接数
-    initialSize: 0
-    #定义最大连接数
-    maxActive: 20
-    #定义最大空闲
-    maxIdle: 20
-    #定义最小空闲
-    minIdle: 1
-    #定义最长等待时间
-    maxWait: 60000
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.3.150:7474
+          username: neo4j
+          password: 12345678
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-ltkg?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+
 
   cloud:
     stream:
@@ -47,3 +59,43 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+#mybatis-plus
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456
+
+qa:
+  server:
+    address: http://192.168.3.150:9998
+term:
+  server:
+    address: http://192.168.3.150:23232

+ 67 - 15
config-server/src/main/resources/shared/ltkg-service-local.yml

@@ -6,20 +6,32 @@ spring:
   profiles:
     active: local
   datasource:
-    driver-class-name: org.neo4j.jdbc.Driver
-    url: jdbc:neo4j:http://192.168.3.150:7474
-    username: neo4j
-    password: 12345678
-    #定义初始连接数
-    initialSize: 0
-    #定义最大连接数
-    maxActive: 20
-    #定义最大空闲
-    maxIdle: 20
-    #定义最小空闲
-    minIdle: 1
-    #定义最长等待时间
-    maxWait: 60000
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.3.150:7474
+          username: neo4j
+          password: 12345678
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/sys-ltkg?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+
 
   cloud:
     stream:
@@ -46,4 +58,44 @@ spring:
 #mybatis
 mybatis:
   type-aliases-package: com.diagbot.entity
-  mapper-locations: classpath:mapper/**/*.xml
+  mapper-locations: classpath:mapper/**/*.xml
+
+#mybatis-plus
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+nlprel:
+  server:
+    address: http://192.168.3.150:3456
+
+qa:
+  server:
+    address: http://192.168.3.150:9998
+term:
+  server:
+    address: http://192.168.3.150:23232

+ 66 - 14
config-server/src/main/resources/shared/ltkg-service-pre.yml

@@ -6,20 +6,32 @@ spring:
   profiles:
     active: local
   datasource:
-    driver-class-name: org.neo4j.jdbc.Driver
-    url: jdbc:neo4j:http://192.168.3.150:7474
-    username: neo4j
-    password: 12345678
-    #定义初始连接数
-    initialSize: 0
-    #定义最大连接数
-    maxActive: 20
-    #定义最大空闲
-    maxIdle: 20
-    #定义最小空闲
-    minIdle: 1
-    #定义最长等待时间
-    maxWait: 60000
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.186:7474
+          username: neo4j
+          password: 12345678
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.121:3306/sys-ltkg?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: teamback
+          password: goTulmLeon
+
 
   cloud:
     stream:
@@ -47,3 +59,43 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+#mybatis-plus
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+nlprel:
+  server:
+    address: http://192.168.2.186:3456
+
+qa:
+  server:
+    address: http://192.168.2.186:9998
+term:
+  server:
+    address: http://192.168.2.186:23232

+ 66 - 14
config-server/src/main/resources/shared/ltkg-service-pro.yml

@@ -6,20 +6,32 @@ spring:
   profiles:
     active: local
   datasource:
-    driver-class-name: org.neo4j.jdbc.Driver
-    url: jdbc:neo4j:http://192.168.3.150:7474
-    username: neo4j
-    password: 12345678
-    #定义初始连接数
-    initialSize: 0
-    #定义最大连接数
-    maxActive: 20
-    #定义最大空闲
-    maxIdle: 20
-    #定义最小空闲
-    minIdle: 1
-    #定义最长等待时间
-    maxWait: 60000
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.123:7472
+          username: neo4j
+          password: 12345678
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.122:3306/sys-ltkg?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+
 
   cloud:
     stream:
@@ -47,3 +59,43 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+#mybatis-plus
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+nlprel:
+  server:
+    address: http://192.168.2.123:3456
+
+qa:
+  server:
+    address: http://192.168.2.123:9998
+term:
+  server:
+    address: http://192.168.2.123:23232

+ 66 - 14
config-server/src/main/resources/shared/ltkg-service-test.yml

@@ -6,20 +6,32 @@ spring:
   profiles:
     active: local
   datasource:
-    driver-class-name: org.neo4j.jdbc.Driver
-    url: jdbc:neo4j:http://192.168.3.150:7474
-    username: neo4j
-    password: 12345678
-    #定义初始连接数
-    initialSize: 0
-    #定义最大连接数
-    maxActive: 20
-    #定义最大空闲
-    maxIdle: 20
-    #定义最小空闲
-    minIdle: 1
-    #定义最长等待时间
-    maxWait: 60000
+    dynamic:
+      primary: neo4j
+      # 数据库配置
+      datasource:
+        neo4j:
+          driver-class-name: org.neo4j.jdbc.Driver
+          url: jdbc:neo4j:http://192.168.2.234:7472
+          username: neo4j
+          password: 12345678
+          #定义初始连接数
+          initialSize: 0
+          #定义最大连接数
+          maxActive: 20
+          #定义最大空闲
+          maxIdle: 20
+          #定义最小空闲
+          minIdle: 1
+          #定义最长等待时间
+          maxWait: 60000
+        mysql:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.241:3306/sys-ltkg?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+          username: root
+          password: lantone
+
 
   cloud:
     stream:
@@ -47,3 +59,43 @@ spring:
 mybatis:
   type-aliases-package: com.diagbot.entity
   mapper-locations: classpath:mapper/**/*.xml
+
+#mybatis-plus
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+nlprel:
+  server:
+    address: http://192.168.2.234:3456
+
+qa:
+  server:
+    address: http://192.168.2.234:9998
+term:
+  server:
+    address: http://192.168.2.234:23232

+ 76 - 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/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
 
   cloud:
     stream:
@@ -66,6 +82,21 @@ spring:
     publisher-confirms: true
     virtual-host: /
 
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+    host: 192.168.2.236  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: lantone # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
 #mybatis
 mybatis-plus:
   mapper-locations: classpath:/mapper/*Mapper.xml
@@ -94,3 +125,5 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     cache-enabled: false
+
+qc.address: http://192.168.2.236:5858

+ 76 - 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/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.236:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
 
   cloud:
     stream:
@@ -66,6 +82,21 @@ spring:
     publisher-confirms: true
     virtual-host: /
 
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+    host: 192.168.2.236  #Redis服务器地址
+    port: 6378 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: lantone # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
 #mybatis
 mybatis-plus:
   mapper-locations: classpath:/mapper/*Mapper.xml
@@ -94,3 +125,5 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     cache-enabled: false
+
+qc.address: http://192.168.2.236:5858

+ 76 - 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.121:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: teamback
+          password: goTulmLeon
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.121:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: teamback
+          password: goTulmLeon
+          druid:
+            initial-size: 5
 
   cloud:
     stream:
@@ -66,6 +82,21 @@ spring:
     publisher-confirms: true
     virtual-host: /
 
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+    host: 192.168.2.121  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: lantone # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
 #mybatis
 mybatis-plus:
   mapper-locations: classpath:/mapper/*Mapper.xml
@@ -94,3 +125,5 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     cache-enabled: false
+
+qc.address: http://192.168.2.121:5858

+ 76 - 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.122:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.122:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
 
   cloud:
     stream:
@@ -66,6 +82,21 @@ spring:
     publisher-confirms: true
     virtual-host: /
 
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+    host: 192.168.2.122  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: lantone # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
 #mybatis
 mybatis-plus:
   mapper-locations: classpath:/mapper/*Mapper.xml
@@ -94,3 +125,5 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     cache-enabled: false
+
+qc.address: http://192.168.2.122:5858

+ 76 - 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.241:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
+        slave:
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          platform: mysql
+          url: jdbc:mysql://192.168.2.241:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+          username: root
+          password: lantone
+          druid:
+            initial-size: 5
 
   cloud:
     stream:
@@ -66,6 +83,21 @@ spring:
     publisher-confirms: true
     virtual-host: /
 
+  #redis
+  redis:
+    database:
+      cache: 8 # cache索引
+    host: 192.168.2.241  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    password: lantone # Redis服务器连接密码(默认为空)
+    lettuce:
+      pool:
+        max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
+        max-idle: 5 # 连接池中的最大空闲连接
+        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+    timeout: 20000 # 连接超时时间(毫秒)
+
 #mybatis
 mybatis-plus:
   mapper-locations: classpath:/mapper/*Mapper.xml
@@ -94,3 +126,5 @@ mybatis-plus:
   configuration:
     map-underscore-to-camel-case: true
     cache-enabled: false
+
+qc.address: http://192.168.2.241:5858

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

@@ -110,3 +110,15 @@ 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
+naligh:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-prerelease/gateway
+  appKey: ngari5e48d9ec11dc3978
+  appSecret: 11dc397869c2d24a

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

@@ -110,3 +110,15 @@ 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
+naligh:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-prerelease/gateway
+  appKey: ngari5e48d9ec11dc3978
+  appSecret: 11dc397869c2d24a

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

@@ -110,3 +110,15 @@ 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
+naligh:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-prerelease/gateway
+  appKey: ngari5e48d9ec11dc3978
+  appSecret: 11dc397869c2d24a

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

@@ -110,3 +110,15 @@ 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
+naligh:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-prerelease/gateway
+  appKey: ngari5e48d9ec11dc3978
+  appSecret: 11dc397869c2d24a

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

@@ -110,3 +110,15 @@ 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
+naligh:
+  apiUrl: http://ssltest.ngarihealth.com/openapi-prerelease/gateway
+  appKey: ngari5e48d9ec11dc3978
+  appSecret: 11dc397869c2d24a

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

File diff suppressed because it is too large
+ 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地址)';

File diff suppressed because it is too large
+ 1071 - 0
docs/032.20200429质控标签模板/init_sys-user.sql


+ 15 - 0
docs/033.20200330手术开单合理项映射脚本/init_tran.sql

@@ -0,0 +1,15 @@
+use `sys-tran`;
+
+DROP TABLE IF EXISTS `tran_operation_config`;
+CREATE TABLE `tran_operation_config` (
+  `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则表示纪录未修改',
+  `hospital_code` varchar(60) DEFAULT NULL COMMENT '医院编码',
+  `name` varchar(100) DEFAULT NULL COMMENT '外部名称',
+  `unique_name` varchar(100) DEFAULT NULL COMMENT '内部名称',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

File diff suppressed because it is too large
+ 48 - 0
docs/034.20200330官网知识平台二期/init_ltkg.sql


+ 3 - 0
docs/035.20190409智能分诊执行脚本/tran_alter.sql

@@ -0,0 +1,3 @@
+use `sys-tran`;
+ALTER TABLE `sys-tran`.`tran_opt_info` ADD COLUMN `way_type` INT(11) NULL COMMENT '1咨询医生2预约挂号3去挂号' AFTER `opt_type`;
+ALTER TABLE `sys-tran`.`tran_inquiry_triage` CHANGE `id_type` `id_type` TINYINT(4) DEFAULT 0 NOT NULL COMMENT '1咨询医生2预约挂号3结果页去挂号4非结果去挂号', ADD COLUMN `correlation` VARCHAR(255) NOT NULL COMMENT '相关情况' AFTER `symptom`;

+ 0 - 0
docs/035.20200420邵逸夫智能分诊数据追加脚本/init_tran.sql


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