Procházet zdrojové kódy

Merge branch 'develop' into his/shaoyifu

# Conflicts:
#	data-service/src/main/java/com/diagbot/vo/PushBaseVO.java
#	icss-service/src/main/java/com/diagbot/vo/SaveInquiryToHisVO.java
#	tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
#	tran-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
#	tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java
#	tran-service/src/main/java/com/diagbot/vo/SaveInquiryToHisVO.java
#	tran-service/src/main/java/com/diagbot/web/PatientInfoController.java
#	tran-service/src/main/resources/mapper/SysSetMapper.xml
lipc před 5 roky
rodič
revize
9ba14da0d9
100 změnil soubory, kde provedl 3628 přidání a 953 odebrání
  1. 3 1
      .gitignore
  2. 2 2
      admin-service/pom.xml
  3. 5 23
      admin-service/src/main/java/com/diagbot/AdminServiceApplication.java
  4. 31 5
      admin-service/src/main/resources/logback-spring.xml
  5. 5 5
      aipt-service/pom.xml
  6. 2 0
      aipt-service/src/main/java/com/diagbot/AiptServiceApplication.java
  7. 15 0
      aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java
  8. 160 0
      aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java
  9. 91 78
      aipt-service/src/main/java/com/diagbot/aggregate/TreatmentAggregate.java
  10. 41 76
      aipt-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  11. 32 1
      aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java
  12. 18 0
      aipt-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java
  13. 7 99
      aipt-service/src/main/java/com/diagbot/client/bean/ResponseData.java
  14. 4 2
      aipt-service/src/main/java/com/diagbot/client/bean/SearchData.java
  15. 26 0
      aipt-service/src/main/java/com/diagbot/client/bean/Treat.java
  16. 18 0
      aipt-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java
  17. 36 1
      aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  18. 4 0
      aipt-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  19. 48 0
      aipt-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java
  20. 6 12
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java
  21. 173 0
      aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDjDTO.java
  22. 19 0
      aipt-service/src/main/java/com/diagbot/dto/PacsResult.java
  23. 1 1
      aipt-service/src/main/java/com/diagbot/dto/SysSetInfoDTO.java
  24. 88 0
      aipt-service/src/main/java/com/diagbot/entity/DictionaryInfo.java
  25. 0 196
      aipt-service/src/main/java/com/diagbot/entity/SysLog.java
  26. 1 0
      aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java
  27. 1 1
      aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java
  28. 55 0
      aipt-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java
  29. 109 0
      aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java
  30. 31 0
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  31. 37 0
      aipt-service/src/main/java/com/diagbot/facade/DictionaryFacade.java
  32. 23 0
      aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java
  33. 33 82
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  34. 254 0
      aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java
  35. 64 172
      aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java
  36. 16 0
      aipt-service/src/main/java/com/diagbot/mapper/DictionaryInfoMapper.java
  37. 1 1
      aipt-service/src/main/java/com/diagbot/rabbit/MySender.java
  38. 16 0
      aipt-service/src/main/java/com/diagbot/service/DictionaryInfoService.java
  39. 20 0
      aipt-service/src/main/java/com/diagbot/service/impl/DictionaryInfoServiceImpl.java
  40. 6 2
      aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java
  41. 36 0
      aipt-service/src/main/java/com/diagbot/vo/ConnectIntroduceVO.java
  42. 19 0
      aipt-service/src/main/java/com/diagbot/vo/DiseaseIcdVO.java
  43. 2 1
      aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java
  44. 60 0
      aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoDjVO.java
  45. 19 0
      aipt-service/src/main/java/com/diagbot/vo/PacsConfigVO.java
  46. 4 0
      aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java
  47. 4 0
      aipt-service/src/main/java/com/diagbot/vo/SearchVo.java
  48. 17 2
      aipt-service/src/main/java/com/diagbot/web/ConceptDetailController.java
  49. 44 0
      aipt-service/src/main/java/com/diagbot/web/DictionaryInfoController.java
  50. 9 0
      aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java
  51. 17 5
      aipt-service/src/main/java/com/diagbot/web/PushController.java
  52. 31 5
      aipt-service/src/main/resources/logback-spring.xml
  53. 265 65
      aipt-service/src/main/resources/mapper/ConceptMapper.xml
  54. 21 0
      aipt-service/src/main/resources/mapper/DictionaryInfoMapper.xml
  55. 6 6
      aipt-service/src/main/resources/mapper/DisScaleMapper.xml
  56. 1 1
      aipt-service/src/main/resources/mapper/EvaluationMapper.xml
  57. 5 5
      bi-service/pom.xml
  58. 2 0
      bi-service/src/main/java/com/diagbot/BiServiceApplication.java
  59. 6 41
      bi-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  60. 4 0
      bi-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  61. 1 1
      bi-service/src/main/java/com/diagbot/rabbit/MySender.java
  62. 31 5
      bi-service/src/main/resources/logback-spring.xml
  63. 18 10
      common/pom.xml
  64. 19 0
      common/src/main/java/com/diagbot/annotation/BiLogger.java
  65. 19 0
      common/src/main/java/com/diagbot/annotation/BiLoggerResult.java
  66. 101 0
      common/src/main/java/com/diagbot/biz/log/entity/BiRecord.java
  67. 82 0
      common/src/main/java/com/diagbot/biz/log/entity/SysLog.java
  68. 49 0
      common/src/main/java/com/diagbot/enums/BiSourceEnum.java
  69. 2 1
      common/src/main/java/com/diagbot/enums/ProductTypeEnum.java
  70. 2 1
      common/src/main/java/com/diagbot/enums/VisibleIdTypeEnum.java
  71. 330 0
      common/src/main/java/com/diagbot/util/AopUtil.java
  72. 93 0
      common/src/main/java/com/diagbot/util/IdCard.java
  73. 24 0
      common/src/main/java/com/diagbot/vo/BaseBiVO.java
  74. 2 0
      config-server/src/main/java/com/diagbot/ConfigServerApplication.java
  75. 31 2
      config-server/src/main/resources/logback-spring.xml
  76. 38 0
      config-server/src/main/resources/shared/admin-service-pre.yml
  77. 1 1
      config-server/src/main/resources/shared/admin-service-pro.yml
  78. 1 1
      config-server/src/main/resources/shared/admin-service-test.yml
  79. 106 0
      config-server/src/main/resources/shared/aipt-service-pre.yml
  80. 4 4
      config-server/src/main/resources/shared/aipt-service-pro.yml
  81. 2 2
      config-server/src/main/resources/shared/aipt-service-test.yml
  82. 7 1
      config-server/src/main/resources/shared/application-dev.yml
  83. 7 1
      config-server/src/main/resources/shared/application-local.yml
  84. 78 0
      config-server/src/main/resources/shared/application-pre.yml
  85. 6 0
      config-server/src/main/resources/shared/application-pro.yml
  86. 7 1
      config-server/src/main/resources/shared/application-test.yml
  87. 102 0
      config-server/src/main/resources/shared/bi-service-pre.yml
  88. 3 3
      config-server/src/main/resources/shared/bi-service-pro.yml
  89. 2 0
      config-server/src/main/resources/shared/data-service-dev.yml
  90. 2 0
      config-server/src/main/resources/shared/data-service-local.yml
  91. 23 0
      config-server/src/main/resources/shared/data-service-pre.yml
  92. 3 1
      config-server/src/main/resources/shared/data-service-pro.yml
  93. 2 1
      config-server/src/main/resources/shared/data-service-test.yml
  94. 97 0
      config-server/src/main/resources/shared/diagbotman-service-pre.yml
  95. 2 2
      config-server/src/main/resources/shared/diagbotman-service-pro.yml
  96. 96 0
      config-server/src/main/resources/shared/feedback-service-pre.yml
  97. 2 2
      config-server/src/main/resources/shared/feedback-service-pro.yml
  98. 137 0
      config-server/src/main/resources/shared/gateway-service-pre.yml
  99. 22 22
      config-server/src/main/resources/shared/gateway-service-pro.yml
  100. 0 0
      config-server/src/main/resources/shared/icss-service-dev.yml

+ 3 - 1
.gitignore

@@ -22,4 +22,6 @@
 /nbbuild/
 /dist/
 /nbdist/
-/.nb-gradle/
+/.nb-gradle/
+
+/logs/

+ 2 - 2
admin-service/pom.xml

@@ -49,7 +49,7 @@
         <dependency>
             <groupId>de.codecentric</groupId>
             <artifactId>spring-boot-admin-starter-server</artifactId>
-            <version>2.1.6</version>
+            <version>2.2.0</version>
         </dependency>
 
         <dependency>
@@ -109,7 +109,7 @@
                         </resource>
                     </resources>
                     <serverId>docker-registry</serverId>
-                    <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+                    <registryUrl>${registryUrl}</registryUrl>
                 </configuration>
             </plugin>
         </plugins>

+ 5 - 23
admin-service/src/main/java/com/diagbot/AdminServiceApplication.java

@@ -5,6 +5,7 @@ import de.codecentric.boot.admin.server.config.AdminServerProperties;
 import de.codecentric.boot.admin.server.config.EnableAdminServer;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.hystrix.EnableHystrix;
 import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
@@ -27,15 +28,16 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti
 @EnableAdminServer
 @Configuration
 @RefreshScope
+@ConfigurationPropertiesScan
 public class AdminServiceApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(AdminServiceApplication.class, args);
     }
 
-    @Profile("local")
+    @Profile({ "local", "dev", "test" })
     @Configuration
-    public static class SecurityPermitAllConfigLocal extends WebSecurityConfigurerAdapter {
+    public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
         @Override
         protected void configure(HttpSecurity http) throws Exception {
             http.authorizeRequests().anyRequest().permitAll()
@@ -43,27 +45,7 @@ public class AdminServiceApplication {
         }
     }
 
-    @Profile("dev")
-    @Configuration
-    public static class SecurityPermitAllConfigDev extends WebSecurityConfigurerAdapter {
-        @Override
-        protected void configure(HttpSecurity http) throws Exception {
-            http.authorizeRequests().anyRequest().permitAll()
-                    .and().csrf().disable();
-        }
-    }
-
-    @Profile("test")
-    @Configuration
-    public static class SecurityPermitAllConfigTest extends WebSecurityConfigurerAdapter {
-        @Override
-        protected void configure(HttpSecurity http) throws Exception {
-            http.authorizeRequests().anyRequest().permitAll()
-                    .and().csrf().disable();
-        }
-    }
-
-    @Profile("pro")
+    @Profile({ "pre", "pro" })
     @Configuration
     public static class SecuritySecureConfig extends WebSecurityConfigurerAdapter {
         private final String adminContextPath;

+ 31 - 5
admin-service/src/main/resources/logback-spring.xml

@@ -15,7 +15,7 @@
                     converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
     <!-- 彩色日志格式 -->
     <!--<property name="CONSOLE_LOG_PATTERN"-->
-              <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
+    <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
     <!--包名输出缩进对齐-->
     <property name="CONSOLE_LOG_PATTERN"
               value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
@@ -229,6 +229,22 @@
         </encoder>
     </appender>
 
+    <appender name="LOGSTASHPRE" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.121:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"admin-service"}</customFields>
+        </encoder>
+    </appender>
+
+    <appender name="LOGSTASHPRO" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.122:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"admin-service"}</customFields>
+        </encoder>
+    </appender>
+
     <!-- 本地环境下的日志配置 -->
     <springProfile name="local">
         <root level="INFO">
@@ -236,7 +252,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
         </root>
     </springProfile>
@@ -248,7 +263,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHDEV"/>
         </root>
@@ -261,12 +275,23 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHTEST"/>
         </root>
     </springProfile>
 
+    <!-- 预发布环境下的日志配置 -->
+    <springProfile name="pre">
+        <root level="INFO">
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRE"/>
+        </root>
+    </springProfile>
+
     <!-- 生产环境下的日志配置 -->
     <springProfile name="pro">
         <root level="INFO">
@@ -274,7 +299,8 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <appender-ref ref="LOGSTASH"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRO"/>
         </root>
     </springProfile>
 </configuration>

+ 5 - 5
aipt-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>
@@ -185,7 +185,7 @@
                         </resource>
                     </resources>
                     <serverId>docker-registry</serverId>
-                    <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+                    <registryUrl>${registryUrl}</registryUrl>
                 </configuration>
             </plugin>
         </plugins>

+ 2 - 0
aipt-service/src/main/java/com/diagbot/AiptServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class AiptServiceApplication {
 
     public static void main(String[] args) {

+ 15 - 0
aipt-service/src/main/java/com/diagbot/aggregate/PushItemAggregate.java

@@ -1,7 +1,9 @@
 package com.diagbot.aggregate;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.TranServiceClient;
+import com.diagbot.client.bean.CalculateData;
 import com.diagbot.client.bean.FeatureRate;
 import com.diagbot.client.bean.HosCodeVO;
 import com.diagbot.client.bean.MedicalIndication;
@@ -14,6 +16,7 @@ import com.diagbot.entity.Concept;
 import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.FeatureTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.facade.ClinicalFacade;
 import com.diagbot.facade.ConceptFacade;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.FastJsonUtils;
@@ -49,6 +52,8 @@ public class PushItemAggregate {
     private ConceptFacade conceptFacade;
     @Autowired
     private TranServiceClient tranServiceClient;
+    @Autowired
+    private ClinicalFacade clinicalFacade;
 
     @DataProvider("setAll")
     public PushDTO setAll(
@@ -317,6 +322,16 @@ public class PushItemAggregate {
                                     }
                                     detail.setContent(scaleJson);
                                 }
+                            } else if (detail.getType().equals(2)) {
+                                JSONObject calcJson = detail.getContent();
+                                CalculateData calcData = new CalculateData();
+                                calcData.setData(JSON.parseObject(FastJsonUtils.getBeanToJson(detail)));
+                                calcData.setType(2);
+                                Map<String, Object> resultMap = clinicalFacade.scaleCalc(calcData);
+                                if (resultMap.containsKey("result") && calcJson != null) {
+                                    calcJson.put("result", resultMap.get("result"));
+                                    detail.setContent(calcJson);
+                                }
                             }
                         }
                     }

+ 160 - 0
aipt-service/src/main/java/com/diagbot/aggregate/SearchItemAggregate.java

@@ -0,0 +1,160 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.LisResult;
+import com.diagbot.dto.PacsResult;
+import com.diagbot.enums.FeatureTypeEnum;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.facade.TransferFacade;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.SearchVo;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/14 16:11
+ */
+@Component
+public class SearchItemAggregate {
+    @Autowired
+    private TransferFacade transferFacade;
+
+    @DataProvider("assembleSearchData")
+    public SearchVo assembleSearchData(@InvokeParameter("searchVo") SearchVo searchVo,
+                                       @InvokeParameter("isConnect") Boolean isConnect,
+                                       @DataConsumer("setLisArr") List<LisResult> lisArr,
+                                       @DataConsumer("setPacsStr") String pacs,
+                                       @DataConsumer("setDiag") String diag,
+                                       @DataConsumer("setDiseaseName") String diseaseName,
+                                       @DataConsumer("setLisOrder") String lisOrder,
+                                       @DataConsumer("setPacsOrder") String pacsOrder) {
+        if (isConnect) {
+            //化验转公表项处理
+            searchVo.setLisArr(lisArr);
+            //下面转换仅限数据引擎模式
+            if (searchVo.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
+                //辅检预处理
+                searchVo.setPacs(pacs);
+                //诊断预处理
+                searchVo.setDiag(diag);
+                //治疗方案诊断转换
+                searchVo.setDiseaseName(diseaseName);
+                //化验开单项
+                searchVo.setLisOrder(lisOrder);
+                //辅检开单项
+                searchVo.setPacsOrder(pacsOrder);
+            }
+        }
+        return searchVo;
+    }
+
+    /**
+     * 化验增加公表项
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setLisArr")
+    public List<LisResult> setLisArr(@InvokeParameter("searchVo") SearchVo searchVo) {
+        List<LisResult> lisArr = searchVo.getLisArr();
+        lisArr = transferFacade.addLisUniqueName(lisArr, searchVo.getHosCode());
+        return lisArr;
+    }
+
+    /**
+     * 辅检转内部项目名称
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setPacsStr")
+    public String setPacsStr(@InvokeParameter("searchVo") SearchVo searchVo) {
+        String pacs = "";
+        if (StringUtil.isNotBlank(searchVo.getPacs())) {
+            pacs += searchVo.getPacs() + ";";
+        }
+        List<PacsResult> pacsArr = searchVo.getPacsArr();
+        if (ListUtil.isNotEmpty(pacsArr)) {
+            List<PacsResult> convertPacsArr = transferFacade.addPacsUniqueName(pacsArr, searchVo.getHosCode());
+            for (PacsResult pacsResult : convertPacsArr) {
+                String pacsResultString = "";
+                if (StringUtils.isNotBlank(pacsResult.getUniqueName())) {
+                    pacsResultString = pacsResult.getUniqueName() + ":";
+                } else {
+                    pacsResultString = pacsResult.getName() + ":";
+                }
+                pacsResultString += pacsResult.getResult() + ";";
+                pacs += pacsResultString;
+            }
+        }
+        return pacs;
+    }
+
+    /**
+     * 诊断转内部名称
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setDiag")
+    public String setDiag(@InvokeParameter("searchVo") SearchVo searchVo) {
+        String diag = "";
+        if (StringUtil.isNotBlank(searchVo.getDiag())) {
+            diag = transferFacade.strConvert(searchVo.getDiag(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Disease.getKey());
+        }
+        return diag;
+    }
+
+    /**
+     * 获取治疗方案诊断转内部名称
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setDiseaseName")
+    public String setDiseaseName(@InvokeParameter("searchVo") SearchVo searchVo) {
+        String diseaseName = "";
+        if (StringUtil.isNotBlank(searchVo.getDiseaseName())) {
+            diseaseName = transferFacade.strConvert(searchVo.getDiseaseName(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Disease.getKey());
+        }
+        return diseaseName;
+    }
+
+    /**
+     * 化验开单项映射公表名称
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setLisOrder")
+    public String setLisOrder(@InvokeParameter("searchVo") SearchVo searchVo) {
+        String lisOrder = "";
+        if (StringUtil.isNotBlank(searchVo.getLisOrder())) {
+            lisOrder = transferFacade.strConvert(searchVo.getLisOrder(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Lis.getKey());
+        }
+        return lisOrder;
+    }
+
+    /**
+     * 辅检开单项转内部项目名称
+     *
+     * @param searchVo
+     * @return
+     */
+    @DataProvider("setPacsOrder")
+    public String setPacsOrder(@InvokeParameter("searchVo") SearchVo searchVo) {
+        String pacsOrder = "";
+        if (StringUtil.isNotBlank(searchVo.getPacsOrder())) {
+            pacsOrder = transferFacade.strConvert(searchVo.getPacsOrder(), searchVo.getHosCode(), FeatureTypeEnum.Feature_Type_Pacs.getKey());
+        }
+        return pacsOrder;
+    }
+}

+ 91 - 78
aipt-service/src/main/java/com/diagbot/aggregate/TreatmentAggregate.java

@@ -3,6 +3,9 @@ package com.diagbot.aggregate;
 import com.diagbot.client.bean.AdverseReaction;
 import com.diagbot.client.bean.Medicition;
 import com.diagbot.client.bean.MedicitionClass;
+import com.diagbot.client.bean.MeditionDetail;
+import com.diagbot.client.bean.Treat;
+import com.diagbot.client.bean.TreatmentPlan;
 import com.diagbot.dto.ConceptDetailDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptDetail;
@@ -17,7 +20,6 @@ import io.github.lvyahui8.spring.annotation.InvokeParameter;
 import org.springframework.stereotype.Component;
 
 import java.util.Arrays;
-import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -31,20 +33,20 @@ import java.util.Map;
 public class TreatmentAggregate {
 
     @DataProvider("setTreatmentAll")
-    public Map<String, Object> setTreatmentAll(@InvokeParameter("treatmentMap") Map<String, Object> treatmentMap,
-                                               @DataConsumer("setCommonTreatment") ConceptDetailDTO commonTreatment,
-                                               @DataConsumer("setSurgeryTreatment") ConceptDetailDTO surgeryTreatment,
-                                               @DataConsumer("setDrugs") List<MedicitionClass> drugsList,
-                                               @DataConsumer("setAdverseReactions") List<AdverseReaction> adverseReactionList) {
-        if (treatmentMap == null) {
-            treatmentMap = new LinkedHashMap<>();
+    public Treat setTreatmentAll(@InvokeParameter("treat") Treat treat,
+                                 @DataConsumer("setCommonTreatment") ConceptDetailDTO commonTreatment,
+                                 @DataConsumer("setSurgeryTreatment") ConceptDetailDTO surgeryTreatment,
+                                 @DataConsumer("setTreatmentPlan") List<TreatmentPlan> treatmentPlanList,
+                                 @DataConsumer("setAdverseReactions") List<AdverseReaction> adverseReactionList) {
+        if (treat == null) {
+            treat = new Treat();
         }
-        treatmentMap.put("commonTreatment", commonTreatment);
-        treatmentMap.put("surgeryTreatment", surgeryTreatment);
-        treatmentMap.put("treatment", drugsList);
-        treatmentMap.put("adverseReactions", adverseReactionList);
+        treat.setCommonTreatment(commonTreatment);
+        treat.setSurgeryTreatment(surgeryTreatment);
+        treat.setTreatmentPlan(treatmentPlanList);
+        treat.setAdverseEvent(adverseReactionList);
 
-        return treatmentMap;
+        return treat;
     }
 
     @DataProvider("setCommonTreatment")
@@ -91,76 +93,87 @@ public class TreatmentAggregate {
         return conceptDetailDTO;
     }
 
-    @DataProvider("setDrugs")
-    public List<MedicitionClass> setDrugs(@InvokeParameter("drugsList") List<MedicitionClass> drugsList,
-                                          @InvokeParameter("conceptMap") Map<String, Map<Long, Concept>> conceptMap,
-                                          @InvokeParameter("hasConDetailMap") Map<String, Map<Long, List<ConceptDetail>>> hasConDetailMap) {
-        if (ListUtil.isNotEmpty(drugsList)) {
-            for (MedicitionClass medicitionClass : drugsList) {
-                if (conceptMap != null
-                        && conceptMap.get(medicitionClass.getBigdrugsName()) != null
-                        && conceptMap.get(medicitionClass
-                        .getBigdrugsName())
-                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
-                    Concept cateBigConcept = conceptMap
-                            .get(medicitionClass.getBigdrugsName())
-                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()));
-                    if (cateBigConcept != null) {
-                        medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
-                        if (hasConDetailMap != null
-                                && hasConDetailMap.get(cateBigConcept.getLibName()) != null
-                                && hasConDetailMap.get(cateBigConcept.getLibName())
-                                .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
-                            medicitionClass.setShowInfo("1");
-                        } else {
-                            medicitionClass.setShowInfo("0");
-                        }
-                    }
-                }
-                medicitionClass.setBigdrgusLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
-                medicitionClass.setBigdrugsType(ConceptTypeEnum.Drug_Category_Big.getKey());
-                if (conceptMap != null
-                        && conceptMap.get(medicitionClass.getSubdrugsName()) != null
-                        && conceptMap.get(medicitionClass.getSubdrugsName())
-                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()))) {
-                    Concept cateSmallConcept = conceptMap
-                            .get(medicitionClass.getSubdrugsName())
-                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()));
-                    if (cateSmallConcept != null) {
-                        medicitionClass.setSubdrugsConceptId(cateSmallConcept.getId());
-                    }
-                }
-                medicitionClass.setSubdrugsLibType(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey());
-                medicitionClass.setSubdrugsType(ConceptTypeEnum.Drug_Category_Small.getKey());
+    @DataProvider("setTreatmentPlan")
+    public List<TreatmentPlan> setTreatmentPlan(@InvokeParameter("treatmentPlan") List<TreatmentPlan> treatmentPlanList,
+                                                @InvokeParameter("conceptMap") Map<String, Map<Long, Concept>> conceptMap,
+                                                @InvokeParameter("hasConDetailMap") Map<String, Map<Long, List<ConceptDetail>>> hasConDetailMap) {
+        if (ListUtil.isNotEmpty(treatmentPlanList)) {
+            for (TreatmentPlan treatmentPlan : treatmentPlanList) {
+                List<MeditionDetail> meditionDetailList = treatmentPlan.getMeditionDetails();
+                if (ListUtil.isNotEmpty(meditionDetailList)) {
+                    for (MeditionDetail meditionDetail : meditionDetailList) {
+                        //药品推荐
+                        List<MedicitionClass> treatmentDrugList = meditionDetail.getTreatment();
+                        if (ListUtil.isNotEmpty(treatmentDrugList)) {
+                            for (MedicitionClass medicitionClass : treatmentDrugList) {
+                                if (conceptMap != null
+                                        && conceptMap.get(medicitionClass.getBigdrugsName()) != null
+                                        && conceptMap.get(medicitionClass
+                                        .getBigdrugsName())
+                                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
+                                    Concept cateBigConcept = conceptMap
+                                            .get(medicitionClass.getBigdrugsName())
+                                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()));
+                                    if (cateBigConcept != null) {
+                                        medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
+                                        if (hasConDetailMap != null
+                                                && hasConDetailMap.get(cateBigConcept.getLibName()) != null
+                                                && hasConDetailMap.get(cateBigConcept.getLibName())
+                                                .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
+                                            medicitionClass.setShowInfo("1");
+                                        } else {
+                                            medicitionClass.setShowInfo("0");
+                                        }
+                                    }
+                                }
+                                medicitionClass.setBigdrgusLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
+                                medicitionClass.setBigdrugsType(ConceptTypeEnum.Drug_Category_Big.getKey());
+                                if (conceptMap != null
+                                        && conceptMap.get(medicitionClass.getSubdrugsName()) != null
+                                        && conceptMap.get(medicitionClass.getSubdrugsName())
+                                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()))) {
+                                    Concept cateSmallConcept = conceptMap
+                                            .get(medicitionClass.getSubdrugsName())
+                                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()));
+                                    if (cateSmallConcept != null) {
+                                        medicitionClass.setSubdrugsConceptId(cateSmallConcept.getId());
+                                    }
+                                }
+                                medicitionClass.setSubdrugsLibType(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey());
+                                medicitionClass.setSubdrugsType(ConceptTypeEnum.Drug_Category_Small.getKey());
 
-                LinkedList<Medicition> medicitionList = medicitionClass.getMedicitionsList();
-                for (Medicition medicition : medicitionList) {
-                    if (conceptMap != null
-                            && conceptMap.get(medicition.getMedicitionName()) != null
-                            && conceptMap.get(medicition.getMedicitionName())
-                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
-                        Concept drugConcept = conceptMap
-                                .get(medicition.getMedicitionName())
-                                .get(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()));
-                        if (drugConcept != null) {
-                            medicition.setConceptId(drugConcept.getId());
+                                LinkedList<Medicition> medicitionList = medicitionClass.getMedicitionsList();
+                                for (Medicition medicition : medicitionList) {
+                                    if (conceptMap != null
+                                            && conceptMap.get(medicition.getMedicitionName()) != null
+                                            && conceptMap.get(medicition.getMedicitionName())
+                                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
+                                        Concept drugConcept = conceptMap
+                                                .get(medicition.getMedicitionName())
+                                                .get(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()));
+                                        if (drugConcept != null) {
+                                            medicition.setConceptId(drugConcept.getId());
+                                        }
+                                    }
+                                    medicition.setLibType(LexiconTypeEnum.DRUGS.getKey());
+                                    medicition.setType(ConceptTypeEnum.Drug.getKey());
+                                    if (hasConDetailMap != null
+                                            && hasConDetailMap.get(medicition.getMedicitionName()) != null
+                                            && hasConDetailMap.get(medicition.getMedicitionName())
+                                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
+                                        medicition.setShowInfo("1");
+                                    } else {
+                                        medicition.setShowInfo("0");
+                                    }
+                                }
+                                medicitionClass.setMedicitionsList(medicitionList);
+                            }
                         }
                     }
-                    medicition.setLibType(LexiconTypeEnum.DRUGS.getKey());
-                    medicition.setType(ConceptTypeEnum.Drug.getKey());
-                    if (hasConDetailMap != null
-                            && hasConDetailMap.get(medicition.getMedicitionName()) != null
-                            && hasConDetailMap.get(medicition.getMedicitionName())
-                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
-                        medicition.setShowInfo("1");
-                    } else {
-                        medicition.setShowInfo("0");
-                    }
                 }
-                medicitionClass.setMedicitionsList(medicitionList);
             }
         }
-        return drugsList;
+        return treatmentPlanList;
     }
 
     @DataProvider("setAdverseReactions")
@@ -196,4 +209,4 @@ public class TreatmentAggregate {
         }
         return adverseReactionList;
     }
-}
+}

+ 41 - 76
aipt-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,76 +1,41 @@
-//package com.diagbot.aop;
-//
-//import com.diagbot.annotation.SysLogger;
-//import com.diagbot.entity.SysLog;
-//import com.diagbot.enums.SysTypeEnum;
-//import com.diagbot.rabbit.MySender;
-//import com.diagbot.util.GsonUtil;
-//import com.diagbot.util.HttpUtils;
-//import com.diagbot.util.StringUtil;
-//import com.diagbot.util.UserUtils;
-//import org.aspectj.lang.JoinPoint;
-//import org.aspectj.lang.annotation.Aspect;
-//import org.aspectj.lang.annotation.Before;
-//import org.aspectj.lang.annotation.Pointcut;
-//import org.aspectj.lang.reflect.MethodSignature;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Component;
-//
-//import java.lang.reflect.Method;
-//import java.util.Date;
-//
-///**
-// * @Description: 日志拦截切面
-// * @author: gaodm
-// * @time: 2018/8/2 13:36
-// */
-//@Aspect
-//@Component
-//public class SysLoggerAspect {
-//    @Autowired
-//    private MySender mySender;
-//
-//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
-//    public void loggerPointCut() {
-//
-//    }
-//
-//    @Before("loggerPointCut()")
-//    public void saveSysLog(JoinPoint joinPoint) {
-//        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-//        Method method = signature.getMethod();
-//
-//        SysLog sysLog = new SysLog();
-//        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-//        if (sysLogger != null) {
-//            //注解上的描述
-//            sysLog.setOperation(sysLogger.value());
-//        }
-//        //请求的方法名
-//        String className = joinPoint.getTarget().getClass().getName();
-//        String methodName = signature.getName();
-//        sysLog.setMethod(className + "." + methodName + "()");
-//        //请求的参数
-//        Object[] args = joinPoint.getArgs();
-//        String params = "";
-//        for (Object o : args) {
-//            params += GsonUtil.toJson(o);
-//        }
-//        if (!StringUtil.isEmpty(params)) {
-//            sysLog.setParams(params);
-//        }
-//        //设置IP地址
-//        sysLog.setIp(HttpUtils.getIpAddress());
-//        //用户名
-//        String username = UserUtils.getCurrentPrinciple();
-//        if (!StringUtil.isEmpty(username)) {
-//            sysLog.setUsername(username);
-//        }
-//        sysLog.setGmtCreate(new Date());
-//        sysLog.setSysType(SysTypeEnum.AIPT_SERVICE.getKey());
-//        //保存系统日志
-//        mySender.outputLogSend(sysLog);
-//    }
-//
-//}
-//
+package com.diagbot.aop;
+
+import com.diagbot.biz.log.entity.SysLog;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.rabbit.MySender;
+import com.diagbot.util.AopUtil;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 日志拦截切面
+ * @author: gaodm
+ * @time: 2018/8/2 13:36
+ */
+@Aspect
+@Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
+public class SysLoggerAspect {
+    @Autowired
+    private MySender mySender;
+
+    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+    public void loggerPointCut() {
+
+    }
+
+    @Before("loggerPointCut()")
+    public void saveSysLog(JoinPoint joinPoint) {
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.AIPT_SERVICE.getKey());
+        //保存系统日志
+        mySender.outputLogSend(sysLog);
+    }
+
+}
+

+ 32 - 1
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -4,17 +4,21 @@ import com.diagbot.client.bean.HosCodeVO;
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.GetDiseaseIcdDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.GetTopPatientInfoDjDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.IndexDataDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.vo.DiseaseIcdVO;
 import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoDjVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.PacsConfigVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -57,6 +61,15 @@ public interface TranServiceClient {
     @PostMapping("/patientInfo/getTopPatientInfo")
     RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 
+    /**
+     * 对接-获取页面顶部病人医生科室信息
+     *
+     * @param getTopPatientInfoDjVO
+     * @return
+     */
+    @PostMapping("/patientInfo/getTopPatientInfoDj")
+    RespDTO<GetTopPatientInfoDjDTO> getTopPatientInfoDj(@RequestBody GetTopPatientInfoDjVO getTopPatientInfoDjVO);
+
     /**
      * 根据医院编码和套餐名称获取化验公表映射关系
      *
@@ -64,7 +77,7 @@ public interface TranServiceClient {
      * @return
      */
     @PostMapping("/tranLisConfig/getLisConfigByMealNameAndHosCode")
-    RespDTO<Map<String, Map<String, String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO);
+    RespDTO<Map<String, Map<String, List<String>>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO);
 
     /**
      * 根据医院编码获取辅检公表映射关系
@@ -75,6 +88,15 @@ public interface TranServiceClient {
     @PostMapping("/pacsConfig/getPacsConfigByHosCode")
     RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO);
 
+    /**
+     * 获取辅检映射关系
+     *
+     * @param pacsConfigVO
+     * @return
+     */
+    @PostMapping("/pacsConfig/getPacsConfig")
+    RespDTO<Map<String, List<String>>> getPacsConfig(@RequestBody PacsConfigVO pacsConfigVO);
+
     /**
      * 根据医院编码获取提示信息标题映射关系
      *
@@ -93,6 +115,15 @@ public interface TranServiceClient {
     @PostMapping("/diseaseIcd/getDiseaseIcdByHosCode")
     RespDTO<Map<String, String>> getDiseaseIcdByHosCode(@RequestBody HosCodeVO hosCodeVO);
 
+    /**
+     * 获取诊断名称映射map
+     *
+     * @param diseaseIcdVO
+     * @return
+     */
+    @PostMapping("/diseaseIcd/getDiseaseIcdMap")
+    RespDTO<Map<String, String>> getDiseaseIcdMap(DiseaseIcdVO diseaseIcdVO);
+
     /**
      * 数据服务模式是否对外对接
      *

+ 18 - 0
aipt-service/src/main/java/com/diagbot/client/bean/MeditionDetail.java

@@ -0,0 +1,18 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/21 11:15
+ */
+@Getter
+@Setter
+public class MeditionDetail {
+    private String description;
+    private List<MedicitionClass> treatment;
+}

+ 7 - 99
aipt-service/src/main/java/com/diagbot/client/bean/ResponseData.java

@@ -1,6 +1,9 @@
 package com.diagbot.client.bean;
 
 import com.alibaba.fastjson.JSONObject;
+import com.google.common.eventbus.AllowConcurrentEvents;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -10,6 +13,8 @@ import java.util.Map;
 /**
  * Created by fyeman on 2018/2/2.
  */
+@Getter
+@Setter
 public class ResponseData {
     private String participleSymptom = "";
 
@@ -19,107 +24,10 @@ public class ResponseData {
     private List<FeatureRate> labs = new ArrayList<>(10);
     private List<FeatureRate> pacs = new ArrayList<>(10);
     private List<FeatureRate> history = new ArrayList<>(10);
-    private Map<String, JSONObject> treat;   //治疗方案
+    private Treat treat;   //治疗方案
     private Map<String, JSONObject> scale;   //量表内容
     private Map<String, JSONObject> managementEvaluation;   //管理评估
     private List<MedicalIndication> medicalIndications;     //量表和指标项推送
 
     private Map<String, Map<String, String>> inputs = new HashMap<>(10, 0.5f);
-
-
-    public String getParticipleSymptom() {
-        return participleSymptom;
-    }
-
-    public void setParticipleSymptom(String participleSymptom) {
-        this.participleSymptom = participleSymptom;
-    }
-
-    public List<FeatureRate> getSymptom() {
-        return symptom;
-    }
-
-    public void setSymptom(List<FeatureRate> symptom) {
-        this.symptom = symptom;
-    }
-
-    public List<FeatureRate> getVitals() {
-        return vitals;
-    }
-
-    public void setVitals(List<FeatureRate> vitals) {
-        this.vitals = vitals;
-    }
-
-    public List<FeatureRate> getDis() {
-        return dis;
-    }
-
-    public void setDis(List<FeatureRate> dis) {
-        this.dis = dis;
-    }
-
-    public List<FeatureRate> getLabs() {
-        return labs;
-    }
-
-    public void setLabs(List<FeatureRate> labs) {
-        this.labs = labs;
-    }
-
-    public List<FeatureRate> getPacs() {
-        return pacs;
-    }
-
-    public void setPacs(List<FeatureRate> pacs) {
-        this.pacs = pacs;
-    }
-
-    public List<FeatureRate> getHistory() {
-        return history;
-    }
-
-    public void setHistory(List<FeatureRate> history) {
-        this.history = history;
-    }
-
-    public Map<String, JSONObject> getTreat() {
-        return treat;
-    }
-
-    public void setTreat(Map<String, JSONObject> treat) {
-        this.treat = treat;
-    }
-
-    public Map<String, Map<String, String>> getInputs() {
-        return inputs;
-    }
-
-    public void setInputs(Map<String, Map<String, String>> inputs) {
-        this.inputs = inputs;
-    }
-
-    public Map<String, JSONObject> getScale() {
-        return scale;
-    }
-
-    public void setScale(Map<String, JSONObject> scale) {
-        this.scale = scale;
-    }
-
-    public Map<String, JSONObject> getManagementEvaluation() {
-        return managementEvaluation;
-    }
-
-    public void setManagementEvaluation(Map<String, JSONObject> managementEvaluation) {
-        this.managementEvaluation = managementEvaluation;
-    }
-
-    public List<MedicalIndication> getMedicalIndications() {
-        return medicalIndications;
-    }
-
-    public void setMedicalIndications(List<MedicalIndication> medicalIndications) {
-        this.medicalIndications = medicalIndications;
-    }
-}
+}

+ 4 - 2
aipt-service/src/main/java/com/diagbot/client/bean/SearchData.java

@@ -28,7 +28,7 @@ public class SearchData {
     private String lis = "";
     private String pacs = "";
     private String diag = "";
-    private String past = "";
+    private String pasts = "";
     private String other = "";
     private List<LisResult> lisArr;
     private Integer disType; //0-普通病(默认不填),1-慢病,2-急诊
@@ -40,6 +40,8 @@ public class SearchData {
     private String pacsOrder;   //当前正在下单辅检
     private String otherOrder; //其他
 
+    private String ruleType;   //规则类型
+
     //特征类别
     private String featureType;
     //特征类别对","进行分割后数据
@@ -62,4 +64,4 @@ public class SearchData {
     private List<Feature> pacsFeatureList = new ArrayList<>();
     private List<Feature> diagFeatureList = new ArrayList<>();
     private List<Feature> symptompropertyFeatureList = new ArrayList<>();
-}
+}

+ 26 - 0
aipt-service/src/main/java/com/diagbot/client/bean/Treat.java

@@ -0,0 +1,26 @@
+package com.diagbot.client.bean;
+
+import com.diagbot.dto.ConceptDetailDTO;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/21 15:36
+ */
+@Getter
+@Setter
+public class Treat {
+    private Integer disType;
+    private String diseaseName;
+    private List<AdverseReaction> adverseEvent;//不良反应
+    private List<TreatmentPlan> treatmentPlan;//治疗方案
+    private ConceptDetailDTO commonTreatment; //一般治疗
+    private ConceptDetailDTO surgeryTreatment; //手术治疗
+    private Object followUp;
+    private Map<String, List<Medicition>> drugHistory;
+}

+ 18 - 0
aipt-service/src/main/java/com/diagbot/client/bean/TreatmentPlan.java

@@ -0,0 +1,18 @@
+package com.diagbot.client.bean;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/21 11:14
+ */
+@Getter
+@Setter
+public class TreatmentPlan {
+    private String title;
+    private List<MeditionDetail> meditionDetails;
+}

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

@@ -4,19 +4,24 @@ import com.diagbot.client.TranServiceClient;
 import com.diagbot.client.bean.HosCodeVO;
 import com.diagbot.dto.GetDiseaseIcdDTO;
 import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.GetTopPatientInfoDjDTO;
 import com.diagbot.dto.HospitalDeptInfoDTO;
 import com.diagbot.dto.IndexDataDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.vo.DiseaseIcdVO;
 import com.diagbot.vo.GetDiseaseIcdVO;
+import com.diagbot.vo.GetTopPatientInfoDjVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.LisConfigVO;
+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;
@@ -49,6 +54,12 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
+    @Override
+    public RespDTO<GetTopPatientInfoDjDTO> getTopPatientInfoDj(GetTopPatientInfoDjVO getTopPatientInfoDjVO) {
+        log.error("【hystrix】调用{}异常", "getTopPatientInfoDj");
+        return null;
+    }
+
     /**
      * 根据医院编码和套餐名称获取化验公表映射关系
      *
@@ -56,7 +67,7 @@ public class TranServiceHystrix implements TranServiceClient {
      * @return
      */
     @Override
-    public RespDTO<Map<String, Map<String, String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
+    public RespDTO<Map<String, Map<String, List<String>>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
         log.error("【hystrix】调用{}异常", "getLisConfigByMealNameAndHosCode");
         return null;
     }
@@ -73,6 +84,18 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
+    /**
+     * 获取辅检映射关系
+     *
+     * @param pacsConfigVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, List<String>>> getPacsConfig(@RequestBody PacsConfigVO pacsConfigVO) {
+        log.error("【hystrix】调用{}异常", "getPacsConfig");
+        return null;
+    }
+
     /**
      * 根据医院编码获取提示信息标题映射关系
      *
@@ -97,6 +120,18 @@ public class TranServiceHystrix implements TranServiceClient {
         return null;
     }
 
+    /**
+     * 获取诊断名称映射map
+     *
+     * @param diseaseIcdVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, String>> getDiseaseIcdMap(DiseaseIcdVO diseaseIcdVO) {
+        log.error("【hystrix】调用{}异常", "getDiseaseIcdMap");
+        return null;
+    }
+
     /**
      * 数据服务模式是否对外对接
      *

+ 4 - 0
aipt-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -23,6 +23,10 @@ public class MybatisPlusConfigurer {
     @Bean
     public PaginationInterceptor paginationInterceptor() {
         PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(500L);
         return paginationInterceptor;
     }
 

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

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

+ 6 - 12
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDTO.java

@@ -121,6 +121,12 @@ public class GetTopPatientInfoDTO {
 	@ApiModelProperty(value="病人证件号码")
     private String patientIdNo;
 
+	/**
+	 * 患者身份证号
+	 */
+	@ApiModelProperty(value = "患者身份证号")
+	private String patientIdentityNum;
+
 	/**
 	 * 系统时间
 	 */
@@ -141,16 +147,4 @@ public class GetTopPatientInfoDTO {
 	@ApiModelProperty(value="门诊号")
 	private String recordId;
 	
-    /**
-     * 模式分类
-     */
-	@ApiModelProperty(value="模式分类")
-    private Integer modeClassify;
-
-    /**
-     * 模式值
-     */
-	@ApiModelProperty(value="模式值")
-    private Integer modeValue;
-	
 }

+ 173 - 0
aipt-service/src/main/java/com/diagbot/dto/GetTopPatientInfoDjDTO.java

@@ -0,0 +1,173 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author rgb
+ * @Description
+ * @time 2018年11月19日下午4:57:43
+ */
+@ApiModel(value = "页面顶部病人医生科室信息查询接口出参")
+@Getter
+@Setter
+public class GetTopPatientInfoDjDTO {
+
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(value = "医院id")
+    private Long hospitalId;
+
+    /**
+     * 医院编码
+     */
+    @ApiModelProperty(value = "医院编码")
+    private String hospitalCode;
+
+    /**
+     * 医院名称
+     */
+    @ApiModelProperty(value = "医院名称")
+    private String hospitalName;
+
+    /**
+     * 子医院id
+     */
+    @ApiModelProperty(value = "子医院id")
+    private Long sonHospitalId;
+
+    /**
+     * 子医院编码
+     */
+    @ApiModelProperty(value = "子医院编码")
+    private String sonHospitalCode;
+
+    /**
+     * 子医院名称
+     */
+    @ApiModelProperty(value = "子医院名称")
+    private String sonHospitalName;
+
+    /**
+     * 医院科室id
+     */
+    @ApiModelProperty(value = "医院科室id")
+    private Long hospitalDeptId;
+
+    /**
+     * 自己科室id
+     */
+    @ApiModelProperty(value = "自己科室id")
+    private Long selfDeptId;
+
+    /**
+     * 自己科室名称
+     */
+    @ApiModelProperty(value = "自己科室名称")
+    private String selfDeptName;
+
+    /**
+     * 医院科室编码
+     */
+    @ApiModelProperty(value = "医院科室编码")
+    private String hospitalDeptCode;
+
+    /**
+     * 医院科室名称
+     */
+    @ApiModelProperty(value = "医院科室名称")
+    private String hospitalDeptName;
+
+    /**
+     * 医生id
+     */
+    @ApiModelProperty(value = "医生id")
+    private Long doctorId;
+
+    /**
+     * 医生编码
+     */
+    @ApiModelProperty(value = "医生编码")
+    private String doctorCode;
+
+    /**
+     * 医生姓名
+     */
+    @ApiModelProperty(value = "医生姓名")
+    private String doctorName;
+
+    /**
+     * 病人id
+     */
+    @ApiModelProperty(value = "病人id")
+    private Long patientId;
+
+    /**
+     * 病人编号
+     */
+    @ApiModelProperty(value = "病人编号")
+    private String patientCode;
+
+    /**
+     * 病人姓名
+     */
+    @ApiModelProperty(value = "病人姓名")
+    private String patientName;
+
+    /**
+     * 病人性别
+     */
+    @ApiModelProperty(value = "病人性别")
+    private String patientSex;
+
+    /**
+     * 病人年龄
+     */
+    @ApiModelProperty(value = "病人年龄")
+    private Integer patientAge;
+
+    /**
+     * 病人证件号码
+     */
+    @ApiModelProperty(value = "病人证件号码")
+    private String patientIdNo;
+
+    /**
+     * 系统时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "系统时间")
+    private Date systemTime;
+
+    /**
+     * 出生日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "出生日期")
+    private Date birthday;
+
+    /**
+     * 门诊号
+     */
+    @ApiModelProperty(value = "门诊号")
+    private String recordId;
+
+    /**
+     * 模式分类
+     */
+    @ApiModelProperty(value = "模式分类")
+    private Integer modeClassify;
+
+    /**
+     * 模式值
+     */
+    @ApiModelProperty(value = "模式值")
+    private Integer modeValue;
+
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/dto/PacsResult.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/7 15:02
+ */
+@Getter
+@Setter
+public class PacsResult {
+    private String name;
+    @ApiModelProperty(hidden = true)
+    private String uniqueName;
+    private String result;
+}

+ 1 - 1
aipt-service/src/main/java/com/diagbot/dto/SysSetInfoDTO.java

@@ -63,7 +63,7 @@ public class SysSetInfoDTO {
     /**
      * 配置值
      */
-    private Integer value;
+    private String value;
 
     /**
      * 备注

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

@@ -0,0 +1,88 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * icss字典表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@TableName("kl_dictionary_info")
+@Getter
+@Setter
+public class DictionaryInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 分组(值自定义)
+     */
+    private Long groupType;
+
+    /**
+     * 内容
+     */
+    private String name;
+
+    /**
+     * 值
+     */
+    private String val;
+
+    /**
+     * 返回类型(0: 都返回,1:后台维护返回 2:icss界面返回)
+     */
+    private Integer returnType;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 0 - 196
aipt-service/src/main/java/com/diagbot/entity/SysLog.java

@@ -1,196 +0,0 @@
-package com.diagbot.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * <p>
- * 系统操作日志表
- * </p>
- *
- * @author gaodm
- * @since 2018-09-14
- */
-public class SysLog implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 日志ID
-     */
-    @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;
-
-    /**
-     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
-     */
-    private Integer sysType;
-
-    /**
-     * 方法
-     */
-    private String method;
-
-    /**
-     * 操作名
-     */
-    private String operation;
-
-    /**
-     * 参数
-     */
-    private String params;
-
-    /**
-     * 用户名
-     */
-    private String username;
-
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public Date getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(Date gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-
-    public String getIp() {
-        return ip;
-    }
-
-    public void setIp(String ip) {
-        this.ip = ip;
-    }
-
-    public Integer getSysType() {
-        return sysType;
-    }
-
-    public void setSysType(Integer sysType) {
-        this.sysType = sysType;
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public void setMethod(String method) {
-        this.method = method;
-    }
-
-    public String getOperation() {
-        return operation;
-    }
-
-    public void setOperation(String operation) {
-        this.operation = operation;
-    }
-
-    public String getParams() {
-        return params;
-    }
-
-    public void setParams(String params) {
-        this.params = params;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    @Override
-    public String toString() {
-        return "SysLog{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", ip=" + ip +
-                ", sysType=" + sysType +
-                ", method=" + method +
-                ", operation=" + operation +
-                ", params=" + params +
-                ", username=" + username +
-                "}";
-    }
-}

+ 1 - 0
aipt-service/src/main/java/com/diagbot/enums/ConceptTypeEnum.java

@@ -24,6 +24,7 @@ public enum ConceptTypeEnum implements KeyedNamed {
     DEPARTMENT(15, "科室"),
     Scale(21, "量表"),
     Indication(22, "指标"),
+    OPERATION(25, "手术"),
     LisDetail(51, "化验明细");
 
 

+ 1 - 1
aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -74,7 +74,7 @@ public enum LexiconTypeEnum implements KeyedNamed {
     HISTORY_OF_MARRIAGE_AND_CHILDBEARING(62, "婚育史"),
     BIRTH_HISTORY(63, "生育史"),
     FAMILY_HISTORY(64, "家族史"),
-    FOOD_ALLERGY_HISTORY(65, "食物过敏史"),
+    FOOD_ALLERGY_HISTORY(65, "过敏史"),
     HISTORY_OF_DRUG_ALLERGY(66, "药物过敏史"),
     FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67, "家族相关传染病史"),
     FURTHER_CONSULTATION(68, "复诊"),

+ 55 - 0
aipt-service/src/main/java/com/diagbot/enums/StaticSearchTypeEnum.java

@@ -0,0 +1,55 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 静态知识搜索类型枚举
+ * @author: gaodm
+ * @time: 2019/5/6 13:58
+ */
+public enum StaticSearchTypeEnum implements KeyedNamed {
+    SYMPTOM(1, "症状"),
+    DRUGS(10, "药品"),
+    LIS_PACKAGE(12, "化验"),
+    PACS_ITEMS(16, "辅检"),
+    DIAGNOSIS(18, "诊断"),
+    OPERATION(25, "手术"),
+    GAUGE(48, "量表");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    StaticSearchTypeEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static StaticSearchTypeEnum getEnum(int key) {
+        for (StaticSearchTypeEnum item : StaticSearchTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        StaticSearchTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

+ 109 - 0
aipt-service/src/main/java/com/diagbot/facade/ConceptDetailFacade.java

@@ -1,13 +1,17 @@
 package com.diagbot.facade;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.ConceptDetailDTO;
 import com.diagbot.dto.ConceptIntroduceDTO;
+import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptDetail;
+import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.enums.PositionTypeEnum;
+import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ConceptDetailServiceImpl;
@@ -15,10 +19,14 @@ import com.diagbot.util.BeanUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ParamConvertUtil;
+import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.ConnectIntroduceVO;
+import com.diagbot.vo.DiseaseIcdVO;
 import com.diagbot.vo.ExistListByConceptIdsVO;
+import com.diagbot.vo.PacsConfigVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -37,6 +45,10 @@ import java.util.stream.Collectors;
 public class ConceptDetailFacade extends ConceptDetailServiceImpl {
     @Autowired
     private ConceptFacade conceptFacade;
+    @Autowired
+    private TransferFacade transferFacade;
+    @Autowired
+    private TranServiceClient tranServiceClient;
 
     /**
      * 单条获取静态知识
@@ -199,4 +211,101 @@ public class ConceptDetailFacade extends ConceptDetailServiceImpl {
         }
         return null;
     }
+
+    /**
+     * 获取对接静态知识
+     *
+     * @param connectIntroduceVO
+     * @return
+     */
+    public List<ConceptIntroduceDTO> getConnectConceptDetails(ConnectIntroduceVO connectIntroduceVO) {
+        //入参预处理
+        List<ConceptIntroduceVO> paramList = convertParam(connectIntroduceVO);
+        return this.getConceptDetails(paramList);
+    }
+
+    /**
+     * 静态知识入参预处理-对接
+     *
+     * @param connectIntroduceVO
+     * @return
+     */
+    public List<ConceptIntroduceVO> convertParam(ConnectIntroduceVO connectIntroduceVO) {
+        List<ConceptIntroduceVO> retList = Lists.newLinkedList();
+        List<String> nameList = Lists.newLinkedList();
+        nameList.add(connectIntroduceVO.getName());
+        if (!connectIntroduceVO.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
+            ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+            BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
+            conceptIntroduceVO.setLibType(ParamConvertUtil.conceptConvert2Lib(conceptIntroduceVO.getType()));
+            retList.add(conceptIntroduceVO);
+            return retList;
+        }
+
+        //是否对接
+        Boolean isConnect = transferFacade.isConnect(connectIntroduceVO.getHosCode(), connectIntroduceVO.getSysType());
+        if (isConnect) {
+            if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Lis.getKey())) {
+                Map<String, Map<String, List<String>>> lisConfigMap
+                        = transferFacade.getLisConfigByMealNameAndHosCode(nameList, connectIntroduceVO.getHosCode());
+                if (lisConfigMap.get(connectIntroduceVO.getName()) != null) {
+                    Map<String, List<String>> itemMap = lisConfigMap.get(connectIntroduceVO.getName());
+                    if (StringUtil.isBlank(connectIntroduceVO.getDetailName())) {
+                        connectIntroduceVO.setDetailName("");
+                    }
+                    List<String> uniqueNameList = itemMap.get(connectIntroduceVO.getDetailName());
+                    if (ListUtil.isNotEmpty(uniqueNameList)) {
+                        for (String uniqueName : uniqueNameList) {
+                            ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+                            BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
+                            conceptIntroduceVO.setName(uniqueName);
+                            conceptIntroduceVO.setType(ConceptTypeEnum.LIS_TABLES.getKey());
+                            conceptIntroduceVO.setLibType(LexiconTypeEnum.LIS_TABLES.getKey());
+                            retList.add(conceptIntroduceVO);
+                        }
+                    }
+                }
+            } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Pacs.getKey())) {
+                PacsConfigVO pacsConfigVO = new PacsConfigVO();
+                pacsConfigVO.setHosCode(connectIntroduceVO.getHosCode());
+                pacsConfigVO.setMealNameList(nameList);
+                RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
+                if (RespDTOUtil.respIsOK(pacsRespDTO)) {
+                    Map<String, List<String>> pacsMap = pacsRespDTO.data;
+                    for (String pacsStr : pacsMap.get(connectIntroduceVO.getName())) {
+                        ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+                        BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
+                        conceptIntroduceVO.setName(pacsStr);
+                        conceptIntroduceVO.setType(ConceptTypeEnum.Pacs.getKey());
+                        conceptIntroduceVO.setLibType(LexiconTypeEnum.PACS_ITEMS.getKey());
+                        retList.add(conceptIntroduceVO);
+                    }
+                }
+            } else if (connectIntroduceVO.getType().equals(ConceptTypeEnum.Disease.getKey())) {
+                DiseaseIcdVO diseaseIcdVO = new DiseaseIcdVO();
+                diseaseIcdVO.setHosCode(connectIntroduceVO.getHosCode());
+                diseaseIcdVO.setDiseaseNameList(nameList);
+
+                Map<String, String> disMap = new LinkedHashMap<>();
+                RespDTO<Map<String, String>> disRespDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
+                if (RespDTOUtil.respIsOK(disRespDTO)) {
+                    disMap = disRespDTO.data;
+                    if (disMap.get(connectIntroduceVO.getName()) != null) {
+                        ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+                        BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
+                        conceptIntroduceVO.setName(disMap.get(connectIntroduceVO.getName()));
+                        conceptIntroduceVO.setType(ConceptTypeEnum.Disease.getKey());
+                        conceptIntroduceVO.setLibType(LexiconTypeEnum.DIAGNOSIS.getKey());
+                        retList.add(conceptIntroduceVO);
+                    }
+                }
+            } else {
+                ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
+                BeanUtil.copyProperties(connectIntroduceVO, conceptIntroduceVO);
+                conceptIntroduceVO.setLibType(ParamConvertUtil.conceptConvert2Lib(conceptIntroduceVO.getType()));
+                retList.add(conceptIntroduceVO);
+            }
+        }
+        return retList;
+    }
 }

+ 31 - 0
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -11,6 +11,7 @@ import com.diagbot.enums.ConceptTypeEnum;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.LexiconRSTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
+import com.diagbot.enums.StaticSearchTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.ConceptServiceImpl;
@@ -364,6 +365,36 @@ public class ConceptFacade extends ConceptServiceImpl {
     public List<RetrievalDTO> getStaticKnowledge(GetStaticKnowledgeVO getStaticKnowledgeVO) {
         RetrievalVO retrievalVO = new RetrievalVO();
         BeanUtil.copyProperties(getStaticKnowledgeVO, retrievalVO);
+        List<Integer> types = retrievalVO.getTypes();
+        if (ListUtil.isEmpty(types)) {
+            // 添加词库搜索类型
+            types.add(StaticSearchTypeEnum.DIAGNOSIS.getKey());
+            types.add(StaticSearchTypeEnum.DRUGS.getKey());
+            types.add(StaticSearchTypeEnum.SYMPTOM.getKey());
+            types.add(StaticSearchTypeEnum.LIS_PACKAGE.getKey());
+            types.add(StaticSearchTypeEnum.PACS_ITEMS.getKey());
+            types.add(StaticSearchTypeEnum.OPERATION.getKey());
+            types.add(StaticSearchTypeEnum.GAUGE.getKey());
+            getStaticKnowledgeVO.setTypes(types);
+        }
+        List<Integer> typesIn = new ArrayList<>();
+        // 是否包含化验
+        if (types.contains(LexiconTypeEnum.LIS_PACKAGE.getKey())) {
+            retrievalVO.setHasLis(true); //
+        }
+        // 是否包含量表
+        if (types.contains(LexiconTypeEnum.GAUGE.getKey())) {
+            retrievalVO.setHasGauge(true); // 包含量表
+        }
+        for (Integer type : types) {
+            // 化验和量表单独处理,不需要遍历
+            if (LexiconTypeEnum.LIS_PACKAGE.getKey() != type.intValue()
+                    && LexiconTypeEnum.GAUGE.getKey() != type.intValue()) {
+                typesIn.add(type);
+            }
+        }
+        retrievalVO.setTypesIn(typesIn);
+
         List<RetrievalDTO> staticRetrievalList = this.staticKnowledge(retrievalVO);
         for (RetrievalDTO retrievalDTO : staticRetrievalList) {
             retrievalDTO.setType(ParamConvertUtil.libConvert2Concept(retrievalDTO.getLibTypeId().intValue()));

+ 37 - 0
aipt-service/src/main/java/com/diagbot/facade/DictionaryFacade.java

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

+ 23 - 0
aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -2,11 +2,13 @@ package com.diagbot.facade;
 
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.GetTopPatientInfoDjDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.Concept;
 import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.ConceptBaseVO;
+import com.diagbot.vo.GetTopPatientInfoDjVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -46,4 +48,25 @@ public class PatientInfoFacade {
         return getTopPatientInfoDTO;
     }
 
+    /**
+     * 对接-页面顶部病人医生科室信息查询
+     *
+     * @param getTopPatientInfoDjVO
+     * @return
+     */
+    public GetTopPatientInfoDjDTO getTopPatientInfoDj(@RequestBody GetTopPatientInfoDjVO getTopPatientInfoDjVO) {
+        RespDTO<GetTopPatientInfoDjDTO> respDTO = tranServiceClient.getTopPatientInfoDj(getTopPatientInfoDjVO);
+        RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
+
+        GetTopPatientInfoDjDTO getTopPatientInfoDjDTO = respDTO.data;
+
+        ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
+        conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
+        conceptBaseVO.setName(getTopPatientInfoDjDTO.getSelfDeptName());
+        Concept concept = conceptFacade.exist(conceptBaseVO);
+        getTopPatientInfoDjDTO.setSelfDeptId(concept.getId());
+
+        return getTopPatientInfoDjDTO;
+    }
+
 }

+ 33 - 82
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -1,23 +1,14 @@
 package com.diagbot.facade;
 
 import com.alibaba.fastjson.JSONObject;
-import com.diagbot.client.TranServiceClient;
-import com.diagbot.client.bean.HosCodeVO;
 import com.diagbot.client.bean.ResponseData;
-import com.diagbot.dto.LisResult;
+import com.diagbot.client.bean.Treat;
 import com.diagbot.dto.PushDTO;
-import com.diagbot.dto.RespDTO;
-import com.diagbot.dto.SysSetInfoDTO;
 import com.diagbot.enums.FeatureTypeEnum;
-import com.diagbot.enums.LisSourceEnum;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
-import com.diagbot.util.ListUtil;
-import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
-import com.diagbot.vo.HospitalSetVO;
-import com.diagbot.vo.LisConfigVO;
 import com.diagbot.vo.SearchVo;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,11 +17,8 @@ import org.springframework.stereotype.Component;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
 
 /**
  * @Description:
@@ -44,7 +32,7 @@ public class PushFacade {
     @Autowired
     private TreatmentFacade treatmentFacade;
     @Autowired
-    private TranServiceClient tranServiceClient;
+    private TransferFacade transferFacade;
     @Autowired
     DataBeanAggregateQueryFacade dataBeanAggregateQueryFacade;
 
@@ -57,39 +45,9 @@ public class PushFacade {
     public PushDTO pushInner(SearchVo searchVo) {
         PushDTO pushDTO = new PushDTO();
         //是否对接
-        Boolean isConnect = false;
-        if (StringUtil.isNotBlank(searchVo.getHosCode())) {
-            HosCodeVO hosCodeVO = new HosCodeVO();
-            hosCodeVO.setHosCode(searchVo.getHosCode());
-            HospitalSetVO hospitalSetVO = new HospitalSetVO();
-            hospitalSetVO.setHospitalCode(searchVo.getHosCode());
-            hospitalSetVO.setCode("connect");
-            if (searchVo.getSysType() != null) {
-                hospitalSetVO.setSysType(searchVo.getSysType());
-            } else {
-                hospitalSetVO.setSysType(SysTypeEnum.AIPT_SERVICE.getKey());
-            }
-            RespDTO<List<SysSetInfoDTO>> sysSetInfoListRes = tranServiceClient.getSysSetInfoDatas(hospitalSetVO);
-            if (RespDTOUtil.respIsOK(sysSetInfoListRes)) {
-                List<SysSetInfoDTO> sysSetInfoList = sysSetInfoListRes.data;
-                if (ListUtil.isNotEmpty(sysSetInfoList)) {
-                    if (sysSetInfoList.get(0).getValue().equals(1)) {
-                        isConnect = true;
-                    } else {
-                        isConnect = false;
-                    }
-                } else {
-                    isConnect = false;
-                }
-            }
-        }
-
-        //化验转公表项处理
-        if (isConnect) {
-            List<LisResult> lisArr = searchVo.getLisArr();
-            lisArr = addUniqueName(lisArr, searchVo.getHosCode());
-            searchVo.setLisArr(lisArr);
-        }
+        Boolean isConnect = transferFacade.isConnect(searchVo.getHosCode(), searchVo.getSysType());
+        //入参预处理
+        searchVo = precSearchData(searchVo, isConnect);
         ResponseData data = clinicalFacade.processClinicalData(searchVo);
 
         String featureType = searchVo.getFeatureType();
@@ -146,51 +104,44 @@ public class PushFacade {
      * @param searchVo
      * @return
      */
-    public Map<String, Object> getTreatment(SearchVo searchVo) {
+    public Treat getTreatment(SearchVo searchVo) {
+        //记录外部诊断名称
+        String diseaseName = searchVo.getDiseaseName();
+        //是否对接
+        Boolean isConnect = transferFacade.isConnect(searchVo.getHosCode(), searchVo.getSysType());
+        //入参预处理
+        searchVo = precSearchData(searchVo, isConnect);
         ResponseData data = clinicalFacade.processClinicalData(searchVo);
-        Map<String, JSONObject> treat = data.getTreat();
+        Treat treat = data.getTreat();
         if (StringUtil.isBlank(searchVo.getDiseaseName())) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "请输入需获取治疗方案的诊断名称");
         }
-        Map<String, Object> treatmentMap
-                = treatmentFacade.getTreatment(treat, searchVo.getDiseaseName(), searchVo.getDisType());
-        return treatmentMap;
+        treat = treatmentFacade.getTreatment(treat, searchVo.getDiseaseName(), searchVo.getDisType());
+
+        //数据引擎模式下,诊断名称转换成外部名称
+        if (isConnect && searchVo.getSysType().equals(SysTypeEnum.LTAPI_SERVICE.getKey())) {
+            treat.setDiseaseName(diseaseName);
+        }
+        return treat;
     }
 
     /**
-     * 增加化验公表项
+     * searchData入参预处理
      *
-     * @param lisResults
-     * @param hosCode
+     * @param searchVo
+     * @param isConnect
      * @return
      */
-    public List<LisResult> addUniqueName(List<LisResult> lisResults, String hosCode) {
-        //化验项转公表内容,参数处理
-        if (ListUtil.isNotEmpty(lisResults)) {
-            List<String> mealNameList = lisResults
-                    .stream()
-                    .map(lisResult -> lisResult.getName()).collect(Collectors.toList());
-            LisConfigVO lisConfigVO = new LisConfigVO();
-            lisConfigVO.setHosCode(hosCode);
-            lisConfigVO.setMealNameList(mealNameList);
-            RespDTO<Map<String, Map<String, String>>> lisConfigRes
-                    = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
-            Map<String, Map<String, String>> lisConfigMap = new LinkedHashMap<>();
-            if (RespDTOUtil.respIsOK(lisConfigRes)) {
-                lisConfigMap = lisConfigRes.data;
-            }
-            for (LisResult lisResult : lisResults) {
-                if (!lisResult.getSource().equals(LisSourceEnum.Outer.getKey())) {
-                    continue;
-                }
-                if (lisResult.getDetailName() == null) {
-                    lisResult.setDetailName("");
-                }
-                if (lisConfigMap.get(lisResult.getName()) != null) {
-                    lisResult.setUniqueName(lisConfigMap.get(lisResult.getName()).get(lisResult.getDetailName()));
-                }
-            }
+    public SearchVo precSearchData(SearchVo searchVo, Boolean isConnect) {
+        try {
+            Map<String, Object> inputParams = new HashMap<>();
+            inputParams.put("searchVo", searchVo);
+            inputParams.put("isConnect", isConnect);
+            searchVo
+                    = dataBeanAggregateQueryFacade.get("assembleSearchData", inputParams, SearchVo.class);
+        } catch (Exception e) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }
-        return lisResults;
+        return searchVo;
     }
 }

+ 254 - 0
aipt-service/src/main/java/com/diagbot/facade/TransferFacade.java

@@ -0,0 +1,254 @@
+package com.diagbot.facade;
+
+import com.diagbot.client.TranServiceClient;
+import com.diagbot.client.bean.HosCodeVO;
+import com.diagbot.dto.LisResult;
+import com.diagbot.dto.PacsResult;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.SysSetInfoDTO;
+import com.diagbot.enums.FeatureTypeEnum;
+import com.diagbot.enums.LisSourceEnum;
+import com.diagbot.enums.SysTypeEnum;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.DiseaseIcdVO;
+import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.PacsConfigVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/11 14:14
+ */
+@Component
+public class TransferFacade {
+    @Autowired
+    private TranServiceClient tranServiceClient;
+
+    /**
+     * 查询对接状态
+     *
+     * @param hosCode
+     * @param sysType
+     * @return
+     */
+    public Boolean isConnect(String hosCode, Integer sysType) {
+        Boolean isConnect = false;
+        if (StringUtil.isNotBlank(hosCode)) {
+            HosCodeVO hosCodeVO = new HosCodeVO();
+            hosCodeVO.setHosCode(hosCode);
+            HospitalSetVO hospitalSetVO = new HospitalSetVO();
+            hospitalSetVO.setHospitalCode(hosCode);
+            hospitalSetVO.setCode("connect");
+            if (sysType != null) {
+                hospitalSetVO.setSysType(sysType);
+            } else {
+                hospitalSetVO.setSysType(SysTypeEnum.AIPT_SERVICE.getKey());
+            }
+            RespDTO<List<SysSetInfoDTO>> sysSetInfoListRes = tranServiceClient.getSysSetInfoDatas(hospitalSetVO);
+            if (RespDTOUtil.respIsOK(sysSetInfoListRes)) {
+                List<SysSetInfoDTO> sysSetInfoList = sysSetInfoListRes.data;
+                if (ListUtil.isNotEmpty(sysSetInfoList)) {
+                    if (sysSetInfoList.get(0).getValue().equals("1")) {
+                        isConnect = true;
+                    } else {
+                        isConnect = false;
+                    }
+                } else {
+                    isConnect = false;
+                }
+            }
+        }
+        return isConnect;
+    }
+
+    /**
+     * 化验结果增肌公表名
+     *
+     * @param lisResults
+     * @param hosCode
+     * @return
+     */
+    public List<LisResult> addLisUniqueName(List<LisResult> lisResults, String hosCode) {
+        List<LisResult> retLisResults = Lists.newLinkedList();
+        //化验项转公表内容,参数处理
+        if (ListUtil.isNotEmpty(lisResults)) {
+            List<String> mealNameList = lisResults
+                    .stream()
+                    .map(lisResult -> lisResult.getName()).collect(Collectors.toList());
+            LisConfigVO lisConfigVO = new LisConfigVO();
+            lisConfigVO.setHosCode(hosCode);
+            lisConfigVO.setMealNameList(mealNameList);
+            RespDTO<Map<String, Map<String, List<String>>>> lisConfigRes
+                    = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
+            Map<String, Map<String, List<String>>> lisConfigMap = new LinkedHashMap<>();
+            if (RespDTOUtil.respIsOK(lisConfigRes)) {
+                lisConfigMap = lisConfigRes.data;
+            }
+            for (LisResult lisResult : lisResults) {
+                if (!lisResult.getSource().equals(LisSourceEnum.Outer.getKey())) {
+                    retLisResults.add(lisResult);
+                    continue;
+                }
+                if (lisResult.getDetailName() == null) {
+                    lisResult.setDetailName("");
+                }
+                Map<String, List<String>> itemMap = lisConfigMap.get(lisResult.getName());
+                if (itemMap != null) {
+                    List<String> uniqueNameList = itemMap.get(lisResult.getDetailName());
+                    if (ListUtil.isNotEmpty(uniqueNameList)) {
+                        //化验公表映射出多项时,拆分成多个公表项数据,指标值保持一致
+                        for (String uniqueName : uniqueNameList) {
+                            LisResult lisResult_new = new LisResult();
+                            BeanUtil.copyProperties(lisResult, lisResult_new);
+                            lisResult_new.setUniqueName(uniqueName);
+                            retLisResults.add(lisResult_new);
+                        }
+                    } else {
+                        retLisResults.add(lisResult);
+                    }
+                }
+            }
+        }
+        return retLisResults;
+    }
+
+
+    /**
+     * 辅检结果增加公表名(辅检项目名称)
+     *
+     * @param pacsArr
+     * @param hosCode
+     * @return
+     */
+    public List<PacsResult> addPacsUniqueName(List<PacsResult> pacsArr, String hosCode) {
+        Map<String, PacsResult> pacsOriginalMap = EntityUtil.makeEntityMap(pacsArr, "name");
+        List<PacsResult> convertPacsArr = Lists.newLinkedList();
+        PacsConfigVO pacsConfigVO = new PacsConfigVO();
+        pacsConfigVO.setHosCode(hosCode);
+        pacsConfigVO.setMealNameList(pacsArr
+                .stream()
+                .map(pacsResult -> pacsResult.getName())
+                .distinct()
+                .collect(Collectors.toList()));
+        RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
+        if (RespDTOUtil.respIsOK(pacsRespDTO)) {
+            Map<String, List<String>> pacsMap = pacsRespDTO.data;
+            for (Map.Entry<String, PacsResult> entry : pacsOriginalMap.entrySet()) {
+                if (ListUtil.isNotEmpty(pacsMap.get(entry.getKey()))) {
+                    for (String uniqueName : pacsMap.get(entry.getKey())) {
+                        PacsResult pacsResult = new PacsResult();
+                        BeanUtil.copyProperties(entry.getValue(), pacsResult);
+                        pacsResult.setUniqueName(uniqueName);
+                        convertPacsArr.add(pacsResult);
+                    }
+                } else {
+                    convertPacsArr.add(entry.getValue());
+                }
+            }
+        }
+        return convertPacsArr;
+    }
+
+    /**
+     * 获取化验公表映射关系
+     *
+     * @param nameList
+     * @param hosCode
+     * @return
+     */
+    public Map<String, Map<String, List<String>>> getLisConfigByMealNameAndHosCode(List<String> nameList, String hosCode) {
+        Map<String, Map<String, List<String>>> lisConfigMap = new LinkedHashMap<>();
+        if (ListUtil.isNotEmpty(nameList) && StringUtil.isNotBlank(hosCode)) {
+            LisConfigVO lisConfigVO = new LisConfigVO();
+            lisConfigVO.setHosCode(hosCode);
+            lisConfigVO.setMealNameList(nameList);
+            RespDTO<Map<String, Map<String, List<String>>>> lisConfigRes
+                    = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
+            if (RespDTOUtil.respIsOK(lisConfigRes)) {
+                lisConfigMap = lisConfigRes.data;
+            }
+        }
+        return lisConfigMap;
+    }
+
+    /**
+     * 外部项目名称转内部名称-字符串格式
+     *
+     * @param originalStr 原始数据
+     * @param hosCode     医院编码
+     * @param type        5-化验(仅限套餐),6-辅检,7-诊断
+     * @return
+     */
+    public String strConvert(String originalStr, String hosCode, Integer type) {
+        String retStr = "";
+        if (StringUtil.isBlank(originalStr)) {
+            return retStr;
+        }
+        String[] strArr = originalStr
+                .replace(" ", "")
+                .split(",|,|;|;");
+        List<String> strList = Arrays.asList(strArr);
+        strList = strList
+                .stream()
+                .filter(str -> StringUtil.isNotBlank(str))
+                .distinct()
+                .collect(Collectors.toList());
+        if (type.equals(FeatureTypeEnum.Feature_Type_Lis.getKey())) {
+            Map<String, Map<String, List<String>>> map = getLisConfigByMealNameAndHosCode(strList, hosCode);
+            if (map != null) {
+                for (String lis : strList) {
+                    Map<String, List<String>> itemMap = map.get(lis);
+                    if (itemMap != null && itemMap.get("") != null) {
+                        retStr += String.join(",", itemMap.get("")) + ",";
+                    }
+                }
+            }
+
+        } else if (type.equals(FeatureTypeEnum.Feature_Type_Pacs.getKey())) {
+            PacsConfigVO pacsConfigVO = new PacsConfigVO();
+            pacsConfigVO.setHosCode(hosCode);
+            pacsConfigVO.setMealNameList(strList);
+            RespDTO<Map<String, List<String>>> pacsRespDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
+            if (RespDTOUtil.respIsOK(pacsRespDTO)) {
+                Map<String, List<String>> pacsMap = pacsRespDTO.data;
+                for (Map.Entry<String, List<String>> entry : pacsMap.entrySet()) {
+                    if (ListUtil.isNotEmpty(entry.getValue())) {
+                        retStr += String.join(",", entry.getValue()) + ",";
+                    }
+                }
+            }
+        } else if (type.equals(FeatureTypeEnum.Feature_Type_Disease.getKey())) {
+            DiseaseIcdVO diseaseIcdVO = new DiseaseIcdVO();
+            diseaseIcdVO.setHosCode(hosCode);
+            diseaseIcdVO.setDiseaseNameList(strList);
+            Map<String, String> disMap = new LinkedHashMap<>();
+            RespDTO<Map<String, String>> disRespDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
+            if (RespDTOUtil.respIsOK(disRespDTO)) {
+                disMap = disRespDTO.data;
+                for (String diseaseName : strList) {
+                    if (StringUtil.isNotBlank(disMap.get(diseaseName))) {
+                        retStr += disMap.get(diseaseName) + ",";
+                    }
+                }
+            }
+        }
+        if (retStr.endsWith(",")) {
+            retStr = retStr.substring(0, retStr.length() - 1);
+        }
+        return retStr;
+    }
+}

+ 64 - 172
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -1,9 +1,11 @@
 package com.diagbot.facade;
 
-import com.alibaba.fastjson.JSONObject;
 import com.diagbot.client.bean.AdverseReaction;
 import com.diagbot.client.bean.Medicition;
 import com.diagbot.client.bean.MedicitionClass;
+import com.diagbot.client.bean.MeditionDetail;
+import com.diagbot.client.bean.Treat;
+import com.diagbot.client.bean.TreatmentPlan;
 import com.diagbot.dto.ConceptRes;
 import com.diagbot.entity.Concept;
 import com.diagbot.entity.ConceptDetail;
@@ -13,8 +15,8 @@ import com.diagbot.enums.LexiconRSTypeEnum;
 import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
-import com.diagbot.util.FastJsonUtils;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.vo.ConceptBaseVO;
 import com.google.common.collect.Lists;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
@@ -48,8 +50,8 @@ public class TreatmentFacade {
      * @param
      * @return
      */
-    public Map<String, Object> getTreatment(Map<String, JSONObject> treatmentMap, String diseaseName, Integer disType) {
-        Map<String, Object> retMap = new LinkedHashMap<>();
+    public Treat getTreatment(Treat treat, String diseaseName, Integer disType) {
+        List<MedicitionClass> drugsList = Lists.newLinkedList();
         List<String> conceptNameList = Lists.newLinkedList();
         conceptNameList.add(diseaseName);
         ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
@@ -59,49 +61,62 @@ public class TreatmentFacade {
         if (disease == null) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "诊断不存在");
         }
-        if (treatmentMap == null || treatmentMap.size() == 0 || !treatmentMap.containsKey(diseaseName)) {
+        if (treat == null) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "未找到治疗方案");
         }
 
         //治疗方案对应诊断
-        retMap.put("diseaseName", diseaseName);
+        treat.setDiseaseName(diseaseName);
 
-        //获取知识图谱治疗方案
-        JSONObject treatmentJson = treatmentMap.get(diseaseName);
-        if (treatmentJson == null || treatmentJson.isEmpty()) {
-            return retMap;
-        }
-        //推荐药物
-        List<MedicitionClass> drugsList
-                = FastJsonUtils.getJsonToListByKey(treatmentJson.toString(), "treatment", MedicitionClass.class);
+        //推荐治疗方案
+        List<TreatmentPlan> treatmentPlanList = treat.getTreatmentPlan();
         //不良反应
-        List<AdverseReaction> adverseReactionList
-                = FastJsonUtils.getJsonToListByKey(treatmentJson.toString(), "adverseEvent", AdverseReaction.class);
-        if (ListUtil.isNotEmpty(drugsList)) {
-            //药品大类
-            List<String> cateBigNameList = drugsList
-                    .stream()
-                    .map(drugs -> drugs.getBigdrugsName())
-                    .collect(Collectors.toList());
-            conceptNameList.addAll(cateBigNameList);
-            //药品小类
-            List<String> cateSmallNameList = drugsList
-                    .stream()
-                    .map(drugs -> drugs.getSubdrugsName())
-                    .collect(Collectors.toList());
-            conceptNameList.addAll(cateSmallNameList);
-            //药品
-            List<Medicition> medicitionTotalList = Lists.newLinkedList();
-            for (MedicitionClass medicitionClass : drugsList) {
-                if (medicitionClass.getMedicitionsList() != null) {
-                    medicitionTotalList.addAll(medicitionClass.getMedicitionsList());
+        List<AdverseReaction> adverseReactionList = treat.getAdverseEvent();
+
+        if (ListUtil.isNotEmpty(treatmentPlanList)) {
+            for (int index = 0; index < treatmentPlanList.size(); index++) {
+                TreatmentPlan treatmentPlan = treatmentPlanList.get(index);
+                List<MeditionDetail> meditionDetailList = treatmentPlan.getMeditionDetails();
+                if (ListUtil.isNotEmpty(meditionDetailList)) {
+                    for (MeditionDetail meditionDetail : meditionDetailList) {
+                        //药品推荐
+                        List<MedicitionClass> treatmentDrugList = meditionDetail.getTreatment();
+                        if (ListUtil.isNotEmpty(treatmentDrugList)) {
+                            drugsList.addAll(treatmentDrugList);
+                            //药品大类
+                            List<String> cateBigNameList = treatmentDrugList
+                                    .stream()
+                                    .map(drugs -> drugs.getBigdrugsName())
+                                    .collect(Collectors.toList());
+                            conceptNameList.addAll(cateBigNameList);
+                            //药品小类
+                            List<String> cateSmallNameList = treatmentDrugList
+                                    .stream()
+                                    .map(drugs -> drugs.getSubdrugsName())
+                                    .collect(Collectors.toList());
+                            conceptNameList.addAll(cateSmallNameList);
+                            //药品
+                            List<Medicition> medicitionTotalList = Lists.newLinkedList();
+                            for (MedicitionClass medicitionClass : treatmentDrugList) {
+                                if (medicitionClass.getMedicitionsList() != null) {
+                                    medicitionTotalList.addAll(medicitionClass.getMedicitionsList());
+                                }
+                            }
+                            List<String> drugNameList = medicitionTotalList
+                                    .stream()
+                                    .map(m -> m.getMedicitionName())
+                                    .collect(Collectors.toList());
+                            conceptNameList.addAll(drugNameList);
+                        } else {
+                            if (StringUtil.isBlank(meditionDetail.getDescription())) {
+                                treatmentPlanList.remove(index);
+                                index--;
+                                break;
+                            }
+                        }
+                    }
                 }
             }
-            List<String> drugNameList = medicitionTotalList
-                    .stream()
-                    .map(m -> m.getMedicitionName())
-                    .collect(Collectors.toList());
-            conceptNameList.addAll(drugNameList);
         }
         if (ListUtil.isNotEmpty(adverseReactionList)) {
             List<String> adNameList = adverseReactionList
@@ -138,155 +153,32 @@ public class TreatmentFacade {
 
         try {
             Map<String, Object> invokeParams = new HashMap<>();
-            invokeParams.put("treatmentMap", retMap);
+            invokeParams.put("treat", treat);
             invokeParams.put("diseaseName", diseaseName);
             invokeParams.put("drugsList", drugsList);
+            invokeParams.put("treatmentPlan", treatmentPlanList);
             invokeParams.put("conceptMap", conceptMap);
             invokeParams.put("hasConDetailMap", hasConDetailMap);
             invokeParams.put("adverseReactionList", adverseReactionList);
             invokeParams.put("isChronic", isChronic);
 
-            retMap
-                    = dataBeanAggregateQueryFacade.get("setTreatmentAll", invokeParams, Map.class);
+            treat = dataBeanAggregateQueryFacade.get("setTreatmentAll", invokeParams, Treat.class);
         } catch (Exception e) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
         }
         //判断是否慢病,慢病增加回访时间,上次用药,不良反应
         if (isChronic) {
-            if (retMap == null) {
-                retMap = new LinkedHashMap<>();
+            if (treat == null) {
+                treat = new Treat();
+                treat.setDiseaseName(diseaseName);
             }
+            treat.setDisType(1);
             //慢病,增加回访时间,暂时前端写死, 以后由只是图谱返回
-            retMap.put("followUp", null);
+            treat.setFollowUp(null);
             //上次用药-icss层处理
-            retMap.put("drugHistory", null);
+            treat.setDrugHistory(null);
         }
-
-        //        //一般治疗&&手术治疗
-        //        if (hasConDetailMap != null && hasConDetailMap.get(diseaseName) != null
-        //                && ListUtil.isNotEmpty(hasConDetailMap
-        //                .get(diseaseName)
-        //                .get(Long.valueOf(LexiconTypeEnum.DIAGNOSIS.getKey())))) {
-        //            List<ConceptDetail> diseaseConDetailList
-        //                    = hasConDetailMap.get(diseaseName).get(Long.valueOf(LexiconTypeEnum.DIAGNOSIS.getKey()));
-        //            for (ConceptDetail conceptDetail : diseaseConDetailList) {
-        //                ConceptDetailDTO conceptDetailDTO = new ConceptDetailDTO();
-        //                List<String> positionList = Arrays.asList(conceptDetail.getPosition().split(",|,"));
-        //                if (positionList.contains(String.valueOf(PositionTypeEnum.T3.getKey()))
-        //                        && retMap.get("commonTreatment") == null) {
-        //                    BeanUtil.copyProperties(conceptDetail, conceptDetailDTO);
-        //                    retMap.put("commonTreatment", conceptDetailDTO);
-        //                }
-        //                if (positionList.contains(String.valueOf(PositionTypeEnum.T4.getKey()))
-        //                        && retMap.get("surgeryTreatment") == null) {
-        //                    BeanUtil.copyProperties(conceptDetail, conceptDetailDTO);
-        //                    retMap.put("surgeryTreatment", conceptDetailDTO);
-        //                }
-        //            }
-        //        }
-        //        if (!retMap.containsKey("commonTreatment")) {
-        //            retMap.put("commonTreatment", null);
-        //        }
-        //        if (!retMap.containsKey("surgeryTreatment")) {
-        //            retMap.put("surgeryTreatment", null);
-        //        }
-
-        //        if (ListUtil.isNotEmpty(drugsList)) {
-        //            for (MedicitionClass medicitionClass : drugsList) {
-        //                if (conceptMap != null
-        //                        && conceptMap.get(medicitionClass.getBigdrugsName()) != null
-        //                        && conceptMap.get(medicitionClass
-        //                        .getBigdrugsName())
-        //                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
-        //                    Concept cateBigConcept = conceptMap
-        //                            .get(medicitionClass.getBigdrugsName())
-        //                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()));
-        //                    if (cateBigConcept != null) {
-        //                        medicitionClass.setBigdrugsConceptId(cateBigConcept.getId());
-        //                        if (hasConDetailMap != null
-        //                                && hasConDetailMap.get(cateBigConcept.getLibName()) != null
-        //                                && hasConDetailMap.get(cateBigConcept.getLibName())
-        //                                .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey()))) {
-        //                            medicitionClass.setShowInfo("1");
-        //                        } else {
-        //                            medicitionClass.setShowInfo("0");
-        //                        }
-        //                    }
-        //                }
-        //                medicitionClass.setBigdrgusLibType(LexiconTypeEnum.DRUG_CATEGORY_BIG.getKey());
-        //                medicitionClass.setBigdrugsType(ConceptTypeEnum.Drug_Category_Big.getKey());
-        //                if (conceptMap != null
-        //                        && conceptMap.get(medicitionClass.getSubdrugsName()) != null
-        //                        && conceptMap.get(medicitionClass.getSubdrugsName())
-        //                        .containsKey(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()))) {
-        //                    Concept cateSmallConcept = conceptMap
-        //                            .get(medicitionClass.getSubdrugsName())
-        //                            .get(Long.valueOf(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey()));
-        //                    if (cateSmallConcept != null) {
-        //                        medicitionClass.setSubdrugsConceptId(cateSmallConcept.getId());
-        //                    }
-        //                }
-        //                medicitionClass.setSubdrugsLibType(LexiconTypeEnum.DRUG_CATEGORY_SMALL.getKey());
-        //                medicitionClass.setSubdrugsType(ConceptTypeEnum.Drug_Category_Small.getKey());
-        //
-        //                LinkedList<Medicition> medicitionList = medicitionClass.getMedicitionsList();
-        //                for (Medicition medicition : medicitionList) {
-        //                    if (conceptMap != null
-        //                            && conceptMap.get(medicition.getMedicitionName()) != null
-        //                            && conceptMap.get(medicition.getMedicitionName())
-        //                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
-        //                        Concept drugConcept = conceptMap
-        //                                .get(medicition.getMedicitionName())
-        //                                .get(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()));
-        //                        if (drugConcept != null) {
-        //                            medicition.setConceptId(drugConcept.getId());
-        //                        }
-        //                    }
-        //                    medicition.setLibType(LexiconTypeEnum.DRUGS.getKey());
-        //                    medicition.setType(ConceptTypeEnum.Drug.getKey());
-        //                    if (hasConDetailMap != null
-        //                            && hasConDetailMap.get(medicition.getMedicitionName()) != null
-        //                            && hasConDetailMap.get(medicition.getMedicitionName())
-        //                            .containsKey(Long.valueOf(LexiconTypeEnum.DRUGS.getKey()))) {
-        //                        medicition.setShowInfo("1");
-        //                    } else {
-        //                        medicition.setShowInfo("0");
-        //                    }
-        //                }
-        //                medicitionClass.setMedicitionsList(medicitionList);
-        //            }
-        //        }
-        //        retMap.put("treatment", drugsList);
-
-
-        //        //不良反应
-        //        for (AdverseReaction adverseReaction : adverseReactionList) {
-        //            if (conceptMap != null
-        //                    && conceptMap.get(adverseReaction.getName()) != null
-        //                    && conceptMap.get(adverseReaction.getName())
-        //                    .containsKey(Long.valueOf(LexiconTypeEnum.SIDE_EFFECTS.getKey()))) {
-        //                Concept adConcept = conceptMap
-        //                        .get(adverseReaction.getName())
-        //                        .get(Long.valueOf(LexiconTypeEnum.SIDE_EFFECTS.getKey()));
-        //                if (adConcept != null) {
-        //                    adverseReaction.setConceptId(adConcept.getId());
-        //                }
-        //            }
-        //            adverseReaction.setLibType(LexiconTypeEnum.SIDE_EFFECTS.getKey());
-        //            adverseReaction.setType(ConceptTypeEnum.SIDE_EFFECTS.getKey());
-        //            if (hasConDetailMap != null
-        //                    && hasConDetailMap.get(adverseReaction.getName()) != null
-        //                    && hasConDetailMap.get(adverseReaction.getName())
-        //                    .containsKey(Long.valueOf(LexiconTypeEnum.SIDE_EFFECTS.getKey()))) {
-        //                adverseReaction.setShowInfo("1");
-        //            } else {
-        //                adverseReaction.setShowInfo("0");
-        //            }
-        //        }
-        //        retMap.put("adverseReactions", adverseReactionList);
-
-
-        return retMap;
+        return treat;
     }
 
     /**

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

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

+ 1 - 1
aipt-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,6 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;

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

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

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

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

+ 6 - 2
aipt-service/src/main/java/com/diagbot/util/ParamConvertUtil.java

@@ -66,6 +66,9 @@ public class ParamConvertUtil {
             case DEPARTMENT:
                 libType = LexiconTypeEnum.DEPARTMENT.getKey();
                 break;
+            case OPERATION:
+                libType = LexiconTypeEnum.OPERATION.getKey();
+                break;
             default:
                 break;
         }
@@ -101,7 +104,6 @@ public class ParamConvertUtil {
             case MARRIAGE:
             case FOOD:
             case HISTORY:
-            case OPERATION:
             case PERSONAL_HISTORY:
             case PERSONAL_HISTORY_DESCRIPTION:
                 type = ConceptTypeEnum.Other.getKey();
@@ -146,7 +148,9 @@ public class ParamConvertUtil {
             case DEPARTMENT:
                 type = ConceptTypeEnum.DEPARTMENT.getKey();
                 break;
-
+            case OPERATION:
+                type = ConceptTypeEnum.OPERATION.getKey();
+                break;
             default:
                 break;
         }

+ 36 - 0
aipt-service/src/main/java/com/diagbot/vo/ConnectIntroduceVO.java

@@ -0,0 +1,36 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2019/11/11 14:06
+ */
+@Getter
+@Setter
+public class ConnectIntroduceVO {
+    @NotBlank(message = "请输入术语名称")
+    private String name;
+    private String detailName;
+    @NotNull(message = "请输入术语类型")
+    private Integer type;
+    @NotBlank(message = "请输入医院编码")
+    private String hosCode;
+    @ApiModelProperty(hidden = true)
+    private String uniqueName;
+    @ApiModelProperty(hidden = true)
+    private Integer position;
+    @ApiModelProperty(hidden = true)
+    private List<String> titles;
+    @ApiModelProperty(hidden = true)
+    private Integer libType;
+    @ApiModelProperty(hidden = true)
+    private Integer sysType;
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/vo/DiseaseIcdVO.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: 2019/11/8 14:54
+ */
+@Getter
+@Setter
+public class DiseaseIcdVO extends HosCodeVO {
+    private List<String> diseaseNameList;
+    private List<String> conceptDisNameList;
+}

+ 2 - 1
aipt-service/src/main/java/com/diagbot/vo/GetStaticKnowledgeVO.java

@@ -4,6 +4,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -20,5 +21,5 @@ public class GetStaticKnowledgeVO {
     //需要去重的id
     private List<Long> inputIds;
     //指定类型
-    private List<Integer> types;
+    private List<Integer> types = new ArrayList<>();
 }

+ 60 - 0
aipt-service/src/main/java/com/diagbot/vo/GetTopPatientInfoDjVO.java

@@ -0,0 +1,60 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author rgb
+ * @Description
+ * @time 2018年11月19日下午4:58:37
+ */
+@ApiModel(value = "页面顶部病人医生科室信息查询接口传参")
+@Getter
+@Setter
+public class GetTopPatientInfoDjVO {
+
+    /**
+     * 医院编号
+     */
+    @ApiModelProperty(value = "医院编号", required = true)
+    @NotBlank(message = "医院编号必填")
+    private String hospitalCode;
+
+    /**
+     * 子医院编号
+     */
+    @ApiModelProperty(value = "子医院编号")
+    private String sonHospitalCode;
+
+    /**
+     * 医院科室编号
+     */
+    @ApiModelProperty(value = "医院科室编号", required = true)
+    @NotBlank(message = "医院科室编号必填")
+    private String hospitalDeptCode;
+
+    /**
+     * 医院医生编号
+     */
+    @ApiModelProperty(value = "医院医生编号")
+    private String doctorCode;
+
+    /**
+     * 医院患者编号
+     */
+    @ApiModelProperty(value = "医院患者编号", required = true)
+    @NotBlank(message = "医院患者编号必填")
+    private String patientCode;
+
+    /**
+     * 门诊号
+     */
+    @ApiModelProperty(value = "门诊号")
+    private String recordId;
+
+
+}

+ 19 - 0
aipt-service/src/main/java/com/diagbot/vo/PacsConfigVO.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: 2019/11/7 16:09
+ */
+@Getter
+@Setter
+public class PacsConfigVO extends HosCodeVO {
+    private List<String> mealNameList;
+    private List<String> uniqueNameList;
+}

+ 4 - 0
aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -29,4 +29,8 @@ public class RetrievalVO {
     private Integer isStatic = 0;
     //是否显示子项(0.不显示,1.显示)
     private Integer isSonShow = 0;
+    private List<Integer> types; // 指定类型
+    private boolean hasLis = false; // 是否搜索化验
+    private boolean hasGauge = false; // 是否有量表
+    private List<Integer> typesIn; // 共用需要遍历的类型
 }

+ 4 - 0
aipt-service/src/main/java/com/diagbot/vo/SearchVo.java

@@ -1,6 +1,7 @@
 package com.diagbot.vo;
 
 import com.diagbot.dto.LisResult;
+import com.diagbot.dto.PacsResult;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
@@ -32,6 +33,7 @@ public class SearchVo {
     private String lis;
     private List<LisResult> lisArr;
     private String pacs;
+    private List<PacsResult> pacsArr;
     private String diag;
     private String diseaseName; //指定诊断,例如取治疗方案
     private String scaleName;   //量表名称
@@ -45,4 +47,6 @@ public class SearchVo {
     private String lisOrder;   //当前正在下单化验
     private String pacsOrder;   //当前正在下单辅检
     private String otherOrder; //其他
+
+    private String ruleType;   //规则类型
 }

+ 17 - 2
aipt-service/src/main/java/com/diagbot/web/ConceptDetailController.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.ConceptIntroduceDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.ConceptDetailFacade;
 import com.diagbot.vo.ConceptIntroduceVO;
+import com.diagbot.vo.ConnectIntroduceVO;
 import com.diagbot.vo.ExistListByConceptIdsVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,7 +38,7 @@ public class ConceptDetailController {
     @ApiOperation(value = "知识库标准化-获取提示信息[by:zhaops]",
             notes = "name: 标签名称,必填<br>" +
                     "titles: 标题,数组选填<br>" +
-                    "type:标签类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标),单选必填<br>" +
+                    "type:标签类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标,25-手术),单选必填<br>" +
                     "position:1-摘要,2-全文,5-药品说明书,6-不良反应,单选选填")
     @PostMapping("/getConceptDetail")
     @SysLogger("getConceptDetail")
@@ -49,7 +50,7 @@ public class ConceptDetailController {
     @ApiOperation(value = "知识库标准化-批量获取提示信息[by:zhaops]",
             notes = "name: 标签名称,必填<br>" +
                     "titles: 标题,数组选填<br>" +
-                    "type:标签类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标),单选必填<br>" +
+                    "type:标签类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标,25-手术),单选必填<br>" +
                     "position:1-摘要,2-全文,5-药品说明书,6-不良反应,单选选填")
     @PostMapping("/getConceptDetails")
     @SysLogger("getConceptDetails")
@@ -58,6 +59,20 @@ public class ConceptDetailController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "知识库标准化-获取静态知识-对接模式[by:zhaops]",
+            notes = "name: 名称,必填<br>" +
+                    "hosCode: 医院编码,必填<br>" +
+                    "detailName: 明细名称,仅针对化验明细项<br>" +
+                    "titles: 标题,数组选填<br>" +
+                    "type:标签类型(5-化验,6-辅检,7-诊断,8-药品),单选必填<br>" +
+                    "position:1-摘要,2-全文,5-药品说明书,6-不良反应,单选选填")
+    @PostMapping("/getConnectConceptDetails")
+    @SysLogger("getConnectConceptDetails")
+    public RespDTO<List<ConceptIntroduceDTO>> getConnectConceptDetails(@Valid @RequestBody ConnectIntroduceVO connectIntroduceVO) {
+        List<ConceptIntroduceDTO> data = conceptDetailFacade.getConnectConceptDetails(connectIntroduceVO);
+        return RespDTO.onSuc(data);
+    }
+
     @ApiOperation(value = "知识库标准化-获取提示信息存在性[by:zhaops]",
             notes = "name: 标签名称,必填<br>" +
                     "type:标签类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标),单选必填<br>")

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

@@ -0,0 +1,44 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.DictionaryInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DictionaryInfo;
+import com.diagbot.facade.DictionaryFacade;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * icss字典表 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2018-12-25
+ */
+@RequestMapping("/dictionaryInfo")
+@RestController
+@SuppressWarnings("unchecked")
+@Api(value = "字典信息", tags = { "字典信息" })
+public class DictionaryInfoController {
+
+
+    @Autowired
+    DictionaryFacade dictionaryFacade;
+
+    @ApiOperation(value = "返回字典信息[by:zhoutg]",
+            notes = "")
+    @PostMapping("/getList")
+    @SysLogger("getList")
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getList() {
+        Map<Long, List<DictionaryInfoDTO>> data = dictionaryFacade.getList();
+        return RespDTO.onSuc(data);
+    }
+}

+ 9 - 0
aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -2,8 +2,10 @@ package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetTopPatientInfoDTO;
+import com.diagbot.dto.GetTopPatientInfoDjDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PatientInfoFacade;
+import com.diagbot.vo.GetTopPatientInfoDjVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -44,4 +46,11 @@ public class PatientInfoController {
         return RespDTO.onSuc(patientInfoFacade.getTopPatientInfo(getTopPatientInfoVO));
     }
 
+    @ApiOperation(value = "知识库标准化-对接-页面顶部病人医生科室信息——查询[by:rengb]")
+    @PostMapping("/getTopPatientInfoDj")
+    @SysLogger("getTopPatientInfoDj")
+    public RespDTO<GetTopPatientInfoDjDTO> getTopPatientInfoDj(@Valid @RequestBody GetTopPatientInfoDjVO getTopPatientInfoDjVO) {
+        return RespDTO.onSuc(patientInfoFacade.getTopPatientInfoDj(getTopPatientInfoDjVO));
+    }
+
 }

+ 17 - 5
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.client.bean.Treat;
 import com.diagbot.dto.PushDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PushFacade;
@@ -14,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
-import java.util.Map;
 
 /**
  * @Description:推理
@@ -33,6 +33,7 @@ public class PushController {
             notes = "age: 年龄(必填)<br>" +
                     "sex:性别(必填),M:男,F:女<br>" +
                     "symptom:症状,String<br>" +
+                    "pasts:既往史,String<br>" +
                     "other:其它史,String<br>" +
                     "vital:查体,String<br>" +
                     "lis:化验,Array<br>" +
@@ -46,6 +47,10 @@ public class PushController {
                     "lis:otherValue:其他结果,包括阴性阳性,文字描述等,String<br>" +
                     "lis:source:数据来源(必填),Integer<br>" +
                     "pacs:辅检,String<br>" +
+                    "pacsArr:辅检结构化输入,Array<br>" +
+                    "pacsArr:name:辅检项目,String<br>" +
+                    "pacsArr:uniqueName:辅检项目(标准术语名),String<br>" +
+                    "pacsArr:result:辅检结果,String<br>" +
                     "diag:诊断,String<br>" +
                     "featureType:类型(必填),8:治疗方案,String<br>" +
                     "diseaeName:取治疗方案的诊断,String<br>" +
@@ -55,11 +60,12 @@ public class PushController {
                     "lisString:化验纯文本,String<br>" +
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
-                    "otherOrder:其他下单项,多项用分号隔开,String<br>")
+                    "otherOrder:其他下单项,多项用分号隔开,String<br>" +
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/treatment")
     @SysLogger("treatment")
-    public RespDTO<Map<String, Object>> getTreatment(@Valid @RequestBody SearchVo searchVo) {
-        Map<String, Object> data = pushFacade.getTreatment((searchVo));
+    public RespDTO<Treat> getTreatment(@Valid @RequestBody SearchVo searchVo) {
+        Treat data = pushFacade.getTreatment((searchVo));
         return RespDTO.onSuc(data);
     }
 
@@ -67,6 +73,7 @@ public class PushController {
             notes = "age: 年龄(必填)<br>" +
                     "sex:性别(必填),M:男,F:女<br>" +
                     "symptom:症状,String<br>" +
+                    "pasts:既往史,String<br>" +
                     "other:其它史,String<br>" +
                     "vital:查体,String<br>" +
                     "lis:化验,Array<br>" +
@@ -80,6 +87,10 @@ public class PushController {
                     "lis:otherValue:其他结果,包括阴性阳性,文字描述等,String<br>" +
                     "lis:source:数据来源(必填),Integer<br>" +
                     "pacs:辅检,String<br>" +
+                    "pacsArr:辅检结构化输入,Array<br>" +
+                    "pacsArr:name:辅检项目,String<br>" +
+                    "pacsArr:uniqueName:辅检项目(标准术语名),String<br>" +
+                    "pacsArr:result:辅检结果,String<br>" +
                     "diag:诊断,String<br>" +
                     "featureType:类型(必填),1:症状,3:其他史,4:查体结果,42:查体指标,5:化验,6:辅检,7:诊断,22-指标,String<br>" +
                     "disType:诊断类型,1-慢病,2-急诊,普通病不填,Integer<br>" +
@@ -88,7 +99,8 @@ public class PushController {
                     "lisString:化验纯文本,String<br>" +
                     "lisOrder:下单化验项,多项用分号隔开,String<br>" +
                     "pacsOrder:下单辅检项,多项用分号隔开,String<br>" +
-                    "otherOrder:其他下单项,多项用分号隔开,String<br>")
+                    "otherOrder:其他下单项,多项用分号隔开,String<br>" +
+                    "ruleType:规则类型,1:危急值提醒  2:开单合理性  3:管理评估  4:不良反应  5:药物推荐  6:异常值,多项用分号隔开,String<br>")
     @PostMapping("/pushInner")
     @SysLogger("pushInner")
     public RespDTO<PushDTO> pushInner(@Valid @RequestBody SearchVo searchVo) {

+ 31 - 5
aipt-service/src/main/resources/logback-spring.xml

@@ -15,7 +15,7 @@
                     converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
     <!-- 彩色日志格式 -->
     <!--<property name="CONSOLE_LOG_PATTERN"-->
-              <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
+    <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
     <!--包名输出缩进对齐-->
     <property name="CONSOLE_LOG_PATTERN"
               value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
@@ -229,6 +229,22 @@
         </encoder>
     </appender>
 
+    <appender name="LOGSTASHPRE" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.121:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"aipt-service"}</customFields>
+        </encoder>
+    </appender>
+
+    <appender name="LOGSTASHPRO" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.122:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"aipt-service"}</customFields>
+        </encoder>
+    </appender>
+
     <!-- 本地环境下的日志配置 -->
     <springProfile name="local">
         <root level="INFO">
@@ -236,7 +252,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
         </root>
     </springProfile>
@@ -248,7 +263,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHDEV"/>
         </root>
@@ -261,12 +275,23 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHTEST"/>
         </root>
     </springProfile>
 
+    <!-- 预发布环境下的日志配置 -->
+    <springProfile name="pre">
+        <root level="INFO">
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRE"/>
+        </root>
+    </springProfile>
+
     <!-- 生产环境下的日志配置 -->
     <springProfile name="pro">
         <root level="INFO">
@@ -274,7 +299,8 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <appender-ref ref="LOGSTASH"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRO"/>
         </root>
     </springProfile>
 </configuration>

+ 265 - 65
aipt-service/src/main/resources/mapper/ConceptMapper.xml

@@ -222,7 +222,7 @@
                 #{id}
             </foreach>
         </if>
-        AND (t2.spell =  UPPER(#{InputStr}) OR t2.name =  #{InputStr})
+        AND (UPPER(t2.spell) =  UPPER(TRIM(#{InputStr})) OR UPPER(t2.name) =  UPPER(TRIM(#{InputStr})))
         LIMIT 100)
         UNION
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
@@ -259,7 +259,7 @@
                 #{id}
             </foreach>
         </if>
-        AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
+        AND (UPPER(t2.spell) LIKE CONCAT( UPPER(TRIM(#{InputStr})),'%') OR UPPER(t2.name) LIKE CONCAT( UPPER(TRIM(#{InputStr})),'%'))
         LIMIT 100)
         UNION
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
@@ -296,7 +296,7 @@
                 #{id}
             </foreach>
         </if>
-        AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
+        AND (UPPER(t2.spell) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})),'%') OR UPPER(t2.name) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})),'%'))
         LIMIT 100)
         <if test="detailType != null and detailType != ''">
             UNION
@@ -326,7 +326,7 @@
                 AND <![CDATA[ t3.min_age <= #{age} ]]>
                 AND <![CDATA[ t3.max_age >= #{age} ]]>
             </if>
-            AND (t2.spell =  UPPER(#{InputStr}) OR t2.name =  #{InputStr})
+            AND (UPPER(t2.spell) =  UPPER(TRIM(#{InputStr})) OR UPPER(t2.name) =  UPPER(TRIM(#{InputStr})))
             <if test="inputIds != null and inputIds.size > 0">
                 and t1.id not in
                 <foreach item="id" collection="inputIds" open="(" separator="," close=")">
@@ -362,7 +362,7 @@
                 AND <![CDATA[ t3.min_age <= #{age} ]]>
                 AND <![CDATA[ t3.max_age >= #{age} ]]>
             </if>
-            AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
+            AND (UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})),'%') OR UPPER(t2.name) LIKE CONCAT( UPPER(TRIM(#{InputStr})),'%'))
             <if test="inputIds != null and inputIds.size > 0">
                 and t1.id not in
                 <foreach item="id" collection="inputIds" open="(" separator="," close=")">
@@ -401,7 +401,7 @@
                 AND <![CDATA[ t3.min_age <= #{age} ]]>
                 AND <![CDATA[ t3.max_age >= #{age} ]]>
             </if>
-            AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
+            AND (UPPER(t2.spell) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})),'%') OR UPPER(t2.name) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})),'%'))
             <if test="inputIds != null and inputIds.size > 0">
                 and t1.id not in
                 <foreach item="id" collection="inputIds" open="(" separator="," close=")">
@@ -421,6 +421,7 @@
         FROM
             (
                 -- 除化验外其他类型标签
+                <if test="typesIn != null and typesIn.size() > 0">
                 (
                     SELECT
                         b1.*, 0 uniqueId,
@@ -436,30 +437,42 @@
                                         10
                                     WHEN 10 THEN
                                         20
-                                    ELSE
+                                    WHEN 1 THEN
+                                        25
+                                    WHEN 16 THEN
                                         50
+                                    WHEN 25 THEN
+                                        60
+                                    ELSE
+                                        100
                                     END
                                 ) + 1 AS orderNo,
                                 t2.`name` retrievalName,
                                 t2.is_concept showType,
                                 t1.lib_type libTypeId,
-                                t6.`name` libTypeName
+                                CASE t6.`name`
+                                  when '药品通用名' then '药品'
+                                  when '辅检项目' then '辅检'
+                                  ELSE t6.`name`
+                                END libTypeName
                             FROM
                                 kl_concept t1
                             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                            LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                             LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                             LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
                             WHERE
                                 t1.is_deleted = 'N'
                             AND t2.is_deleted = 'N'
-                            AND t3.is_deleted = 'N'
                             AND t6.is_deleted = 'N'
                             AND t7.is_deleted = 'N'
-                            AND t1.lib_type IN (18, 10, 16)
+                            AND t1.lib_type IN
+                            <foreach collection="typesIn" item="item" open="(" close=")"
+                                     separator=",">
+                                #{item}
+                            </foreach>
                             AND (
-                                t2.spell = UPPER(#{InputStr})
-                                OR t2. NAME = (#{InputStr})
+                                UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                                OR UPPER(TRIM(t2. NAME)) = UPPER((TRIM(#{InputStr})))
                             )
                         ) b1
                 )
@@ -479,30 +492,42 @@
                                             10
                                         WHEN 10 THEN
                                             20
-                                        ELSE
+                                        WHEN 1 THEN
+                                            25
+                                        WHEN 16 THEN
                                             50
+                                        WHEN 25 THEN
+                                            60
+                                        ELSE
+                                            100
                                         END
                                     ) + 2 AS orderNo,
                                     t2.`name` retrievalName,
                                     t2.is_concept showType,
                                     t1.lib_type libTypeId,
-                                    t6.`name` libTypeName
+                                    CASE t6.`name`
+                                    when '药品通用名' then '药品'
+                                    when '辅检项目' then '辅检'
+                                    ELSE t6.`name`
+                                    END libTypeName
                                 FROM
                                     kl_concept t1
                                 LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                                 LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t7.is_deleted = 'N'
-                                AND t1.lib_type IN (18, 10, 16)
+                                AND t1.lib_type IN
+                                <foreach collection="typesIn" item="item" open="(" close=")"
+                                         separator=",">
+                                    #{item}
+                                </foreach>
                                 AND (
-                                    t2.spell LIKE CONCAT(UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT((#{InputStr}), '%')
+                                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
                                 )
                             ) b1
                     )
@@ -522,34 +547,51 @@
                                             10
                                         WHEN 10 THEN
                                             20
-                                        ELSE
+                                        WHEN 1 THEN
+                                            25
+                                        WHEN 16 THEN
                                             50
+                                        WHEN 25 THEN
+                                            60
+                                        ELSE
+                                            100
                                         END
                                     ) + 3 AS orderNo,
                                     t2.`name` retrievalName,
                                     t2.is_concept showType,
                                     t1.lib_type libTypeId,
-                                    t6.`name` libTypeName
+                                    CASE t6.`name`
+                                    when '药品通用名' then '药品'
+                                    when '辅检项目' then '辅检'
+                                    ELSE t6.`name`
+                                    END libTypeName
                                 FROM
                                     kl_concept t1
                                 LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                                 LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t7.is_deleted = 'N'
-                                AND t1.lib_type IN (18, 10, 16)
+                                AND t1.lib_type IN
+                                <foreach collection="typesIn" item="item" open="(" close=")"
+                                         separator=",">
+                                    #{item}
+                                </foreach>
                                 AND (
-                                    t2.spell LIKE CONCAT('%', UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT('%',(#{InputStr}), '%')
+                                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
                                 )
                             ) b1
-                    ) -- 化验本体标签公表项匹配静态知识
+                    )
+                </if>
+                -- 化验本体标签公表项匹配静态知识
+                <if test="typesIn != null and typesIn.size() > 0 and hasLis == true">
                 UNION
+                </if>
+                <if test="hasLis == true">
                     (
                         SELECT
                             b2.id conceptId,
@@ -573,17 +615,15 @@
                                 FROM
                                     kl_concept t1
                                 LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 12
                                 AND (
-                                    t2.spell = UPPER(#{InputStr})
-                                    OR t2. NAME = (#{InputStr})
+                                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
                                 )
                             ) b1,
                             kl_concept b2,
@@ -623,17 +663,15 @@
                                 FROM
                                     kl_concept t1
                                 LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 12
                                 AND (
-                                    t2.spell LIKE CONCAT(UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT((#{InputStr}), '%')
+                                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
                                 )
                             ) b1,
                             kl_concept b2,
@@ -673,17 +711,15 @@
                                 FROM
                                     kl_concept t1
                                 LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 12
                                 AND (
-                                    t2.spell LIKE CONCAT('%', UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT('%',(#{InputStr}), '%')
+                                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
                                 )
                             ) b1,
                             kl_concept b2,
@@ -728,18 +764,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell = UPPER(#{InputStr})
-                                    OR t2. NAME = #{InputStr}
+                                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -785,18 +819,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell LIKE CONCAT(UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT(#{InputStr}, '%')
+                                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -842,18 +874,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell LIKE CONCAT('%', UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT('%', #{InputStr}, '%')
+                                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -899,18 +929,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell = UPPER(#{InputStr})
-                                    OR t2. NAME = #{InputStr}
+                                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -956,18 +984,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell LIKE CONCAT(UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT(#{InputStr}, '%')
+                                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -1013,18 +1039,16 @@
                                 LEFT JOIN kl_relation t4 ON t4.end_id = t1.id
                                 LEFT JOIN kl_concept t5 ON t5.id = t4.start_id
                                 LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-                                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
                                 WHERE
                                     t1.is_deleted = 'N'
                                 AND t2.is_deleted = 'N'
-                                AND t3.is_deleted = 'N'
                                 AND t4.is_deleted = 'N'
                                 AND t5.is_deleted = 'N'
                                 AND t6.is_deleted = 'N'
                                 AND t1.lib_type = 13
                                 AND (
-                                    t2.spell LIKE CONCAT('%', UPPER(#{InputStr}), '%')
-                                    OR t2. NAME LIKE CONCAT('%', #{InputStr}, '%')
+                                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                                    OR UPPER(t2. NAME) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
                                 )
                                 AND t4.relation_id = 18
                             ) b1,
@@ -1041,6 +1065,180 @@
                         AND b2.lib_type = 46
                         AND b2.id = b3.concept_id
                     )
+                </if>
+
+                -- 量表匹配静态知识同时搜索诊断有关的量表;
+                <if test="hasGauge == true">
+                    <if test="typesIn != null and typesIn.size() > 0 or hasLis == true">
+                    union
+                    </if>
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    71 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+                    )
+                    ) b1,
+                    kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+                    UNION
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    72 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                    OR UPPER(t2. NAME) LIKE CONCAT(UPPER(TRIM(#{InputStr})), '%')
+                    )
+                    ) b1,
+                    kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+                    UNION
+                    (
+                    SELECT
+                    b1.selfId conceptId,
+                    b1.selfName `name`,
+                    73 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    b1.showType showType,
+                    b1.libTypeId libTypeId,
+                    b1.libTypeName libTypeName,
+                    b1.selfId uniqueId,
+                    b1.selfName uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 48
+                    AND (
+                    UPPER(t2.spell) LIKE CONCAT('%', UPPER(TRIM(#{InputStr})), '%')
+                    OR UPPER(t2. NAME) LIKE CONCAT('%',UPPER(TRIM(#{InputStr})), '%')
+                    )
+                    ) b1
+                    ,kl_scale b2
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b1.selfId = b2.concept_id
+                    )
+
+
+                    UNION
+                    (
+                    SELECT distinct
+                    b2.id conceptId,
+                    b2.lib_name `name`,
+                    74 AS orderNo,
+                    b1.retrievalName retrievalName,
+                    0 showType,
+                    b2.lib_type libTypeId,
+                    '量表' libTypeName,
+                    b2.id uniqueId,
+                    b2.lib_name uniqueName
+                    FROM
+                    (
+                    SELECT
+                    t1.id selfId,
+                    t1.lib_name selfName,
+                    t2.`name` retrievalName,
+                    t2.is_concept showType,
+                    t1.lib_type libTypeId,
+                    t6.`name` libTypeName
+                    FROM
+                    kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = 18
+                    AND (
+                    UPPER(t2.spell) = UPPER(TRIM(#{InputStr}))
+                    OR UPPER(t2. NAME) = UPPER(TRIM(#{InputStr}))
+                    )
+                    ) b1
+                    , kl_concept b2, kl_relation b3, kl_scale b4
+                    WHERE
+                    b2.is_deleted = 'N'
+                    AND b3.is_deleted = 'N'
+                    AND b4.is_deleted = 'N'
+                    AND b1.selfId = b3.start_id
+                    AND b2.id = b3.end_id
+                    AND b2.id = b4.concept_id
+                    )
+                </if>
+
             ) a1
         ORDER BY
             a1.orderNo ASC,
@@ -1085,7 +1283,9 @@
         SELECT DISTINCT b.id concept_id,b.lib_name name  FROM `kl_library_info` a, kl_concept b
         where a.is_deleted = 'N' and b.is_deleted = 'N'
         and a.concept_id = b.id
-        and a.`name` like concat('%',#{name},'%') and a.type_id = #{libType} and b.lib_type = #{libType}
+        and (UPPER(TRIM(a.`name`)) like concat('%',UPPER(TRIM(#{name})),'%')
+        or UPPER(TRIM(a.`spell`)) like concat('%',UPPER(TRIM(#{name})),'%'))
+        and a.type_id = #{libType} and b.lib_type = #{libType}
     </select>
 
 </mapper>

+ 21 - 0
aipt-service/src/main/resources/mapper/DictionaryInfoMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.DictionaryInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.DictionaryInfo">
+        <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="group_type" property="groupType" />
+        <result column="name" property="name" />
+        <result column="val" property="val" />
+        <result column="return_type" property="returnType" />
+        <result column="order_no" property="orderNo" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 6 - 6
aipt-service/src/main/resources/mapper/DisScaleMapper.xml

@@ -11,7 +11,7 @@
                 SELECT a.name search_name,b.id concept_id,b.lib_name name,a.is_concept as show_type, 0 as from_dis
                 FROM `kl_library_info` a, kl_concept b
                 where a.is_deleted = 'N' and b.is_deleted = 'N' and a.concept_id = b.id
-                and a.`name` = #{name}
+                and UPPER(TRIM(a.`name`)) = UPPER(TRIM(#{name}))
                 and b.lib_type = #{endType}
             )
             union
@@ -19,7 +19,7 @@
             SELECT a.name search_name,b.id concept_id,b.lib_name name,a.is_concept as show_type, 0 as from_dis
             FROM `kl_library_info` a, kl_concept b
             where a.is_deleted = 'N' and b.is_deleted = 'N' and a.concept_id = b.id
-            and a.`name` like concat (#{name},'%')
+            and UPPER(TRIM(a.`name`)) like concat (UPPER(TRIM(#{name})),'%')
             and b.lib_type = #{endType}
             )
             union
@@ -27,7 +27,7 @@
             SELECT a.name search_name,b.id concept_id,b.lib_name name,a.is_concept as show_type, 0 as from_dis
             FROM `kl_library_info` a, kl_concept b
             where a.is_deleted = 'N' and b.is_deleted = 'N' and a.concept_id = b.id
-            and a.`name` like concat ('%',#{name},'%')
+            and UPPER(TRIM(a.`name`)) like concat ('%',UPPER(TRIM(#{name})),'%')
             and b.lib_type = #{endType}
             )
 
@@ -52,7 +52,7 @@
                     AND t1.id = t2.start_id
                     AND t3.id = t2.end_id
                     <if test="name != null and name != ''">
-                        AND t1.lib_name LIKE  concat ('%',#{name},'%')
+                        AND UPPER(TRIM(t1.lib_name)) LIKE  concat ('%',UPPER(TRIM(#{name})),'%')
                     </if>
                     <if test="startType != null">
                         AND t1.lib_type = #{startType}
@@ -68,9 +68,9 @@
         ) s
         where 1 = 1
         <if test="filterName != null and filterName.size > 0">
-            and s.name not in
+            and TRIM(s.name) not in
             <foreach item="item" collection="filterName" open="(" separator="," close=")">
-                #{item}
+                TRIM(#{item})
             </foreach>
         </if>
 

+ 1 - 1
aipt-service/src/main/resources/mapper/EvaluationMapper.xml

@@ -31,7 +31,7 @@
 		WHERE a.is_deleted = "N"
 		AND b.lib_type = 18
 		<if test="evaluationModule.diseaseName != null">
-		AND b.lib_name  LIKE CONCAT('%', #{evaluationModule.diseaseName}, '%')
+		AND b.lib_name = #{evaluationModule.diseaseName}
 		</if>
 	</select>
 </mapper>

+ 5 - 5
bi-service/pom.xml

@@ -75,10 +75,10 @@
         </dependency>
 
         <!-- zipkin-->
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-zipkin</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
 
         <!--swagger-->
         <dependency>
@@ -185,7 +185,7 @@
                         </resource>
                     </resources>
                     <serverId>docker-registry</serverId>
-                    <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+                    <registryUrl>${registryUrl}</registryUrl>
                 </configuration>
             </plugin>
         </plugins>

+ 2 - 0
bi-service/src/main/java/com/diagbot/BiServiceApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -26,6 +27,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 @EnableHystrix
 @EnableCircuitBreaker
 @RefreshScope
+@ConfigurationPropertiesScan
 public class BiServiceApplication {
 
     public static void main(String[] args) {

+ 6 - 41
bi-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,24 +1,17 @@
 package com.diagbot.aop;
 
-import com.diagbot.annotation.SysLogger;
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.enums.SysTypeEnum;
 import com.diagbot.rabbit.MySender;
-import com.diagbot.util.GsonUtil;
-import com.diagbot.util.HttpUtils;
-import com.diagbot.util.StringUtil;
-import com.diagbot.util.UserUtils;
+import com.diagbot.util.AopUtil;
 import org.aspectj.lang.JoinPoint;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.stereotype.Component;
 
-import java.lang.reflect.Method;
-import java.util.Date;
-
 /**
  * @Description: 日志拦截切面
  * @author: gaodm
@@ -26,6 +19,7 @@ import java.util.Date;
  */
 @Aspect
 @Component
+@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
 public class SysLoggerAspect {
     @Autowired
     private MySender mySender;
@@ -37,37 +31,8 @@ public class SysLoggerAspect {
 
     @Before("loggerPointCut()")
     public void saveSysLog(JoinPoint joinPoint) {
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        Method method = signature.getMethod();
-
-        SysLog sysLog = new SysLog();
-        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
-        if (sysLogger != null) {
-            //注解上的描述
-            sysLog.setOperation(sysLogger.value());
-        }
-        //请求的方法名
-        String className = joinPoint.getTarget().getClass().getName();
-        String methodName = signature.getName();
-        sysLog.setMethod(className + "." + methodName + "()");
-        //请求的参数
-        Object[] args = joinPoint.getArgs();
-        String params = "";
-        for (Object o : args) {
-            params += GsonUtil.toJson(o);
-        }
-        if (!StringUtil.isEmpty(params)) {
-            sysLog.setParams(params);
-        }
-        //设置IP地址
-        sysLog.setIp(HttpUtils.getIpAddress());
-        //用户名
-        String username = UserUtils.getCurrentPrinciple();
-        if (!StringUtil.isEmpty(username)) {
-            sysLog.setUsername(username);
-        }
-        sysLog.setGmtCreate(new Date());
-        sysLog.setSysType(SysTypeEnum.BI_SERVICE.getKey());
+        //入参设置
+        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.BI_SERVICE.getKey());
         //保存系统日志
         mySender.outputLogSend(sysLog);
     }

+ 4 - 0
bi-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -23,6 +23,10 @@ public class MybatisPlusConfigurer {
     @Bean
     public PaginationInterceptor paginationInterceptor() {
         PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(500L);
         return paginationInterceptor;
     }
 

+ 1 - 1
bi-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -1,6 +1,6 @@
 package com.diagbot.rabbit;
 
-import com.diagbot.entity.SysLog;
+import com.diagbot.biz.log.entity.SysLog;
 import com.diagbot.util.GsonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;

+ 31 - 5
bi-service/src/main/resources/logback-spring.xml

@@ -15,7 +15,7 @@
                     converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
     <!-- 彩色日志格式 -->
     <!--<property name="CONSOLE_LOG_PATTERN"-->
-              <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
+    <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
     <!--包名输出缩进对齐-->
     <property name="CONSOLE_LOG_PATTERN"
               value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
@@ -229,6 +229,22 @@
         </encoder>
     </appender>
 
+    <appender name="LOGSTASHPRE" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.121:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"bi-service"}</customFields>
+        </encoder>
+    </appender>
+
+    <appender name="LOGSTASHPRO" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.122:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"bi-service"}</customFields>
+        </encoder>
+    </appender>
+
     <!-- 本地环境下的日志配置 -->
     <springProfile name="local">
         <root level="INFO">
@@ -236,7 +252,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
         </root>
     </springProfile>
@@ -248,7 +263,6 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHDEV"/>
         </root>
@@ -261,12 +275,23 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <!-- 生产环境将请stdout去掉 -->
             <appender-ref ref="STDOUT"/>
             <appender-ref ref="LOGSTASHTEST"/>
         </root>
     </springProfile>
 
+    <!-- 预发布环境下的日志配置 -->
+    <springProfile name="pre">
+        <root level="INFO">
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRE"/>
+        </root>
+    </springProfile>
+
     <!-- 生产环境下的日志配置 -->
     <springProfile name="pro">
         <root level="INFO">
@@ -274,7 +299,8 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <appender-ref ref="LOGSTASH"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRO"/>
         </root>
     </springProfile>
 </configuration>

+ 18 - 10
common/pom.xml

@@ -18,6 +18,8 @@
         <java.version>1.8</java.version>
         <maven.compiler.source>1.8</maven.compiler.source>
         <maven.compiler.target>1.8</maven.compiler.target>
+        <docker.image.prefix>192.168.2.236:5000/diagbotcloud</docker.image.prefix>
+        <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
     </properties>
     <dependencies>
         <dependency>
@@ -37,7 +39,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-webmvc</artifactId>
-            <version>5.1.9.RELEASE</version>
+            <version>5.2.1.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
@@ -51,35 +53,35 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
-            <version>5.1.6.RELEASE</version>
+            <version>5.2.1.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.security.oauth</groupId>
             <artifactId>spring-security-oauth2</artifactId>
-            <version>2.3.6.RELEASE</version>
+            <version>2.4.0.RELEASE</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.7.28</version>
+            <version>1.7.29</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
-            <version>2.8.5</version>
+            <version>2.8.6</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>1.2.61</version>
+            <version>1.2.62</version>
             <scope>compile</scope>
         </dependency>
 
@@ -87,14 +89,14 @@
         <dependency>
             <groupId>org.apache.poi</groupId>
             <artifactId>poi</artifactId>
-            <version>4.1.0</version>
+            <version>4.1.1</version>
             <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.poi</groupId>
             <artifactId>poi-ooxml</artifactId>
-            <version>4.1.0</version>
+            <version>4.1.1</version>
             <scope>provided</scope>
         </dependency>
 
@@ -112,6 +114,12 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.9.5</version>
+        </dependency>
+
         <!--<dependency>-->
             <!--<groupId>com.fasterxml.jackson.core</groupId>-->
             <!--<artifactId>jackson-core</artifactId>-->
@@ -137,7 +145,7 @@
                 <artifactId>docker-maven-plugin</artifactId>
                 <version>1.1.1</version>
                 <configuration>
-                    <imageName>192.168.2.236:5000/diagbotcloud/${project.artifactId}:${project.version}</imageName>
+                    <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
                     <pushImage>true</pushImage>
                     <!--<forceTags>true</forceTags>-->
                     <!--镜像的FROM,使用java官方镜像-->
@@ -151,7 +159,7 @@
                         </resource>
                     </resources>
                     <serverId>docker-registry</serverId>
-                    <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
+                    <registryUrl>${registryUrl}</registryUrl>
                 </configuration>
             </plugin>
         </plugins>

+ 19 - 0
common/src/main/java/com/diagbot/annotation/BiLogger.java

@@ -0,0 +1,19 @@
+package com.diagbot.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Description: BI统计注解
+ * @author: gaodm
+ * @time: 2019/11/11 11:46
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BiLogger {
+    String value() default "";
+}

+ 19 - 0
common/src/main/java/com/diagbot/annotation/BiLoggerResult.java

@@ -0,0 +1,19 @@
+package com.diagbot.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @Description: BI统计注解结果太大需特殊处理
+ * @author: gaodm
+ * @time: 2019/11/11 11:46
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface BiLoggerResult {
+    String value() default "";
+}

+ 101 - 0
common/src/main/java/com/diagbot/biz/log/entity/BiRecord.java

@@ -0,0 +1,101 @@
+package com.diagbot.biz.log.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @Description: BI记录实体类
+ * @author: gaodm
+ * @time: 2019/11/11 14:27
+ */
+@Getter
+@Setter
+public class BiRecord {
+
+    /**
+     * 日志ID
+     */
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院编码
+     */
+    private String hospitalCode;
+
+    /**
+     * 医院医生编码
+     */
+    private String doctorCode;
+
+    /**
+     * 医院科室编码
+     */
+    private String deptCode;
+
+    /**
+     * 医院患者编码
+     */
+    private String patientCode;
+
+    /**
+     * 产品类型(1:云平台内部;2:云平台外部;3:icss;4:智能分诊;5:页面推送模式;6:智能预问诊;7:数据引擎模式)
+     */
+    private Integer productType;
+
+    /**
+     * 功能编码
+     */
+    private String code;
+
+    /**
+     * 输入参数
+     */
+    private String params;
+
+    /**
+     * 返回参数
+     */
+    private String result;
+
+    /**
+     * 响应时间
+     */
+    private String execTime;
+
+    /**
+     * 调用是否成功(0:失败;1:成功)
+     */
+    private Integer successFlag;
+
+    /**
+     * 来源(1:后台接口-无处理;2:后台接口-结果特殊处理;3:前端)
+     */
+    private Integer source;
+}

+ 82 - 0
common/src/main/java/com/diagbot/biz/log/entity/SysLog.java

@@ -0,0 +1,82 @@
+package com.diagbot.biz.log.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统操作日志表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-14
+ */
+@Getter
+@Setter
+public class SysLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志ID
+     */
+    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;
+
+    /**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+    private Integer sysType;
+
+    /**
+     * 方法
+     */
+    private String method;
+
+    /**
+     * 操作名
+     */
+    private String operation;
+
+    /**
+     * 参数
+     */
+    private String params;
+
+    /**
+     * 用户名
+     */
+    private String username;
+}

+ 49 - 0
common/src/main/java/com/diagbot/enums/BiSourceEnum.java

@@ -0,0 +1,49 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description: 产品类型
+ * @author: gaodm
+ * @time: 2018/9/14 9:15
+ */
+public enum BiSourceEnum implements KeyedNamed {
+    BI_NORMAL(1, "后台接口-无处理"),
+    BI_RESULT(2, "后台接口-结果特殊处理"),
+    FRONT(3, "前端");
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    BiSourceEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static BiSourceEnum getEnum(int key) {
+        for (BiSourceEnum item : BiSourceEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        BiSourceEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 2 - 1
common/src/main/java/com/diagbot/enums/ProductTypeEnum.java

@@ -14,7 +14,8 @@ public enum ProductTypeEnum implements KeyedNamed {
     ICSS(3, "ICSS"),
     TRIAGE(4, "智能分诊"),
     DATA(5, "页面推送模式"),
-    PREC(6, "智能预问诊");
+    PREC(6, "智能预问诊"),
+    LTAPI(7, "数据引擎模式");
     @Setter
     private int key;
 

+ 2 - 1
common/src/main/java/com/diagbot/enums/VisibleIdTypeEnum.java

@@ -12,7 +12,8 @@ public enum VisibleIdTypeEnum implements KeyedNamed {
     IS_IMG_VER(1, "图片验证码"),
     IS_ORDER(2, "订单编号"),
     IS_RENEWALS(3,"续费单号"),
-    IS_AUTH(4,"认证申请单号");
+    IS_AUTH(4,"认证申请单号"),
+    PATIENT_NO(5,"病人自动编号");
 
     @Setter
     private int key;

+ 330 - 0
common/src/main/java/com/diagbot/util/AopUtil.java

@@ -0,0 +1,330 @@
+package com.diagbot.util;
+
+import com.diagbot.annotation.BiLogger;
+import com.diagbot.annotation.BiLoggerResult;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.annotation.SysLoggerExport;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.enums.BiSourceEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.biz.log.entity.BiRecord;
+import com.diagbot.biz.log.entity.SysLog;
+import com.diagbot.vo.BaseBiVO;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.validation.BindException;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/11/12 18:17
+ */
+public class AopUtil {
+    /**
+     * SysLoggerAspect入参设置
+     *
+     * @param joinPoint
+     * @param sysType
+     */
+    public static SysLog sysLoggerAspect(JoinPoint joinPoint, Integer sysType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLogger sysLogger = method.getAnnotation(SysLogger.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += FastJsonUtils.getBeanToJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(sysType);
+        return sysLog;
+    }
+
+    /**
+     * SysLoggerExprotAspect入参设置
+     *
+     * @param joinPoint
+     * @param sysType
+     */
+    public static SysLog sysLoggerExprotAspect(JoinPoint joinPoint, Integer sysType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+
+        SysLog sysLog = new SysLog();
+        SysLoggerExport sysLogger = method.getAnnotation(SysLoggerExport.class);
+        if (sysLogger != null) {
+            //注解上的描述
+            sysLog.setOperation(sysLogger.value());
+        }
+        //请求的方法名
+        String className = joinPoint.getTarget().getClass().getName();
+        String methodName = signature.getName();
+        sysLog.setMethod(className + "." + methodName + "()");
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            params += FastJsonUtils.getBeanToJson(o);
+            break;
+        }
+        if (!StringUtil.isEmpty(params)) {
+            sysLog.setParams(params);
+        }
+        //设置IP地址
+        sysLog.setIp(HttpUtils.getIpAddress());
+        //用户名
+        String username = UserUtils.getCurrentPrinciple();
+        if (!StringUtil.isEmpty(username)) {
+            sysLog.setUsername(username);
+        }
+        sysLog.setGmtCreate(new Date());
+        sysLog.setSysType(sysType);
+        return sysLog;
+    }
+
+    /**
+     * Bi日志有返回值处理(普通)
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @param productType
+     * @return
+     * @throws Throwable
+     */
+    public static Object biLoggerAspect(BiRecord biRecord, ProceedingJoinPoint joinPoint,
+                                        Integer productType) throws Throwable {
+        long start = System.currentTimeMillis();
+        Object object = joinPoint.proceed();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_NORMAL.getKey())) {
+            biRecord = null;
+            return object;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(object);
+        if (!StringUtil.isEmpty(result)) {
+            biRecord.setResult(result);
+        }
+        biRecord.setSuccessFlag(1);
+        long execTime = System.currentTimeMillis() - start;
+        biRecord.setExecTime(String.valueOf(execTime));
+        return object;
+    }
+
+    /**
+     * Bi日志异常统一处理(普通)
+     *
+     * @param joinPoint
+     * @param ex
+     * @param productType
+     * @return
+     */
+    public static BiRecord biLoggerAspectThrow(JoinPoint joinPoint, Throwable ex, Integer productType) {
+        BiRecord biRecord = new BiRecord();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_NORMAL.getKey())) {
+            return null;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(handleException((Exception) ex));
+        biRecord.setResult(result);
+        biRecord.setSuccessFlag(0);
+        return biRecord;
+    }
+
+    /**
+     * Bi日志有返回值处理(特殊)
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @param productType
+     * @return
+     * @throws Throwable
+     */
+    public static Object biLoggerResultAspect(BiRecord biRecord, ProceedingJoinPoint joinPoint,
+                                              Integer productType) throws Throwable {
+        long start = System.currentTimeMillis();
+        Object object = joinPoint.proceed();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_RESULT.getKey())) {
+            biRecord = null;
+            return object;
+        }
+        //出参设置
+        String result = "";
+        if (object instanceof RespDTO) {
+            RespDTO respDTO = (RespDTO) object;
+            RespDTO rs = new RespDTO();
+            rs.code = respDTO.code;
+            rs.msg = respDTO.msg;
+            rs.data = new Object();
+            result = FastJsonUtils.getBeanToJson(rs);
+        } else {
+            result = FastJsonUtils.getBeanToJson(object);
+        }
+        if (!StringUtil.isEmpty(result)) {
+            biRecord.setResult(result);
+        }
+        biRecord.setSuccessFlag(1);
+        long execTime = System.currentTimeMillis() - start;
+        biRecord.setExecTime(String.valueOf(execTime));
+        return object;
+    }
+
+    /**
+     * Bi日志异常统一处理(特殊)
+     *
+     * @param joinPoint
+     * @param ex
+     * @param productType
+     * @return
+     */
+    public static BiRecord biLoggerResultAspectThrow(JoinPoint joinPoint, Throwable ex, Integer productType) {
+        BiRecord biRecord = new BiRecord();
+        if (!biRecordSet(biRecord, joinPoint, productType, BiSourceEnum.BI_RESULT.getKey())) {
+            return null;
+        }
+        //出参设置
+        String result = "";
+        result = FastJsonUtils.getBeanToJson(handleException((Exception) ex));
+        biRecord.setResult(result);
+        biRecord.setSuccessFlag(0);
+        return biRecord;
+    }
+
+    /**
+     * 消息设定
+     *
+     * @param biRecord
+     * @param joinPoint
+     * @return 是否可以继续下去
+     */
+    private static Boolean biRecordSet(BiRecord biRecord, JoinPoint joinPoint,
+                                       Integer productType, Integer biSourceType) {
+        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+        Method method = signature.getMethod();
+        //请求的参数
+        Object[] args = joinPoint.getArgs();
+        String params = "";
+        for (Object o : args) {
+            if (o instanceof BaseBiVO) {
+                BaseBiVO baseBiVO = (BaseBiVO) o;
+                if (StringUtil.isBlank(baseBiVO.getHospitalCode())) {
+                    if (StringUtil.isNotBlank(baseBiVO.getHosCode())) {
+                        BeanUtil.copyProperties(baseBiVO, biRecord);
+                        biRecord.setHospitalCode(baseBiVO.getHosCode());
+                    } else {
+                        return false;
+                    }
+                } else {
+                    BeanUtil.copyProperties(baseBiVO, biRecord);
+                }
+            }
+            params += FastJsonUtils.getBeanToJson(o);
+        }
+        if (!StringUtil.isEmpty(params)) {
+            biRecord.setParams(params);
+        }
+
+        //设置功能编码
+        if (biSourceType.equals(BiSourceEnum.BI_NORMAL.getKey())) {
+            BiLogger biLogger = method.getAnnotation(BiLogger.class);
+            if (biLogger != null) {
+                //注解上的描述
+                biRecord.setCode(biLogger.value());
+            }
+        } else if (biSourceType.equals(BiSourceEnum.BI_RESULT.getKey())) {
+            BiLoggerResult biLoggerResult = method.getAnnotation(BiLoggerResult.class);
+            if (biLoggerResult != null) {
+                //注解上的描述
+                biRecord.setCode(biLoggerResult.value());
+            }
+        } else {
+            return false;
+        }
+        biRecord.setGmtCreate(new Date());
+        biRecord.setProductType(productType);
+        biRecord.setSource(biSourceType);
+        return true;
+    }
+
+    /**
+     * 抛错信息处理
+     *
+     * @param e
+     * @return 结果参数
+     */
+    private static RespDTO handleException(Exception e) {
+        RespDTO resp = new RespDTO();
+        if (e instanceof BindException) {
+            BindException ex = (BindException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof MethodArgumentNotValidException) {
+            MethodArgumentNotValidException ex = (MethodArgumentNotValidException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof MissingServletRequestParameterException) {
+            MissingServletRequestParameterException ex = (MissingServletRequestParameterException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            stringMap.put(ex.getParameterName(), "不能为null");
+            String msg = FastJsonUtils.getBeanToJson(stringMap);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return resp;
+        }
+        if (e instanceof CommonException) {
+            CommonException taiChiException = (CommonException) e;
+            resp.code = taiChiException.getCode();
+            resp.msg = e.getMessage();
+            return resp;
+        }
+        resp.code = CommonErrorCode.FAIL.getCode();
+        resp.msg = e.getMessage();
+        return resp;
+    }
+}

+ 93 - 0
common/src/main/java/com/diagbot/util/IdCard.java

@@ -0,0 +1,93 @@
+package com.diagbot.util;
+
+import java.util.Calendar;
+
+/**
+ * @Description:
+ * @author: rengb
+ * @time: 2019/11/20 13:18
+ */
+public class IdCard {
+    /**
+     * 中国公民身份证号码最小长度。
+     */
+    public final int CHINA_ID_MIN_LENGTH = 15;
+
+    /**
+     * 中国公民身份证号码最大长度。
+     */
+    public final int CHINA_ID_MAX_LENGTH = 18;
+
+    /**
+     * 根据身份编号获取年龄
+     *
+     * @param idCard 身份编号
+     * @return 年龄
+     */
+    public static int getAgeByIdCard(String idCard) {
+        int iAge = 0;
+        Calendar cal = Calendar.getInstance();
+        String year = idCard.substring(6, 10);
+        int iCurrYear = cal.get(Calendar.YEAR);
+        iAge = iCurrYear - Integer.valueOf(year);
+        return iAge;
+    }
+
+    /**
+     * 根据身份编号获取生日
+     *
+     * @param idCard 身份编号
+     * @return 生日(yyyyMMdd)
+     */
+    public static String getBirthByIdCard(String idCard) {
+        return idCard.substring(6, 14);
+    }
+
+    /**
+     * 根据身份编号获取生日年
+     *
+     * @param idCard 身份编号
+     * @return 生日(yyyy)
+     */
+    public static Short getYearByIdCard(String idCard) {
+        return Short.valueOf(idCard.substring(6, 10));
+    }
+
+    /**
+     * 根据身份编号获取生日月
+     *
+     * @param idCard 身份编号
+     * @return 生日(MM)
+     */
+    public static Short getMonthByIdCard(String idCard) {
+        return Short.valueOf(idCard.substring(10, 12));
+    }
+
+    /**
+     * 根据身份编号获取生日天
+     *
+     * @param idCard 身份编号
+     * @return 生日(dd)
+     */
+    public static Short getDateByIdCard(String idCard) {
+        return Short.valueOf(idCard.substring(12, 14));
+    }
+
+    /**
+     * 根据身份编号获取性别
+     *
+     * @param idCard 身份编号
+     * @return 性别(1- 男 ,2 - 女 , 0 - 未知)
+     */
+    public static int getGenderByIdCard(String idCard) {
+        int sGender = 0;
+
+        String sCardNum = idCard.substring(16, 17);
+        if (Integer.parseInt(sCardNum) % 2 != 0) {
+            sGender = 1;//男
+        } else {
+            sGender = 2;//女
+        }
+        return sGender;
+    }
+}

+ 24 - 0
common/src/main/java/com/diagbot/vo/BaseBiVO.java

@@ -0,0 +1,24 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: BI统计基础VO
+ * @author: gaodm
+ * @time: 2019/11/11 11:42
+ */
+@Getter
+@Setter
+public class BaseBiVO {
+    //医院编码
+    private String hospitalCode;
+    //医生编码
+    private String doctorCode;
+    //科室编码
+    private String deptCode;
+    //医院患者编码
+    private String patientCode;
+    //医院编码(不用传)
+    private String hosCode;
+}

+ 2 - 0
config-server/src/main/java/com/diagbot/ConfigServerApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration;
+import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
 import org.springframework.cloud.config.server.EnableConfigServer;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 
@@ -18,6 +19,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
         JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
 @EnableConfigServer
 @EnableEurekaClient
+@ConfigurationPropertiesScan
 public class ConfigServerApplication {
 
     public static void main(String[] args) {

+ 31 - 2
config-server/src/main/resources/logback-spring.xml

@@ -15,7 +15,7 @@
                     converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
     <!-- 彩色日志格式 -->
     <!--<property name="CONSOLE_LOG_PATTERN"-->
-              <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
+    <!--value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(-&#45;&#45;){faint} %clr([%15.15t]){faint} %clr(%logger){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>-->
     <!--包名输出缩进对齐-->
     <property name="CONSOLE_LOG_PATTERN"
               value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
@@ -229,6 +229,22 @@
         </encoder>
     </appender>
 
+    <appender name="LOGSTASHPRE" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.121:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"config-server"}</customFields>
+        </encoder>
+    </appender>
+
+    <appender name="LOGSTASHPRO" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>192.168.2.122:5044</destination>
+        <!-- encoder必须配置,有多种可选 -->
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
+            <customFields>{"appname":"config-server"}</customFields>
+        </encoder>
+    </appender>
+
     <!-- 本地环境下的日志配置 -->
     <springProfile name="native">
         <root level="INFO">
@@ -277,6 +293,18 @@
         </root>
     </springProfile>
 
+    <!-- 预发布环境下的日志配置 -->
+    <springProfile name="pre">
+        <root level="INFO">
+            <appender-ref ref="ERROR"/>
+            <appender-ref ref="WARN"/>
+            <appender-ref ref="INFO"/>
+            <appender-ref ref="DEBUG"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRE"/>
+        </root>
+    </springProfile>
+
     <!-- 生产环境下的日志配置 -->
     <springProfile name="pro">
         <root level="INFO">
@@ -284,7 +312,8 @@
             <appender-ref ref="WARN"/>
             <appender-ref ref="INFO"/>
             <appender-ref ref="DEBUG"/>
-            <appender-ref ref="LOGSTASH"/>
+            <appender-ref ref="STDOUT"/>
+            <appender-ref ref="LOGSTASHPRO"/>
         </root>
     </springProfile>
 </configuration>

+ 38 - 0
config-server/src/main/resources/shared/admin-service-pre.yml

@@ -0,0 +1,38 @@
+server:
+  port: 9998
+
+#spring:
+#  boot:
+#    admin:
+#      routes:
+#        endpoints: env,metrics,dump,jolokia,info,configprops,trace,logfile,refresh,flyway,liquibase,heapdump,loggers,auditevents,hystrix.stream,activiti
+#      turbine:
+#        clusters: default
+#        location: monitor-service
+
+security2:
+  user:
+    name: "admin"
+    password: "123456"
+
+
+spring:
+  profiles: pre
+  security:
+    user:
+      name: ${security2.user.name}
+      password: ${security2.user.password}
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+eureka:
+  instance:
+    metadata-map:
+      user.name: ${security2.user.name}
+      user.password: ${security2.user.password}

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

@@ -24,7 +24,7 @@ spring:
       password: ${security2.user.password}
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone

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

@@ -17,7 +17,7 @@ security2:
 
 
 spring:
-  profiles: dev
+  profiles: test
   #  security:
   #    user:
   #      name: ${security2.user.name}

+ 106 - 0
config-server/src/main/resources/shared/aipt-service-pre.yml

@@ -0,0 +1,106 @@
+server:
+  port: 8845
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.121:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: teamback
+      password: goTulmLeon
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      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:
+          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/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+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
+
+io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
+
+ai:
+  server:
+    address: http://192.168.2.186:5008
+
+nlp:
+  server:
+    address: http://192.168.2.186:5002

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.122:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息
@@ -59,7 +59,7 @@ spring:
 
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone
@@ -99,8 +99,8 @@ io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
 
 ai:
   server:
-    address: http://192.168.2.234:5008
+    address: http://192.168.2.123:5008
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.2.123:5002

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

@@ -99,8 +99,8 @@ io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
 
 ai:
   server:
-    address: http://192.168.2.234:5008
+    address: http://192.168.2.241:5008
 
 nlp:
   server:
-    address: http://192.168.2.234:5002
+    address: http://192.168.2.241:5002

+ 7 - 1
config-server/src/main/resources/shared/application-dev.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-local.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 78 - 0
config-server/src/main/resources/shared/application-pre.yml

@@ -0,0 +1,78 @@
+#logging:
+#  level:
+#    org.springframework.security: INFO
+
+hystrix:
+  command:
+    default:
+      execution:
+        isolation:
+          thread:
+            timeoutInMilliseconds: 20000
+
+ribbon:
+  ReadTimeout: 20000
+  ConnectTimeout: 20000
+  MaxAutoRetries: 0
+  MaxAutoRetriesNextServer: 1
+
+eureka:
+  instance:
+    prefer-ip-address: true #使用IP注册
+    instance-id: ${spring.cloud.client.ip-address}:${server.port}
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health #2.0后actuator的地址发生了变化
+  client:
+    registryFetchIntervalSeconds: 5
+#    serviceUrl:
+#      defaultZone: http://eureka1:8761/eureka/
+
+#endpoints:
+#  health:
+#    sensitive: false
+#    enabled: true
+#  actuator:
+#    enabled: true
+#    sensitive: false
+#  beans:
+#    sensitive: false
+#    enabled: true
+
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: bus-refresh,health,info,hystrix.stream
+      cors:
+        allowed-origins: "*"
+        allowed-methods: "*"
+  endpoint:
+    health:
+      show-details: always
+feign:
+  hystrix:
+    enabled: true
+
+spring:
+  #消息总线
+  cloud:
+    bus:
+      enabled: true
+      trace:
+        enabled: true
+  jackson:
+    date-format: yyyy-MM-dd HH:mm:ss
+    time-zone: GMT+8
+
+server:
+  max-http-header-size: 10MB
+
+swagger:
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 6 - 0
config-server/src/main/resources/shared/application-pro.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
   enable: false

+ 7 - 1
config-server/src/main/resources/shared/application-test.yml

@@ -69,4 +69,10 @@ server:
   max-http-header-size: 10MB
 
 swagger:
-  enable: true
+  enable: true
+
+syslog:
+  enable: true
+
+bilog:
+  enable: false

+ 102 - 0
config-server/src/main/resources/shared/bi-service-pre.yml

@@ -0,0 +1,102 @@
+server:
+  port: 8841
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.121:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: teamback
+      password: goTulmLeon
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      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:
+          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/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+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
+
+io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
+
+neo:
+  server:
+    address: http://192.168.2.186:5004

+ 3 - 3
config-server/src/main/resources/shared/bi-service-pro.yml

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.122:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息
@@ -59,7 +59,7 @@ spring:
 
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone
@@ -99,4 +99,4 @@ io.github.lvyahui8.spring.base-packages: com.diagbot.aggregate
 
 neo:
   server:
-    address: http://192.168.2.234:5004
+    address: http://192.168.2.123:5004

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

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

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

@@ -9,6 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
 
   #mq
   rabbitmq:

+ 23 - 0
config-server/src/main/resources/shared/data-service-pre.yml

@@ -0,0 +1,23 @@
+server:
+  port: 8823
+
+# 驱动配置信息
+spring:
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+        outputBiLog:
+          destination: myBiLog
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+

+ 3 - 1
config-server/src/main/resources/shared/data-service-pro.yml

@@ -9,10 +9,12 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+      outputBiLog:
+        destination: myBiLog
 
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone

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

@@ -9,7 +9,8 @@ spring:
         outputLog:
           destination: myLog
   #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
-
+        outputBiLog:
+          destination: myBiLog
   #mq
   rabbitmq:
     host: 192.168.2.241

+ 97 - 0
config-server/src/main/resources/shared/diagbotman-service-pre.yml

@@ -0,0 +1,97 @@
+server:
+  port: 8811
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.121:3306/sys-diagbotman?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: teamback
+      password: goTulmLeon
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      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:
+          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/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+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
+

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-diagbotman?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.122:3306/sys-diagbotman?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息
@@ -59,7 +59,7 @@ spring:
 
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone

+ 96 - 0
config-server/src/main/resources/shared/feedback-service-pre.yml

@@ -0,0 +1,96 @@
+server:
+  port: 8831
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://192.168.2.121:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: teamback
+      password: goTulmLeon
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      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:
+          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/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+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

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

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.236:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://192.168.2.122:3306/sys-log?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: lantone
       # 连接池的配置信息
@@ -59,7 +59,7 @@ spring:
 
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone

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

@@ -0,0 +1,137 @@
+spring:
+  #mq
+  rabbitmq:
+    host: 192.168.2.121
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+    #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+    gateway:
+      default-filters:
+      routes:
+      - id: user-service
+        uri: lb://user-service
+        predicates:
+        - Path=/api/user/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: logger-service
+        uri: lb://logger-service
+        predicates:
+        - Path=/api/log/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: bi-service
+        uri: lb://bi-service
+        predicates:
+        - Path=/api/bi/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: diagbotman-service
+        uri: lb://diagbotman-service
+        predicates:
+        - Path=/api/diagbotman/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: feedback-service
+        uri: lb://feedback-service
+        predicates:
+        - Path=/api/feedback/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: triage-service
+        uri: lb://triage-service
+        predicates:
+        - Path=/api/triage/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icss-service
+        uri: lb://icss-service
+        predicates:
+        - Path=/api/icss/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: icssman-service
+        uri: lb://icssman-service
+        predicates:
+        - Path=/api/icssman/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: knowledgeman-service
+        uri: lb://knowledgeman-service
+        predicates:
+        - Path=/api/knowledgeman/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: prec-service
+        uri: lb://prec-service
+        predicates:
+        - Path=/api/prec/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: tran-service
+        uri: lb://tran-service
+        predicates:
+        - Path=/api/tran/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: aipt-service
+        uri: lb://aipt-service
+        predicates:
+        - Path=/api/aipt/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: data-service
+        uri: lb://data-service
+        predicates:
+        - Path=/api/data/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: ltapi-service
+        uri: lb://ltapi-service
+        predicates:
+        - Path=/api/ltapi/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: precman-service
+        uri: lb://precman-service
+        predicates:
+        - Path=/api/precman/**
+        filters:
+#        - SwaggerHeaderFilter
+        - StripPrefix=2
+      - id: precold-service
+        uri: lb://precold-service
+        predicates:
+        - Path=/api/precold/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
+
+server:
+  port: 5050
+
+lantone:
+  product: triagett,143;icsstt,2
+

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

@@ -1,7 +1,7 @@
 spring:
   #mq
   rabbitmq:
-    host: 192.168.2.236
+    host: 192.168.2.122
     port: 5672
     username: lantone
     password: lantone
@@ -21,70 +21,63 @@ spring:
         predicates:
         - Path=/api/user/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: logger-service
         uri: lb://logger-service
         predicates:
         - Path=/api/log/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: bi-service
         uri: lb://bi-service
         predicates:
         - Path=/api/bi/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: diagbotman-service
         uri: lb://diagbotman-service
         predicates:
         - Path=/api/diagbotman/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: feedback-service
         uri: lb://feedback-service
         predicates:
         - Path=/api/feedback/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: triage-service
         uri: lb://triage-service
         predicates:
         - Path=/api/triage/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: icss-service
         uri: lb://icss-service
         predicates:
         - Path=/api/icss/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: icssman-service
         uri: lb://icssman-service
         predicates:
         - Path=/api/icssman/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: knowledgeman-service
         uri: lb://knowledgeman-service
         predicates:
         - Path=/api/knowledgeman/**
         filters:
-#        - SwaggerHeaderFilter
-        - StripPrefix=2
-      - id: tran-service
-        uri: lb://tran-service
-        predicates:
-        - Path=/api/tran/**
-        filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: prec-service
         uri: lb://prec-service
@@ -93,38 +86,45 @@ spring:
         filters:
         #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: tran-service
+        uri: lb://tran-service
+        predicates:
+        - Path=/api/tran/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
       - id: aipt-service
         uri: lb://aipt-service
         predicates:
         - Path=/api/aipt/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: data-service
         uri: lb://data-service
         predicates:
         - Path=/api/data/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: ltapi-service
         uri: lb://ltapi-service
         predicates:
         - Path=/api/ltapi/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
       - id: precman-service
         uri: lb://precman-service
         predicates:
         - Path=/api/precman/**
         filters:
-#        - SwaggerHeaderFilter
+        #        - SwaggerHeaderFilter
         - StripPrefix=2
 
 server:
   port: 5050
 
 lantone:
-  product: triage,1;icss,2
+  product: triagett,143;icsstt,2
 

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


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů