浏览代码

初始化代码

攻心小虫 2 年之前
当前提交
36fd4302de
共有 100 个文件被更改,包括 5869 次插入0 次删除
  1. 27 0
      .gitignore
  2. 263 0
      pom.xml
  3. 1 0
      src/.gitignore
  4. 32 0
      src/main/java/com/diagbot/CdssApplication.java
  5. 585 0
      src/main/java/com/diagbot/aggregate/AssembleAggregate.java
  6. 281 0
      src/main/java/com/diagbot/aggregate/AssemblePushAggregate.java
  7. 19 0
      src/main/java/com/diagbot/annotation/CdssLog.java
  8. 19 0
      src/main/java/com/diagbot/annotation/TokenAuth.java
  9. 30 0
      src/main/java/com/diagbot/client/AuthServiceClient.java
  10. 271 0
      src/main/java/com/diagbot/client/CdssCoreClient.java
  11. 31 0
      src/main/java/com/diagbot/client/MrqcClient.java
  12. 34 0
      src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java
  13. 362 0
      src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java
  14. 35 0
      src/main/java/com/diagbot/client/hystrix/MrqcHystrix.java
  15. 29 0
      src/main/java/com/diagbot/config/CacheDeleteInit.java
  16. 30 0
      src/main/java/com/diagbot/config/CorsConfiguer.java
  17. 19 0
      src/main/java/com/diagbot/config/CustomAccessTokenConverter.java
  18. 30 0
      src/main/java/com/diagbot/config/CustomTokenEnhancer.java
  19. 15 0
      src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java
  20. 19 0
      src/main/java/com/diagbot/config/IdcConfigurer.java
  21. 33 0
      src/main/java/com/diagbot/config/MultipartConfigurer.java
  22. 39 0
      src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  23. 96 0
      src/main/java/com/diagbot/config/OAuth2Configurer.java
  24. 204 0
      src/main/java/com/diagbot/config/RedisConfigurer.java
  25. 175 0
      src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  26. 75 0
      src/main/java/com/diagbot/config/SwaggerConfigurer.java
  27. 69 0
      src/main/java/com/diagbot/config/WebSecurityConfigurer.java
  28. 223 0
      src/main/java/com/diagbot/config/mybatisLike/AbstractLikeSqlConverter.java
  29. 79 0
      src/main/java/com/diagbot/config/mybatisLike/MapLikeSqlConverter.java
  30. 160 0
      src/main/java/com/diagbot/config/mybatisLike/MybatisLikeSqlInterceptor.java
  31. 28 0
      src/main/java/com/diagbot/config/mybatisLike/ObjectLikeSqlConverter.java
  32. 199 0
      src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  33. 29 0
      src/main/java/com/diagbot/config/security/UrlConfigAttribute.java
  34. 79 0
      src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java
  35. 40 0
      src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java
  36. 23 0
      src/main/java/com/diagbot/dto/AnalyzeRunDTO.java
  37. 25 0
      src/main/java/com/diagbot/dto/BillMsg.java
  38. 43 0
      src/main/java/com/diagbot/dto/ConceptDetailDTO.java
  39. 61 0
      src/main/java/com/diagbot/dto/ConceptInfoDTO.java
  40. 17 0
      src/main/java/com/diagbot/dto/ConceptScaleDTO.java
  41. 107 0
      src/main/java/com/diagbot/dto/ConceptScaleDetailDTO.java
  42. 18 0
      src/main/java/com/diagbot/dto/ConceptScaleSubDTO.java
  43. 48 0
      src/main/java/com/diagbot/dto/DictionaryInfoDTO.java
  44. 36 0
      src/main/java/com/diagbot/dto/DisclaimerInfoDTO.java
  45. 15 0
      src/main/java/com/diagbot/dto/DiseaseIndexDTO.java
  46. 24 0
      src/main/java/com/diagbot/dto/DiseaseInfoDTO.java
  47. 33 0
      src/main/java/com/diagbot/dto/DrugInfoDTO.java
  48. 28 0
      src/main/java/com/diagbot/dto/FileDTO.java
  49. 17 0
      src/main/java/com/diagbot/dto/FileDeleteDTO.java
  50. 25 0
      src/main/java/com/diagbot/dto/FileUploadDTO.java
  51. 46 0
      src/main/java/com/diagbot/dto/GetAllForRelationDTO.java
  52. 49 0
      src/main/java/com/diagbot/dto/HospitalInfoDTO.java
  53. 72 0
      src/main/java/com/diagbot/dto/HospitalInfoGetDTO.java
  54. 35 0
      src/main/java/com/diagbot/dto/HospitalLoginDTO.java
  55. 30 0
      src/main/java/com/diagbot/dto/HospitalRelationDTO.java
  56. 27 0
      src/main/java/com/diagbot/dto/HospitalRelationErrorDTO.java
  57. 32 0
      src/main/java/com/diagbot/dto/IndexBatchDTO.java
  58. 27 0
      src/main/java/com/diagbot/dto/IndicationDTO.java
  59. 18 0
      src/main/java/com/diagbot/dto/JwtDTO.java
  60. 43 0
      src/main/java/com/diagbot/dto/KlConceptDetailDTO.java
  61. 63 0
      src/main/java/com/diagbot/dto/KlConceptStaticDTO.java
  62. 27 0
      src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java
  63. 32 0
      src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java
  64. 65 0
      src/main/java/com/diagbot/dto/KlRuleInfoDTO.java
  65. 38 0
      src/main/java/com/diagbot/dto/KllisDetailDTO.java
  66. 51 0
      src/main/java/com/diagbot/dto/LisDetailDTO.java
  67. 20 0
      src/main/java/com/diagbot/dto/LoginDTO.java
  68. 57 0
      src/main/java/com/diagbot/dto/MsgDTO.java
  69. 19 0
      src/main/java/com/diagbot/dto/NurseInfoDTO.java
  70. 23 0
      src/main/java/com/diagbot/dto/OperationInfoDTO.java
  71. 20 0
      src/main/java/com/diagbot/dto/PermissionDTO.java
  72. 62 0
      src/main/java/com/diagbot/dto/PlanDetailDTO.java
  73. 34 0
      src/main/java/com/diagbot/dto/PlanInfoDefaultDTO.java
  74. 41 0
      src/main/java/com/diagbot/dto/PlanInfoPageDTO.java
  75. 28 0
      src/main/java/com/diagbot/dto/PushBaseDTO.java
  76. 45 0
      src/main/java/com/diagbot/dto/PushDTO.java
  77. 23 0
      src/main/java/com/diagbot/dto/PushPlanDTO.java
  78. 30 0
      src/main/java/com/diagbot/dto/PushPlanDetailDTO.java
  79. 20 0
      src/main/java/com/diagbot/dto/PushPlansDTO.java
  80. 18 0
      src/main/java/com/diagbot/dto/PushScaleDTO.java
  81. 17 0
      src/main/java/com/diagbot/dto/RetrievalConceptDTO.java
  82. 64 0
      src/main/java/com/diagbot/dto/RetrievalDTO.java
  83. 28 0
      src/main/java/com/diagbot/dto/RuleBaseDTO.java
  84. 24 0
      src/main/java/com/diagbot/dto/RuleConditionDTO.java
  85. 21 0
      src/main/java/com/diagbot/dto/RuleDTO.java
  86. 19 0
      src/main/java/com/diagbot/dto/RuleQueryDTO.java
  87. 20 0
      src/main/java/com/diagbot/dto/ScaleInfoDTO.java
  88. 50 0
      src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java
  89. 43 0
      src/main/java/com/diagbot/dto/StaticKnowledgeDetailDTO.java
  90. 22 0
      src/main/java/com/diagbot/dto/StaticKnowledgeHISDTO.java
  91. 71 0
      src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java
  92. 28 0
      src/main/java/com/diagbot/dto/StaticKnowledgeIndexPageDTO.java
  93. 33 0
      src/main/java/com/diagbot/dto/SysPlanInfoDTO.java
  94. 23 0
      src/main/java/com/diagbot/dto/TcmDTO.java
  95. 24 0
      src/main/java/com/diagbot/dto/TcmdiseaseInfoDTO.java
  96. 24 0
      src/main/java/com/diagbot/dto/TcmsyndromeInfoDTO.java
  97. 32 0
      src/main/java/com/diagbot/dto/TemplateInfoDTO.java
  98. 31 0
      src/main/java/com/diagbot/dto/TemplateInfoPageDTO.java
  99. 20 0
      src/main/java/com/diagbot/dto/TermConceptDTO.java
  100. 0 0
      src/main/java/com/diagbot/dto/TestcaseInfoDTO.java

+ 27 - 0
.gitignore

@@ -0,0 +1,27 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/logs/
+/doc/

+ 263 - 0
pom.xml

@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.diagbot</groupId>
+    <artifactId>cdss</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>cdss</name>
+    <description>临床决策支持系统</description>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.1.RELEASE</version>
+        <relativePath/>
+    </parent>
+
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
+        <mybatis-plus-boot-starter.version>3.2.0</mybatis-plus-boot-starter.version>
+        <mybatis-spring-boot.version>2.1.1</mybatis-spring-boot.version>
+        <druid.version>1.1.21</druid.version>
+        <swagger.version>2.9.2</swagger.version>
+        <easypoi.version>4.2.0</easypoi.version>
+        <docker-maven-plugin.version>1.2.1</docker-maven-plugin.version>
+        <aggregator.version>1.1.3</aggregator.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jolokia</groupId>
+            <artifactId>jolokia-core</artifactId>
+        </dependency>
+
+        <!-- 开启web-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+
+        <!-- 开启feign-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+
+        <!-- dashboard -->
+        <!-- actuator-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <!--hystrix-dashboard-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
+        </dependency>
+        <!--hystrix -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
+        </dependency>
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <!--database-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <!--security-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-oauth2</artifactId>
+        </dependency>
+
+        <!-- easypoi -->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>${easypoi.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <!-- mybatis-plus begin -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>${mybatis-plus-boot-starter.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>${mybatis-plus-boot-starter.version}</version>
+        </dependency>
+        <!-- mybatis-plus end -->
+
+        <!-- 阿里巴巴druid数据库连接池 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- springboot整合mybatis(核心就这一个) -->
+        <!-- 注意顺序,这个一定要放在最下面 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis-spring-boot.version}</version>
+        </dependency>
+
+        <!--redis设置-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+
+        <!-- 文件上传相关架包 -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>io.github.lvyahui8</groupId>
+            <artifactId>spring-boot-data-aggregator-starter</artifactId>
+            <version>${aggregator.version}</version>
+        </dependency>
+
+    </dependencies>
+
+   
+
+    <build>
+       <plugins>
+			<plugin>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy-dependencies</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>${project.build.directory}/lib</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>package</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<resources>
+								<resource>
+									<directory>src/main/resources</directory>
+								</resource>
+							</resources>
+							<outputDirectory>${project.build.directory}/resources</outputDirectory>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<exclude>mapper</exclude>
+						<exclude>*.**</exclude>
+						<exclude>**/*.xml</exclude>
+						<exclude>**/*.yml</exclude>
+					</excludes>
+					<archive>
+						<manifest>
+							<mainClass>${main-class}</mainClass>
+							<addClasspath>true</addClasspath>
+							<classpathPrefix>lib/</classpathPrefix>
+							<useUniqueVersions>false</useUniqueVersions>
+						</manifest>
+					</archive>
+					<outputDirectory>${project.build.directory}</outputDirectory>
+				</configuration>
+			</plugin>
+		</plugins>
+    </build>
+
+</project>

+ 1 - 0
src/.gitignore

@@ -0,0 +1 @@
+/test/

+ 32 - 0
src/main/java/com/diagbot/CdssApplication.java

@@ -0,0 +1,32 @@
+package com.diagbot;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+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.netflix.hystrix.EnableHystrix;
+import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+
+
+/**
+ * @Description: 病历质控系统启动文件
+ * @author: gaodm
+ * @time: 2018/8/7 9:26
+ */
+@EnableHystrix
+@EnableCircuitBreaker
+@EnableHystrixDashboard
+@ConfigurationPropertiesScan
+@EnableFeignClients({ "com.diagbot.client" })
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+public class CdssApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(CdssApplication.class, args);
+    }
+}

+ 585 - 0
src/main/java/com/diagbot/aggregate/AssembleAggregate.java

@@ -0,0 +1,585 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.facade.MappingConfigFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.ReflectUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.Drug;
+import com.diagbot.vo.ItemExt;
+import com.diagbot.vo.SearchData;
+import com.google.common.collect.Lists;
+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.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/8/19 13:18
+ */
+@Component
+public class AssembleAggregate {
+    @Autowired
+    private MappingConfigFacade mappingConfigFacade;
+
+    @DataProvider("assembleDataAll")
+    public SearchData assembleDataAll(
+            @InvokeParameter("searchData") SearchData searchData,
+            @DataConsumer("lisConfigMap") Map<String, Map<String, Map<String, List<String>>>> lisConfigMap,
+            @DataConsumer("pacsConfigMap") Map<String, Map<String, Map<String, List<String>>>> pacsConfigMap,
+            @DataConsumer("diagConfigMap") Map<String, Map<String, Map<String, List<String>>>> diagConfigMap,
+            @DataConsumer("drugConfigMap") Map<String, Map<String, Map<String, List<String>>>> drugConfigMap,
+            @DataConsumer("operationConfigMap") Map<String, Map<String, Map<String, List<String>>>> operationConfigMap,
+            @DataConsumer("deptConfigMap") Map<String, Map<String, Map<String, List<String>>>> deptConfigMap,
+            @DataConsumer("transfusionConfigMap") Map<String, Map<String, Map<String, List<String>>>> transfusionConfigMap,
+            @DataConsumer("routeConfigMap") Map<String, Map<String, Map<String, List<String>>>> routeConfigMap) {
+        //检验
+        if (MapUtils.isNotEmpty(lisConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getLis())) {
+                List<Lis> convertLis = addUniqueName(searchData.getLis(), lisConfigMap, ConceptTypeEnum.LisPack.getKey());
+                searchData.setLis(convertLis);
+            }
+            if (ListUtil.isNotEmpty(searchData.getLisOrder())) {
+                List<Lis> convertLis = addUniqueName(searchData.getLisOrder(), lisConfigMap, ConceptTypeEnum.LisPack.getKey());
+                searchData.setLisOrder(convertLis);
+            }
+        }
+        //检查
+        if (MapUtils.isNotEmpty(pacsConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getPacs())) {
+                List<Pacs> convertPacs = addUniqueName(searchData.getPacs(), pacsConfigMap, ConceptTypeEnum.Pacs.getKey());
+                searchData.setPacs(convertPacs);
+            }
+            if (ListUtil.isNotEmpty(searchData.getPacsOrder())) {
+                List<Pacs> convertPacs = addUniqueName(searchData.getPacsOrder(), pacsConfigMap, ConceptTypeEnum.Pacs.getKey());
+                searchData.setPacsOrder(convertPacs);
+            }
+        }
+        //诊断
+        if (MapUtils.isNotEmpty(diagConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getDiag())) {
+                List<Item> convertItem = addUniqueName(searchData.getDiag(), diagConfigMap, ConceptTypeEnum.Disease.getKey());
+                searchData.setDiag(convertItem);
+            }
+            if (ListUtil.isNotEmpty(searchData.getDiagOrder())) {
+                List<Item> convertItem = addUniqueName(searchData.getDiagOrder(), diagConfigMap, ConceptTypeEnum.Disease.getKey());
+                searchData.setDiagOrder(convertItem);
+            }
+            if (searchData.getDiseaseName() != null
+                    && StringUtil.isNotBlank(searchData.getDiseaseName().getName())) {
+                List<Item> convertItem = addUniqueName(Lists.newArrayList(searchData.getDiseaseName()), diagConfigMap, ConceptTypeEnum.Disease.getKey());
+                searchData.setDiseaseName(convertItem.get(0));
+            }
+        }
+        //药品
+        if (MapUtils.isNotEmpty(drugConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getDrug())) {
+                List<Drug> convertItem = addUniqueName(searchData.getDrug(), drugConfigMap, ConceptTypeEnum.Drug.getKey());
+                searchData.setDrug(convertItem);
+            }
+            if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
+                List<Drug> convertItem = addUniqueName(searchData.getDrugOrder(), drugConfigMap, ConceptTypeEnum.Drug.getKey());
+                searchData.setDrugOrder(convertItem);
+            }
+        }
+        //给药途径,没有映射的数据标准术语名称赋值成医院术语名称
+        //if (MapUtils.isNotEmpty(routeConfigMap)) {
+        if (ListUtil.isNotEmpty(searchData.getDrug())) {
+            List<Drug> convertItem = addUniqueName(searchData.getDrug(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
+            searchData.setDrug(convertItem);
+        }
+        if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
+            List<Drug> convertItem = addUniqueName(searchData.getDrugOrder(), routeConfigMap, ConceptTypeEnum.AdministrationRoute.getKey(), "routeName", "routeUniqueName");
+            searchData.setDrugOrder(convertItem);
+        }
+        //}
+
+        //手术
+        if (MapUtils.isNotEmpty(operationConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getOperation())) {
+                List<Item> convertItem = addUniqueName(searchData.getOperation(), operationConfigMap, ConceptTypeEnum.Operation.getKey());
+                searchData.setOperation(convertItem);
+            }
+            if (ListUtil.isNotEmpty(searchData.getOperationOrder())) {
+                List<Item> convertItem = addUniqueName(searchData.getOperationOrder(), operationConfigMap, ConceptTypeEnum.Operation.getKey());
+                searchData.setOperationOrder(convertItem);
+            }
+            if (searchData.getOperationName() != null
+                    && StringUtil.isNotBlank(searchData.getOperationName().getName())) {
+                List<Item> convertItem = addUniqueName(Lists.newArrayList(searchData.getOperationName()), operationConfigMap, ConceptTypeEnum.Operation.getKey());
+                searchData.setOperationName(convertItem.get(0));
+            }
+        }
+        //科室
+        if (MapUtils.isNotEmpty(deptConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getDept())) {
+                List<Item> convertItem = addUniqueName(searchData.getDept(), deptConfigMap, ConceptTypeEnum.Dept.getKey());
+                searchData.setDept(convertItem);
+            }
+        }
+        //输血
+        if (MapUtils.isNotEmpty(transfusionConfigMap)) {
+            if (ListUtil.isNotEmpty(searchData.getTransfusion())) {
+                List<ItemExt> convertItem = addUniqueName(searchData.getTransfusion(), transfusionConfigMap, ConceptTypeEnum.Transfusion.getKey());
+                searchData.setTransfusion(convertItem);
+            }
+            if (ListUtil.isNotEmpty(searchData.getTransfusionOrder())) {
+                List<ItemExt> convertItem = addUniqueName(searchData.getTransfusionOrder(), transfusionConfigMap, ConceptTypeEnum.Transfusion.getKey());
+                searchData.setTransfusionOrder(convertItem);
+            }
+        }
+        return searchData;
+    }
+
+    @DataProvider("lisConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> lisConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //化验公表转换
+        List<String> lisHisNameList = Lists.newArrayList();
+        //lis
+        if (ListUtil.isNotEmpty(searchData.getLis())) {
+            lisHisNameList.addAll(searchData.getLis()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //lisOrder
+        if (ListUtil.isNotEmpty(searchData.getLisOrder())) {
+            lisHisNameList.addAll(searchData.getLisOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        lisHisNameList = lisHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> lisConfigMap = new HashMap<>();
+
+        if (ListUtil.isNotEmpty(lisHisNameList)) {
+            lisConfigMap
+                    = mappingConfigFacade.groupByHisNameWithName(lisHisNameList, ConceptTypeEnum.LisPack.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return lisConfigMap;
+    }
+
+    @DataProvider("pacsConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> pacsConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //辅检公表转换
+        List<String> pacsHisNameList = Lists.newArrayList();
+        //pacs
+        if (ListUtil.isNotEmpty(searchData.getPacs())) {
+            pacsHisNameList.addAll(searchData.getPacs()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //pacsOrder
+        if (ListUtil.isNotEmpty(searchData.getPacsOrder())) {
+            pacsHisNameList.addAll(searchData.getPacsOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        pacsHisNameList = pacsHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> pacsConfigMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(pacsHisNameList)) {
+            pacsConfigMap
+                    = mappingConfigFacade.groupByHisNameWithName(pacsHisNameList, ConceptTypeEnum.Pacs.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return pacsConfigMap;
+    }
+
+    @DataProvider("diagConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> diagConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //诊断公表转换
+        List<String> diagHisNameList = Lists.newArrayList();
+        //diag
+        if (ListUtil.isNotEmpty(searchData.getDiag())) {
+            diagHisNameList.addAll(searchData.getDiag()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //diagOrder
+        if (ListUtil.isNotEmpty(searchData.getDiagOrder())) {
+            diagHisNameList.addAll(searchData.getDiagOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //diseaseName
+        if (searchData.getDiseaseName() != null
+                && StringUtil.isNotBlank(searchData.getDiseaseName().getName())) {
+            diagHisNameList.add(searchData.getDiseaseName().getName());
+        }
+        diagHisNameList = diagHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(diagHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(diagHisNameList, ConceptTypeEnum.Disease.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    @DataProvider("drugConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> drugConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //药品公表转换
+        List<String> drugHisNameList = Lists.newArrayList();
+        //drug
+        if (ListUtil.isNotEmpty(searchData.getDrug())) {
+            drugHisNameList.addAll(searchData.getDrug()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //drugOrder
+        if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
+            drugHisNameList.addAll(searchData.getDrugOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        drugHisNameList = drugHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(drugHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(drugHisNameList, ConceptTypeEnum.Drug.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    @DataProvider("operationConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> operationConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //手术公表转换
+        List<String> operationHisNameList = Lists.newArrayList();
+        //operation
+        if (ListUtil.isNotEmpty(searchData.getOperation())) {
+            operationHisNameList.addAll(searchData.getOperation()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //operationOrder
+        if (ListUtil.isNotEmpty(searchData.getOperationOrder())) {
+            operationHisNameList.addAll(searchData.getOperationOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //operationName
+        if (searchData.getOperationName() != null
+                && StringUtil.isNotBlank(searchData.getOperationName().getName())) {
+            operationHisNameList.add(searchData.getOperationName().getName());
+        }
+        operationHisNameList = operationHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(operationHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(operationHisNameList, ConceptTypeEnum.Operation.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    @DataProvider("deptConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> deptConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //科室公表转换
+        List<String> deptHisNameList = Lists.newArrayList();
+        //dept
+        if (ListUtil.isNotEmpty(searchData.getDept())) {
+            deptHisNameList.addAll(searchData.getDept()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        deptHisNameList = deptHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+
+        if (ListUtil.isNotEmpty(deptHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(deptHisNameList, ConceptTypeEnum.Dept.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    @DataProvider("transfusionConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> transfusionConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //输血公表转换
+        List<String> transfusionHisNameList = Lists.newArrayList();
+        //transfusion
+        if (ListUtil.isNotEmpty(searchData.getTransfusion())) {
+            transfusionHisNameList.addAll(searchData.getTransfusion()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        //transfusionOrder
+        if (ListUtil.isNotEmpty(searchData.getTransfusionOrder())) {
+            transfusionHisNameList.addAll(searchData.getTransfusionOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList()));
+        }
+        transfusionHisNameList = transfusionHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+
+        if (ListUtil.isNotEmpty(transfusionHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(transfusionHisNameList, ConceptTypeEnum.Transfusion.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    @DataProvider("routeConfigMap")
+    public Map<String, Map<String, Map<String, List<String>>>> routeConfigMap(@InvokeParameter("searchData") SearchData searchData) {
+        //药品给药途径公表转换
+        List<String> routeHisNameList = Lists.newArrayList();
+        //drug
+        if (ListUtil.isNotEmpty(searchData.getDrug())) {
+            routeHisNameList.addAll(searchData.getDrug()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getRouteName()) || StringUtil.isNotBlank(i.getRouteUniqueName()))
+                    .map(i -> i.getRouteName())
+                    .collect(Collectors.toList()));
+        }
+        //drugOrder
+        if (ListUtil.isNotEmpty(searchData.getDrugOrder())) {
+            routeHisNameList.addAll(searchData.getDrugOrder()
+                    .stream()
+                    .filter(i -> StringUtil.isNotBlank(i.getRouteName()) || StringUtil.isNotBlank(i.getRouteUniqueName()))
+                    .map(i -> i.getRouteName())
+                    .collect(Collectors.toList()));
+        }
+        routeHisNameList = routeHisNameList
+                .stream()
+                .distinct()
+                .collect(Collectors.toList());
+
+        Map<String, Map<String, Map<String, List<String>>>> configMap = new HashMap<>();
+        if (ListUtil.isNotEmpty(routeHisNameList)) {
+            configMap
+                    = mappingConfigFacade.groupByHisNameWithName(routeHisNameList, ConceptTypeEnum.AdministrationRoute.getKey(), searchData.getHospitalId(), StatusEnum.Enable.getKey());
+        }
+        return configMap;
+    }
+
+    /**
+     * 标准名称转换
+     *
+     * @param list
+     * @param configMap
+     * @param type
+     * @param <T>
+     * @return
+     */
+    public <T> List<T> addUniqueName(List<T> list, Map<String, Map<String, Map<String, List<String>>>> configMap, Integer type) {
+        List<T> retList = new ArrayList<>();
+        if (ListUtil.isEmpty(list)) {
+            return list;
+        }
+        if (configMap == null || configMap.size() == 0) {
+            return list;
+        }
+
+        try {
+            for (T item : list) {
+                String name = ReflectUtil.getProperty(item, "name");
+                if (StringUtil.isBlank(name)) {
+                    retList.add(item);
+                    continue;
+                }
+
+                String uniqueName = ReflectUtil.getProperty(item, "uniqueName");
+                if (StringUtil.isNotBlank(uniqueName)) {
+                    retList.add(item);
+                    continue;
+                }
+
+                String hisDetailName = "";
+                if (type.equals(ConceptTypeEnum.LisPack.getKey())) {
+                    hisDetailName = ReflectUtil.getProperty(item, "detailName");
+                    if (StringUtil.isBlank(hisDetailName)) {
+                        hisDetailName = "";
+                    }
+                }
+
+                if (configMap.containsKey(name)) {
+                    Map<String, Map<String, List<String>>> subMap = configMap.get(name);
+                    if (subMap.containsKey(hisDetailName)) {
+                        if (type.equals(ConceptTypeEnum.Drug.getKey())) {
+                            if (MapUtils.isNotEmpty(subMap.get(hisDetailName))) {
+                                for (Map.Entry<String, List<String>> thirdEntry : subMap.get(hisDetailName).entrySet()) {
+                                    if (ListUtil.isNotEmpty(thirdEntry.getValue())) {
+                                        for (String form : thirdEntry.getValue()) {
+                                            T o = (T) item.getClass().newInstance();
+                                            BeanUtil.copyProperties(item, o);
+                                            Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
+                                            setUniqueName.invoke(o, thirdEntry.getKey());
+                                            Method setForm = o.getClass().getMethod("setForm", String.class);
+                                            setForm.invoke(o, form);
+                                            retList.add(o);
+                                        }
+                                    } else {
+                                        T o = (T) item.getClass().newInstance();
+                                        BeanUtil.copyProperties(item, o);
+                                        Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
+                                        setUniqueName.invoke(o, thirdEntry.getKey());
+                                        retList.add(o);
+                                    }
+                                }
+                            } else {
+                                retList.add(item);
+                            }
+                        } else {
+                            List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
+                            if (ListUtil.isNotEmpty(standNames)) {
+                                for (String stdName : standNames) {
+                                    T o = (T) item.getClass().newInstance();
+                                    BeanUtil.copyProperties(item, o);
+                                    Method setUniqueName = o.getClass().getMethod("setUniqueName", String.class);
+                                    setUniqueName.invoke(o, stdName);
+                                    retList.add(o);
+                                }
+                            } else {
+                                retList.add(item);
+                            }
+                        }
+                    } else {
+                        retList.add(item);
+                    }
+                } else {
+                    retList.add(item);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return retList;
+    }
+
+    /**
+     * 标准名称转换,指定字段
+     *
+     * @param list
+     * @param configMap
+     * @param type
+     * @param <T>
+     * @return
+     */
+    public <T> List<T> addUniqueName(List<T> list, Map<String, Map<String, Map<String, List<String>>>> configMap, Integer type,
+                                     String fieldName, String uniqueFieldName) {
+        List<T> retList = new ArrayList<>();
+        if (ListUtil.isEmpty(list)) {
+            return list;
+        }
+
+        if (configMap == null) {
+            configMap = new HashMap<>();
+        }
+
+        try {
+            for (T item : list) {
+                String name = ReflectUtil.getProperty(item, fieldName);
+                if (StringUtil.isBlank(name)) {
+                    retList.add(item);
+                    continue;
+                }
+
+                String uniqueName = ReflectUtil.getProperty(item, uniqueFieldName);
+                if (StringUtil.isNotBlank(uniqueName)) {
+                    retList.add(item);
+                    continue;
+                }
+
+                String hisDetailName = "";
+
+                if (configMap.containsKey(name)) {
+                    Map<String, Map<String, List<String>>> subMap = configMap.get(name);
+                    if (subMap.containsKey(hisDetailName)) {
+                        List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
+                        //映射关系没找到,uniqueName赋值成name
+                        if (ListUtil.isEmpty(standNames)) {
+                            T o = (T) item.getClass().newInstance();
+                            BeanUtil.copyProperties(item, o);
+                            Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
+                            setUniqueName.invoke(o, name);
+                            retList.add(o);
+                        } else {
+                            for (String stdName : standNames) {
+                                T o = (T) item.getClass().newInstance();
+                                BeanUtil.copyProperties(item, o);
+                                Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
+                                setUniqueName.invoke(o, stdName);
+                                retList.add(o);
+                            }
+                        }
+                    } else {
+                        retList.add(item);
+                    }
+                } else {
+                    T o = (T) item.getClass().newInstance();
+                    BeanUtil.copyProperties(item, o);
+                    Method setUniqueName = o.getClass().getMethod("set" + uniqueFieldName.substring(0, 1).toUpperCase() + uniqueFieldName.substring(1), String.class);
+                    setUniqueName.invoke(o, name);
+                    retList.add(o);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return retList;
+    }
+}

+ 281 - 0
src/main/java/com/diagbot/aggregate/AssemblePushAggregate.java

@@ -0,0 +1,281 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.dto.PushBaseDTO;
+import com.diagbot.dto.PushDTO;
+import com.diagbot.dto.PushScaleDTO;
+import com.diagbot.enums.ConceptTypeEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.facade.MappingConfigFacade;
+import com.diagbot.util.ListUtil;
+import com.google.common.collect.Lists;
+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.collections4.MapUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/8/19 13:50
+ */
+@Component
+public class AssemblePushAggregate {
+
+    @Autowired
+    private MappingConfigFacade mappingConfigFacade;
+
+    @DataProvider("assemblePushAll")
+    public PushDTO assemblePushAll(
+            @InvokeParameter("pushDTO") PushDTO data,
+            @InvokeParameter("hospitalId") Long hospitalId,
+            @DataConsumer("retLis") List<PushBaseDTO> retLis,
+            @DataConsumer("retPacs") List<PushBaseDTO> retPacs,
+            @DataConsumer("retDiagMap") Map<String, List<PushBaseDTO>> retDiagMap,
+            @DataConsumer("retOperation") List<PushBaseDTO> retOperation,
+            @DataConsumer("retDrug") List<PushBaseDTO> retDrug,
+            @DataConsumer("retScale") List<PushScaleDTO> retScale,
+            @DataConsumer("retNurse") List<PushBaseDTO> retNurse) {
+        //检验
+        if (ListUtil.isNotEmpty(retLis)) {
+            data.setLis(retLis);
+        }
+        //检查
+        if (ListUtil.isNotEmpty(retPacs)) {
+            data.setPacs(retPacs);
+        }
+        //诊断
+        if (MapUtils.isNotEmpty(retDiagMap)) {
+            data.setDis(retDiagMap);
+        }
+        //手术
+        if (ListUtil.isNotEmpty(retOperation)) {
+            data.setOperations(retOperation);
+        }
+        //药品
+        if (ListUtil.isNotEmpty(retDrug)) {
+            data.setMedicines(retDrug);
+        }
+        //量表
+        if (ListUtil.isNotEmpty(retScale)) {
+            data.setScale(retScale);
+        }
+        //护理
+        if (ListUtil.isNotEmpty(retNurse)) {
+            data.setNurse(retNurse);
+        }
+        return data;
+    }
+
+    @DataProvider("retLis")
+    public List<PushBaseDTO> retLis(@InvokeParameter("pushDTO") PushDTO data,
+                                    @InvokeParameter("hospitalId") Long hospitalId) {
+        //检验
+        List<PushBaseDTO> retLis = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getLis())) {
+            retLis = data.getLis();
+            List<String> uniqueNameList = retLis.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.LisPack.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retLis.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retLis;
+    }
+
+    @DataProvider("retPacs")
+    public List<PushBaseDTO> retPacs(@InvokeParameter("pushDTO") PushDTO data,
+                                     @InvokeParameter("hospitalId") Long hospitalId) {
+        //检查
+        List<PushBaseDTO> retPacs = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getPacs())) {
+            retPacs = data.getPacs();
+            List<String> uniqueNameList = retPacs.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Pacs.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retPacs.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retPacs;
+    }
+
+    @DataProvider("retDiagMap")
+    public Map<String, List<PushBaseDTO>> retDiagMap(@InvokeParameter("pushDTO") PushDTO data,
+                                                     @InvokeParameter("hospitalId") Long hospitalId) {
+        Map<String, List<PushBaseDTO>> retMap = new HashMap<>();
+        if (data.getDis() != null && data.getDis().size() > 0) {
+            retMap = data.getDis();
+            List<String> uniqueNameList = Lists.newLinkedList();
+            for (Map.Entry<String, List<PushBaseDTO>> entry : retMap.entrySet()) {
+                if (ListUtil.isNotEmpty(entry.getValue())) {
+                    uniqueNameList.addAll(entry.getValue().stream()
+                            .map(i -> i.getName())
+                            .collect(Collectors.toList()));
+                }
+            }
+            if (ListUtil.isNotEmpty(uniqueNameList)) {
+                Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                        = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Disease.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+                for (Map.Entry<String, List<PushBaseDTO>> entry : retMap.entrySet()) {
+                    if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                        entry.getValue().forEach(item -> {
+                            if (uniqueNameMap.get(item.getName()) != null) {
+                                item.setHisNameList(uniqueNameMap.get(item.getName())
+                                        .values().stream()
+                                        .map(i -> i.keySet())
+                                        .flatMap(Collection::stream)
+                                        .collect(Collectors.toList()));
+                            }
+                        });
+                    }
+                }
+            }
+        }
+        return retMap;
+    }
+
+    @DataProvider("retOperation")
+    public List<PushBaseDTO> retOperation(@InvokeParameter("pushDTO") PushDTO data,
+                                          @InvokeParameter("hospitalId") Long hospitalId) {
+        //手术
+        List<PushBaseDTO> retOperation = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getOperations())) {
+            retOperation = data.getOperations();
+            List<String> uniqueNameList = retOperation.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Operation.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retOperation.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retOperation;
+    }
+
+    @DataProvider("retDrug")
+    public List<PushBaseDTO> retDrug(@InvokeParameter("pushDTO") PushDTO data,
+                                     @InvokeParameter("hospitalId") Long hospitalId) {
+        //药品
+        List<PushBaseDTO> retDrug = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getMedicines())) {
+            retDrug = data.getMedicines();
+            List<String> uniqueNameList = retDrug.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Drug.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retDrug.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retDrug;
+    }
+
+    @DataProvider("retScale")
+    public List<PushScaleDTO> retScale(@InvokeParameter("pushDTO") PushDTO data,
+                                       @InvokeParameter("hospitalId") Long hospitalId) {
+        //量表
+        List<PushScaleDTO> retScale = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getScale())) {
+            retScale = data.getScale();
+            List<String> uniqueNameList = retScale.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Scale.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retScale.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retScale;
+    }
+
+    @DataProvider("retNurse")
+    public List<PushBaseDTO> retNurse(@InvokeParameter("pushDTO") PushDTO data,
+                                      @InvokeParameter("hospitalId") Long hospitalId) {
+        //量表
+        List<PushBaseDTO> retNurse = new ArrayList<>();
+        if (ListUtil.isNotEmpty(data.getNurse())) {
+            retNurse = data.getNurse();
+            List<String> uniqueNameList = retNurse.stream()
+                    .map(i -> i.getName())
+                    .collect(Collectors.toList());
+            Map<String, Map<String, Map<String, List<String>>>> uniqueNameMap
+                    = mappingConfigFacade.groupByUniqueNameWithName(uniqueNameList, ConceptTypeEnum.Nurse.getKey(), hospitalId, StatusEnum.Enable.getKey());
+
+            if (uniqueNameMap != null && uniqueNameMap.size() > 0) {
+                retNurse.forEach(item -> {
+                    if (uniqueNameMap.get(item.getName()) != null) {
+                        item.setHisNameList(uniqueNameMap.get(item.getName())
+                                .values().stream()
+                                .map(i -> i.keySet())
+                                .flatMap(Collection::stream)
+                                .collect(Collectors.toList()));
+                    }
+                });
+            }
+        }
+        return retNurse;
+    }
+}

+ 19 - 0
src/main/java/com/diagbot/annotation/CdssLog.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: 需要二次Token验证注解
+ * @author: gaodm
+ * @time: 2020/7/29 9:23
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface CdssLog {
+    String value() default "";
+}

+ 19 - 0
src/main/java/com/diagbot/annotation/TokenAuth.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: 需要二次Token验证注解
+ * @author: gaodm
+ * @time: 2020/7/29 9:23
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface TokenAuth {
+    String value() default "";
+}

+ 30 - 0
src/main/java/com/diagbot/client/AuthServiceClient.java

@@ -0,0 +1,30 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.AuthServiceHystrix;
+import com.diagbot.entity.JWT;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @Description: 请求认证授权服务器客户端
+ * @author: gaodm
+ * @time: 2018/8/2 13:37
+ */
+@FeignClient(name = "oath-self", url = "${oath.self.address}", fallback = AuthServiceHystrix.class)
+public interface AuthServiceClient {
+
+    @PostMapping(value = "/oauth/token")
+    JWT getToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("grant_type") String type, @RequestParam("username") String username, @RequestParam("password") String password);
+
+    @PostMapping(value = "/oauth/token")
+    JWT refreshToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("grant_type") String type, @RequestParam("refresh_token") String refreshToken);
+
+    @PostMapping(value = "/oauth/check_token")
+    OAuth2AccessToken checkToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("token") String token);
+}
+
+
+

+ 271 - 0
src/main/java/com/diagbot/client/CdssCoreClient.java

@@ -0,0 +1,271 @@
+package com.diagbot.client;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.hystrix.CdssCoreHystrix;
+import com.diagbot.dto.*;
+import com.diagbot.entity.KlRuleMenuWrapper;
+import com.diagbot.vo.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: CDSS核心类客户端
+ * @author: gaodm
+ * @time: 2020/7/28 9:29
+ */
+@FeignClient(name = "cdss-core", url = "${cdss-core.url}", fallback = CdssCoreHystrix.class)
+public interface CdssCoreClient {
+
+    @PostMapping("/core/indication")
+    RespDTO<IndicationDTO> indication(@Valid @RequestBody IndicationPushVO indicationPushVO);
+
+    @PostMapping("/core/push")
+    RespDTO<PushDTO> push(@RequestBody @Valid PushVO pushVo);
+
+    /**
+     * 推送持续检验检查计划
+     */
+    @PostMapping("/core/pushPlan")
+    RespDTO<PushPlanDTO> pushPlan(@RequestBody PushPlanVO pushPlanVO);
+
+    /**
+     * 化验大项、化验小项、辅检、诊断、药品、手术等检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @PostMapping("/retrieval/index")
+    RespDTO<RetrievalDTO> index(@RequestBody @Valid RetrievalVO retrievalVO);
+
+    /**
+     * 疾病编码检索
+     *
+     * @param diseaseIndexPageVO
+     * @return
+     */
+    @PostMapping("/retrieval/diseaseIndex")
+    RespDTO<Page<DiseaseIndexDTO>> diseaseIndex(@RequestBody @Valid DiseaseIndexPageVO diseaseIndexPageVO);
+
+    /**
+     * 国药准字匹配
+     *
+     * @param indexByApprovalVO
+     * @return
+     */
+    @PostMapping("/retrieval/indexByApproval")
+    RespDTO<List<IndexBatchDTO>> indexByApproval(@Valid @RequestBody IndexByApprovalVO indexByApprovalVO);
+
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @PostMapping("/retrieval/staticKnowledgeIndex")
+    RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO);
+
+    /**
+     * 术语关联医学术语检索
+     *
+     * @param filterVO
+     * @return
+     */
+    @PostMapping("/retrieval/filter")
+    RespDTO<List<IndexBatchDTO>> filter(@Valid @RequestBody FilterVO filterVO);
+
+    /**
+     * 更新是否有静态知识状态
+     *
+     * @param hasStaticKnowledgeVO
+     * @return
+     */
+    @PostMapping("/staticKnowledge/updateHasInfoStatus")
+    RespDTO<Boolean> updateHasInfoStatus(@Valid @RequestBody HasStaticKnowledgeVO hasStaticKnowledgeVO);
+
+    /**
+     * 术语批量校验
+     *
+     * @param conceptVO
+     * @return
+     */
+    @PostMapping("/retrieval/getConceptNames")
+    RespDTO<List<IndexBatchDTO>> getConceptNames(@Valid @RequestBody ConceptVO conceptVO);
+
+
+    /**
+     * 化验小项术语批量查询获取范围
+     *
+     * @param kllisDetailVO
+     * @return
+     */
+    @PostMapping("/retrieval/getLisDetaisByNames")
+    RespDTO<Map<String, KllisDetailDTO>> getLisDetaisByNames(@RequestBody KllisDetailVO kllisDetailVO);
+
+    /**
+     * 取上级静态知识
+     *
+     * @param staticKnowledgeNameVO
+     * @return
+     */
+    @PostMapping("/staticKnowledge/getSuperName")
+    RespDTO<StaticKnowledgeNameVO> getSuperName(@Valid @RequestBody StaticKnowledgeNameVO staticKnowledgeNameVO);
+
+    /**
+     * 取上级静态知识(批量)
+     *
+     * @param staticKnowledgeNameVO
+     * @return
+     */
+    @PostMapping("/staticKnowledge/getSuperNameBatch")
+    RespDTO<List<StaticKnowledgeNameVO>> getSuperNameBatch(@Valid @RequestBody List<StaticKnowledgeNameVO> staticKnowledgeNameVO);
+
+    /**
+     * 根据名称和类型获取静态知识内容
+     *
+     * @param scaleStaticAllVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/getStaticKnowledge")
+    RespDTO<StaticKnowledgeDTO> getStaticKnowledge(@Valid @RequestBody ScaleStaticAllVO scaleStaticAllVO);
+
+    /**
+     * 分页查询
+     *
+     * @param klConceptStaticPageVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/getPage")
+    RespDTO<Page<KlConceptStaticDTO>> getPage(@Valid @RequestBody KlConceptStaticPageVO klConceptStaticPageVO);
+
+
+    /**
+     * 静态知识检索(分页返回)
+     *
+     * @param staticKnowledgeIndexPageVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/staticIndexPage")
+    RespDTO<Page<StaticKnowledgeIndexPageDTO>> staticIndexPage(@Valid @RequestBody StaticKnowledgeIndexPageVO staticKnowledgeIndexPageVO);
+
+    /**
+     * 保存静态知识
+     *
+     * @param klConceptStaticVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/saveOrUpdateRecord")
+    RespDTO<Boolean> saveOrUpdateRecord(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO);
+
+    /**
+     * 静态知识启用禁用
+     *
+     * @param changeStatusVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/changeStatus")
+    RespDTO<Boolean> changeStatus(@Valid @RequestBody ChangeStatusVO changeStatusVO);
+
+    /**
+     * 根据id获取静态知识
+     *
+     * @param idVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/getRecordById")
+    RespDTO<KlConceptStaticDTO> getRecordById(@Valid @RequestBody IdVO idVO);
+
+    /**
+     * 静态知识是否已存在
+     *
+     * @param klConceptStaticVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/isExist")
+    RespDTO<Boolean> isExist(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO);
+
+    /**
+     * 推理结果匹配静态知识
+     *
+     * @param getDetailVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/getDetailByConcept")
+    RespDTO<Map<String, List<ConceptDetailDTO>>> getDetailByConcept(@Valid @RequestBody GetDetailVO getDetailVO);
+
+    /**
+     * 推理结果匹配量表
+     *
+     * @param getDetailVO
+     * @return
+     */
+    @PostMapping("/kl/conceptStatic/getScaleDetailByConcept")
+    RespDTO<Map<String, ConceptScaleDTO>> getScaleDetailByConcept(@RequestBody @Valid GetDetailVO getDetailVO);
+
+    /**
+     * 获取规则下拉菜单信息
+     *
+     * @param klRuleMenuVO
+     * @return
+     */
+    @PostMapping("/klRulePlan/getMenu")
+    RespDTO<List<KlRuleMenuWrapper>> getMenus(@RequestBody KlRuleMenuVO klRuleMenuVO);
+
+    //"分页获取规则维护列表
+    @PostMapping("/klRule/getKlRuleInfoPage")
+    RespDTO<Page<KlRuleInfoDTO>> getKlRuleInfoPages(@RequestBody KlRuleInfoVO klRuleInfoVO);
+
+
+    //根据规则Id获取规则详情
+    @PostMapping("/klRule/getByIdRuleInfo")
+    RespDTO<KlRuleByIdParDTO> getByIdRuleInfoAll(@RequestBody @Valid KlRuleByIdVO klRuleByIdVO);
+
+    //保存规则详情[
+    @PostMapping("/klRule/saveRuleInfo")
+    RespDTO<Boolean> saveRuleInfoAll(@RequestBody @Valid KlRuleInfoSaveVO klRuleInfoSaveVO);
+
+    //刪除规则详情
+    @PostMapping("/klRule/clearRuleInfo")
+    RespDTO<Boolean> clearRuleInfoAll(@RequestBody @Valid KlRuleInfoClearVO klRuleInfoClearVO);
+
+    //停用规则
+    @PostMapping("/klRule/disableRuleInfo")
+    RespDTO<Boolean> disableRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO);
+
+    //启用规则
+    @PostMapping("/klRule/startRuleInfo")
+    RespDTO<Boolean> startRuleInfos(@RequestBody @Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO);
+
+    @PostMapping("/kl/dictionary/getDictionaryInfo")
+    RespDTO<Map<Long, List<DictionaryInfoDTO>>> getDictionaryAll();
+
+    @PostMapping("/klDisease/searchConcept")
+    RespDTO<List<GetAllForRelationDTO>> searchConcept(@Valid @RequestBody SearchConceptVO searchConceptVO);
+
+    //术语集合新增
+    @PostMapping("/klDisease/addConceptClass")
+    RespDTO<List<GetAllForRelationDTO>> addConceptClass(@Valid @RequestBody SearchConceptVO searchConceptVO);
+
+    //规则维护术语查询
+    @PostMapping("/klDisease/searchConceptRuleClass")
+    RespDTO<List<GetAllForRelationDTO>> searchConceptRuleClass(@Valid @RequestBody SearchConceptVO searchConceptVO);
+
+    @PostMapping("/cache/clearRuleInfoAll")
+    RespDTO<Boolean> clearRuleAll();
+
+    @PostMapping("/term/termMatching")
+    public RespDTO<List<TermConceptDTO>> getTermMatching(@Valid @RequestBody TermMatchingVO termMatchingVO);
+
+    //查询所有有效的规则
+    @PostMapping("/klRule/getRulePage")
+    RespDTO<Page<RuleQueryDTO>> getRulePage(@RequestBody RuleQueryVO ruleQueryVO);
+
+    //根据录入内容查询有效规则的明细
+    @PostMapping("/klRule/getRuleDetail")
+    RespDTO<RuleDTO> getRuleDetail(@RequestBody @Valid RuleQueryKeyVO ruleQueryKeyVO);
+}

+ 31 - 0
src/main/java/com/diagbot/client/MrqcClient.java

@@ -0,0 +1,31 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.MrqcHystrix;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.AnalyzeCdsVO;
+import com.diagbot.vo.AnalyzeRunVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * @Description: 病历质控客户端
+ * @author: gaodm
+ * @time: 2020/7/28 9:29
+ */
+@FeignClient(name = "mrqc", url = "${mrqc.url}", fallback = MrqcHystrix.class)
+public interface MrqcClient {
+    @PostMapping("/qc/behospitalInfo/analyze_run")
+    RespDTO<AnalyzeRunDTO> analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO);
+
+    @PostMapping("/qc/behospitalInfo/analyzeCds")
+    RespDTO<Map<String, String>> caseWritingPrompt(@Valid @RequestBody AnalyzeCdsVO analyzeCdsVO);
+
+}
+
+
+

+ 34 - 0
src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java

@@ -0,0 +1,34 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.AuthServiceClient;
+import com.diagbot.entity.JWT;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 请求认证授权服务器客户端(请求失败熔断)
+ * @author: gaodm
+ * @time: 2018/8/2 13:37
+ */
+@Component
+@Slf4j
+public class AuthServiceHystrix implements AuthServiceClient {
+    @Override
+    public JWT getToken(String authorization, String type, String username, String password) {
+        log.error("【hystrix】调用{}异常", "getToken");
+        return null;
+    }
+
+    @Override
+    public JWT refreshToken(String authorization, String type, String refreshToken) {
+        log.error("【hystrix】调用{}异常", "refreshToken");
+        return null;
+    }
+
+    @Override
+    public OAuth2AccessToken checkToken(String authorization, String token) {
+        log.error("【hystrix】调用{}异常", "checkToken");
+        return null;
+    }
+}

+ 362 - 0
src/main/java/com/diagbot/client/hystrix/CdssCoreHystrix.java

@@ -0,0 +1,362 @@
+package com.diagbot.client.hystrix;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.*;
+import com.diagbot.entity.KlRuleMenuWrapper;
+import com.diagbot.vo.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 病历质控客户端(请求失败熔断)
+ * @author: gaodm
+ * @time: 2020/7/28 9:29
+ */
+@Component
+@Slf4j
+public class CdssCoreHystrix implements CdssCoreClient {
+
+    @Override
+    public RespDTO<IndicationDTO> indication(@Valid @RequestBody IndicationPushVO indicationPushVO) {
+        log.error("【hystrix】调用{}异常", "indication");
+        return null;
+    }
+
+    @Override
+    public RespDTO<PushDTO> push(@RequestBody @Valid PushVO pushVo) {
+        log.error("【hystrix】调用{}异常", "push");
+        return null;
+    }
+
+    /**
+     * 推送持续检验检查计划
+     */
+    @Override
+    public RespDTO<PushPlanDTO> pushPlan(@RequestBody PushPlanVO pushPlanVO) {
+        log.error("【hystrix】调用{}异常", "pushPlan");
+        return null;
+    }
+
+    /**
+     * 化验大项、化验小项、辅检、诊断、药品、手术等检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @Override
+    public RespDTO<RetrievalDTO> index(@RequestBody @Valid RetrievalVO retrievalVO) {
+        log.error("【hystrix】调用{}异常", "index");
+        return null;
+    }
+
+    /**
+     * 编码检索疾病
+     * @param diseaseIndexPageVO
+     * @return
+     */
+    @Override
+    public RespDTO<Page<DiseaseIndexDTO>> diseaseIndex(@RequestBody @Valid DiseaseIndexPageVO diseaseIndexPageVO){
+        log.error("【hystrix】调用{}异常", "diseaseIndex");
+        return null;
+    }
+
+    /**
+     * 国药准字匹配
+     *
+     * @param indexByApprovalVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<IndexBatchDTO>> indexByApproval(@Valid @RequestBody IndexByApprovalVO indexByApprovalVO) {
+        log.error("【hystrix】调用{}异常", "indexByApproval");
+        return null;
+    }
+
+    /**
+     * 静态知识检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@RequestBody @Valid StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        log.error("【hystrix】调用{}异常", "staticKnowledgeIndex");
+        return null;
+    }
+
+    /**
+     * 术语关联医学术语检索
+     *
+     * @param filterVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<IndexBatchDTO>> filter(@Valid @RequestBody FilterVO filterVO) {
+        log.error("【hystrix】调用{}异常", "filter");
+        return null;
+    }
+
+    /**
+     * 更新是否有静态知识状态
+     *
+     * @param hasStaticKnowledgeVO
+     * @return
+     */
+    @Override
+    public RespDTO<Boolean> updateHasInfoStatus(@Valid @RequestBody HasStaticKnowledgeVO hasStaticKnowledgeVO) {
+        log.error("【hystrix】调用{}异常", "updateHasInfoStatus");
+        return null;
+    }
+
+    /**
+     * 术语批量校验
+     *
+     * @param conceptVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<IndexBatchDTO>> getConceptNames(@Valid @RequestBody ConceptVO conceptVO) {
+        log.error("【hystrix】调用{}异常", "getConceptNames");
+        return null;
+    }
+
+    /**
+     * 化验小项术语批量查询获取范围
+     *
+     * @param kllisDetailVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, KllisDetailDTO>> getLisDetaisByNames(@RequestBody KllisDetailVO kllisDetailVO) {
+        log.error("【hystrix】调用{}异常", "getConceptNames");
+        return null;
+    }
+
+    /**
+     * 取上级静态知识
+     *
+     * @param staticKnowledgeNameVO
+     * @return
+     */
+    @Override
+    public RespDTO<StaticKnowledgeNameVO> getSuperName(@Valid @RequestBody StaticKnowledgeNameVO staticKnowledgeNameVO) {
+        log.error("【hystrix】调用{}异常", "getSuperName");
+        return null;
+    }
+
+    /**
+     * 取上级静态知识(批量)
+     *
+     * @param staticKnowledgeNameVO
+     * @return
+     */
+    @Override
+    public RespDTO<List<StaticKnowledgeNameVO>> getSuperNameBatch(@Valid @RequestBody List<StaticKnowledgeNameVO> staticKnowledgeNameVO) {
+        log.error("【hystrix】调用{}异常", "getSuperNameBatch");
+        return null;
+    }
+
+    /**
+     * 根据名称和类型获取静态知识内容
+     *
+     * @param scaleStaticAllVO
+     * @return
+     */
+    @Override
+    public RespDTO<StaticKnowledgeDTO> getStaticKnowledge(@Valid @RequestBody ScaleStaticAllVO scaleStaticAllVO) {
+        log.error("【hystrix】调用{}异常", "getStaticKnowledge");
+        return null;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param klConceptStaticPageVO
+     * @return
+     */
+    @Override
+    public RespDTO<Page<KlConceptStaticDTO>> getPage(@Valid @RequestBody KlConceptStaticPageVO klConceptStaticPageVO) {
+        log.error("【hystrix】调用{}异常", "getPage");
+        return null;
+    }
+
+    /**
+     * 静态知识检索(分页返回)
+     *
+     * @param staticKnowledgeIndexPageVO
+     * @return
+     */
+    @Override
+    public RespDTO<Page<StaticKnowledgeIndexPageDTO>> staticIndexPage(@Valid @RequestBody StaticKnowledgeIndexPageVO staticKnowledgeIndexPageVO) {
+        log.error("【hystrix】调用{}异常", "staticIndexPage");
+        return null;
+    }
+
+    /**
+     * 保存静态知识
+     *
+     * @param klConceptStaticVO
+     * @return
+     */
+    @Override
+    public RespDTO<Boolean> saveOrUpdateRecord(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO) {
+        log.error("【hystrix】调用{}异常", "saveOrUpdateRecord");
+        return null;
+    }
+
+    /**
+     * 静态知识启用禁用
+     *
+     * @param changeStatusVO
+     * @return
+     */
+    @Override
+    public RespDTO<Boolean> changeStatus(@Valid @RequestBody ChangeStatusVO changeStatusVO) {
+        log.error("【hystrix】调用{}异常", "changeStatus");
+        return null;
+    }
+
+    /**
+     * 根据id获取静态知识
+     *
+     * @param idVO
+     * @return
+     */
+    @Override
+    public RespDTO<KlConceptStaticDTO> getRecordById(@Valid @RequestBody IdVO idVO) {
+        log.error("【hystrix】调用{}异常", "getRecordById");
+        return null;
+    }
+
+    /**
+     * 静态知识是否已存在
+     *
+     * @param klConceptStaticVO
+     * @return
+     */
+    @Override
+    public RespDTO<Boolean> isExist(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO) {
+        log.error("【hystrix】调用{}异常", "isExist");
+        return null;
+    }
+
+    /**
+     * 推理结果匹配静态知识
+     *
+     * @param getDetailVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, List<ConceptDetailDTO>>> getDetailByConcept(@Valid @RequestBody GetDetailVO getDetailVO) {
+        log.error("【hystrix】调用{}异常", "getDetailByConcept");
+        return null;
+    }
+
+    /**
+     * 推理结果匹配量表
+     *
+     * @param getDetailVO
+     * @return
+     */
+    @Override
+    public RespDTO<Map<String, ConceptScaleDTO>> getScaleDetailByConcept(@RequestBody @Valid GetDetailVO getDetailVO) {
+        log.error("【hystrix】调用{}异常", "getScaleDetailByConcept");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<KlRuleMenuWrapper>> getMenus(KlRuleMenuVO klRuleMenuVO) {
+        log.error("【hystrix】调用{}异常", "getMenus");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Page<KlRuleInfoDTO>> getKlRuleInfoPages(KlRuleInfoVO klRuleInfoVO) {
+        log.error("【hystrix】调用{}异常", "getKlRuleInfoPages");
+        return null;
+    }
+
+    @Override
+    public RespDTO<KlRuleByIdParDTO> getByIdRuleInfoAll(@Valid KlRuleByIdVO klRuleByIdVO) {
+        log.error("【hystrix】调用{}异常", "getByIdRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> saveRuleInfoAll(@Valid KlRuleInfoSaveVO klRuleInfoSaveVO) {
+        log.error("【hystrix】调用{}异常", "saveRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> clearRuleInfoAll(@Valid KlRuleInfoClearVO klRuleInfoClearVO) {
+        log.error("【hystrix】调用{}异常", "clearRuleInfoAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> disableRuleInfos(@Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        log.error("【hystrix】调用{}异常", "disableRuleInfos");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> startRuleInfos(@Valid KlRuleSatartOrdisaVO klRuleSatartOrdisaVO) {
+        log.error("【hystrix】调用{}异常", "startRuleInfos");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Map<Long, List<DictionaryInfoDTO>>> getDictionaryAll() {
+        log.error("【hystrix】调用{}异常", "getDictionaryAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<GetAllForRelationDTO>> searchConcept(@Valid SearchConceptVO searchConceptVO) {
+        log.error("【hystrix】调用{}异常", "searchConcept");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<GetAllForRelationDTO>> addConceptClass(@Valid SearchConceptVO searchConceptVO) {
+        log.error("【hystrix】调用{}异常", "addConceptClass");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<GetAllForRelationDTO>> searchConceptRuleClass(@Valid SearchConceptVO searchConceptVO) {
+        log.error("【hystrix】调用{}异常", "searchConceptRuleClass");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> clearRuleAll() {
+        log.error("【hystrix】调用{}异常", "clearRuleAll");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<TermConceptDTO>> getTermMatching(@Valid TermMatchingVO termMatchingVO) {
+        log.error("【hystrix】调用{}异常", "getTermMatching");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Page<RuleQueryDTO>> getRulePage(@RequestBody RuleQueryVO ruleQueryVO) {
+        log.error("【hystrix】调用{}异常", "getRulePage");
+        return null;
+    }
+
+    @Override
+    public RespDTO<RuleDTO> getRuleDetail(@RequestBody @Valid RuleQueryKeyVO ruleQueryKeyVO) {
+        log.error("【hystrix】调用{}异常", "getRuleDetail");
+        return null;
+    }
+}

+ 35 - 0
src/main/java/com/diagbot/client/hystrix/MrqcHystrix.java

@@ -0,0 +1,35 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.MrqcClient;
+import com.diagbot.dto.AnalyzeRunDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.AnalyzeCdsVO;
+import com.diagbot.vo.AnalyzeRunVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * @Description: 病历质控客户端(请求失败熔断)
+ * @author: gaodm
+ * @time: 2020/7/28 9:29
+ */
+@Component
+@Slf4j
+public class MrqcHystrix implements MrqcClient {
+
+    @Override
+    public RespDTO<AnalyzeRunDTO> analyzeRun(@Valid @RequestBody AnalyzeRunVO analyzeRunVO) {
+        log.error("【hystrix】调用{}异常", "analyzeRun");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Map<String, String>> caseWritingPrompt(@Valid AnalyzeCdsVO analyzeCdsVO) {
+        log.error("【hystrix】调用{}异常", "caseWritingPrompt");
+        return null;
+    }
+}

+ 29 - 0
src/main/java/com/diagbot/config/CacheDeleteInit.java

@@ -0,0 +1,29 @@
+package com.diagbot.config;
+
+import com.diagbot.facade.TokenPermissionFacade;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 项目启动后初始化缓存
+ * @author: gaodm
+ * @time: 2020/5/13 11:20
+ */
+@Component //把类交给spring容器管理
+@Order(100)  //使用order属性,设置该类在spring容器中的加载顺序
+@Slf4j
+public class CacheDeleteInit implements CommandLineRunner {
+
+    @Autowired
+    private TokenPermissionFacade tokenPermissionFacade;
+
+    @Override
+    public void run(String... args) throws Exception {
+        // 服务启动清除redis缓存
+        tokenPermissionFacade.delPermission();
+        log.info("CDSS服务启动清除redis缓存成功!");
+    }
+}

+ 30 - 0
src/main/java/com/diagbot/config/CorsConfiguer.java

@@ -0,0 +1,30 @@
+package com.diagbot.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/12 15:56
+ */
+@Configuration
+public class CorsConfiguer {
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin("*"); // 允许的域名
+        corsConfiguration.addAllowedHeader("*"); // 允许的请求头
+        corsConfiguration.addAllowedMethod("*"); // 允许的方法(post、get等)
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); // 对接口配置跨域设置
+        return new CorsFilter(source);
+    }
+}

+ 19 - 0
src/main/java/com/diagbot/config/CustomAccessTokenConverter.java

@@ -0,0 +1,19 @@
+package com.diagbot.config;
+
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class CustomAccessTokenConverter extends DefaultAccessTokenConverter {
+
+    @Override
+    public OAuth2Authentication extractAuthentication(Map<String, ?> claims) {
+        OAuth2Authentication authentication = super.extractAuthentication(claims);
+        authentication.setDetails(claims);
+        return authentication;
+    }
+
+}

+ 30 - 0
src/main/java/com/diagbot/config/CustomTokenEnhancer.java

@@ -0,0 +1,30 @@
+package com.diagbot.config;
+
+import com.diagbot.entity.SysUserUaa;
+import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.security.oauth2.provider.OAuth2Authentication;
+import org.springframework.security.oauth2.provider.token.TokenEnhancer;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Description: token生成携带的信息
+ * @author: gaodm
+ * @time: 2018/9/3 15:16
+ */
+public class CustomTokenEnhancer implements TokenEnhancer {
+
+    @Override
+    public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) {
+        final Map<String, Object> additionalInfo = new HashMap<>();
+        SysUserUaa user = (SysUserUaa) authentication.getUserAuthentication().getPrincipal();
+        additionalInfo.put("user_id", user.getId());
+        additionalInfo.put("hosp_id", user.getHospitalId());
+        //		additionalInfo.put("authorities", user.getAuthorities());
+        ((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(additionalInfo);
+        return accessToken;
+    }
+
+}

+ 15 - 0
src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java

@@ -0,0 +1,15 @@
+package com.diagbot.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+
+/**
+ * @Description: 安全配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:38
+ */
+@Configuration
+@EnableGlobalMethodSecurity(prePostEnabled = true)
+public class GlobalMethodSecurityConfigurer {
+
+}

+ 19 - 0
src/main/java/com/diagbot/config/IdcConfigurer.java

@@ -0,0 +1,19 @@
+package com.diagbot.config;
+
+import com.diagbot.idc.VisibleIdCreater;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Description: ID生成器配置
+ * @author: gaodm
+ * @time: 2018/9/20 10:43
+ */
+@Configuration
+public class IdcConfigurer {
+
+    @Bean
+    public VisibleIdCreater visibleIdCreater() {
+        return new VisibleIdCreater(0, 0);
+    }
+}

+ 33 - 0
src/main/java/com/diagbot/config/MultipartConfigurer.java

@@ -0,0 +1,33 @@
+package com.diagbot.config;
+
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.util.unit.DataSize;
+
+import javax.servlet.MultipartConfigElement;
+
+/**
+ * @Description: 配置上传文件大小的配置
+ * @author: gaodm
+ * @time: 2019/5/9 11:18
+ */
+@Configuration
+public class MultipartConfigurer {
+    /**
+     * 配置上传文件大小的配置
+     *
+     * @return
+     */
+    @Bean
+    public MultipartConfigElement multipartConfigElement() {
+        MultipartConfigFactory factory = new MultipartConfigFactory();
+        //  上传文件临时文件夹
+        factory.setLocation(System.getProperty("/data/tmp"));
+        //  单个数据大小
+        factory.setMaxFileSize(DataSize.ofMegabytes(600));
+        /// 总上传数据大小
+        factory.setMaxRequestSize(DataSize.ofMegabytes(600));
+        return factory.createMultipartConfig();
+    }
+}

+ 39 - 0
src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -0,0 +1,39 @@
+package com.diagbot.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import com.diagbot.config.mybatisLike.MybatisLikeSqlInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * @Description: MybatisPlus配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:39
+ */
+@EnableTransactionManagement
+@Configuration
+@MapperScan("com.diagbot.mapper*")//这个注解,作用相当于下面的@Bean MapperScannerConfigurer,2者配置1份即可
+public class MybatisPlusConfigurer {
+
+    /**
+     * mybatis-plus分页插件<br>
+     * 文档:http://mp.baomidou.com<br>
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        // 设置请求的页面大于最大页后操作,true调回到首页,false继续请求,默认false
+        //paginationInterceptor.setOverflow(false);
+        // 设置最大单页限制数量,默认500条,-1不受限制
+        paginationInterceptor.setLimit(-1L);
+        return paginationInterceptor;
+    }
+
+    @Bean
+    public MybatisLikeSqlInterceptor mybatisSqlInterceptor() {
+        return new MybatisLikeSqlInterceptor();
+    }
+
+}

+ 96 - 0
src/main/java/com/diagbot/config/OAuth2Configurer.java

@@ -0,0 +1,96 @@
+package com.diagbot.config;
+
+import java.util.Arrays;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
+import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.token.TokenEnhancer;
+import org.springframework.security.oauth2.provider.token.TokenEnhancerChain;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
+import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory;
+
+import com.diagbot.service.UrlUserService;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @Description: OAuth2授权认证配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:24
+ */
+@Configuration
+@EnableAuthorizationServer
+@Slf4j
+public class OAuth2Configurer extends AuthorizationServerConfigurerAdapter {
+    @Autowired
+    private UrlUserService urlUserService;
+
+    @Override
+    public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
+        clients.inMemory()
+                .withClient("uaa-service")
+                .secret("{noop}123456")
+                .scopes("service")
+                .autoApprove(true)
+                .authorizedGrantTypes("implicit", "refresh_token", "password", "authorization_code")
+                .accessTokenValiditySeconds(24 * 3600)
+                .refreshTokenValiditySeconds(30 * 24 * 3600);
+    }
+
+    /**
+     * 注入自定义token生成方式
+     *
+     * @return
+     */
+    @Bean
+    public TokenEnhancer customerEnhancer() {
+        return new CustomTokenEnhancer();
+    }
+
+    @Override
+    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
+        //指定认证管理器
+        endpoints.authenticationManager(authenticationManager).userDetailsService(urlUserService);
+        //指定token存储位置
+        endpoints.tokenStore(new JwtTokenStore(jwtTokenEnhancerServer()));
+        // 自定义token生成方式
+        TokenEnhancerChain tokenEnhancerChain = new TokenEnhancerChain();
+        tokenEnhancerChain.setTokenEnhancers(Arrays.asList(customerEnhancer(), jwtTokenEnhancerServer()));
+        endpoints.tokenEnhancer(tokenEnhancerChain);
+    }
+
+    @Override
+    public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
+        security.tokenKeyAccess("permitAll()")
+                .checkTokenAccess("isAuthenticated()")
+                .allowFormAuthenticationForClients();
+    }
+
+    @Autowired
+    @Qualifier("authenticationManagerBean")
+    private AuthenticationManager authenticationManager;
+
+    @Bean("JwtTokenEnhancerServer")
+    protected JwtAccessTokenConverter jwtTokenEnhancerServer() {
+    	
+    	
+    	
+        ClassPathResource resource = new ClassPathResource("diagbot-jwt.jks");
+        System.out.println(resource.getPath());
+		KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(resource, "diagbot123456".toCharArray());
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
+        converter.setKeyPair(keyStoreKeyFactory.getKeyPair("diagbot-jwt"));
+        log.info("Created jwtTokenEnhancerServer success");
+        return converter;
+    }
+}

+ 204 - 0
src/main/java/com/diagbot/config/RedisConfigurer.java

@@ -0,0 +1,204 @@
+package com.diagbot.config;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import java.time.Duration;
+
+@Configuration
+@EnableCaching
+@Slf4j
+public class RedisConfigurer extends CachingConfigurerSupport {
+
+    @Value("${spring.redis.database.cache}")
+    private String databaseCache;
+    @Value("${spring.redis.database.token}")
+    private String databaseToken;
+    @Value("${spring.redis.database.mr}")
+    private String databaseMr;
+    @Value("${spring.redis.host}")
+    private String host;
+    @Value("${spring.redis.password}")
+    private String password;
+    @Value("${spring.redis.port}")
+    private int port;
+    @Value("${spring.redis.timeout}")
+    private int timeout;
+    @Value("${spring.redis.lettuce.pool.max-active}")
+    private int maxActive;
+    @Value("${spring.redis.lettuce.pool.max-idle}")
+    private int maxIdle;
+    @Value("${spring.redis.lettuce.pool.max-wait}")
+    private long maxWaitMillis;
+    @Value("${spring.redis.lettuce.pool.min-idle}")
+    private int minIdle;
+
+    @Autowired
+    @Qualifier("factoryForCache")
+    private LettuceConnectionFactory lettuceConnectionFactory;
+
+    @Bean
+    public GenericObjectPoolConfig getRedisConfig() {
+        GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
+        poolConfig.setMaxTotal(maxActive);
+        poolConfig.setMaxIdle(maxIdle);
+        poolConfig.setMaxWaitMillis(maxWaitMillis);
+        poolConfig.setMinIdle(minIdle);
+        return poolConfig;
+    }
+
+    @Bean
+    @Override
+    public CacheManager cacheManager() {
+        RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig()
+                // 设置 key为string序列化
+                .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
+                // 设置value为json序列化
+                .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(getSerializer()))
+                // 不缓存空值
+                .disableCachingNullValues();
+        RedisCacheManager cacheManager = RedisCacheManager.builder(lettuceConnectionFactory)
+                .cacheDefaults(redisCacheConfiguration)
+                .transactionAware()
+                .build();
+        cacheManager.afterPropertiesSet();
+        log.info("RedisCacheManager config success");
+        return cacheManager;
+    }
+
+    @Bean(name = "springSessionDefaultRedisSerializer")
+    public GenericJackson2JsonRedisSerializer getGenericJackson2JsonRedisSerializer() {
+        return new GenericJackson2JsonRedisSerializer();
+    }
+
+    /**
+     * 缓存使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForCache")
+    @Primary
+    public LettuceConnectionFactory redisConnectionFactory() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseCache));
+    }
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate() {
+        return getRedisTemplate(lettuceConnectionFactory);
+    }
+
+    private Jackson2JsonRedisSerializer getSerializer() {
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<>(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+        return jackson2JsonRedisSerializer;
+    }
+
+    @Bean
+    @Override
+    public KeyGenerator keyGenerator() {
+        //  设置自动key的生成规则,配置spring boot的注解,进行方法级别的缓存
+        // 使用:进行分割,可以很多显示出层级关系
+        // 这里其实就是new了一个KeyGenerator对象
+        return (target, method, params) -> {
+            StringBuilder sb = new StringBuilder();
+            sb.append(target.getClass().getName());
+            sb.append(":");
+            sb.append(method.getName());
+            for (Object obj : params) {
+                sb.append(":" + String.valueOf(obj));
+            }
+            String rsToUse = String.valueOf(sb);
+            log.info("自动生成Redis Key -> [{}]", rsToUse);
+            return rsToUse;
+        };
+    }
+
+    /**
+     * Token使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForToken")
+    public LettuceConnectionFactory redisConnectionFactoryForToken() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseToken));
+    }
+
+    @Bean(name = "redisTemplateForToken")
+    public RedisTemplate<String, Object> redisTemplateForToken(@Qualifier("factoryForToken") LettuceConnectionFactory factory) {
+        return getRedisTemplate(factory);
+    }
+
+    /**
+     * 电子病历使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForMr")
+    public LettuceConnectionFactory redisConnectionFactoryForIdc() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseMr));
+    }
+
+    @Bean(name = "redisTemplateForMr")
+    public RedisTemplate<String, Object> redisTemplateForIdc(@Qualifier("factoryForMr") LettuceConnectionFactory factory) {
+        return getRedisTemplate(factory);
+    }
+
+
+    private LettuceConnectionFactory getRedisConnectionFactory(Integer database) {
+        RedisStandaloneConfiguration connection = new RedisStandaloneConfiguration();
+        connection.setHostName(host);
+        connection.setPort(port);
+        connection.setPassword(password);
+        connection.setDatabase(database);
+        GenericObjectPoolConfig poolConfig = getRedisConfig();
+        LettuceClientConfiguration builder = LettucePoolingClientConfiguration.builder()
+                .commandTimeout(Duration.ofMillis(timeout))
+                .poolConfig(poolConfig)
+                .shutdownTimeout(Duration.ZERO)
+                .build();
+        LettuceConnectionFactory factory = new LettuceConnectionFactory(connection, builder);
+        return factory;
+    }
+
+    private RedisTemplate<String, Object> getRedisTemplate(LettuceConnectionFactory factory) {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(factory);
+
+        // value值的序列化
+        redisTemplate.setValueSerializer(getSerializer());
+        redisTemplate.setHashValueSerializer(getSerializer());
+        // key的序列化采用StringRedisSerializer
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+        redisTemplate.afterPropertiesSet();
+        return redisTemplate;
+    }
+}
+ 

+ 175 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -0,0 +1,175 @@
+package com.diagbot.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.jwt.crypto.sign.RsaVerifier;
+import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
+import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
+import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
+import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
+import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
+import org.springframework.util.FileCopyUtils;
+
+import java.io.IOException;
+
+/**
+ * @Description: 权限资源配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@EnableResourceServer
+@ComponentScan({ "com.diagbot.config" })
+public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
+    Logger log = LoggerFactory.getLogger(ResourceServerConfigurer.class);
+
+    @Override
+    public void configure(HttpSecurity http) throws Exception {
+        http.cors()
+                .and()
+                .csrf().disable()
+                .authorizeRequests()
+                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+                .antMatchers("/sys/user/getJwt").permitAll()
+                .antMatchers("/sys/user/refreshJwt").permitAll()
+                .antMatchers("/sys/user/checkToken").permitAll()
+                //.antMatchers("/sys/user/getUserOrgMenu").permitAll()
+                .antMatchers("/oauth/token").permitAll()
+                .antMatchers("/oauth/check_token").permitAll()
+                .antMatchers("/tran/mappingConfig/exportExcelModule").permitAll()
+                .antMatchers("/tran/mappingConfig/dataVerify").permitAll()
+                .antMatchers("/tran/mappingConfig/precDataMatch").permitAll()
+                .antMatchers("/tran/mappingConfig/precData").permitAll()
+                .antMatchers("/tran/mappingConfig/precDataMatch_remote").permitAll()
+                .antMatchers("/tran/mappingConfig/importExcelDataVerify").permitAll()
+                .antMatchers("/tran/mappingConfig/importExcel").permitAll()
+                .antMatchers("/tran/mappingConfig/importExcel_remote").permitAll()
+                .antMatchers("/tran/mappingConfig/exportExcel").permitAll()
+                .antMatchers("/tran/mappingConfig/exportExcel_remote").permitAll()
+                .antMatchers("/tran/mappingConfig/getPage").permitAll()
+                .antMatchers("/tran/mappingConfig/getRecord").permitAll()
+                .antMatchers("/tran/mappingConfig/getRelatedMapping").permitAll()
+                .antMatchers("/tran/mappingConfig/isExistRecord").permitAll()
+                .antMatchers("/tran/mappingConfig/saveOrUpdateRecord").permitAll()
+                .antMatchers("/tran/mappingConfig/deleteRecord").permitAll()
+                .antMatchers("/tran/mappingConfig/deleteRecords").permitAll()
+                //.antMatchers("/tran/hospitalInfo/saveRecord").permitAll()
+                .antMatchers("/tran/log/pageList").permitAll()
+                .antMatchers("/tran/log/getRecordById").permitAll()
+                .antMatchers("/tran/log/getStatistByDept").permitAll()
+                .antMatchers("/tran/hospitalInfo/getHospitalInfo").permitAll()
+                .antMatchers("/tran/hospitalInfo/getAllHospitalInfo").permitAll()
+                .antMatchers("/tran/hospitalInfo/getAllEnableHospitalInfo").permitAll()
+                .antMatchers("/tran/hospitalInfo/getHospitalInfoById").permitAll()
+                .antMatchers("/sys/versionInfo/getVersionInfoAlls").permitAll()
+                .antMatchers("/sys/disclaimerInfo/getDisclaimerInfo").permitAll()
+                .antMatchers("/sys/mr/createMr").permitAll()
+                .antMatchers("/sys/mr/getMr").permitAll()
+                .antMatchers("/sys/mr/getTcmMr").permitAll()
+                .antMatchers("/sys/mr/getIndicationMr").permitAll()
+                .antMatchers("/sys/plan/getSysPlanInfoDatas").permitAll()
+                .antMatchers("/sys/mrqc/analyze_run").permitAll()
+                .antMatchers("/sys/tokenPermission/delPermission").permitAll()
+                .antMatchers("/sys/tokenPermission/getPermission").permitAll()
+                .antMatchers("/sys/push/push").permitAll()
+                .antMatchers("/sys/push/pushApi").permitAll()
+                .antMatchers("/sys/push/indicationPush").permitAll()
+                .antMatchers("/sys/push/indicationExtPush").permitAll()
+                .antMatchers("/sys/push/pushPlan").permitAll()
+                .antMatchers("/demo/templateInfo/updateByIdUsNames").permitAll()
+                .antMatchers("/demo/templateInfo/saveTemplateInfo").permitAll()
+                .antMatchers("/demo/templateInfo/cancelTemplateInfos").permitAll()
+                .antMatchers("/demo/templateInfo/getTemplatePageAlls").permitAll()
+                .antMatchers("/demo/templateInfo/getTemplatebyId").permitAll()
+                .antMatchers("/sys/tokenPermission/getPermission").permitAll()
+                //.antMatchers("/sys/plan/getPlanInfoPages").permitAll()
+                //.antMatchers("/sys/plan/savePlanInfoDatas").permitAll()
+                //.antMatchers("/sys/plan/getSysPlanInfoDatas").permitAll()
+                //.antMatchers("/sys/plan/cancelPlanDatas").permitAll()
+                //.antMatchers("/sys/plan/revStopPlans").permitAll()
+                .antMatchers("/sys/tokenHospital/getTokenHospital").permitAll()
+                .antMatchers("/demo/retrieval/index").permitAll()
+                .antMatchers("/demo/retrieval/diseaseIndex").permitAll()
+                .antMatchers("/kl/conceptInfo/staticKnowledgeIndex").permitAll()
+                .antMatchers("/kl/conceptInfo/staticKnowledgeIndexWithoutInfo").permitAll()
+                .antMatchers("/kl/conceptInfo/getStaticKnowledge").permitAll()
+                .antMatchers("/kl/conceptInfo/getStaticKnowledgeForHIS").permitAll()
+                .antMatchers("/kl/conceptInfo/isExistForHIS").permitAll()
+                .antMatchers("/kl/conceptInfo/getPage").permitAll()
+                .antMatchers("/kl/conceptInfo/staticIndexPage").permitAll()
+                //.antMatchers("/kl/conceptInfo/saveOrUpdateRecord").permitAll()
+                //.antMatchers("/kl/conceptInfo/changeStatus").permitAll()
+                .antMatchers("/kl/conceptInfo/isExist").permitAll()
+                .antMatchers("/kl/conceptInfo/getRecordById").permitAll()
+                .antMatchers("/kl/conceptInfo/updateHasInfoStatusBatch").permitAll()
+                .antMatchers("/sys/planDetail/getPlanDetailDatas").permitAll()
+                //.antMatchers("/sys/planDetail/savePlanDetails").permitAll()
+                //.antMatchers("/sys/planDetail/cancelPlanDetails").permitAll()
+                //.antMatchers("/sys/planDetail/revStopPlanDetails").permitAll()
+                //.antMatchers("/sys/plan/getDefaultPlans").permitAll()
+                .antMatchers("/sys/dictionaryInfo/getList").permitAll()
+                .antMatchers("/sys/dictionaryInfo/getListBack").permitAll()
+                .antMatchers("/sys/plan/getPlanInfoIds").permitAll()
+                .antMatchers("/sys/file/uploadImage").permitAll()
+                .antMatchers("/sys/file/deleteRemoteFile").permitAll()
+                .antMatchers("/sys/mrqc/caseWritingPrompt").permitAll()
+                .antMatchers("/demo/testcaseInfo/testcaseProcess").permitAll()
+                .antMatchers("/demo/mrtestInfo/importExcel").permitAll()
+                .antMatchers("/demo/mrtestInfo/exportExcel").permitAll()
+                .antMatchers("/demo/mrtestInfo/mrTestProcess").permitAll()
+                .antMatchers("/kl/dictionary/getDictionarys").permitAll()
+                .antMatchers("/klRulePlan/getMenu").permitAll()
+                .antMatchers("/klRule/getKlRuleInfoPage").permitAll()
+                .antMatchers("/klRule/getByIdRuleInfo").permitAll()
+                .antMatchers("/klRule/saveRuleInfo").permitAll()
+                .antMatchers("/klRule/clearRuleInfo").permitAll()
+                .antMatchers("/klRule/disableRuleInfo").permitAll()
+                .antMatchers("/klRule/startRuleInfo").permitAll()
+                .antMatchers("/klDisease/searchConcept").permitAll()
+                .antMatchers("/klDisease/addConceptClass").permitAll()
+                .antMatchers("/klDisease/searchConceptRuleClass").permitAll()
+                .antMatchers("/cache/clearRuleAll").permitAll()
+                .antMatchers("/term/termMatching").permitAll()
+                .antMatchers("/sys/mr/testIndication").permitAll()
+                .antMatchers("/test/logTest").permitAll()
+                .antMatchers("/klRule/getRulePage").permitAll()
+                .antMatchers("/klRule/getRuleDetail").permitAll()
+                .antMatchers("/**").authenticated();
+        //                .antMatchers("/**").permitAll();
+    }
+
+
+    @Override
+    public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
+        log.info("Configuring ResourceServerSecurityConfigurer");
+        resources.resourceId("user-service").tokenStore(new JwtTokenStore(jwtTokenEnhancerClient()));
+    }
+
+    @Autowired
+    private CustomAccessTokenConverter customAccessTokenConverter;
+
+    @Bean("jwtTokenEnhancerClient")
+    protected JwtAccessTokenConverter jwtTokenEnhancerClient() {
+        JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
+        Resource resource = new ClassPathResource("public.cert");
+        String publicKey;
+        try {
+            publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        converter.setVerifierKey(publicKey);
+        //不设置这个会出现 Cannot convert access token to JSON
+        converter.setVerifier(new RsaVerifier(publicKey));
+        converter.setAccessTokenConverter(customAccessTokenConverter);
+        log.info("Created jwtTokenEnhancerClient success");
+        return converter;
+    }
+}

+ 75 - 0
src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -0,0 +1,75 @@
+package com.diagbot.config;
+
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @Description: Swagger配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@ConditionalOnProperty(prefix = "swagger", value = { "enable" }, havingValue = "true")
+@EnableSwagger2
+public class SwaggerConfigurer {
+    /**
+     * 全局参数
+     *
+     * @return
+     */
+    private List<Parameter> parameter() {
+        List<Parameter> params = new ArrayList<>();
+        params.add(new ParameterBuilder().name("Authorization")
+                .description("Authorization Bearer token")
+                .modelRef(new ModelRef("string"))
+                .parameterType("header")
+                .required(false).build());
+        params.add(new ParameterBuilder().name("token")
+                .description("Authorization token")
+                .modelRef(new ModelRef("string"))
+                .parameterType("header")
+                .required(false).build());
+        return params;
+    }
+
+
+    @Bean
+    public Docket sysApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.diagbot.web"))
+                .paths(PathSelectors.any())
+                .build().globalOperationParameters(parameter());
+        //.securitySchemes(newArrayList(oauth()))
+        // .securityContexts(newArrayList(securityContext()));
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("临床决策系统 api ")
+                .description("临床决策系统服务")
+                .termsOfServiceUrl("")
+                .contact(new Contact("diagbot","",""))
+                .version("1.0")
+                .build();
+    }
+
+}

+ 69 - 0
src/main/java/com/diagbot/config/WebSecurityConfigurer.java

@@ -0,0 +1,69 @@
+package com.diagbot.config;
+
+import com.diagbot.service.UrlUserService;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.AuthenticationEntryPoint;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @Description: WebSecurity配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:24
+ */
+@Configuration
+class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
+
+    @Override
+    @Bean
+    public AuthenticationManager authenticationManagerBean() throws Exception {
+        return super.authenticationManagerBean();
+    }
+
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        //CSRF:因为不再依赖于Cookie,所以你就不需要考虑对CSRF(跨站请求伪造)的防范。
+        http
+                .csrf().disable()
+                .exceptionHandling()
+                // .authenticationEntryPoint((request, response, authException) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED))
+                .authenticationEntryPoint(new AuthenticationEntryPoint() {
+                    @Override
+                    public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
+                        httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                    }
+                })
+                .and()
+                .authorizeRequests()
+                .regexMatchers("/actuator.*").permitAll()
+                .antMatchers("/**").authenticated()
+                .and()
+                .httpBasic();
+    }
+
+    @Bean
+    UrlUserService urlUserService() {
+        return new UrlUserService();
+    }
+
+    @Bean
+    public PasswordEncoder passwordEncoder() {
+        return PasswordEncoderFactories.createDelegatingPasswordEncoder();
+    }
+
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+        auth.userDetailsService(urlUserService()).passwordEncoder(passwordEncoder());
+    }
+}

+ 223 - 0
src/main/java/com/diagbot/config/mybatisLike/AbstractLikeSqlConverter.java

@@ -0,0 +1,223 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.beans.IntrospectionException;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+
+/**
+ * @Description: 包含like的SQL语句转义模板
+ * @author: gaodm
+ * @time: 2020/11/2 16:05
+ */
+@Slf4j
+public abstract class AbstractLikeSqlConverter<T> {
+
+    /**
+     * SQL语句like使用关键字%
+     */
+    private final static String LIKE_SQL_KEY = "%";
+
+    /**
+     * SQL语句需要转义的关键字
+     */
+    private final static String[] ESCAPE_CHAR = new String[] { LIKE_SQL_KEY, "_", "\\" };
+
+    /**
+     * mybatis-plus中like的SQL语句样式
+     */
+    private final static String MYBATIS_PLUS_LIKE_SQL = " like ?";
+
+    /**
+     * mybatis-plus中参数前缀
+     */
+    private final static String MYBATIS_PLUS_WRAPPER_PREFIX = "ew.paramNameValuePairs.";
+
+    /**
+     * mybatis-plus中参数键
+     */
+    final static String MYBATIS_PLUS_WRAPPER_KEY = "ew";
+
+    /**
+     * mybatis-plus中参数分隔符
+     */
+    final static String MYBATIS_PLUS_WRAPPER_SEPARATOR = ".";
+
+    /**
+     * mybatis-plus中参数分隔符替换器
+     */
+    final static String MYBATIS_PLUS_WRAPPER_SEPARATOR_REGEX = "\\.";
+
+    /**
+     * 已经替换过的标记
+     */
+    final static String REPLACED_LIKE_KEYWORD_MARK = "replaced.keyword";
+
+    /**
+     * 转义特殊字符
+     *
+     * @param sql       SQL语句
+     * @param fields    字段列表
+     * @param parameter 参数对象
+     */
+    public void convert(String sql, Set<String> fields, T parameter) {
+        for (String field : fields) {
+            if (this.hasMybatisPlusLikeSql(sql)) {
+                if (this.hasWrapper(field)) {
+                    // 第一种情况:在业务层进行条件构造产生的模糊查询关键字,使用QueryWrapper,LambdaQueryWrapper
+                    this.transferWrapper(field, parameter);
+                } else {
+                    // 第二种情况:未使用条件构造器,但是在service层进行了查询关键字与模糊查询符`%`手动拼接
+                    this.transferSelf(field, parameter);
+                }
+            } else {
+                // 第三种情况:在Mapper类的注解SQL中进行了模糊查询的拼接
+                this.transferSplice(field, parameter);
+            }
+        }
+    }
+
+    /**
+     * 转义条件构造的特殊字符
+     * 在业务层进行条件构造产生的模糊查询关键字,使用QueryWrapper,LambdaQueryWrapper
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferWrapper(String field, T parameter);
+
+    /**
+     * 转义自定义条件拼接的特殊字符
+     * 未使用条件构造器,但是在service层进行了查询关键字与模糊查询符`%`手动拼接
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferSelf(String field, T parameter);
+
+    /**
+     * 转义自定义条件拼接的特殊字符
+     * 在Mapper类的注解SQL中进行了模糊查询的拼接
+     *
+     * @param field     字段名称
+     * @param parameter 参数对象
+     */
+    public abstract void transferSplice(String field, T parameter);
+
+    /**
+     * 转义通配符
+     *
+     * @param before 待转义字符串
+     * @return 转义后字符串
+     */
+    String escapeChar(String before) {
+        if (StringUtils.isNotBlank(before)) {
+            before = before.replaceAll("\\\\", "\\\\\\\\");
+            before = before.replaceAll("_", "\\\\_");
+            before = before.replaceAll("%", "\\\\%");
+        }
+        return before;
+    }
+
+    /**
+     * 是否包含需要转义的字符
+     *
+     * @param obj 待判断的对象
+     * @return true/false
+     */
+    boolean hasEscapeChar(Object obj) {
+        if (!(obj instanceof String)) {
+            return false;
+        }
+        return this.hasEscapeChar((String) obj);
+    }
+
+    /**
+     * 处理对象like问题
+     *
+     * @param field     对象字段
+     * @param parameter 对象
+     */
+    void resolveObj(String field, Object parameter) {
+        if (parameter == null || StringUtils.isBlank(field)) {
+            return;
+        }
+        try {
+            PropertyDescriptor descriptor = new PropertyDescriptor(field, parameter.getClass());
+            Method readMethod = descriptor.getReadMethod();
+            Object param = readMethod.invoke(parameter);
+            if (this.hasEscapeChar(param)) {
+                Method setMethod = descriptor.getWriteMethod();
+                setMethod.invoke(parameter, this.escapeChar(param.toString()));
+            } else if (this.cascade(field)) {
+                int index = field.indexOf(MYBATIS_PLUS_WRAPPER_SEPARATOR) + 1;
+                this.resolveObj(field.substring(index), param);
+            }
+        } catch (IntrospectionException | IllegalAccessException | InvocationTargetException e) {
+            log.error("反射 {} 的 {} get/set方法出现异常", parameter, field, e);
+        }
+    }
+
+    /**
+     * 判断是否是级联属性
+     *
+     * @param field 字段名
+     * @return true/false
+     */
+    boolean cascade(String field) {
+        if (StringUtils.isBlank(field)) {
+            return false;
+        }
+        return field.contains(MYBATIS_PLUS_WRAPPER_SEPARATOR) && !this.hasWrapper(field);
+    }
+
+    /**
+     * 是否包含mybatis-plus的包含like的SQL语句格式
+     *
+     * @param sql 完整SQL语句
+     * @return true/false
+     */
+    private boolean hasMybatisPlusLikeSql(String sql) {
+        if (StringUtils.isBlank(sql)) {
+            return false;
+        }
+        return sql.toLowerCase().contains(MYBATIS_PLUS_LIKE_SQL);
+    }
+
+    /**
+     * 判断是否使用mybatis-plus条件构造器
+     *
+     * @param field 字段
+     * @return true/false
+     */
+    private boolean hasWrapper(String field) {
+        if (StringUtils.isBlank(field)) {
+            return false;
+        }
+        return field.contains(MYBATIS_PLUS_WRAPPER_PREFIX);
+    }
+
+    /**
+     * 判断字符串是否含有需要转义的字符
+     *
+     * @param str 待判断的字符串
+     * @return true/false
+     */
+    private boolean hasEscapeChar(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        for (String s : ESCAPE_CHAR) {
+            if (str.contains(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

+ 79 - 0
src/main/java/com/diagbot/config/mybatisLike/MapLikeSqlConverter.java

@@ -0,0 +1,79 @@
+package com.diagbot.config.mybatisLike;
+
+import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
+
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * @Description: 参数对象为Map的转换器
+ * @author: gaodm
+ * @time: 2020/11/2 16:07
+ */
+public class MapLikeSqlConverter extends AbstractLikeSqlConverter<Map> {
+
+    @Override
+    public void transferWrapper(String field, Map parameter) {
+        AbstractWrapper wrapper = (AbstractWrapper) parameter.get(MYBATIS_PLUS_WRAPPER_KEY);
+        parameter = wrapper.getParamNameValuePairs();
+        String[] keys = field.split(MYBATIS_PLUS_WRAPPER_SEPARATOR_REGEX);
+        // ew.paramNameValuePairs.param1,截取字符串之后,获取第三个,即为参数名
+        String paramName = keys[2];
+        String mapKey = String.format("%s.%s", REPLACED_LIKE_KEYWORD_MARK, paramName);
+        if (parameter.containsKey(mapKey) && Objects.equals(parameter.get(mapKey), true)) {
+            return;
+        }
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+        } else {
+            Object param = parameter.get(paramName);
+            if (this.hasEscapeChar(param)) {
+                String paramStr = param.toString();
+                parameter.put(keys[2], String.format("%%%s%%", this.escapeChar(paramStr.substring(1, paramStr.length() - 1))));
+            }
+        }
+        parameter.put(mapKey, true);
+    }
+
+    @Override
+    public void transferSelf(String field, Map parameter) {
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+            return;
+        }
+        Object param = parameter.get(field);
+        if (this.hasEscapeChar(param)) {
+            String paramStr = param.toString();
+            parameter.put(field, String.format("%%%s%%", this.escapeChar(paramStr.substring(1, paramStr.length() - 1))));
+        }
+    }
+
+    @Override
+    public void transferSplice(String field, Map parameter) {
+        if (this.cascade(field)) {
+            this.resolveCascadeObj(field, parameter);
+            return;
+        }
+        Object param = parameter.get(field);
+        if (this.hasEscapeChar(param)) {
+            parameter.put(field, this.escapeChar(param.toString()));
+        }
+    }
+
+    /**
+     * 处理级联属性
+     *
+     * @param field     级联字段名
+     * @param parameter 参数Map对象
+     */
+    private void resolveCascadeObj(String field, Map parameter) {
+        int index = field.indexOf(MYBATIS_PLUS_WRAPPER_SEPARATOR);
+        Object param = parameter.get(field.substring(0, index));
+        if (param == null) {
+            return;
+        }
+        this.resolveObj(field.substring(index + 1), param);
+    }
+
+}
+

+ 160 - 0
src/main/java/com/diagbot/config/mybatisLike/MybatisLikeSqlInterceptor.java

@@ -0,0 +1,160 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.plugin.Interceptor;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+/**
+ * @Description: mybatis/mybatis-plus模糊查询语句特殊字符转义拦截器
+ * @author: gaodm
+ * @time: 2020/11/2 16:04
+ */
+@Intercepts({ @Signature(type = Executor.class, method = "query", args = { MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class }) })
+@Slf4j
+public class MybatisLikeSqlInterceptor implements Interceptor {
+
+    /**
+     * SQL语句like
+     */
+    private final static String SQL_LIKE = " like ";
+
+    /**
+     * SQL语句占位符
+     */
+    private final static String SQL_PLACEHOLDER = "?";
+
+    /**
+     * SQL语句占位符分隔
+     */
+    private final static String SQL_PLACEHOLDER_REGEX = "\\?";
+
+    /**
+     * 所有的转义器
+     */
+    private static Map<Class, AbstractLikeSqlConverter> converterMap = new HashMap<>(4);
+
+    static {
+        converterMap.put(Map.class, new MapLikeSqlConverter());
+        converterMap.put(Object.class, new ObjectLikeSqlConverter());
+    }
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+        Object[] args = invocation.getArgs();
+        MappedStatement statement = (MappedStatement) args[0];
+        Object parameterObject = args[1];
+        BoundSql boundSql = statement.getBoundSql(parameterObject);
+        String sql = boundSql.getSql();
+        this.transferLikeSql(sql, parameterObject, boundSql);
+        return invocation.proceed();
+    }
+
+    @Override
+    public Object plugin(Object target) {
+        return Plugin.wrap(target, this);
+    }
+
+    @Override
+    public void setProperties(Properties arg0) {
+
+    }
+
+    /**
+     * 修改包含like的SQL语句
+     *
+     * @param sql             SQL语句
+     * @param parameterObject 参数对象
+     * @param boundSql        绑定SQL对象
+     */
+    private void transferLikeSql(String sql, Object parameterObject, BoundSql boundSql) {
+        if (!isEscape(sql)) {
+            return;
+        }
+        sql = sql.replaceAll(" {2}", " ");
+        // 获取关键字的个数(去重)
+        Set<String> fields = this.getKeyFields(sql, boundSql);
+        if (fields == null) {
+            return;
+        }
+        // 此处可以增强,不止是支持Map对象,Map对象仅用于传入的条件为Map或者使用@Param传入的对象被Mybatis转为的Map
+        AbstractLikeSqlConverter converter;
+        // 对关键字进行特殊字符“清洗”,如果有特殊字符的,在特殊字符前添加转义字符(\)
+        if (parameterObject instanceof Map) {
+            converter = converterMap.get(Map.class);
+        } else {
+            converter = converterMap.get(Object.class);
+        }
+        converter.convert(sql, fields, parameterObject);
+    }
+
+    /**
+     * 是否需要转义
+     *
+     * @param sql SQL语句
+     * @return true/false
+     */
+    private boolean isEscape(String sql) {
+        return this.hasLike(sql) && this.hasPlaceholder(sql);
+    }
+
+    /**
+     * 判断SQL语句中是否含有like关键字
+     *
+     * @param str SQL语句
+     * @return true/false
+     */
+    private boolean hasLike(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        return str.toLowerCase().contains(SQL_LIKE);
+    }
+
+    /**
+     * 判断SQL语句中是否包含SQL占位符
+     *
+     * @param str SQL语句
+     * @return true/false
+     */
+    private boolean hasPlaceholder(String str) {
+        if (StringUtils.isBlank(str)) {
+            return false;
+        }
+        return str.toLowerCase().contains(SQL_PLACEHOLDER);
+    }
+
+    /**
+     * 获取需要替换的所有字段集合
+     *
+     * @param sql      完整SQL语句
+     * @param boundSql 绑定的SQL对象
+     * @return 字段集合列表
+     */
+    private Set<String> getKeyFields(String sql, BoundSql boundSql) {
+        String[] params = sql.split(SQL_PLACEHOLDER_REGEX);
+        Set<String> fields = new HashSet<>();
+        for (int i = 0; i < params.length; i++) {
+            if (this.hasLike(params[i])) {
+                String field = boundSql.getParameterMappings().get(i).getProperty();
+                fields.add(field);
+            }
+        }
+        return fields;
+    }
+
+}

+ 28 - 0
src/main/java/com/diagbot/config/mybatisLike/ObjectLikeSqlConverter.java

@@ -0,0 +1,28 @@
+package com.diagbot.config.mybatisLike;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @Description: 通用参数的转换器
+ * @author: gaodm
+ * @time: 2020/11/2 16:06
+ */
+@Slf4j
+public class ObjectLikeSqlConverter extends AbstractLikeSqlConverter<Object> {
+
+    @Override
+    public void transferWrapper(String field, Object parameter) {
+        // 尚未发现这种情况
+    }
+
+    @Override
+    public void transferSelf(String field, Object parameter) {
+        // 尚未发现这种情况
+    }
+
+    @Override
+    public void transferSplice(String field, Object parameter) {
+        this.resolveObj(field, parameter);
+    }
+
+}

+ 199 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -0,0 +1,199 @@
+package com.diagbot.config.security;
+
+import com.diagbot.facade.TokenFacade;
+import com.diagbot.util.HttpUtils;
+import com.diagbot.util.StringUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.AccessDecisionManager;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.authentication.AccountExpiredException;
+import org.springframework.security.authentication.InsufficientAuthenticationException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:46
+ */
+@Service
+public class UrlAccessDecisionManager implements AccessDecisionManager {
+    @Autowired
+    private TokenFacade tokenFacade;
+
+    @Override
+    public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException {
+        HttpServletRequest request = ((FilterInvocation) object).getHttpRequest();
+        String url, method;
+        if (matchPermitAllUrl(request)) {
+            return;
+        }
+        if ("anonymousUser".equals(authentication.getPrincipal())) {
+            throw new AccessDeniedException("no right");
+        } else {
+            String tokenStr = HttpUtils.getHeaders(request).get("Authorization");
+            if (StringUtil.isNotEmpty(tokenStr)) {
+                tokenStr = tokenStr.replaceFirst("Bearer ", "");
+                Boolean res = tokenFacade.verifyToken(tokenStr, 1);
+                if (!res) {
+                    throw new AccountExpiredException("token expire");
+                }
+            }
+            for (GrantedAuthority ga : authentication.getAuthorities()) {
+                String[] authority = ga.getAuthority().split(";");
+                url = authority[0];
+                method = authority[1];
+                if (matchers(url, request)) {
+                    if (method.equals(request.getMethod()) || "ALL".equals(method)) {
+                        return;
+                    }
+                }
+            }
+        }
+        throw new AccessDeniedException("no right");
+    }
+
+
+    @Override
+    public boolean supports(ConfigAttribute attribute) {
+        return true;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+
+    private Boolean matchPermitAllUrl(HttpServletRequest request) {
+        if (matchers("/swagger/**", request)
+                || matchers("/v2/**", request)
+                || matchers("/swagger-ui.html/**", request)
+                || matchers("/swagger-resources/**", request)
+                || matchers("/webjars/**", request)
+                || matchers("/druid/**", request)
+                || matchers("/actuator/**", request)
+                || matchers("/hystrix/**", request)
+                || matchers("/sys/user/getJwt", request)
+                || matchers("/sys/user/refreshJwt", request)
+                || matchers("/sys/user/checkToken", request)
+                //|| matchers("/sys/user/getUserOrgMenu", request)
+                || matchers("/oauth/token", request)
+                || matchers("/oauth/check_token", request)
+                || matchers("/tran/mappingConfig/exportExcelModule", request)
+                || matchers("/tran/mappingConfig/dataVerify", request)
+                || matchers("/tran/mappingConfig/precDataMatch", request)
+                || matchers("/tran/mappingConfig/precData", request)
+                || matchers("/tran/mappingConfig/precDataMatch_remote", request)
+                || matchers("/tran/mappingConfig/importExcelDataVerify", request)
+                || matchers("/tran/mappingConfig/importExcel", request)
+                || matchers("/tran/mappingConfig/importExcel_remote", request)
+                || matchers("/tran/mappingConfig/exportExcel", request)
+                || matchers("/tran/mappingConfig/exportExcel_remote", request)
+                || matchers("/tran/mappingConfig/getPage", request)
+                || matchers("/tran/mappingConfig/getRecord", request)
+                || matchers("/tran/mappingConfig/getRelatedMapping", request)
+                || matchers("/tran/mappingConfig/isExistRecord", request)
+                || matchers("/tran/mappingConfig/saveOrUpdateRecord", request)
+                || matchers("/tran/mappingConfig/deleteRecord", request)
+                || matchers("/tran/mappingConfig/deleteRecords", request)
+                || matchers("/tran/log/pageList", request)
+                || matchers("/tran/log/getRecordById", request)
+                || matchers("/tran/log/getStatistByDept", request)
+                //|| matchers("/tran/hospitalInfo/saveRecord", request)
+                || matchers("/tran/hospitalInfo/getHospitalInfo", request)
+                || matchers("/tran/hospitalInfo/getAllHospitalInfo", request)
+                || matchers("/tran/hospitalInfo/getAllEnableHospitalInfo", request)
+                || matchers("/tran/hospitalInfo/getHospitalInfoById", request)
+                || matchers("/sys/versionInfo/getVersionInfoAlls", request)
+                || matchers("/sys/disclaimerInfo/getDisclaimerInfo", request)
+                || matchers("/sys/mr/createMr", request)
+                || matchers("/sys/mr/getMr", request)
+                || matchers("/sys/mr/getTcmMr", request)
+                || matchers("/sys/mr/getIndicationMr", request)
+                || matchers("/sys/plan/getSysPlanInfoDatas", request)
+                || matchers("/sys/mrqc/analyze_run", request)
+                || matchers("/sys/tokenPermission/delPermission", request)
+                || matchers("/sys/tokenPermission/getPermission", request)
+                || matchers("/sys/push/push", request)
+                || matchers("/sys/push/pushApi", request)
+                || matchers("/sys/push/indicationPush", request)
+                || matchers("/sys/push/indicationExtPush", request)
+                || matchers("/sys/push/pushPlan", request)
+                || matchers("/demo/templateInfo/updateByIdUsNames", request)
+                || matchers("/demo/templateInfo/saveTemplateInfo", request)
+                || matchers("/demo/templateInfo/cancelTemplateInfos", request)
+                || matchers("/demo/templateInfo/getTemplatePageAlls", request)
+                || matchers("/demo/templateInfo/getTemplatebyId", request)
+                || matchers("/sys/plan/getPlanInfoPages", request)
+                /*|| matchers("/sys/plan/savePlanInfoDatas", request)
+                || matchers("/sys/plan/getSysPlanInfoDatas", request)
+                || matchers("/sys/plan/cancelPlanDatas", request)*/
+                //|| matchers("/sys/plan/revStopPlans", request)
+                || matchers("/sys/tokenHospital/getTokenHospital", request)
+                || matchers("/demo/retrieval/index", request)
+                || matchers("/demo/retrieval/diseaseIndex", request)
+                || matchers("/kl/conceptInfo/staticKnowledgeIndex", request)
+                || matchers("/kl/conceptInfo/staticKnowledgeIndexWithoutInfo", request)
+                || matchers("/kl/conceptInfo/getStaticKnowledge", request)
+                || matchers("/kl/conceptInfo/getStaticKnowledgeForHIS", request)
+                || matchers("/kl/conceptInfo/isExistForHIS", request)
+                || matchers("/kl/conceptInfo/getPage", request)
+                || matchers("/kl/conceptInfo/staticIndexPage", request)
+                //|| matchers("/kl/conceptInfo/saveOrUpdateRecord", request)
+                //|| matchers("/kl/conceptInfo/changeStatus", request)
+                || matchers("/kl/conceptInfo/isExist", request)
+                || matchers("/kl/conceptInfo/getRecordById", request)
+                || matchers("/kl/conceptInfo/updateHasInfoStatusBatch", request)
+                || matchers("/sys/planDetail/getPlanDetailDatas", request)
+                /*|| matchers("/sys/planDetail/savePlanDetails", request)
+                || matchers("/sys/planDetail/cancelPlanDetails", request)
+                || matchers("/sys/planDetail/revStopPlanDetails", request)
+                || matchers("/sys/plan/getDefaultPlans", request)*/
+                || matchers("/sys/dictionaryInfo/getList", request)
+                || matchers("/sys/dictionaryInfo/getListBack", request)
+                || matchers("/sys/plan/getPlanInfoIds", request)
+                || matchers("/sys/file/uploadImage", request)
+                || matchers("/sys/file/deleteRemoteFile", request)
+                || matchers("/sys/mrqc/caseWritingPrompt", request)
+                || matchers("/demo/testcaseInfo/testcaseProcess", request)
+                || matchers("/demo/mrtestInfo/importExcel", request)
+                || matchers("/demo/mrtestInfo/exportExcel", request)
+                || matchers("/demo/mrtestInfo/mrTestProcess", request)
+                || matchers("/kl/dictionary/getDictionarys", request)
+                || matchers("/klRulePlan/getMenu", request)
+                || matchers("/klRule/getKlRuleInfoPage", request)
+                || matchers("/klRule/getByIdRuleInfo", request)
+                || matchers("/klRule/saveRuleInfo", request)
+                || matchers("/klRule/clearRuleInfo", request)
+                || matchers("/klRule/disableRuleInfo", request)
+                || matchers("/klRule/startRuleInfo", request)
+                || matchers("/klDisease/searchConcept", request)
+                || matchers("/klDisease/addConceptClass", request)
+                || matchers("/klDisease/searchConceptRuleClass", request)
+                || matchers("/cache/clearRuleAll", request)
+                || matchers("/term/termMatching", request)
+                || matchers("/sys/mr/testIndication", request)
+                || matchers("/test/logTest", request)
+                || matchers("/klRule/getRulePage", request)
+                || matchers("/klRule/getRuleDetail", request)
+                || matchers("/", request)) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean matchers(String url, HttpServletRequest request) {
+        AntPathRequestMatcher matcher = new AntPathRequestMatcher(url);
+        if (matcher.matches(request)) {
+            return true;
+        }
+        return false;
+    }
+}

+ 29 - 0
src/main/java/com/diagbot/config/security/UrlConfigAttribute.java

@@ -0,0 +1,29 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+public class UrlConfigAttribute implements ConfigAttribute {
+
+    private final HttpServletRequest httpServletRequest;
+
+    public UrlConfigAttribute(HttpServletRequest httpServletRequest) {
+        this.httpServletRequest = httpServletRequest;
+    }
+
+
+    @Override
+    public String getAttribute() {
+        return null;
+    }
+
+    public HttpServletRequest getHttpServletRequest() {
+        return httpServletRequest;
+    }
+}

+ 79 - 0
src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java

@@ -0,0 +1,79 @@
+package com.diagbot.config.security;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.SecurityMetadataSource;
+import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
+import org.springframework.security.access.intercept.InterceptorStatusToken;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlFilterSecurityInterceptor extends AbstractSecurityInterceptor implements Filter {
+
+
+    @Autowired
+    private FilterInvocationSecurityMetadataSource securityMetadataSource;
+
+    @Autowired
+    public void setUrlAccessDecisionManager(UrlAccessDecisionManager urlAccessDecisionManager) {
+        super.setAccessDecisionManager(urlAccessDecisionManager);
+    }
+
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+
+    }
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+        FilterInvocation fi = new FilterInvocation(request, response, chain);
+        invoke(fi);
+    }
+
+
+    public void invoke(FilterInvocation fi) throws IOException, ServletException {
+        //fi里面有一个被拦截的url
+        //里面调用UrlMetadataSource的getAttributes(Object object)这个方法获取fi对应的所有权限
+        //再调用UrlAccessDecisionManager的decide方法来校验用户的权限是否足够
+        InterceptorStatusToken token = super.beforeInvocation(fi);
+        try {
+            //执行下一个拦截器
+            fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
+        } finally {
+            super.afterInvocation(token, null);
+        }
+    }
+
+
+    @Override
+    public void destroy() {
+
+    }
+
+    @Override
+    public Class<?> getSecureObjectClass() {
+        return FilterInvocation.class;
+
+    }
+
+    @Override
+    public SecurityMetadataSource obtainSecurityMetadataSource() {
+        return this.securityMetadataSource;
+    }
+}

+ 40 - 0
src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java

@@ -0,0 +1,40 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.ConfigAttribute;
+import org.springframework.security.web.FilterInvocation;
+import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @Description: 自定义权限拦截
+ * @author: gaodm
+ * @time: 2018/8/23 13:47
+ */
+@Service
+public class UrlMetadataSourceService implements
+        FilterInvocationSecurityMetadataSource {
+
+    @Override
+    public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException {
+        final HttpServletRequest request = ((FilterInvocation) object).getRequest();
+        Set<ConfigAttribute> allAttributes = new HashSet<>();
+        ConfigAttribute configAttribute = new UrlConfigAttribute(request);
+        allAttributes.add(configAttribute);
+        return allAttributes;
+    }
+
+    @Override
+    public Collection<ConfigAttribute> getAllConfigAttributes() {
+        return null;
+    }
+
+    @Override
+    public boolean supports(Class<?> clazz) {
+        return true;
+    }
+}

+ 23 - 0
src/main/java/com/diagbot/dto/AnalyzeRunDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/4/15 12:24
+ */
+@Getter
+@Setter
+public class AnalyzeRunDTO {
+    // //得分
+    // private BigDecimal scoreRes;
+    // //等级
+    // private String level;
+    // 缺陷条目
+    private List<MsgDTO> msgDTOList = new ArrayList<>();
+}

+ 25 - 0
src/main/java/com/diagbot/dto/BillMsg.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+/**
+ * @description: 开单合理性提示语
+ * @author: zhoutg
+ * @time: 2020/7/29 9:57
+ */
+@Data
+public class BillMsg {
+
+    // 提示信息
+    private String msg;
+    // 开单名称
+    private String orderName;
+    // 明细名称
+    private String orderDetailName;
+    // 开单标准名称
+    private String orderStandName;
+    // 匹配的内容
+    private String content;
+    // 类型
+    private String type;
+}

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

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

+ 61 - 0
src/main/java/com/diagbot/dto/ConceptInfoDTO.java

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

+ 17 - 0
src/main/java/com/diagbot/dto/ConceptScaleDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/12 13:50
+ */
+@Getter
+@Setter
+public class ConceptScaleDTO {
+    List<ConceptScaleSubDTO> scaleDetails;
+}

+ 107 - 0
src/main/java/com/diagbot/dto/ConceptScaleDetailDTO.java

@@ -0,0 +1,107 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/12 13:54
+ */
+@Getter
+@Setter
+public class ConceptScaleDetailDTO {
+    /**
+     * 下级
+     */
+    private List<ConceptScaleSubDTO> subList = new ArrayList<>();
+
+    private Long id;
+    /**
+     * -1:表示顶级,其他值表示上级id
+     */
+    private Long parentId;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 编码
+     */
+    private String ruleCode;
+
+    /**
+     * 扣分
+     */
+    private BigDecimal score;
+
+    /**
+     * 0表格1有分数2无分数
+     */
+    private Integer textType;
+
+    /**
+     * 结果类型(1算分;2显示选择结果)
+     */
+    private Integer resultType;
+
+    /**
+     * 选择类型(1单选2多选)
+     */
+    private Integer selectType;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 术语概念id
+     */
+    private Long conceptId;
+
+
+    /**
+     * 系数
+     */
+    private BigDecimal factor;
+
+    /**
+     * 常数
+     */
+    private BigDecimal constant;
+
+
+    /**
+     * 1:显示,0:不显示,2隐藏
+     */
+    private Integer status;
+
+    /**
+     * 组别互斥(同组互斥)
+     */
+    private Integer groupNum;
+
+    /**
+     * 结果
+     */
+    private String result;
+
+    /**
+     * 推送信息
+     */
+    private String pushInfo;
+
+    private Integer match ;
+}

+ 18 - 0
src/main/java/com/diagbot/dto/ConceptScaleSubDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/25 13:46
+ */
+@Getter
+@Setter
+public class ConceptScaleSubDTO {
+    private Integer groupNum;
+    private List<ConceptScaleDetailDTO> detailList;
+}

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

+ 36 - 0
src/main/java/com/diagbot/dto/DisclaimerInfoDTO.java

@@ -0,0 +1,36 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-27 14:31
+ */
+@Setter
+@Getter
+public class DisclaimerInfoDTO {
+    private Long id;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+
+    /**
+     * 免责申明编号
+     */
+    private String disclaimerCode;
+}

+ 15 - 0
src/main/java/com/diagbot/dto/DiseaseIndexDTO.java

@@ -0,0 +1,15 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2022/4/8 13:52
+ */
+@Data
+public class DiseaseIndexDTO {
+    private Long id;
+    private String name;
+    private String code;
+}

+ 24 - 0
src/main/java/com/diagbot/dto/DiseaseInfoDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/9/15 10:07
+ */
+@Getter
+@Setter
+public class DiseaseInfoDTO {
+    private Long id;
+    /**
+     * 疾病名称
+     */
+    private String name;
+
+    /**
+     * ICD10编码
+     */
+    private String code;
+}

+ 33 - 0
src/main/java/com/diagbot/dto/DrugInfoDTO.java

@@ -0,0 +1,33 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:15
+ */
+@Getter
+@Setter
+public class DrugInfoDTO {
+    private Long id;
+    /**
+     * 药品名称
+     */
+    private String name;
+    /**
+     * 用法
+     */
+    private List<String> usage;
+    /**
+     * 用量、剂量
+     */
+    private List<String> dosage;
+    /**
+     * 频次
+     */
+    private List<String> frequency;
+}

+ 28 - 0
src/main/java/com/diagbot/dto/FileDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/12/18 17:08
+ */
+@Getter
+@Setter
+public class FileDTO {
+    private String state;
+    private String original;
+    private String title;
+    private String url;
+    private String md5;
+    private String info;
+
+    public FileDTO(String state, String info) {
+        this.state = state;
+        this.info = info;
+    }
+    public FileDTO(){
+
+    }
+}

+ 17 - 0
src/main/java/com/diagbot/dto/FileDeleteDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/11/4 11:09
+ */
+@Getter
+@Setter
+public class FileDeleteDTO {
+    private Object data;
+    private String message;
+    private String status;
+}

+ 25 - 0
src/main/java/com/diagbot/dto/FileUploadDTO.java

@@ -0,0 +1,25 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/11/4 10:55
+ */
+@Getter
+@Setter
+public class FileUploadDTO {
+    private String url;
+    private String md5;
+    private String path;
+    private String domain;
+    private String scene;
+    private int size;
+    private int mtime;
+    private String scenes;
+    private String retmsg;
+    private int retcode;
+    private String src;
+}

+ 46 - 0
src/main/java/com/diagbot/dto/GetAllForRelationDTO.java

@@ -0,0 +1,46 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-17 15:23
+ */
+@Setter
+@Getter
+public class GetAllForRelationDTO {
+    /**
+     * 概念id
+     */
+    @ApiModelProperty(value="概念id")
+    private Long conceptId;
+
+    /**
+     * 概念名称
+     */
+    @ApiModelProperty(value="概念名称")
+    private String conceptName;
+
+    /**
+     * 概念id
+     */
+    @ApiModelProperty(value="概念id")
+    private Integer libType;
+
+    /**
+     * 概念名称(类型)
+     */
+    @ApiModelProperty(value="概念名称(类型)")
+    private String conceptNameType;
+
+    /**
+     * 说明
+     */
+    @ApiModelProperty(value="说明(remark)")
+    private String remark;
+
+}
+

+ 49 - 0
src/main/java/com/diagbot/dto/HospitalInfoDTO.java

@@ -0,0 +1,49 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-29 11:09
+ */
+@Getter
+@Setter
+public class HospitalInfoDTO {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 医院编码
+     */
+    private String code;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}
+

+ 72 - 0
src/main/java/com/diagbot/dto/HospitalInfoGetDTO.java

@@ -0,0 +1,72 @@
+package com.diagbot.dto;
+
+import com.google.common.collect.Lists;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 医院信息表
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+@Data
+public class HospitalInfoGetDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 状态:0.禁用1.启用
+     */
+    private Integer status;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 子医院关联表
+     */
+    private List<HospitalRelationDTO> hospitalRelationDTOList = Lists.newLinkedList();
+}

+ 35 - 0
src/main/java/com/diagbot/dto/HospitalLoginDTO.java

@@ -0,0 +1,35 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-29 11:09
+ */
+@Getter
+@Setter
+public class HospitalLoginDTO {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 医院编码
+     */
+    private String code;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+
+}
+

+ 30 - 0
src/main/java/com/diagbot/dto/HospitalRelationDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 医院关联表
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-08-06
+ */
+@Data
+public class HospitalRelationDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 子医院名称
+     */
+    private String name;
+
+    /**
+     * 子医院编码
+     */
+    private String code;
+
+}

+ 27 - 0
src/main/java/com/diagbot/dto/HospitalRelationErrorDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import com.diagbot.vo.HospitalRelationVO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * 医院关联表提示出错
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-08-06
+ */
+@Data
+public class HospitalRelationErrorDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    // 当前医院重复
+    private List<HospitalRelationVO> errorCurrent;
+
+    // 与其他医院重复
+    private List<HospitalRelationVO> errorOther;
+}

+ 32 - 0
src/main/java/com/diagbot/dto/IndexBatchDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/6/7 10:27
+ */
+@Getter
+@Setter
+public class IndexBatchDTO {
+    private Long id;
+    private Integer status;
+    private String name;
+    private String code;
+    private String synonyms;
+    private Integer type;
+    /**
+     * 国药准字
+     */
+    private String approval;
+    /**
+     * 药品剂型
+     */
+    private String form;
+    /**
+     * 药品剂型id
+     */
+    private Long formConceptId;
+}

+ 27 - 0
src/main/java/com/diagbot/dto/IndicationDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description: 提示信息出参
+ * @author: zhoutg
+ * @time: 2020/7/29 9:57
+ */
+@Data
+public class IndicationDTO {
+    // 危机值提醒
+    private List<BillMsg> criticalValList = new ArrayList<>();
+    // 开单合理性提示信息
+    private List<BillMsg> billMsgList = new ArrayList<>();
+    // 高危药品、手术
+    private List<BillMsg> highRiskList = new ArrayList<>();
+    // 其他提醒
+    private List<BillMsg> otherList = new ArrayList<>();
+    // 记录调试信息
+    private Map<String, Object> debug = new LinkedHashMap<>();
+}

+ 18 - 0
src/main/java/com/diagbot/dto/JwtDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: jwt 输出类
+ * @author: gaodm
+ * @time: 2018/8/2 14:22
+ */
+@Getter
+@Setter
+public class JwtDTO {
+    private String accessToken;
+    private String refreshToken;
+    private Integer type; //用户类型
+    private String typeCn; //用户类型中文
+}

+ 43 - 0
src/main/java/com/diagbot/dto/KlConceptDetailDTO.java

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

+ 63 - 0
src/main/java/com/diagbot/dto/KlConceptStaticDTO.java

@@ -0,0 +1,63 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/2/24 13:38
+ */
+@Getter
+@Setter
+public class KlConceptStaticDTO {
+    /**
+     * 术语id
+     */
+    private Long id;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 关联标题
+     */
+    private String title;
+    /**
+     * 术语类型(词性)
+     */
+    private Integer type;
+    /**
+     * 术语类型(词性)
+     */
+    private String typeName;
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date gmtModified;
+    /**
+     * 修改人
+     */
+    private String modifier;
+    /**
+     * 启用状态
+     */
+    private Integer status;
+    /**
+     * 明细
+     */
+    List<KlConceptDetailDTO> details;
+}

+ 27 - 0
src/main/java/com/diagbot/dto/KlRuleByIdParDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:18
+ */
+@Setter
+@Getter
+public class KlRuleByIdParDTO {
+    private Long parId;
+    private String parDescription;//规则名称
+    private Integer parRuleType;//规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+    private Long parConceptId;//提示概念id
+    private String parlibName;
+    private Integer parHasSub;//是否有子条件(0:无,1:有)
+    private String parMsg;//附加信息
+    private Integer parStatus;//启用状态(0:禁用,1:启用)
+    private String parLenName;
+    private String parLenCode;
+    private List<KlRuleByIdSubDTO>  klRuleByIdSub;
+}

+ 32 - 0
src/main/java/com/diagbot/dto/KlRuleByIdSubDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-08 13:16
+ */
+@Setter
+@Getter
+public class KlRuleByIdSubDTO {
+    private Long subId;//基础规则id
+    private String subDescription;//基础规则名称
+    private Long subConceptId;//医学标准术语id
+    private String subLibName;//医学标准术语
+    private String subLenName;//基础规则术语类型
+    private String subLenCode;//基础规则术语编码
+    private Integer subType;//基础规则类型(1:开单外等于术语本身;2:开单外存在比较;3:开单外不等于术语本身;4:过敏原;5:开单项;6:检查结果正则表达式)
+    private Integer groupType;
+    private String subMinOperator;//最小域比较符
+    private String subMinValue;//最小域值
+    private String subMinUnit;//最小域单位
+    private String subMaxOperator;//最大域比较符
+    private String subMaxValue;//最大域值
+    private String subMaxUnit;//最大域单位
+    private String subEqOperator;//等于域比较符
+    private String subEqValue;//等于域值
+    private String subEqUnit;//等于域单位
+    private String subMsg;
+}

+ 65 - 0
src/main/java/com/diagbot/dto/KlRuleInfoDTO.java

@@ -0,0 +1,65 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-03-05 13:44
+ */
+@Setter
+@Getter
+public class KlRuleInfoDTO {
+
+    /**
+     * 主键
+     */
+    private Long parId;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 提示概念id
+     */
+    private Long parConceptId;
+
+    private String parConceptName;
+
+
+    private String parLibTypeName;
+    /**
+     * 描述
+     */
+    private String parDescription;
+
+    /**
+     * 规则类型(1:开单合理性;2:高危;3:危急值;4:其他值提醒;5:其他值提醒输血;6:正常项目重复开立)
+     */
+    private Integer parRuleType;
+
+    /**
+     * 是否有子条件(0:无,1:有)
+     */
+    private Integer parHasSub;
+
+    /**
+     * 启用状态(0:禁用,1:启用)
+     */
+    private Integer parStatus;
+
+    /**
+     * 附加信息
+     */
+    private String parMsg;
+}

+ 38 - 0
src/main/java/com/diagbot/dto/KllisDetailDTO.java

@@ -0,0 +1,38 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/4/16 14:34
+ */
+@Getter
+@Setter
+public class KllisDetailDTO {
+    /**
+     * 名称
+     */
+    private String libName;
+    /**
+     * 编号
+     */
+    private Long id;
+    /**
+     * 下限
+     */
+    private Double minValue;
+    /**
+     * 上限
+     */
+    private Double maxValue;
+    /**
+     * 单位
+     */
+    private String unit;
+    /**
+     * 参考范围:0-范围内,1-范围外
+     */
+    private Integer type;
+}

+ 51 - 0
src/main/java/com/diagbot/dto/LisDetailDTO.java

@@ -0,0 +1,51 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 15:53
+ */
+@Getter
+@Setter
+public class LisDetailDTO {
+    private Long id;
+    /**
+     * 大项(套餐)
+     */
+    private String name;
+    /**
+     * 小项(公表名)
+     */
+    private String uniqueName;
+    /**
+     * 数值
+     */
+    private Double value;
+    /**
+     * 单位
+     */
+    private String units;
+    /**
+     * 下限
+     */
+    private Double minValue;
+    /**
+     * 上限
+     */
+    private Double maxValue;
+    /**
+     * 非数值结果
+     */
+    private String otherValue;
+    /**
+     * 非数值类型参考值
+     */
+    private String referenceValue;
+    /**
+     * 参考范围:0-范围内,1-范围外
+     */
+    private Integer range;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/LoginDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.wrapper.SysMenuWrapper;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description: 登录输出类
+ * @author: gaodm
+ * @time: 2018/8/2 14:22
+ */
+@Getter
+@Setter
+public class LoginDTO {
+    private UserLoginDTO userLoginDTO;
+    private HospitalLoginDTO hospitalLoginDTO;
+    private List<SysMenuWrapper> menuWrappers;
+}

+ 57 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -0,0 +1,57 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/4/14 13:07
+ */
+@Getter
+@Setter
+public class MsgDTO {
+    //明细主键
+    private Long id;
+    //得分
+    private BigDecimal score;
+    //提示信息
+    private String msg;
+    // 控费标识(1:是控费条目,2:不是控费条目)
+    private Integer drgs;
+    // 质控形式(1:形式质控,2:内涵质控)
+    private Integer type;
+    //提示信息
+    private String code;
+    //提示信息
+    private String info;
+    //标准提示信息
+    private String standardMsg;
+    // 操作类型(1:新增,2:删除,3:修改)
+    private Integer optType;
+    // 初始类型(1:机器,2:人工)
+    private Integer gradeType;
+    //单项否决
+    private String isReject;
+    //模块名称
+    private String modelName;
+    //模块id
+    private String modelId;
+    //模块ID
+    private Long casesId;
+    //模块分数
+    private BigDecimal casesScore;
+    // 条目ID
+    private Long casesEntryId;
+    // 记录创建时间
+    private Date gmtCreate;
+    // 记录修改时间,如果时间是1970年则表示纪录未修改
+    private Date gmtModified;
+    // 条目id对应页面数据的key值
+    private List<Long> pageKeyList = new ArrayList<>();
+}

+ 19 - 0
src/main/java/com/diagbot/dto/NurseInfoDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/23 10:55
+ */
+@Getter
+@Setter
+public class NurseInfoDTO {
+    private Long id;
+    /**
+     * 护理名称
+     */
+    private String name;
+}

+ 23 - 0
src/main/java/com/diagbot/dto/OperationInfoDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 16:21
+ */
+@Getter
+@Setter
+public class OperationInfoDTO {
+    private Long id;
+    /**
+     * 手术或操作名称
+     */
+    private String name;
+    /**
+     * 类型:手术、操作
+     */
+    private String type;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/PermissionDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-29 16:08
+ */
+@Getter
+@Setter
+public class PermissionDTO {
+    private Map<String, Map<String, List<Map<String, Set<String>>>>> permissionMap;
+    private List<TokenPermissionDTO> tokenPermission;
+}

+ 62 - 0
src/main/java/com/diagbot/dto/PlanDetailDTO.java

@@ -0,0 +1,62 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-27 19:01
+ */
+@Setter
+@Getter
+public class PlanDetailDTO {
+    
+    private Long id;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+
+    /**
+     * 方案编号
+     */
+    private Long planId;
+    private Long parentId;
+    /**
+     * 配置名称
+     */
+    private String name;
+
+    /**
+     * 配置编码
+     */
+    private String code;
+
+    private String value;
+
+    /**
+     * 是否显示(1是,0否)
+     */
+    private Integer status;
+
+    /**
+     * 显示个数
+     */
+    private Integer number;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<PlanDetailDTO> planDetails;
+}

+ 34 - 0
src/main/java/com/diagbot/dto/PlanInfoDefaultDTO.java

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

+ 41 - 0
src/main/java/com/diagbot/dto/PlanInfoPageDTO.java

@@ -0,0 +1,41 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-03 11:08
+ */
+@Setter
+@Getter
+public class PlanInfoPageDTO {
+
+    private Long id;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+    /**
+     * 方案编号
+     */
+    private String planName;
+
+    private String planCode;
+
+    private Integer planStatus;
+
+    private Date gmtCreate;
+
+    private String planDetail;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<PlanDetailDTO> sysSetInfo;
+}

+ 28 - 0
src/main/java/com/diagbot/dto/PushBaseDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/8/6 9:59
+ */
+@Getter
+@Setter
+public class PushBaseDTO {
+    //条目名称
+    private String name;
+    //医院端名称
+    private List<String> hisNameList;
+    /**
+     * 是否有静态知识
+     */
+    private Integer hasInfo = 0;
+    /**
+     * 静态知识页面显示类型
+     */
+    private Integer type;
+}

+ 45 - 0
src/main/java/com/diagbot/dto/PushDTO.java

@@ -0,0 +1,45 @@
+package com.diagbot.dto;
+
+import com.google.common.collect.Lists;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 推理出参
+ * @author: gaodm
+ * @time: 2020/8/6 9:54
+ */
+@Getter
+@Setter
+public class PushDTO {
+    //症状
+    private List<PushBaseDTO> symptom = new ArrayList<>();
+    //体格检查
+    private List<PushBaseDTO> vital = new ArrayList<>();
+    //检验
+    private List<PushBaseDTO> lis = new ArrayList<>();
+    //检查
+    private List<PushBaseDTO> pacs = new ArrayList<>();
+    // 手术
+    private List<PushBaseDTO> operations = new ArrayList<>();
+    // 药品
+    private List<PushBaseDTO> medicines = new ArrayList<>();
+    // 并发症
+    private List<PushBaseDTO> complications = new ArrayList<>();
+    // 护理
+    private List<PushBaseDTO> nurse = Lists.newArrayList();
+    //诊断
+    private Map<String, List<PushBaseDTO>> dis;
+    //一般治疗
+    private List<TreatDTO> treat = new ArrayList<>();
+    //推送量表
+    private List<PushScaleDTO> scale = Lists.newArrayList();
+
+    // 记录调试信息
+    private Map<String, Object> debug = new LinkedHashMap<>();
+}

+ 23 - 0
src/main/java/com/diagbot/dto/PushPlanDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 检验检查计划出参
+ * @author: gaodm
+ * @time: 2020/8/31 9:39
+ */
+@Getter
+@Setter
+public class PushPlanDTO {
+    // 随访计划信息
+    private List<PushPlansDTO> pushPlans = new ArrayList<>();
+    // 记录调试信息
+    private Map<String, Object> debug = new LinkedHashMap<>();
+}

+ 30 - 0
src/main/java/com/diagbot/dto/PushPlanDetailDTO.java

@@ -0,0 +1,30 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 检验检查计划明细
+ * @author: gaodm
+ * @time: 2020/8/31 9:41
+ */
+@Getter
+@Setter
+public class PushPlanDetailDTO {
+    //检查时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date examineDate;
+    //描述
+    private String description;
+    //是否历史数据
+    private Integer history;
+    //检验
+    private List<String> lis = new ArrayList<>();
+    //检查
+    private List<String> pacs = new ArrayList<>();
+}

+ 20 - 0
src/main/java/com/diagbot/dto/PushPlansDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import com.diagbot.biz.push.entity.Item;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: 检验检查计划针对单个项目
+ * @author: gaodm
+ * @time: 2020/8/31 9:49
+ */
+@Getter
+@Setter
+public class PushPlansDTO {
+    private Item item;
+    private List<PushPlanDetailDTO> pushPlanDetails = new ArrayList<>();
+}

+ 18 - 0
src/main/java/com/diagbot/dto/PushScaleDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/26 13:31
+ */
+@Getter
+@Setter
+public class PushScaleDTO extends PushBaseDTO {
+    /**
+     * 是否有评估量表
+     */
+    private Integer hasScale = 0;
+}

+ 17 - 0
src/main/java/com/diagbot/dto/RetrievalConceptDTO.java

@@ -0,0 +1,17 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-06-15 16:58
+ */
+@Setter
+@Getter
+public class RetrievalConceptDTO {
+    private Long id;
+    private String name;
+    private String code;
+}

+ 64 - 0
src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -0,0 +1,64 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/12 15:45
+ */
+@Getter
+@Setter
+public class RetrievalDTO {
+    /**
+     * 化验大项 辅检 诊断 药品 手术或操作 科室 输血 量表 护理 中医诊断 中医证候
+     */
+    private List<RetrievalConceptDTO> nameList;
+    /**
+     * 化验小项
+     */
+    private List<LisDetailDTO> lisDetailNames;
+    /**
+     * 辅检
+     *//*
+    private List<RetrievalConceptDTO> pacsNames;
+    *//**
+     * 诊断
+     *//*
+    private List<DiseaseInfoDTO> diseaseNames;
+    *//**
+     * 药品
+     *//*
+    private List<DrugInfoDTO> drugNames;
+    *//**
+     * 手术或操作
+     *//*
+    private List<OperationInfoDTO> operationNames;
+    *//**
+     * 科室
+     *//*
+    private List<RetrievalConceptDTO> deptNames;
+    *//**
+     * 输血
+     *//*
+    private List<RetrievalConceptDTO> transfusionNames;
+    *//**
+     * 量表
+     *//*
+    private List<ScaleInfoDTO> scalenames;
+    *//**
+     * 护理
+     *//*
+    private List<NurseInfoDTO> nursenames;
+    *//**
+     * 中医诊断
+     *//*
+    private List<TcmdiseaseInfoDTO> tcmdiseaseNames;
+    *//**
+     * 中医证候
+     *//*
+    private List<TcmsyndromeInfoDTO> tcmsyndromeNames;*/
+}

+ 28 - 0
src/main/java/com/diagbot/dto/RuleBaseDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/2/3 16:25
+ */
+@Getter
+@Setter
+@ToString(includeFieldNames = false)
+public class RuleBaseDTO {
+    private String baseLibName = "";
+    private Integer baseLibType = 0;
+    private Integer baseType = 0;
+    private String baseMinOperator = "";
+    private String baseMinValue = "";
+    private String baseMinUnit = "";
+    private String baseMaxOperator = "";
+    private String baseMaxValue = "";
+    private String baseMaxUnit = "";
+    private String baseEqOperator = "";
+    private String baseEqValue = "";
+    private String baseEqUnit = "";
+}

+ 24 - 0
src/main/java/com/diagbot/dto/RuleConditionDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/2/3 16:32
+ */
+@Getter
+@Setter
+@ToString(exclude = { "ruleGroup", "msg", "description" }, includeFieldNames = false)
+public class RuleConditionDTO {
+    private Integer hasSubCond;
+    private String ruleGroup;
+    private String msg;
+    private String description;
+    private List<RuleBaseDTO> ruleBaseDTOList = new ArrayList<>();
+}

+ 21 - 0
src/main/java/com/diagbot/dto/RuleDTO.java

@@ -0,0 +1,21 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/2/3 16:34
+ */
+@Getter
+@Setter
+public class RuleDTO {
+    private String libName;
+    private Integer libType;
+    private Integer ruleType;
+    private List<RuleConditionDTO> ruleConditionDTOList = new ArrayList<>();
+}

+ 19 - 0
src/main/java/com/diagbot/dto/RuleQueryDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/12/30 13:21
+ */
+@Getter
+@Setter
+public class RuleQueryDTO {
+    private String libName;
+    private Integer libType;
+    private String libTypeName;
+    private Integer ruleType;
+    private String ruleTypeName;
+}

+ 20 - 0
src/main/java/com/diagbot/dto/ScaleInfoDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/13 14:06
+ */
+@Getter
+@Setter
+public class ScaleInfoDTO {
+    private Long id;
+    /**
+     * 量表名称
+     */
+    private String name;
+}
+

+ 50 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java

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

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

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

+ 22 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeHISDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/9/27 17:29
+ */
+@Getter
+@Setter
+public class StaticKnowledgeHISDTO extends StaticKnowledgeDTO {
+    /**
+     * his名称
+     */
+    private String hisName;
+    /**
+     * his明细名称
+     */
+    private String hisDetailName;
+}

+ 71 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java

@@ -0,0 +1,71 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/18 15:59
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexDTO {
+    /**
+     * 术语id
+     */
+    private Long id;
+    /**
+     * 术语名称
+     */
+    private String name;
+    /**
+     * 编码
+     */
+    private String code;
+    /**
+     * 国临版编码
+     */
+    private String guocode;
+    /**
+     * 国临版名称
+     */
+    private String guoname;
+    /**
+     * 词性
+     */
+    private Integer type;
+    /**
+     * 词性
+     */
+    private String typeName;
+    /**
+     * 同义词
+     */
+    private String retrievalName;
+    /**
+     * 是否有静态知识
+     */
+    private Integer hasInfo = 0;
+    /**
+     * 是否有基本静态知识
+     */
+    private Integer hasStaticKnowledge = 0;
+    /**
+     * 是否有临床路径
+     */
+    private Integer hasClinicalPathway = 0;
+    /**
+     * 是否有注意事项
+     */
+    private Integer hasNotice = 0;
+    /**
+     * 是否有治疗方案静态知识
+     */
+    private Integer hasTreatInfo = 0;
+    /**
+     * 启用禁用
+     */
+    private Integer status;
+
+}

+ 28 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeIndexPageDTO.java

@@ -0,0 +1,28 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/4/7 13:29
+ */
+@Getter
+@Setter
+public class StaticKnowledgeIndexPageDTO extends StaticKnowledgeIndexDTO {
+    /**
+     * 临床路径名称
+     */
+    private String clinicalPathwayName;
+
+    /**
+     * 注意事项名称
+     */
+    private String noticeName;
+
+    /**
+     * 摘要
+     */
+    private String abstractContent;
+}

+ 33 - 0
src/main/java/com/diagbot/dto/SysPlanInfoDTO.java

@@ -0,0 +1,33 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-07-27 19:21
+ */
+@Setter
+@Getter
+public class SysPlanInfoDTO {
+    private Long id;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+    /**
+     * 方案编号
+     */
+    private String planName;
+
+    private String planCode;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<PlanDetailDTO> sysSetInfo;
+}

+ 23 - 0
src/main/java/com/diagbot/dto/TcmDTO.java

@@ -0,0 +1,23 @@
+package com.diagbot.dto;
+
+import com.diagbot.biz.push.entity.Item;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/14 13:54
+ */
+@Getter
+@Setter
+public class TcmDTO {
+    /**
+     * 中医疾病
+     */
+    private Item tcmdisease;
+    /**
+     * 中医证候
+     */
+    private Item tcmsyndrome;
+}

+ 24 - 0
src/main/java/com/diagbot/dto/TcmdiseaseInfoDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/13 15:37
+ */
+@Getter
+@Setter
+public class TcmdiseaseInfoDTO {
+    private Long id;
+    /**
+     * 疾病名称
+     */
+    private String name;
+
+    /**
+     * 编码
+     */
+    private String code;
+}

+ 24 - 0
src/main/java/com/diagbot/dto/TcmsyndromeInfoDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2021/5/13 15:43
+ */
+@Getter
+@Setter
+public class TcmsyndromeInfoDTO {
+    private Long id;
+    /**
+     * 疾病名称
+     */
+    private String name;
+
+    /**
+     * 编码
+     */
+    private String code;
+}

+ 32 - 0
src/main/java/com/diagbot/dto/TemplateInfoDTO.java

@@ -0,0 +1,32 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description: 医生病历模板出参
+ * @date 2018年11月16日 上午10:40:27
+ */
+@Getter
+@Setter
+public class TemplateInfoDTO {
+    private Long id;//模板id
+    private Date gmtCreate;//创建时间
+    private String name;//模板名字
+    private Integer sex;//性别
+    private String age;//年龄
+    private String patName;//病人姓名
+    private String doctorName;//医生姓名
+    private String inquiryCode;//门诊号
+    private String cardNo;//卡号
+    private String deptName;//科室名称
+    //    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date inquiryDate;//就诊时间
+    private String preview;//预览文字
+    private String dataJson;//模板数据
+    private String remark;//备注
+
+}

+ 31 - 0
src/main/java/com/diagbot/dto/TemplateInfoPageDTO.java

@@ -0,0 +1,31 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2019年7月24日 上午11:07:57
+ */
+@Getter
+@Setter
+public class TemplateInfoPageDTO {
+    private Long id;//模板id
+    private Date gmtCreate;//创建时间
+    private String name;//模板名字
+    private Integer sex;//性别
+    private String age;//年龄
+    private String patName;//病人姓名
+    private String doctorName;//医生姓名
+    private String inquiryCode;//门诊号
+    private String cardNo;//卡号
+    private String deptName;//科室名称
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date inquiryDate;//就诊时间
+    private String preview;//预览文字
+    private String remark;//备注
+}

+ 20 - 0
src/main/java/com/diagbot/dto/TermConceptDTO.java

@@ -0,0 +1,20 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-06-15 16:44
+ */
+@Setter
+@Getter
+public class TermConceptDTO {
+    private Long id;
+    private String name;
+    private String code;
+    //数据来源(1-标准词、2-同义词、3-编码、4-历史数据、5-相似词、99-数据迁移)
+    private Integer source;
+}
+

+ 0 - 0
src/main/java/com/diagbot/dto/TestcaseInfoDTO.java


部分文件因为文件数量过多而无法显示