浏览代码

Merge branch 'dev/cdssman20200727_init' into debug

# Conflicts:
#	pom.xml
gaodm 5 年之前
父节点
当前提交
f73e08f5d5
共有 100 个文件被更改,包括 7619 次插入0 次删除
  1. 25 0
      cdssman-service/.gitignore
  2. 243 0
      cdssman-service/pom.xml
  3. 38 0
      cdssman-service/src/main/java/com/diagbot/CdssmanServiceApplication.java
  4. 41 0
      cdssman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java
  5. 30 0
      cdssman-service/src/main/java/com/diagbot/client/UserServiceClient.java
  6. 35 0
      cdssman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java
  7. 34 0
      cdssman-service/src/main/java/com/diagbot/config/CacheConfigurer.java
  8. 19 0
      cdssman-service/src/main/java/com/diagbot/config/CustomAccessTokenConverter.java
  9. 15 0
      cdssman-service/src/main/java/com/diagbot/config/GlobalMethodSecurityConfigurer.java
  10. 48 0
      cdssman-service/src/main/java/com/diagbot/config/JwtConfigurer.java
  11. 33 0
      cdssman-service/src/main/java/com/diagbot/config/MultipartConfigurer.java
  12. 33 0
      cdssman-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java
  13. 42 0
      cdssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  14. 70 0
      cdssman-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java
  15. 81 0
      cdssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  16. 29 0
      cdssman-service/src/main/java/com/diagbot/config/security/UrlConfigAttribute.java
  17. 79 0
      cdssman-service/src/main/java/com/diagbot/config/security/UrlFilterSecurityInterceptor.java
  18. 40 0
      cdssman-service/src/main/java/com/diagbot/config/security/UrlMetadataSourceService.java
  19. 60 0
      cdssman-service/src/main/java/com/diagbot/dto/DisclaimerInfoDTO.java
  20. 28 0
      cdssman-service/src/main/java/com/diagbot/dto/FileDTO.java
  21. 17 0
      cdssman-service/src/main/java/com/diagbot/dto/FileDeleteDTO.java
  22. 25 0
      cdssman-service/src/main/java/com/diagbot/dto/FileUploadDTO.java
  23. 26 0
      cdssman-service/src/main/java/com/diagbot/dto/HosRelationNumDTO.java
  24. 16 0
      cdssman-service/src/main/java/com/diagbot/dto/HospitalInfoDTO.java
  25. 58 0
      cdssman-service/src/main/java/com/diagbot/dto/PlanDetailDTO.java
  26. 34 0
      cdssman-service/src/main/java/com/diagbot/dto/PlanInfoPagesDTO.java
  27. 36 0
      cdssman-service/src/main/java/com/diagbot/dto/TokenHospitaDTO.java
  28. 60 0
      cdssman-service/src/main/java/com/diagbot/dto/VersionDetailDTO.java
  29. 60 0
      cdssman-service/src/main/java/com/diagbot/dto/VersionDetailSpecDTO.java
  30. 52 0
      cdssman-service/src/main/java/com/diagbot/dto/VersionWrapperDTO.java
  31. 183 0
      cdssman-service/src/main/java/com/diagbot/entity/DisclaimerInfo.java
  32. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/DiseaseConfig.java
  33. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/DrugConfig.java
  34. 211 0
      cdssman-service/src/main/java/com/diagbot/entity/HospitalInfo.java
  35. 185 0
      cdssman-service/src/main/java/com/diagbot/entity/LisConfig.java
  36. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java
  37. 166 0
      cdssman-service/src/main/java/com/diagbot/entity/PacsConfig.java
  38. 170 0
      cdssman-service/src/main/java/com/diagbot/entity/Plan.java
  39. 219 0
      cdssman-service/src/main/java/com/diagbot/entity/PlanDetail.java
  40. 196 0
      cdssman-service/src/main/java/com/diagbot/entity/SysLog.java
  41. 21 0
      cdssman-service/src/main/java/com/diagbot/entity/Token.java
  42. 186 0
      cdssman-service/src/main/java/com/diagbot/entity/TokenHospital.java
  43. 183 0
      cdssman-service/src/main/java/com/diagbot/entity/VersionDetail.java
  44. 155 0
      cdssman-service/src/main/java/com/diagbot/entity/VersionInfo.java
  45. 50 0
      cdssman-service/src/main/java/com/diagbot/enums/StatusEnum.java
  46. 81 0
      cdssman-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java
  47. 39 0
      cdssman-service/src/main/java/com/diagbot/exception/ServiceErrorCode.java
  48. 199 0
      cdssman-service/src/main/java/com/diagbot/facade/DisclaimerInfoFacade.java
  49. 268 0
      cdssman-service/src/main/java/com/diagbot/facade/DiseaseConfigFacade.java
  50. 275 0
      cdssman-service/src/main/java/com/diagbot/facade/DrugConfigFacade.java
  51. 30 0
      cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java
  52. 315 0
      cdssman-service/src/main/java/com/diagbot/facade/LisConfigFacade.java
  53. 277 0
      cdssman-service/src/main/java/com/diagbot/facade/OperationConfigFacade.java
  54. 275 0
      cdssman-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java
  55. 138 0
      cdssman-service/src/main/java/com/diagbot/facade/PlanDetailFacade.java
  56. 156 0
      cdssman-service/src/main/java/com/diagbot/facade/PlanFacade.java
  57. 13 0
      cdssman-service/src/main/java/com/diagbot/facade/SysLogFacade.java
  58. 151 0
      cdssman-service/src/main/java/com/diagbot/facade/TokenHospitalFacade.java
  59. 13 0
      cdssman-service/src/main/java/com/diagbot/facade/UploadFacade.java
  60. 282 0
      cdssman-service/src/main/java/com/diagbot/facade/VersionDetailFacade.java
  61. 268 0
      cdssman-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java
  62. 20 0
      cdssman-service/src/main/java/com/diagbot/mapper/DisclaimerInfoMapper.java
  63. 36 0
      cdssman-service/src/main/java/com/diagbot/mapper/DiseaseConfigMapper.java
  64. 35 0
      cdssman-service/src/main/java/com/diagbot/mapper/DrugConfigMapper.java
  65. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/HospitalInfoMapper.java
  66. 36 0
      cdssman-service/src/main/java/com/diagbot/mapper/LisConfigMapper.java
  67. 35 0
      cdssman-service/src/main/java/com/diagbot/mapper/OperationConfigMapper.java
  68. 35 0
      cdssman-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java
  69. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/PlanDetailMapper.java
  70. 20 0
      cdssman-service/src/main/java/com/diagbot/mapper/PlanMapper.java
  71. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/SysLogMapper.java
  72. 20 0
      cdssman-service/src/main/java/com/diagbot/mapper/TokenHospitalMapper.java
  73. 16 0
      cdssman-service/src/main/java/com/diagbot/mapper/VersionDetailMapper.java
  74. 20 0
      cdssman-service/src/main/java/com/diagbot/mapper/VersionInfoMapper.java
  75. 23 0
      cdssman-service/src/main/java/com/diagbot/rabbit/MyProcessor.java
  76. 27 0
      cdssman-service/src/main/java/com/diagbot/rabbit/MySender.java
  77. 20 0
      cdssman-service/src/main/java/com/diagbot/service/DisclaimerInfoService.java
  78. 35 0
      cdssman-service/src/main/java/com/diagbot/service/DiseaseConfigService.java
  79. 35 0
      cdssman-service/src/main/java/com/diagbot/service/DrugConfigService.java
  80. 16 0
      cdssman-service/src/main/java/com/diagbot/service/HospitalInfoService.java
  81. 36 0
      cdssman-service/src/main/java/com/diagbot/service/LisConfigService.java
  82. 35 0
      cdssman-service/src/main/java/com/diagbot/service/OperationConfigService.java
  83. 35 0
      cdssman-service/src/main/java/com/diagbot/service/PacsConfigService.java
  84. 16 0
      cdssman-service/src/main/java/com/diagbot/service/PlanDetailService.java
  85. 19 0
      cdssman-service/src/main/java/com/diagbot/service/PlanService.java
  86. 15 0
      cdssman-service/src/main/java/com/diagbot/service/SysLogService.java
  87. 19 0
      cdssman-service/src/main/java/com/diagbot/service/TokenHospitalService.java
  88. 13 0
      cdssman-service/src/main/java/com/diagbot/service/UploadService.java
  89. 16 0
      cdssman-service/src/main/java/com/diagbot/service/VersionDetailService.java
  90. 19 0
      cdssman-service/src/main/java/com/diagbot/service/VersionInfoService.java
  91. 27 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DisclaimerInfoServiceImpl.java
  92. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DiseaseConfigServiceImpl.java
  93. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/DrugConfigServiceImpl.java
  94. 20 0
      cdssman-service/src/main/java/com/diagbot/service/impl/HospitalInfoServiceImpl.java
  95. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/LisConfigServiceImpl.java
  96. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/OperationConfigServiceImpl.java
  97. 43 0
      cdssman-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java
  98. 20 0
      cdssman-service/src/main/java/com/diagbot/service/impl/PlanDetailServiceImpl.java
  99. 27 0
      cdssman-service/src/main/java/com/diagbot/service/impl/PlanServiceImpl.java
  100. 0 0
      cdssman-service/src/main/java/com/diagbot/service/impl/SysLogServiceImpl.java

+ 25 - 0
cdssman-service/.gitignore

@@ -0,0 +1,25 @@
+/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/

+ 243 - 0
cdssman-service/pom.xml

@@ -0,0 +1,243 @@
+<?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>cdssman-service</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>cdssman-service</name>
+    <description>CDSS后台管理 service for Spring Boot</description>
+
+    <parent>
+        <groupId>com.diagbot</groupId>
+        <artifactId>diagbotcloud</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.diagbot</groupId>
+            <artifactId>common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
+        <!-- 配置-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-config</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>
+
+        <!-- zipkin-->
+        <!--<dependency>-->
+            <!--<groupId>org.springframework.cloud</groupId>-->
+            <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
+        <!--</dependency>-->
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+        </dependency>
+        <!--database-->
+        <dependency>
+            <groupId>org.neo4j</groupId>
+            <artifactId>neo4j-jdbc-driver</artifactId>
+            <version>3.4.0</version>
+        </dependency>
+        <!--security-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-oauth2</artifactId>
+        </dependency>
+
+        <!-- mq -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bus-amqp</artifactId>
+        </dependency>
+
+        <!-- easypoi -->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-spring-boot-starter</artifactId>
+            <version>${easypoi.version}</version>
+        </dependency>
+
+        <!-- springboot整合mybatis(核心就这一个) -->
+        <!-- 注意顺序,这个一定要放在最下面 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-cache</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.ben-manes.caffeine</groupId>
+            <artifactId>caffeine</artifactId>
+        </dependency>
+
+        <!-- mybatis-plus begin -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+        </dependency>
+        <!-- mybatis-plus end -->
+
+        <!--&lt;!&ndash; 阿里巴巴druid数据库连接池 &ndash;&gt;-->
+        <!--<dependency>-->
+            <!--<groupId>com.alibaba</groupId>-->
+            <!--<artifactId>druid-spring-boot-starter</artifactId>-->
+        <!--</dependency>-->
+
+        <!-- springboot整合mybatis(核心就这一个) -->
+        <!-- 注意顺序,这个一定要放在最下面 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>${mybatis-spring-boot.version}</version>
+        </dependency>
+
+        <!--多数据源-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+
+        <!--mysql-database-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </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>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <!-- 添加docker-maven插件 -->
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <configuration>
+                    <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
+                    <forceTags>true</forceTags>
+                    <!--镜像的FROM,使用压缩的小镜像-->
+                    <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
+                    <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                    <serverId>docker-registry</serverId>
+                    <registryUrl>${registryUrl}</registryUrl>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 38 - 0
cdssman-service/src/main/java/com/diagbot/CdssmanServiceApplication.java

@@ -0,0 +1,38 @@
+package com.diagbot;
+
+import org.mybatis.spring.annotation.MapperScan;
+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.context.config.annotation.RefreshScope;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+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
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
+        JmxAutoConfiguration.class, ThymeleafAutoConfiguration.class })
+@EnableEurekaClient
+@EnableFeignClients({ "com.diagbot.client" })
+@EnableHystrixDashboard
+@EnableHystrix
+@EnableCircuitBreaker
+@RefreshScope
+@ConfigurationPropertiesScan
+@MapperScan("com.diagbot.mapper")
+public class CdssmanServiceApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(CdssmanServiceApplication.class, args);
+    }
+}

+ 41 - 0
cdssman-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -0,0 +1,41 @@
+//package com.diagbot.aop;
+//
+//import com.diagbot.biz.log.entity.SysLog;
+//import com.diagbot.enums.SysTypeEnum;
+//import com.diagbot.rabbit.MySender;
+//import com.diagbot.util.AopUtil;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Before;
+//import org.aspectj.lang.annotation.Pointcut;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+//import org.springframework.stereotype.Component;
+//
+///**
+// * @Description: 日志拦截切面
+// * @author: gaodm
+// * @time: 2018/8/2 13:36
+// */
+//@Aspect
+//@Component
+//@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
+//public class SysLoggerAspect {
+//    @Autowired
+//    private MySender mySender;
+//
+//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+//    public void loggerPointCut() {
+//
+//    }
+//
+//    @Before("loggerPointCut()")
+//    public void saveSysLog(JoinPoint joinPoint) {
+//        //入参设置
+//        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.LTKG_SERVICE.getKey());
+//        //保存系统日志
+//        mySender.outputLogSend(sysLog);
+//    }
+//
+//}
+//

+ 30 - 0
cdssman-service/src/main/java/com/diagbot/client/UserServiceClient.java

@@ -0,0 +1,30 @@
+package com.diagbot.client;
+
+import com.diagbot.client.hystrix.UserServiceHystrix;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Token;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 调用用户服务
+ * @author: gaodm
+ * @time: 2018/8/6 9:52
+ */
+@FeignClient(value = "user-service", fallback = UserServiceHystrix.class)
+public interface UserServiceClient {
+
+    @PostMapping(value = "/user/getUserInfoByIds")
+    RespDTO<Map<String, String>> getUserInfoByIds(@RequestBody List<String> ids);
+
+    @PostMapping("/user/verifyToken")
+    RespDTO<Boolean> verifyToken(@RequestBody Token token);
+}
+
+
+

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java

@@ -0,0 +1,35 @@
+package com.diagbot.client.hystrix;
+
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.Token;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 调用用户服务
+ * @author: gaodm
+ * @time: 2018/8/6 9:52
+ */
+@Component
+@Slf4j
+public class UserServiceHystrix implements UserServiceClient {
+
+    @Override
+    public RespDTO<Map<String, String>> getUserInfoByIds(@RequestBody List<String> ids) {
+        log.error("【hystrix】调用{}异常", "getUserInfoByIds");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> verifyToken(Token token) {
+        log.error("【hystrix】调用{}异常", "verifyToken");
+        return null;
+    }
+
+}

+ 34 - 0
cdssman-service/src/main/java/com/diagbot/config/CacheConfigurer.java

@@ -0,0 +1,34 @@
+package com.diagbot.config;
+
+import com.github.benmanes.caffeine.cache.CacheLoader;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@EnableCaching
+public class CacheConfigurer {
+    /**
+     * 必须要指定这个Bean,refreshAfterWrite=xs这个配置属性才生效
+     *
+     * @return
+     */
+    @Bean
+    public CacheLoader<Object, Object> cacheLoader() {
+        CacheLoader<Object, Object> cacheLoader = new CacheLoader<Object, Object>() {
+
+            @Override
+            public Object load(Object key) throws Exception {
+                return null;
+            }
+
+            // 重写这个方法将oldValue值返回回去,进而刷新缓存
+            @Override
+            public Object reload(Object key, Object oldValue) throws Exception {
+                return oldValue;
+            }
+        };
+
+        return cacheLoader;
+    }
+}

+ 19 - 0
cdssman-service/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;
+    }
+
+}

+ 15 - 0
cdssman-service/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 {
+
+}

+ 48 - 0
cdssman-service/src/main/java/com/diagbot/config/JwtConfigurer.java

@@ -0,0 +1,48 @@
+package com.diagbot.config;
+
+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.core.io.Resource;
+import org.springframework.security.oauth2.provider.token.TokenStore;
+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: JWT配置类
+ * @author: gaodm
+ * @time: 2018/8/2 13:38
+ */
+@Configuration
+public class JwtConfigurer {
+    @Autowired
+    private CustomAccessTokenConverter customAccessTokenConverter;
+
+    @Bean
+    @Qualifier("tokenStore")
+    public TokenStore tokenStore() {
+
+        System.out.println("Created JwtTokenStore");
+        return new JwtTokenStore(jwtTokenEnhancer());
+    }
+
+    @Bean
+    protected JwtAccessTokenConverter jwtTokenEnhancer() {
+        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);
+        converter.setAccessTokenConverter(customAccessTokenConverter);
+        return converter;
+    }
+}

+ 33 - 0
cdssman-service/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();
+    }
+}

+ 33 - 0
cdssman-service/src/main/java/com/diagbot/config/MybatisPlusConfigurer.java

@@ -0,0 +1,33 @@
+package com.diagbot.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+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(500L);
+        return paginationInterceptor;
+    }
+
+}

+ 42 - 0
cdssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -0,0 +1,42 @@
+package com.diagbot.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+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.TokenStore;
+
+/**
+ * @Description: 权限资源配置类
+ * @author: gaodm
+ * @time: 2018/8/2 14:21
+ */
+@Configuration
+@EnableResourceServer
+public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
+    Logger log = LoggerFactory.getLogger(ResourceServerConfigurer.class);
+
+    @Override
+    public void configure(HttpSecurity http) throws Exception {
+        http
+                .csrf().disable()
+                .authorizeRequests()
+                .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
+//                .antMatchers("/**").authenticated();
+                .antMatchers("/**").permitAll();
+    }
+
+
+    @Override
+    public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
+        log.info("Configuring ResourceServerSecurityConfigurer ");
+        resources.resourceId("user-service").tokenStore(tokenStore);
+    }
+
+    @Autowired
+    TokenStore tokenStore;
+}

+ 70 - 0
cdssman-service/src/main/java/com/diagbot/config/SwaggerConfigurer.java

@@ -0,0 +1,70 @@
+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());
+        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(" cdssman-service api ")
+                .description("CDSS后台维护 微服务")
+                .termsOfServiceUrl("")
+                .contact(new Contact("diagbot","",""))
+                .version("1.0")
+                .build();
+    }
+
+}

+ 81 - 0
cdssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -0,0 +1,81 @@
+package com.diagbot.config.security;
+
+import org.springframework.security.access.AccessDecisionManager;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.access.ConfigAttribute;
+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 {
+    @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 {
+//            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("/", 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
cdssman-service/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
cdssman-service/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
cdssman-service/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;
+    }
+}

+ 60 - 0
cdssman-service/src/main/java/com/diagbot/dto/DisclaimerInfoDTO.java

@@ -0,0 +1,60 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-05 10:57
+ */
+@Getter
+@Setter
+public class DisclaimerInfoDTO {
+
+    private Long id;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String modifier;
+
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    /**
+     * 免责申明位置
+     */
+    private String disclaimerCode;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}
+

+ 28 - 0
cdssman-service/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
cdssman-service/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
cdssman-service/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;
+}

+ 26 - 0
cdssman-service/src/main/java/com/diagbot/dto/HosRelationNumDTO.java

@@ -0,0 +1,26 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/5 14:53
+ */
+@Getter
+@Setter
+public class HosRelationNumDTO {
+    /**
+     * 医院id
+     */
+    private Long id;
+    /**
+     * 医院名称
+     */
+    private String name;
+    /**
+     * 映射关系条数
+     */
+    private Integer num;
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/dto/HospitalInfoDTO.java

@@ -0,0 +1,16 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 18:38
+ */
+@Setter
+@Getter
+public class HospitalInfoDTO {
+    private Long id;
+    private String name;
+}

+ 58 - 0
cdssman-service/src/main/java/com/diagbot/dto/PlanDetailDTO.java

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

+ 34 - 0
cdssman-service/src/main/java/com/diagbot/dto/PlanInfoPagesDTO.java

@@ -0,0 +1,34 @@
+package com.diagbot.dto;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-07 10:29
+ */
+@Setter
+@Getter
+public class PlanInfoPagesDTO {
+    private Long id;
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+    /**
+     * 方案编号
+     */
+    private String planName;
+
+    private String planCode;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<PlanDetailDTO> planDetails;
+}

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/dto/TokenHospitaDTO.java

@@ -0,0 +1,36 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 14:57
+ */
+@Setter
+@Getter
+public class TokenHospitaDTO {
+
+    private Long id;
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 医院ID
+     */
+    private String hospitalName;
+
+    private String appidToken;
+
+    private Date startTime;
+
+    private Date endTime;
+
+    private Integer validDays;
+
+}

+ 60 - 0
cdssman-service/src/main/java/com/diagbot/dto/VersionDetailDTO.java

@@ -0,0 +1,60 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 9:50
+ */
+@Getter
+@Setter
+public class VersionDetailDTO {
+
+    private Long id;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    //private String creator;
+
+    private String modifierid;
+    /**
+     * 版本主表id
+     */
+    private Long versionId;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}
+

+ 60 - 0
cdssman-service/src/main/java/com/diagbot/dto/VersionDetailSpecDTO.java

@@ -0,0 +1,60 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 9:51
+ */
+@Getter
+@Setter
+public class VersionDetailSpecDTO {
+
+    private Long id;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    // private String creator;
+
+
+    /**
+     * 版本主表id
+     */
+    private Long versionId;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    //  private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}
+

+ 52 - 0
cdssman-service/src/main/java/com/diagbot/dto/VersionWrapperDTO.java

@@ -0,0 +1,52 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 9:38
+ */
+@Getter
+@Setter
+public class VersionWrapperDTO {
+
+    private Long id;
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    //private String creator;
+
+    private String modifierid;
+
+
+    /**
+     * 名称
+     */
+    private String name;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date refreshTime;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    private List<VersionDetailDTO> detail;
+    /**
+     * 备注
+     */
+    private String remark;
+
+}
+

+ 183 - 0
cdssman-service/src/main/java/com/diagbot/entity/DisclaimerInfo.java

@@ -0,0 +1,183 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 免责申明详情
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-05
+ */
+@TableName("sys_disclaimer_info")
+public class DisclaimerInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    /**
+     * 免责申明编号
+     */
+    private String disclaimerCode;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+    public String getDisclaimerCode() {
+        return disclaimerCode;
+    }
+
+    public void setDisclaimerCode(String disclaimerCode) {
+        this.disclaimerCode = disclaimerCode;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "DisclaimerInfo{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", title=" + title +
+            ", description=" + description +
+            ", orderNo=" + orderNo +
+            ", status=" + status +
+            ", disclaimerCode=" + disclaimerCode +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/DiseaseConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 诊断映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_disease_config")
+public class DiseaseConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * ICD编码
+     */
+    @Excel(name="ICD编码", width = 40)
+    private String icdCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getIcdCode() {
+        return icdCode;
+    }
+
+    public void setIcdCode(String icdCode) {
+        this.icdCode = icdCode;
+    }
+
+    @Override
+    public String toString() {
+        return "DiseaseConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", icdCode=" + icdCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/DrugConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 药品映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_drug_config")
+public class DrugConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "DrugConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 211 - 0
cdssman-service/src/main/java/com/diagbot/entity/HospitalInfo.java

@@ -0,0 +1,211 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 医院信息表
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+@TableName("tran_hospital_info")
+public class HospitalInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院编码
+     */
+    private String code;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 医院地址
+     */
+    private String address;
+
+    /**
+     * 医院名称拼音
+     */
+    private String spell;
+
+    /**
+     * 状态:0.禁用1.启用
+     */
+    private Integer status;
+
+    /**
+     * 排序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 是否对接(0-不对接,1-对接)
+     */
+    private Integer connect;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public Integer getConnect() {
+        return connect;
+    }
+
+    public void setConnect(Integer connect) {
+        this.connect = connect;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "HospitalInfo{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", code=" + code +
+            ", name=" + name +
+            ", address=" + address +
+            ", spell=" + spell +
+            ", status=" + status +
+            ", orderNo=" + orderNo +
+            ", connect=" + connect +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 185 - 0
cdssman-service/src/main/java/com/diagbot/entity/LisConfig.java

@@ -0,0 +1,185 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 化验公表映射
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Data
+@TableName("tran_lis_config")
+public class LisConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his大项名称
+     */
+    @Excel(name = "his大项名称", width = 40)
+    @NotBlank(message = "请输入大项名称")
+    private String hisName;
+
+    /**
+     * his小项名称
+     */
+    @Excel(name = "his小项名称", width = 40)
+    private String hisDetailName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名", width = 40)
+    @NotBlank(message = "请输入公表名称")
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name = "标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getHisDetailName() {
+        return hisDetailName;
+    }
+
+    public void setHisDetailName(String hisDetailName) {
+        this.hisDetailName = hisDetailName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "LisConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", hisDetailName=" + hisDetailName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/OperationConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 手术映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_operation_config")
+public class OperationConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "OperationConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 166 - 0
cdssman-service/src/main/java/com/diagbot/entity/PacsConfig.java

@@ -0,0 +1,166 @@
+package com.diagbot.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 检查公表映射
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@TableName("tran_pacs_config")
+public class PacsConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+
+    /**
+     * his名称
+     */
+    @Excel(name="HIS名称", width = 40)
+    private String hisName;
+
+    /**
+     * 标准名
+     */
+    @Excel(name = "标准名称", width = 40)
+    private String uniqueName;
+
+    /**
+     * 标准编码
+     */
+    @Excel(name="标准编码", width = 40)
+    private String uniqueCode;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getHisName() {
+        return hisName;
+    }
+
+    public void setHisName(String hisName) {
+        this.hisName = hisName;
+    }
+    public String getUniqueName() {
+        return uniqueName;
+    }
+
+    public void setUniqueName(String uniqueName) {
+        this.uniqueName = uniqueName;
+    }
+    public String getUniqueCode() {
+        return uniqueCode;
+    }
+
+    public void setUniqueCode(String uniqueCode) {
+        this.uniqueCode = uniqueCode;
+    }
+
+    @Override
+    public String toString() {
+        return "PacsConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", hisName=" + hisName +
+            ", uniqueName=" + uniqueName +
+            ", uniqueCode=" + uniqueCode +
+        "}";
+    }
+}

+ 170 - 0
cdssman-service/src/main/java/com/diagbot/entity/Plan.java

@@ -0,0 +1,170 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+@TableName("tran_plan")
+public class Plan implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 资源ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+
+    /**
+     * 方案名称
+     */
+    private String planName;
+
+    /**
+     * 方案编号
+     */
+    private String planCode;
+
+    /**
+     * 方案启动1:启动,0:不启用
+     */
+    private Integer planStatus;
+
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getPlanName() {
+        return planName;
+    }
+
+    public void setPlanName(String planName) {
+        this.planName = planName;
+    }
+    public String getPlanCode() {
+        return planCode;
+    }
+
+    public void setPlanCode(String planCode) {
+        this.planCode = planCode;
+    }
+    public Integer getPlanStatus() {
+        return planStatus;
+    }
+
+    public void setPlanStatus(Integer planStatus) {
+        this.planStatus = planStatus;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Plan{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", planName=" + planName +
+            ", planCode=" + planCode +
+            ", planStatus=" + planStatus +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 219 - 0
cdssman-service/src/main/java/com/diagbot/entity/PlanDetail.java

@@ -0,0 +1,219 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+@TableName("tran_plan_detail")
+public class PlanDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 资源ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院编码
+     */
+    private Long hospitalId;
+
+    /**
+     * 方案编号
+     */
+    private Long planId;
+
+    /**
+     * 配置名称
+     */
+    private String name;
+
+    /**
+     * 是否显示(1是,0否)
+     */
+    private Integer status;
+
+    /**
+     * 显示个数
+     */
+    private Integer number;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    /**
+     * 配置编码
+     */
+    private String code;
+
+    private String value;
+
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public Long getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(Long planId) {
+        this.planId = planId;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "PlanDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", planId=" + planId +
+            ", name=" + name +
+            ", status=" + status +
+            ", number=" + number +
+            ", orderNo=" + orderNo +
+            ", code=" + code +
+            ", value=" + value +
+            ", remark=" + remark +
+        "}";
+    }
+}

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

@@ -0,0 +1,196 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 系统操作日志表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-09-14
+ */
+public class SysLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 访问者的IP
+     */
+    private String ip;
+
+    /**
+     * 访问的系统类型 1:user-service,2:diagbotman-service,3:uaa-service,4:log-service,5:bi-service,6:knowledge-service,7:feedback-service,8:icss-web
+     */
+    private Integer sysType;
+
+    /**
+     * 方法
+     */
+    private String method;
+
+    /**
+     * 操作名
+     */
+    private String operation;
+
+    /**
+     * 参数
+     */
+    private String params;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public String getIp() {
+        return ip;
+    }
+
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+
+    public Integer getSysType() {
+        return sysType;
+    }
+
+    public void setSysType(Integer sysType) {
+        this.sysType = sysType;
+    }
+
+    public String getMethod() {
+        return method;
+    }
+
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getParams() {
+        return params;
+    }
+
+    public void setParams(String params) {
+        this.params = params;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    @Override
+    public String toString() {
+        return "SysLog{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", ip=" + ip +
+                ", sysType=" + sysType +
+                ", method=" + method +
+                ", operation=" + operation +
+                ", params=" + params +
+                ", username=" + username +
+                "}";
+    }
+}

+ 21 - 0
cdssman-service/src/main/java/com/diagbot/entity/Token.java

@@ -0,0 +1,21 @@
+package com.diagbot.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-05 11:08
+ */
+@Getter
+@Setter
+public class Token implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String token;
+
+}

+ 186 - 0
cdssman-service/src/main/java/com/diagbot/entity/TokenHospital.java

@@ -0,0 +1,186 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+@TableName("sys_token_hospital")
+public class TokenHospital implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * token
+     */
+    private String appidToken;
+
+    /**
+     * 开始时间
+     */
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+
+    /**
+     * 有限天数
+     */
+    private Integer validDays;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public String getAppidToken() {
+        return appidToken;
+    }
+
+    public void setAppidToken(String appidToken) {
+        this.appidToken = appidToken;
+    }
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+    public Integer getValidDays() {
+        return validDays;
+    }
+
+    public void setValidDays(Integer validDays) {
+        this.validDays = validDays;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "TokenHospital{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalId=" + hospitalId +
+            ", appidToken=" + appidToken +
+            ", startTime=" + startTime +
+            ", endTime=" + endTime +
+            ", validDays=" + validDays +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 183 - 0
cdssman-service/src/main/java/com/diagbot/entity/VersionDetail.java

@@ -0,0 +1,183 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 版本详情(关于)
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+@TableName("sys_version_detail")
+public class VersionDetail implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 版本主表id
+     */
+    private Long versionId;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 排序号
+     */
+    private String orderNo;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getVersionId() {
+        return versionId;
+    }
+
+    public void setVersionId(Long versionId) {
+        this.versionId = versionId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "VersionDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", versionId=" + versionId +
+            ", title=" + title +
+            ", description=" + description +
+            ", orderNo=" + orderNo +
+            ", status=" + status +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 155 - 0
cdssman-service/src/main/java/com/diagbot/entity/VersionInfo.java

@@ -0,0 +1,155 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 版本信息
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+@TableName("sys_version_info")
+public class VersionInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    private Date refreshTime;
+
+    /**
+     * 1:启动,0:不启用
+     */
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Date getRefreshTime() {
+        return refreshTime;
+    }
+
+    public void setRefreshTime(Date refreshTime) {
+        this.refreshTime = refreshTime;
+    }
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "VersionInfo{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", name=" + name +
+            ", refreshTime=" + refreshTime +
+            ", status=" + status +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 50 - 0
cdssman-service/src/main/java/com/diagbot/enums/StatusEnum.java

@@ -0,0 +1,50 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2018年11月21日 下午2:31:42
+ */
+public enum StatusEnum implements KeyedNamed {
+    Disable(0, "禁用"),
+    Enable(1, "启用");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    StatusEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static StatusEnum getEnum(int key) {
+        for (StatusEnum item : StatusEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        StatusEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

+ 81 - 0
cdssman-service/src/main/java/com/diagbot/exception/CommonExceptionHandler.java

@@ -0,0 +1,81 @@
+package com.diagbot.exception;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.GsonUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.BindException;
+import org.springframework.validation.FieldError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * @Description: 错误通用处理
+ * @author: gaodm
+ * @time: 2018/8/2 14:22
+ */
+@ControllerAdvice
+@ResponseBody
+@Slf4j
+public class CommonExceptionHandler {
+
+    @ExceptionHandler(Exception.class)
+    public ResponseEntity<RespDTO> handleException(Exception e) {
+        RespDTO resp = new RespDTO();
+        if (e instanceof BindException) {
+            BindException ex = (BindException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof MethodArgumentNotValidException) {
+            MethodArgumentNotValidException ex = (MethodArgumentNotValidException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            for (FieldError fieldError : ex.getBindingResult().getFieldErrors()) {
+                stringMap.put(fieldError.getField(), fieldError.getDefaultMessage());
+            }
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof MissingServletRequestParameterException) {
+            MissingServletRequestParameterException ex = (MissingServletRequestParameterException) e;
+            Map<String, String> stringMap = new HashMap<>();
+            stringMap.put(ex.getParameterName(), "不能为null");
+            String msg = GsonUtil.toJson(stringMap);
+            log.warn("【参数异常】:{}", msg);
+            resp.code = CommonErrorCode.PARAM_ERROR.getCode();
+            resp.msg = msg;
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        if (e instanceof CommonException) {
+            CommonException taiChiException = (CommonException) e;
+            resp.code = taiChiException.getCode();
+            resp.msg = e.getMessage();
+            log.error("【业务异常】:{}", e.getMessage());
+            return new ResponseEntity(resp, HttpStatus.OK);
+        }
+        resp.code = CommonErrorCode.FAIL.getCode();
+        resp.msg = e.getMessage();
+        log.error("【系统异常】:{}", e.getMessage());
+        e.printStackTrace();
+        return new ResponseEntity(resp, HttpStatus.OK);
+    }
+
+}

+ 39 - 0
cdssman-service/src/main/java/com/diagbot/exception/ServiceErrorCode.java

@@ -0,0 +1,39 @@
+package com.diagbot.exception;
+
+/**
+ * @Description: 本服务错误码
+ * 系统码(3位) + 等级码(1位) + 4位顺序号
+ * 系统码 通用码 000;用户中心 100; 管理中心 200;
+ * @author: gaodm
+ * @time: 2018/9/10 11:11
+ */
+public enum ServiceErrorCode implements ErrorCode {
+    LOG_IS_NOT_EXIST("90020001", "该日志不存在");
+
+    private String code;
+    private String msg;
+
+
+    ServiceErrorCode(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public static ServiceErrorCode codeOf(String code) {
+        for (ServiceErrorCode state : values()) {
+            if (state.getCode() == code) {
+                return state;
+            }
+        }
+        return null;
+    }
+}

+ 199 - 0
cdssman-service/src/main/java/com/diagbot/facade/DisclaimerInfoFacade.java

@@ -0,0 +1,199 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.DisclaimerInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.DisclaimerInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.DisclaimerInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DisclaimerInfoIdVO;
+import com.diagbot.vo.DisclaimerInfoTitleVO;
+import com.diagbot.vo.DisclaimerInfoVO;
+import com.diagbot.vo.DisclaimerInformationAllVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-05 10:54
+ */
+@Component
+public class DisclaimerInfoFacade extends DisclaimerInfoServiceImpl {
+    @Autowired
+    UserServiceClient userServiceClient;
+
+    public IPage<DisclaimerInfoDTO> getDisclaimerInformation(DisclaimerInfoTitleVO disclaimerInfoTitleVO) {
+        IPage<DisclaimerInfoDTO> querDisclaimerInformation = getDisclaimerInformationAll(disclaimerInfoTitleVO);
+        List<DisclaimerInfoDTO> data = querDisclaimerInformation.getRecords();
+
+        List<String> modifierid = new ArrayList<>();
+        modifierid = data.stream().map(ac -> ac.getModifier()).collect(Collectors.toList());
+
+        Map<String, String> userNames = new HashMap<>();
+        if (ListUtil.isNotEmpty(modifierid)) {
+            RespDTO<Map<String, String>> userNamesDTO = userServiceClient.getUserInfoByIds(modifierid);
+            if (userNamesDTO == null || !CommonErrorCode.OK.getCode().equals(userNamesDTO.code)) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "获取所有用户信息失败");
+            }
+            userNames = userNamesDTO.data;
+        }
+        List<DisclaimerInfoDTO> dataNew = new ArrayList<DisclaimerInfoDTO>();
+        for (DisclaimerInfoDTO disclaimerInformationDTO : data) {
+            DisclaimerInfoDTO dis = new DisclaimerInfoDTO();
+            BeanUtil.copyProperties(disclaimerInformationDTO, dis);
+            dis.setModifier(userNames.get(disclaimerInformationDTO.getModifier()));
+            dataNew.add(dis);
+        }
+        return querDisclaimerInformation.setRecords(dataNew);
+    }
+
+    public boolean addDisclaimerInformation(DisclaimerInfoVO disclaimerInfoVO) {
+        //每一处免责声明(免责声明按钮、推送免责声明、诊断免责声明)同时最多可启用1条内容,显示(按操作时间)最新的条记录;新添加免责声明,则自动展示新添加的内容;自动开启,最近一条数据自动停用;
+        UpdateWrapper<DisclaimerInfo> DisclaimerInformationStatus = new UpdateWrapper<>();
+        DisclaimerInformationStatus.eq("disclaimer_code", disclaimerInfoVO.getDisclaimerCode()).eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now()).set("status", StatusEnum.Disable.getKey());
+
+        update(new DisclaimerInfo(), DisclaimerInformationStatus);
+
+        DisclaimerInfo disclaimerInformation = new DisclaimerInfo();
+        disclaimerInformation.setCreator(UserUtils.getCurrentPrincipleID());
+        disclaimerInformation.setModifier(UserUtils.getCurrentPrincipleID());
+        disclaimerInformation.setDescription(disclaimerInfoVO.getDescription());
+        disclaimerInformation.setDisclaimerCode(disclaimerInfoVO.getDisclaimerCode());
+        disclaimerInformation.setGmtCreate(DateUtil.now());
+        disclaimerInformation.setGmtModified(DateUtil.now());
+        disclaimerInformation.setOrderNo(disclaimerInfoVO.getOrderNo());
+        disclaimerInformation.setRemark(disclaimerInfoVO.getRemark());
+        disclaimerInformation.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+        disclaimerInformation.setTitle(disclaimerInfoVO.getTitle());
+        //disclaimerInformation.setVersionId();
+
+        boolean res = save(disclaimerInformation);
+
+        return res;
+    }
+
+    public boolean updateDisclaimerInformation(DisclaimerInformationAllVO disclaimerInformationAllVO) {
+        // 1.先判断数据是否存在有效
+        checkExist(disclaimerInformationAllVO.getId());
+        // 2.修改版本详情信息
+        DisclaimerInfo disclaimerInformation = new DisclaimerInfo();
+
+        disclaimerInformation.setGmtModified(DateUtil.now());// 修改时间
+        disclaimerInformation.setModifier(UserUtils.getCurrentPrincipleID());
+        disclaimerInformation.setDescription(disclaimerInformationAllVO.getDescription());
+        disclaimerInformation.setDisclaimerCode(disclaimerInformationAllVO.getDisclaimerCode());
+        disclaimerInformation.setGmtCreate(DateUtil.now());
+        disclaimerInformation.setId(disclaimerInformationAllVO.getId());
+        //disclaimerInformation.setOrderNo(disclaimerInformationAllVO.getOrderNo());
+        //disclaimerInformation.setRemark(disclaimerInformationAllVO.getRemark());
+        //disclaimerInformation.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+        disclaimerInformation.setTitle(disclaimerInformationAllVO.getTitle());
+
+        boolean res = updateById(disclaimerInformation);
+
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+
+        return res;
+    }
+
+    /**
+     * 删除
+     *
+     * @return
+     */
+    public Boolean cancelDisclaimerInformation(DisclaimerInfoIdVO disclaimerInformationIdVO) {
+        // 1.先判断数据是否存在有效
+        checkExist(disclaimerInformationIdVO.getId());
+        UpdateWrapper<DisclaimerInfo> disclaimerInformationNew = new UpdateWrapper<>();
+        disclaimerInformationNew
+                .eq("id", disclaimerInformationIdVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        return update(new DisclaimerInfo(), disclaimerInformationNew);
+    }
+
+    /**
+     * 启用
+     *
+     * @return
+     */
+    public boolean startDisclaimerInformations(DisclaimerInfoIdVO disclaimerInfoIdVO) {
+        // 1.先判断数据是否存在有效
+        checkExist(disclaimerInfoIdVO.getId());
+        //每一处免责声明(免责声明按钮、推送免责声明、诊断免责声明)同时最多可启用1条内容,显示(按操作时间)最新的条记录;新添加免责声明,则自动展示新添加的内容;自动开启,最近一条数据自动停用;
+        //  QueryWrapper<DisclaimerInformation> data = new QueryWrapper<DisclaimerInformation>();
+        // data.in("id", disclaimerInformationIdVO.getId()).eq("is_deleted", IsDeleteEnum.N.getKey());
+        DisclaimerInfo disclaimerInformation = getById(disclaimerInfoIdVO.getId());
+
+        UpdateWrapper<DisclaimerInfo> DisclaimerInformationStatus = new UpdateWrapper<>();
+        DisclaimerInformationStatus.eq("disclaimer_code", disclaimerInformation.getDisclaimerCode()).eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now()).set("status", StatusEnum.Disable.getKey());
+
+        update(new DisclaimerInfo(), DisclaimerInformationStatus);
+
+        UpdateWrapper<DisclaimerInfo> disclaimerInformationNew = new UpdateWrapper<>();
+        disclaimerInformationNew
+                .eq("id", disclaimerInfoIdVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("status", StatusEnum.Disable.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now()).set("status", StatusEnum.Enable.getKey());
+        return update(new DisclaimerInfo(), disclaimerInformationNew);
+    }
+
+    /**
+     * 停用
+     *
+     * @return
+     */
+    public boolean endDisclaimerInformations(DisclaimerInfoIdVO disclaimerInfoIdVO) {
+        // 1.先判断数据是否存在有效
+        checkExist(disclaimerInfoIdVO.getId());
+        UpdateWrapper<DisclaimerInfo> disclaimerInformationNew = new UpdateWrapper<>();
+        disclaimerInformationNew
+                .eq("id", disclaimerInfoIdVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("status", StatusEnum.Enable.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now()).set("status", StatusEnum.Disable.getKey());
+        return update(new DisclaimerInfo(), disclaimerInformationNew);
+    }
+
+
+    /**
+     * 判断数据是否存在有效
+     *
+     * @param id
+     */
+    private void checkExist(Long id) {
+        QueryWrapper<DisclaimerInfo> disclaimerInformationFand = new QueryWrapper<>();
+        disclaimerInformationFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        int sum = count(disclaimerInformationFand);
+        if (sum == 0) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+    }
+}
+

+ 268 - 0
cdssman-service/src/main/java/com/diagbot/facade/DiseaseConfigFacade.java

@@ -0,0 +1,268 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.DiseaseConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DiseaseConfigListVO;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:05
+ */
+@Component
+public class DiseaseConfigFacade {
+    @Autowired
+    private DiseaseConfigService diseaseConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    public Boolean isExistRecord(DiseaseConfig diseaseConfig) {
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        DiseaseConfig oldRecord = new DiseaseConfig();
+        if (diseaseConfig.getId() != null) {
+            oldRecord = diseaseConfigService.getById(diseaseConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        //hisName:uniqueName 1:n
+        if (StringUtil.isNotBlank(diseaseConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", diseaseConfig.getHospitalId())
+                    .eq("his_name", diseaseConfig.getHisName())
+                    .eq("unique_name", diseaseConfig.getUniqueName());
+            oldRecord = diseaseConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param diseaseConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(DiseaseConfig diseaseConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        diseaseConfig.setModifier(userId);
+        diseaseConfig.setGmtModified(now);
+        //新增数据
+        if (diseaseConfig.getId() == null) {
+            diseaseConfig.setCreator(userId);
+            diseaseConfig.setGmtCreate(now);
+        }
+        if (diseaseConfig.getIsDeleted() == null) {
+            diseaseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        diseaseConfigService.saveOrUpdate(diseaseConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param diseaseConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(DiseaseConfigListVO diseaseConfigListVO) {
+        if (ListUtil.isEmpty(diseaseConfigListVO.getDiseaseConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(diseaseConfigListVO.getDiseaseConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param diseaseConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<DiseaseConfig> diseaseConfigList) {
+        if (ListUtil.isEmpty(diseaseConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        diseaseConfigList = diseaseConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(diseaseConfigList)) {
+            return false;
+        }
+        Long hospitalId = diseaseConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        diseaseConfigList.forEach(diseaseConfig -> {
+            diseaseConfig.setModifier(userId);
+            diseaseConfig.setGmtModified(now);
+            if (diseaseConfig.getId() == null) {
+                if (configMap.containsKey(diseaseConfig.getHisName())) {
+                    deleteIds.add(configMap.get(diseaseConfig.getHisName()).get(diseaseConfig.getUniqueName()));
+                }
+                diseaseConfig.setCreator(userId);
+                diseaseConfig.setGmtCreate(now);
+            }
+            if (diseaseConfig.getIsDeleted() == null) {
+                diseaseConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        diseaseConfigService.saveOrUpdateBatch(diseaseConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        diseaseConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        diseaseConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(DiseaseConfigPageVO diseaseConfigPageVO) {
+        return diseaseConfigService.getPage(diseaseConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<DiseaseConfig> diseaseConfigList = ExcelUtils.importExcel(file, 0, 1, DiseaseConfig.class);
+        if (ListUtil.isNotEmpty(diseaseConfigList)) {
+            diseaseConfigList.forEach(diseaseConfig -> {
+                diseaseConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(diseaseConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<DiseaseConfig> records = diseaseConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<DiseaseConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<DiseaseConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<DiseaseConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<DiseaseConfig> records = diseaseConfigService.list(queryWrapper);
+        String fileName = "疾病映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", DiseaseConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return diseaseConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 275 - 0
cdssman-service/src/main/java/com/diagbot/facade/DrugConfigFacade.java

@@ -0,0 +1,275 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.DrugConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.DrugConfigListVO;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:04
+ */
+@Component
+public class DrugConfigFacade {
+    @Autowired
+    private DrugConfigService drugConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param drugConfig
+     * @return
+     */
+    public Boolean isExistRecord(DrugConfig drugConfig) {
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        DrugConfig oldRecord = new DrugConfig();
+        if (drugConfig.getId() != null) {
+            oldRecord = drugConfigService.getById(drugConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(drugConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", drugConfig.getHospitalId())
+                    .eq("his_name", drugConfig.getHisName())
+                    .eq("unique_name", drugConfig.getUniqueName());
+            oldRecord = drugConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param drugConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(DrugConfig drugConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        drugConfig.setModifier(userId);
+        drugConfig.setGmtModified(now);
+        //新增数据
+        if (drugConfig.getId() == null) {
+            drugConfig.setCreator(userId);
+            drugConfig.setGmtCreate(now);
+        }
+        if (drugConfig.getIsDeleted() == null) {
+            drugConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        drugConfigService.saveOrUpdate(drugConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param drugConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(DrugConfigListVO drugConfigListVO) {
+        if (ListUtil.isEmpty(drugConfigListVO.getDrugConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(drugConfigListVO.getDrugConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param drugConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<DrugConfig> drugConfigList) {
+        if (ListUtil.isEmpty(drugConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        drugConfigList = drugConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(drugConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = drugConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        drugConfigList.forEach(drugConfig -> {
+            drugConfig.setModifier(userId);
+            drugConfig.setGmtModified(now);
+            if (drugConfig.getId() == null) {
+                if (configMap.containsKey(drugConfig.getHisName())) {
+                    deleteIds.add(configMap.get(drugConfig.getHisName()).get(drugConfig.getUniqueName()));
+                }
+                drugConfig.setCreator(userId);
+                drugConfig.setGmtCreate(now);
+            }
+            if (drugConfig.getIsDeleted() == null) {
+                drugConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        drugConfigService.saveOrUpdateBatch(drugConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<DrugConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        drugConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<DrugConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        drugConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    public IPage<DrugConfig> getPage(DrugConfigPageVO drugConfigPageVO) {
+        return drugConfigService.getPage(drugConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<DrugConfig> drugConfigList = ExcelUtils.importExcel(file, 0, 1, DrugConfig.class);
+        if (ListUtil.isNotEmpty(drugConfigList)) {
+            drugConfigList.forEach(drugConfig -> {
+                drugConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(drugConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<DrugConfig> records = drugConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<DrugConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<DrugConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<DrugConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<DrugConfig> records = drugConfigService.list(queryWrapper);
+        String fileName = "药品映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", DrugConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return drugConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 30 - 0
cdssman-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -0,0 +1,30 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.HospitalInfoDTO;
+import com.diagbot.entity.HospitalInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.HospitalInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 18:37
+ */
+@Component
+public class HospitalInfoFacade extends HospitalInfoServiceImpl {
+
+    public List<HospitalInfoDTO> getHospitalInfo() {
+        QueryWrapper<HospitalInfo> hospitalInfo = new QueryWrapper<>();
+        hospitalInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
+        List<HospitalInfo> list = list(hospitalInfo);
+        List<HospitalInfoDTO> data = new ArrayList<>();
+        data = BeanUtil.listCopyTo(list, HospitalInfoDTO.class);
+        return data;
+    }
+}

+ 315 - 0
cdssman-service/src/main/java/com/diagbot/facade/LisConfigFacade.java

@@ -0,0 +1,315 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.LisConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.LisConfigListVO;
+import com.diagbot.vo.LisConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class LisConfigFacade{
+    @Autowired
+    private LisConfigService lisConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param lisConfig
+     * @return
+     */
+    public Boolean isExistRecord(LisConfig lisConfig) {
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        LisConfig oldRecord = new LisConfig();
+        if (lisConfig.getId() != null) {
+            oldRecord = lisConfigService.getById(lisConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        } else if (StringUtil.isNotBlank(lisConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", lisConfig.getHospitalId())
+                    .eq("his_name", lisConfig.getHisName())
+                    .eq("unique_name", lisConfig.getUniqueName());
+            if (StringUtil.isBlank(lisConfig.getHisDetailName())) {
+                queryWrapper
+                        .isNull("his_detail_name")
+                        .or()
+                        .eq("his_detail_name", "");
+            } else {
+                queryWrapper
+                        .eq("his_detail_name", lisConfig.getHisDetailName());
+            }
+            oldRecord = lisConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param lisConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(LisConfig lisConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        lisConfig.setModifier(userId);
+        lisConfig.setGmtModified(now);
+        //新增数据
+        if (lisConfig.getId() == null) {
+            lisConfig.setCreator(userId);
+            lisConfig.setGmtCreate(now);
+        }
+        if (lisConfig.getIsDeleted() == null) {
+            lisConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        lisConfigService.saveOrUpdate(lisConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param lisConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(LisConfigListVO lisConfigListVO) {
+        if (ListUtil.isEmpty(lisConfigListVO.getLisConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(lisConfigListVO.getLisConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param lisConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<LisConfig> lisConfigList) {
+        if (ListUtil.isEmpty(lisConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤套餐或公表名为空的数据,hospitalId不允许为空
+        lisConfigList = lisConfigList
+                .stream()
+                .filter(i->i.getHospitalId()!=null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if(ListUtil.isEmpty(lisConfigList)){
+            return false;
+        }
+        Long hosptialId=lisConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Map<String, Long>>> configMap
+                = getConfigMap(hosptialId, null, null);
+        lisConfigList.forEach(lisConfig -> {
+            lisConfig.setModifier(userId);
+            lisConfig.setGmtModified(now);
+            if (lisConfig.getId() == null) {
+                if (configMap.containsKey(lisConfig.getHisName())) {
+                    if (lisConfig.getHisDetailName() == null
+                            && configMap.get(lisConfig.getHisName()).containsKey("")) {
+                        if (configMap.get(lisConfig.getHisName()).get("").containsKey(lisConfig.getUniqueName())) {
+                            deleteIds.add(configMap.get(lisConfig.getHisName()).get("").get(lisConfig.getUniqueName()));
+                        }
+                    } else if (configMap.get(lisConfig.getHisName()).containsKey(lisConfig.getHisDetailName())) {
+                        if (configMap.get(lisConfig.getHisName()).get(lisConfig.getHisDetailName()).containsKey(lisConfig.getUniqueName())) {
+                            deleteIds.add(configMap
+                                    .get(lisConfig.getHisName())
+                                    .get(lisConfig.getHisDetailName())
+                                    .get(lisConfig.getUniqueName()));
+                        }
+                    }
+                }
+                lisConfig.setCreator(userId);
+                lisConfig.setGmtCreate(now);
+            }
+            if (lisConfig.getIsDeleted() == null) {
+                lisConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+
+        lisConfigService.saveOrUpdateBatch(lisConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<LisConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        lisConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<LisConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        lisConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    public IPage<LisConfig> getPage(LisConfigPageVO lisConfigPageVO) {
+        return lisConfigService.getPage(lisConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        //从Excel读取数据
+        List<LisConfig> lisConfigList = ExcelUtils.importExcel(file, 0, 1, LisConfig.class);
+        if (ListUtil.isNotEmpty(lisConfigList)) {
+            lisConfigList.forEach(lisConfig -> {
+                lisConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(lisConfigList);
+        }
+    }
+
+
+    /**
+     * 获取映射关系-id
+     * Map<hisName,Map<hisDetailName,Map<uniqueName,id>>>
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Map<String, Long>>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Map<String, Long>>> retMap = new HashMap<>();
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<LisConfig> records = lisConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+
+        records.forEach(lisConfig -> {
+            if (lisConfig.getHisDetailName() == null) {
+                lisConfig.setHisDetailName("");
+            }
+        });
+
+        Map<String, List<LisConfig>> hisNameMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<LisConfig>> entry : hisNameMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                Map<String, Map<String, Long>> detailNameMap = new HashMap<>();
+                //his名称映射到标准词,1:n
+                Map<String, List<LisConfig>> hisDetailNameMap
+                        = EntityUtil.makeEntityListMap(entry.getValue(), "hisDetailName");
+                for (Map.Entry<String, List<LisConfig>> detailEntry : hisDetailNameMap.entrySet()) {
+                    if (ListUtil.isNotEmpty(detailEntry.getValue())) {
+                        detailNameMap.put(detailEntry.getKey(),
+                                EntityUtil.makeMapWithKeyValue(detailEntry.getValue(), "uniqueName", "id"));
+                    }
+                }
+                retMap.put(entry.getKey(), detailNameMap);
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<LisConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<LisConfig> records = lisConfigService.list(queryWrapper);
+        String fileName = "检验映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", LisConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return lisConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 277 - 0
cdssman-service/src/main/java/com/diagbot/facade/OperationConfigFacade.java

@@ -0,0 +1,277 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.OperationConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.OperationConfigListVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:05
+ */
+@Component
+public class OperationConfigFacade {
+    @Autowired
+    private OperationConfigService operationConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param operationConfig
+     * @return
+     */
+    public Boolean isExistRecord(OperationConfig operationConfig) {
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        OperationConfig oldRecord = new OperationConfig();
+        if (operationConfig.getId() != null) {
+            oldRecord = operationConfigService.getById(operationConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(operationConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id",operationConfig.getHospitalId())
+                    .eq("his_name", operationConfig.getHisName())
+                    .eq("unique_name", operationConfig.getUniqueName());
+            oldRecord = operationConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param operationConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(OperationConfig operationConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        operationConfig.setModifier(userId);
+        operationConfig.setGmtModified(now);
+        //新增数据
+        if (operationConfig.getId() == null) {
+            operationConfig.setCreator(userId);
+            operationConfig.setGmtCreate(now);
+        }
+        if (operationConfig.getIsDeleted() == null) {
+            operationConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        operationConfigService.saveOrUpdate(operationConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param operationConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(OperationConfigListVO operationConfigListVO) {
+        if (ListUtil.isEmpty(operationConfigListVO.getOperationConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(operationConfigListVO.getOperationConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param operationConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<OperationConfig> operationConfigList) {
+        if (ListUtil.isEmpty(operationConfigList)) {
+            return false;
+        }
+
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        operationConfigList = operationConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+
+        if (ListUtil.isEmpty(operationConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = operationConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        operationConfigList.forEach(operationConfig -> {
+            operationConfig.setModifier(userId);
+            operationConfig.setGmtModified(now);
+            if (operationConfig.getId() == null) {
+                if (configMap.containsKey(operationConfig.getHisName())) {
+                    deleteIds.add(configMap.get(operationConfig.getHisName()).get(operationConfig.getUniqueName()));
+                }
+                operationConfig.setCreator(userId);
+                operationConfig.setGmtCreate(now);
+            }
+            if (operationConfig.getIsDeleted() == null) {
+                operationConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        operationConfigService.saveOrUpdateBatch(operationConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<OperationConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        operationConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<OperationConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        operationConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    public IPage<OperationConfig> getPage(OperationConfigPageVO operationConfigPageVO) {
+        return operationConfigService.getPage(operationConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<OperationConfig> operationConfigList = ExcelUtils.importExcel(file, 0, 1, OperationConfig.class);
+        if (ListUtil.isNotEmpty(operationConfigList)) {
+            operationConfigList.forEach(operationConfig -> {
+                operationConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(operationConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<OperationConfig> records = operationConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<OperationConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<OperationConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<OperationConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<OperationConfig> records = operationConfigService.list(queryWrapper);
+        String fileName = "手术映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", OperationConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return operationConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 275 - 0
cdssman-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -0,0 +1,275 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.PacsConfigService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ExcelUtils;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.HospitalIdVO;
+import com.diagbot.vo.IdListVO;
+import com.diagbot.vo.IdVO;
+import com.diagbot.vo.PacsConfigListVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class PacsConfigFacade {
+    @Autowired
+    private PacsConfigService pacsConfigService;
+
+    /**
+     * 判断是否已存在
+     *
+     * @param pacsConfig
+     * @return
+     */
+    public Boolean isExistRecord(PacsConfig pacsConfig) {
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        PacsConfig oldRecord = new PacsConfig();
+        if (pacsConfig.getId() != null) {
+            oldRecord = pacsConfigService.getById(pacsConfig.getId());
+            if (oldRecord != null && oldRecord.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
+                return true;
+            }
+        }
+        if (StringUtil.isNotBlank(pacsConfig.getHisName())) {
+            queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("hospital_id", pacsConfig.getHospitalId())
+                    .eq("his_name", pacsConfig.getHisName())
+                    .eq("unique_name", pacsConfig.getUniqueName());
+            oldRecord = pacsConfigService.getOne(queryWrapper);
+            if (oldRecord != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 保存记录-单条
+     *
+     * @param pacsConfig
+     * @return
+     */
+    public Boolean saveOrUpdateRecord(PacsConfig pacsConfig) {
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+        pacsConfig.setModifier(userId);
+        pacsConfig.setGmtModified(now);
+        //新增数据
+        if (pacsConfig.getId() == null) {
+            pacsConfig.setCreator(userId);
+            pacsConfig.setGmtCreate(now);
+        }
+        if (pacsConfig.getIsDeleted() == null) {
+            pacsConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+        }
+        pacsConfigService.saveOrUpdate(pacsConfig);
+        return true;
+    }
+
+    /**
+     * 保存记录-批量
+     *
+     * @param pacsConfigListVO
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(PacsConfigListVO pacsConfigListVO) {
+        if (ListUtil.isEmpty(pacsConfigListVO.getPacsConfigList())) {
+            return false;
+        }
+        return saveOrUpdateRecords(pacsConfigListVO.getPacsConfigList());
+    }
+
+    /**
+     * 批量保存
+     *
+     * @param pacsConfigList
+     * @return
+     */
+    public Boolean saveOrUpdateRecords(List<PacsConfig> pacsConfigList) {
+        if (ListUtil.isEmpty(pacsConfigList)) {
+            return false;
+        }
+        String userId = UserUtils.getCurrentPrincipleID();
+        Date now = DateUtil.now();
+
+        //数据不完整的不保存
+        //过滤外部名称或公表名为空的数据
+        pacsConfigList = pacsConfigList
+                .stream()
+                .filter(i -> i.getHospitalId() != null)
+                .filter(i -> StringUtil.isNotBlank(i.getHisName()))
+                .filter(i -> StringUtil.isNotBlank(i.getUniqueName()))
+                .collect(Collectors.toList());
+        if (ListUtil.isEmpty(pacsConfigList)) {
+            return false;
+        }
+
+        Long hospitalId = pacsConfigList.get(0).getHospitalId();
+
+        // 验证数据是否已存在,已存在的先删除
+        // 没id的删除重新插入,有id的更新
+        List<Long> deleteIds = Lists.newLinkedList();
+        Map<String, Map<String, Long>> configMap
+                = getConfigMap(hospitalId, null, null);
+        pacsConfigList.forEach(pacsConfig -> {
+            pacsConfig.setModifier(userId);
+            pacsConfig.setGmtModified(now);
+            if (pacsConfig.getId() == null) {
+                if (configMap.containsKey(pacsConfig.getHisName())) {
+                    deleteIds.add(configMap.get(pacsConfig.getHisName()).get(pacsConfig.getUniqueName()));
+                }
+                pacsConfig.setCreator(userId);
+                pacsConfig.setGmtCreate(now);
+            }
+            if (pacsConfig.getIsDeleted() == null) {
+                pacsConfig.setIsDeleted(IsDeleteEnum.N.getKey());
+            }
+        });
+        //删除已存在映射关系
+        IdListVO idListVO = new IdListVO();
+        idListVO.setIds(deleteIds);
+        deleteRecords(idListVO);
+        pacsConfigService.saveOrUpdateBatch(pacsConfigList);
+        return true;
+    }
+
+    /**
+     * 删除记录-单条
+     *
+     * @param idVO
+     * @return
+     */
+    public Boolean deleteRecord(IdVO idVO) {
+        UpdateWrapper<PacsConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.eq("id", idVO.getId())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        pacsConfigService.removeById(idVO.getId());
+        return true;
+    }
+
+    /**
+     * 删除记录-批量
+     *
+     * @param idListVO
+     * @return
+     */
+    public Boolean deleteRecords(IdListVO idListVO) {
+        if (ListUtil.isEmpty(idListVO.getIds())) {
+            return false;
+        }
+        UpdateWrapper<PacsConfig> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.in("id", idListVO.getIds())
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        pacsConfigService.removeByIds(idListVO.getIds());
+        return true;
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    public IPage<PacsConfig> getPage(PacsConfigPageVO pacsConfigPageVO) {
+        return pacsConfigService.getPage(pacsConfigPageVO);
+    }
+
+    /**
+     * 数据导入
+     *
+     * @param file
+     * @param hospitalIdVO
+     */
+    public void importExcel(MultipartFile file, HospitalIdVO hospitalIdVO) {
+        List<PacsConfig> pacsConfigList = ExcelUtils.importExcel(file, 0, 1, PacsConfig.class);
+        if (ListUtil.isNotEmpty(pacsConfigList)) {
+            pacsConfigList.forEach(pacsConfig -> {
+                pacsConfig.setHospitalId(hospitalIdVO.getHospitalId());
+            });
+            saveOrUpdateRecords(pacsConfigList);
+        }
+    }
+
+    /**
+     * 获取映射关系-公表名
+     *
+     * @param hospitalId
+     * @param hisNames
+     * @param uniqueNames
+     * @return
+     */
+    public Map<String, Map<String, Long>> getConfigMap(Long hospitalId, List<String> hisNames, List<String> uniqueNames) {
+        Map<String, Map<String, Long>> retMap = new HashMap<>();
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId);
+        if (ListUtil.isNotEmpty(hisNames)) {
+            queryWrapper.in("his_name", hisNames);
+        }
+        if (ListUtil.isNotEmpty(uniqueNames)) {
+            queryWrapper.in("unique_name", uniqueNames);
+        }
+        List<PacsConfig> records = pacsConfigService.list(queryWrapper);
+        if (ListUtil.isEmpty(records)) {
+            return retMap;
+        }
+        Map<String, List<PacsConfig>> configMap = EntityUtil.makeEntityListMap(records, "hisName");
+        for (Map.Entry<String, List<PacsConfig>> entry : configMap.entrySet()) {
+            if (ListUtil.isNotEmpty(entry.getValue())) {
+                retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "uniqueName", "id"));
+            }
+        }
+        return retMap;
+    }
+
+    /**
+     * 数据导出
+     *
+     * @param response
+     * @param hospitalIdVO
+     */
+    public void exportExcel(HttpServletResponse response, HospitalIdVO hospitalIdVO) {
+        QueryWrapper<PacsConfig> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalIdVO.getHospitalId());
+        List<PacsConfig> records = pacsConfigService.list(queryWrapper);
+        String fileName = "检查映射.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", PacsConfig.class, fileName, response, 12.8f);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(HosRelationNumPageVO hosRelationNumPageVO) {
+        return pacsConfigService.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 138 - 0
cdssman-service/src/main/java/com/diagbot/facade/PlanDetailFacade.java

@@ -0,0 +1,138 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.PlanDetailDTO;
+import com.diagbot.entity.PlanDetail;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.PlanDetailService;
+import com.diagbot.service.impl.PlanDetailServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalPlanDetailSaveVO;
+import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.PlanDetailCancelVO;
+import com.diagbot.vo.PlanDetailRevStopVO;
+import com.diagbot.vo.PlanDetailSaveVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-07 10:38
+ */
+@Component
+public class PlanDetailFacade extends PlanDetailServiceImpl {
+    @Autowired
+    PlanDetailService planDetailService;
+
+
+    public List<PlanDetailDTO> getSysSetInfoData(HospitalSetVO hospitalSetVO) {
+        QueryWrapper<PlanDetail> sysSetInfo = new QueryWrapper<>();
+        sysSetInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
+        sysSetInfo.eq("hospital_id", hospitalSetVO.getHospitalId());
+        sysSetInfo.eq("plan_id", hospitalSetVO.getPlanId());
+        sysSetInfo.eq(StringUtil.isNotBlank(hospitalSetVO.getCode()), "code", hospitalSetVO.getCode());
+        List<PlanDetail> sysSetData = list(sysSetInfo);
+        List<PlanDetailDTO> data = BeanUtil.listCopyTo(sysSetData, PlanDetailDTO.class);
+        return data;
+    }
+
+    public List<PlanDetailDTO> getByPlanIds(List<Long> planIds) {
+        List<PlanDetailDTO> dataNew = new ArrayList<PlanDetailDTO>();
+        if (ListUtil.isNotEmpty(planIds)) {
+            QueryWrapper<PlanDetail> planDetailQuery = new QueryWrapper<>();
+            planDetailQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("STATUS", StatusEnum.Enable.getKey())
+                    .in("plan_id", planIds)
+                    .orderByDesc("gmt_create")
+                    .orderByAsc("order_no");
+            List<PlanDetail> datas = list(planDetailQuery);
+            dataNew = BeanUtil.listCopyTo(datas, PlanDetailDTO.class);
+        }
+        return dataNew;
+    }
+
+    public boolean savePlanDetail(PlanDetailSaveVO planDetailSaveVO) {
+        Date now = DateUtil.now();
+        UpdateWrapper<PlanDetail> planDetailUpdate = new UpdateWrapper<>();
+        planDetailUpdate.eq("plan_id", planDetailSaveVO.getPlanId())
+                .eq("hospital_id", planDetailSaveVO.getHospitalId())//医院id
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        update(new PlanDetail(), planDetailUpdate);
+        List<PlanDetail> planDetailList = new ArrayList<>();
+        List<HospitalPlanDetailSaveVO> planDetailData = planDetailSaveVO.getPlanDetail();
+        Long planId = planDetailSaveVO.getPlanId();
+        for (HospitalPlanDetailSaveVO planDetailVO : planDetailData) {
+            PlanDetail planDetail = new PlanDetail();
+            BeanUtil.copyProperties(planDetailVO, planDetail);
+            planDetail.setPlanId(planId);
+            planDetail.setGmtCreate(now);
+            planDetail.setCreator(UserUtils.getCurrentPrincipleID());
+            planDetail.setModifier(UserUtils.getCurrentPrincipleID());
+            planDetail.setGmtModified(now);
+            planDetailList.add(planDetail);
+        }
+        return planDetailService.saveBatch(planDetailList);
+    }
+
+    public boolean cancelPlanDetail(PlanDetailCancelVO planDetailCancelVO) {
+        boolean res = false;
+        // 1.先判断数据是否存在有效
+        UpdateWrapper<PlanDetail> planDetailNew = new UpdateWrapper<>();
+        planDetailNew
+                .eq("hospital_id", planDetailCancelVO.getHospitalId())
+                .eq("plan_id", planDetailCancelVO.getPlanId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        res = update(new PlanDetail(), planDetailNew);
+        return res;
+    }
+
+    public boolean revStopPlanDetail(PlanDetailRevStopVO planDetailRevStopVO) {
+        checkPlan(planDetailRevStopVO.getId());
+        UpdateWrapper<PlanDetail> planNew = new UpdateWrapper<>();
+        planNew
+                .eq("id", planDetailRevStopVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("status", planDetailRevStopVO.getStatus())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        return update(new PlanDetail(), planNew);
+
+    }
+
+    /**
+     * 判断数据是否存在有效
+     *
+     * @param id
+     */
+    private PlanDetail checkPlan(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<PlanDetail> PlanFand = new QueryWrapper<>();
+        PlanFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        PlanDetail planDetail = getOne(PlanFand, false);
+        if (null == planDetail) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+        return planDetail;
+    }
+}
+

+ 156 - 0
cdssman-service/src/main/java/com/diagbot/facade/PlanFacade.java

@@ -0,0 +1,156 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.PlanDetailDTO;
+import com.diagbot.dto.PlanInfoPagesDTO;
+import com.diagbot.entity.Plan;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.PlanServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.HospitalPlanCancelVO;
+import com.diagbot.vo.HospitalPlanPageVO;
+import com.diagbot.vo.HospitalPlanSaveVO;
+import com.diagbot.vo.PlanRevStopVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-07 10:29
+ */
+@Component
+public class PlanFacade extends PlanServiceImpl {
+
+    @Autowired
+    PlanDetailFacade planDetailFacade;
+
+
+    /**
+     * @param hospitalPlanSaveVO
+     * @return
+     */
+    public boolean savePlanInfoDatas(HospitalPlanSaveVO hospitalPlanSaveVO) {
+        Date now = DateUtil.now();
+        boolean res = false;
+        // 校验名称是否相同
+        int count = this.count(new QueryWrapper<Plan>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalPlanSaveVO.getHospitalId())
+                .eq("plan_name", hospitalPlanSaveVO.getPlanName())
+                .eq("plan_code", hospitalPlanSaveVO.getPlanCode())
+                .ne("id", hospitalPlanSaveVO.getId() == null ? -1 : hospitalPlanSaveVO.getId()));
+        if (count > 0) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "相同【医院】下,方案名称已存在");
+        }
+        if (hospitalPlanSaveVO.getId() != null) {
+            UpdateWrapper<Plan> planQuery = new UpdateWrapper<>();
+            planQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("id", hospitalPlanSaveVO.getId())
+                    .set("gmt_modified", now)
+                    .set("modifier", UserUtils.getCurrentPrincipleID())
+                    .set("hospital_id", hospitalPlanSaveVO.getHospitalId())
+                    .set("plan_name", hospitalPlanSaveVO.getPlanName())
+                    .set("plan_code", hospitalPlanSaveVO.getPlanCode())
+                    .set("plan_status", StatusEnum.Enable.getKey());
+            res = update(new Plan(), planQuery);
+        } else {
+            Plan plan = new Plan();
+            BeanUtil.copyProperties(hospitalPlanSaveVO, plan);
+            plan.setGmtCreate(now);
+            plan.setGmtModified(now);
+            plan.setCreator(UserUtils.getCurrentPrincipleID());
+            plan.setModifier(UserUtils.getCurrentPrincipleID());
+            res = this.save(plan);
+        }
+        return res;
+    }
+
+    public IPage<PlanInfoPagesDTO> getPlanInfoPage(HospitalPlanPageVO hospitalPlanPageVO) {
+        IPage<PlanInfoPagesDTO> data = getPlanInfoPageAll(hospitalPlanPageVO);
+        List<PlanInfoPagesDTO> planInfos = data.getRecords();
+        // 取版本id查明细
+        List<Long> ids = new ArrayList<>();
+        if (planInfos != null) {
+            // 当查出的数据不为空时,取到版本id,再去版本明细表中查询详细的信息
+            for (PlanInfoPagesDTO planInfo : planInfos) {
+                ids.add(planInfo.getId());
+            }
+            // 获取明细信息
+            List<PlanDetailDTO> PlanDetailDatas = planDetailFacade.getByPlanIds(ids);
+            Map<Long, List<PlanDetailDTO>> map = new HashMap<>();
+            // 获取所有用户开通的产品信息
+            map = EntityUtil.makeEntityListMap(PlanDetailDatas, "planId");
+            if (map.size() > 0) {
+                for (PlanInfoPagesDTO planInfo : planInfos) {
+                    List<PlanDetailDTO> planDetails = map.get(planInfo.getId());
+                    if (ListUtil.isNotEmpty(planDetails)) {
+                        planInfo.setPlanDetails(planDetails);
+                    }
+                }
+            }
+        }
+        return data.setRecords(planInfos);
+    }
+
+    public boolean cancelPlanData(HospitalPlanCancelVO hospitalPlanCancelVO) {
+        boolean res = false;
+        // 1.先判断数据是否存在有效
+        checkPlan(hospitalPlanCancelVO.getPlanId());
+        UpdateWrapper<Plan> planNew = new UpdateWrapper<>();
+        planNew
+                .eq("id", hospitalPlanCancelVO.getPlanId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        res = update(new Plan(), planNew);
+
+        return res;
+    }
+
+    public boolean revStopPlan(PlanRevStopVO planRevStopVO) {
+        checkPlan(planRevStopVO.getId());
+        UpdateWrapper<Plan> planNew = new UpdateWrapper<>();
+        planNew
+                .eq("id", planRevStopVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("plan_status", planRevStopVO.getStatus())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        return update(new Plan(), planNew);
+    }
+
+    /**
+     * 判断数据是否存在有效
+     *
+     * @param id
+     */
+    private Plan checkPlan(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<Plan> PlanFand = new QueryWrapper<>();
+        PlanFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        Plan plan = getOne(PlanFand, false);
+        if (null == plan) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+        return plan;
+    }
+
+
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/SysLogFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.SysLogServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 用户日志业务层
+ * @author: gaodm
+ * @time: 2018/8/6 9:11
+ */
+@Component
+public class SysLogFacade extends SysLogServiceImpl {
+}

+ 151 - 0
cdssman-service/src/main/java/com/diagbot/facade/TokenHospitalFacade.java

@@ -0,0 +1,151 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.TokenHospitaDTO;
+import com.diagbot.entity.TokenHospital;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.TokenHospitalService;
+import com.diagbot.service.impl.TokenHospitalServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.RSATokenIdUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.TokenHospitalCancelVO;
+import com.diagbot.vo.TokenHospitalInfoVO;
+import com.diagbot.vo.TokenHospitalUpdataVO;
+import com.diagbot.vo.TokenHospitalVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 14:55
+ */
+@Component
+public class TokenHospitalFacade extends TokenHospitalServiceImpl {
+
+    @Autowired
+    TokenHospitalService tokenHospitalService;
+
+    /**
+     * @param tokenHospitalVO
+     * @return
+     */
+
+    public IPage<TokenHospitaDTO> getTokenHospitals(TokenHospitalVO tokenHospitalVO) {
+        IPage<TokenHospitaDTO> data = getTokenHospitalPages(tokenHospitalVO);
+        return data;
+    }
+
+    public Boolean addTokenHospitals(TokenHospitalInfoVO tokenHospitalInfoVO) {
+        //校验改医院是否存在token信息
+        UpdateWrapper<TokenHospital> tokenHospitalQueryWrapper = new UpdateWrapper<>();
+        tokenHospitalQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", tokenHospitalInfoVO.getHospitalId());
+        int count = tokenHospitalService.count(tokenHospitalQueryWrapper);
+        if (count > 0) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院Token信息已存在!");
+        }
+        TokenHospital tokenHospitalData = getOne(tokenHospitalQueryWrapper, false);
+        Date now = DateUtil.now();
+        Date startTime = tokenHospitalInfoVO.getStartTime();
+        Date endTime = tokenHospitalInfoVO.getEndTime();
+        if (endTime.getTime() < startTime.getTime()) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+        }
+        int validDays = (int) ((endTime.getTime() - startTime.getTime()) / (1000 * 3600 * 24));
+        //生成Token规则, 请勿调换顺序!
+        StringBuffer sb = new StringBuffer();
+        sb.append("Token")
+                .append(DateUtil.formatDateTime(startTime))// 开始时间
+                .append(DateUtil.formatDateTime(endTime)) //结束时间
+                .append(tokenHospitalInfoVO.getHospitalId().toString()); // 医院id
+        TokenHospital tokenHospital = new TokenHospital();
+        //加密Token
+        try {
+            String appidToken = RSATokenIdUtil.encrypt(sb.toString());
+            if (appidToken.isEmpty()) {
+                throw new CommonException(CommonErrorCode.FAIL, "生成token失败!");
+            }
+            BeanUtil.copyProperties(tokenHospitalInfoVO, tokenHospital);
+            tokenHospital.setValidDays(validDays);
+            tokenHospital.setAppidToken(appidToken);
+            tokenHospital.setGmtCreate(now);
+            tokenHospital.setGmtModified(now);
+            tokenHospital.setModifier(UserUtils.getCurrentPrincipleID());
+            tokenHospital.setCreator(UserUtils.getCurrentPrincipleID());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return tokenHospitalService.save(tokenHospital);
+    }
+
+    public boolean cancelTokenHospitals(TokenHospitalCancelVO tokenHospitalCancelVO) {
+        UpdateWrapper<TokenHospital> tokenHospitalQueryWrapper = new UpdateWrapper<>();
+        tokenHospitalQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", tokenHospitalCancelVO.getId());
+        return tokenHospitalService.remove(tokenHospitalQueryWrapper);
+    }
+
+    public boolean updataTokenHospitals(TokenHospitalUpdataVO tokenHospitalInfoVO) {
+        //校验数据
+        checkTokenHospital(tokenHospitalInfoVO.getId());
+        Date now = DateUtil.now();
+        Date startTime = tokenHospitalInfoVO.getStartTime();
+        Date endTime = tokenHospitalInfoVO.getEndTime();
+        if (endTime.getTime() < startTime.getTime()) {
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
+        }
+        int validDays = (int) ((endTime.getTime() - startTime.getTime()) / (1000 * 3600 * 24));
+        //生成Token规则, 请勿调换顺序!
+        StringBuffer sb = new StringBuffer();
+        sb.append("Token")
+                .append(DateUtil.formatDateTime(startTime))// 开始时间
+                .append(DateUtil.formatDateTime(endTime)) //结束时间
+                .append(tokenHospitalInfoVO.getHospitalId().toString()); // 医院id
+        //加密Token
+        String appidToken = "";
+        try {
+            appidToken = RSATokenIdUtil.encrypt(sb.toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (appidToken.isEmpty()) {
+            throw new CommonException(CommonErrorCode.FAIL, "生成token失败!");
+        }
+        UpdateWrapper<TokenHospital> tokenHospitalQueryWrapper = new UpdateWrapper<>();
+        tokenHospitalQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", tokenHospitalInfoVO.getId())
+                .eq("hospital_id", tokenHospitalInfoVO.getHospitalId())
+                .set("appid_token", appidToken)
+                .set("start_time", startTime)
+                .set("end_time", endTime)
+                .set("valid_days", validDays);
+        return update(new TokenHospital(), tokenHospitalQueryWrapper);
+    }
+
+    /**
+     * 检验数据是否有效
+     */
+    private TokenHospital checkTokenHospital(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<TokenHospital> tokenHospitalFand = new QueryWrapper<>();
+        tokenHospitalFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        TokenHospital tokenHospital = getOne(tokenHospitalFand, false);
+        if (null == tokenHospital) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+        return tokenHospital;
+    }
+
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/facade/UploadFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.UploadServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 文件上传装饰层
+ * @author: gaodm
+ * @time: 2018/11/13 13:19
+ */
+@Component
+public class UploadFacade extends UploadServiceImpl {
+}

+ 282 - 0
cdssman-service/src/main/java/com/diagbot/facade/VersionDetailFacade.java

@@ -0,0 +1,282 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionDetailDTO;
+import com.diagbot.dto.VersionDetailSpecDTO;
+import com.diagbot.entity.VersionDetail;
+import com.diagbot.entity.VersionInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.VersionDetailServiceImpl;
+import com.diagbot.service.impl.VersionInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.VersionDetailIdVO;
+import com.diagbot.vo.VersionDetailVO;
+import com.diagbot.vo.VersionInfoAndDetailIdVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 9:36
+ */
+@Component
+public class VersionDetailFacade extends VersionDetailServiceImpl {
+
+    @Autowired
+    VersionDetailServiceImpl versionDetailServiceImpl;
+    @Autowired
+    UserServiceClient userServiceClient;
+    @Autowired
+    VersionInfoServiceImpl versionInfoServiceImpl;
+
+
+    /**
+     * 根据版本id查询版本详情
+     *
+     * @param id
+     * @return
+     */
+    public List<VersionDetailDTO> getById(Long id) {
+        QueryWrapper<VersionDetail> versionDetailQuery = new QueryWrapper<>();
+
+        versionDetailQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("STATUS", StatusEnum.Enable.getKey())
+                .eq("version_id", id).orderByAsc("order_no");
+
+        VersionDetail versionDetail = new VersionDetail();
+        versionDetail.setVersionId(id);
+        List<VersionDetail> datas = list(versionDetailQuery);
+        // System.out.println("List<VersionDetail>==="+datas.toString());
+        List<VersionDetailDTO> dataNew = new ArrayList<VersionDetailDTO>();
+        // 过滤字段
+        for (VersionDetail versionData : datas) {
+            VersionDetailDTO versionDTO = new VersionDetailDTO();
+            versionDTO.setId(versionData.getId());
+            //versionDTO.setCreator(versionData.getCreator());
+            versionDTO.setDescription(versionData.getDescription());
+            versionDTO.setGmtCreate(versionData.getGmtCreate());
+            versionDTO.setOrderNo(versionData.getOrderNo());
+            versionDTO.setRemark(versionData.getRemark());
+            versionDTO.setStatus(versionData.getStatus());
+            versionDTO.setTitle(versionData.getTitle());
+            versionDTO.setVersionId(versionData.getVersionId());
+            dataNew.add(versionDTO);
+        }
+        return dataNew;
+
+    }
+
+    /**
+     * 根据版本id查询版本详情
+     *
+     * @param id
+     * @return
+     */
+    public List<VersionDetailSpecDTO> getById2(Long id) {
+        QueryWrapper<VersionDetail> versionDetailQuery = new QueryWrapper<>();
+        Map<String, Object> mapAll = new HashMap<>();
+        mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+        mapAll.put("version_id", id);
+        mapAll.put("STATUS", StatusEnum.Enable.getKey());
+        versionDetailQuery.allEq(mapAll).orderByAsc("order_no");
+
+        VersionDetail versionDetail = new VersionDetail();
+        versionDetail.setVersionId(id);
+        List<VersionDetail> datas = list(versionDetailQuery);
+        List<VersionDetailSpecDTO> dataNew = new ArrayList<>();
+        //过滤字段
+        dataNew = BeanUtil.listCopyTo(datas, VersionDetailSpecDTO.class);
+        return dataNew;
+
+    }
+
+    /**
+     * 根据版本ids查询版本详情
+     *
+     * @param ids
+     * @return
+     */
+    public List<VersionDetailDTO> getByIds(List<Long> ids) {
+        List<VersionDetailDTO> dataNew = new ArrayList<VersionDetailDTO>();
+        if (ListUtil.isNotEmpty(ids)) {
+            QueryWrapper<VersionDetail> versionDetailQuery = new QueryWrapper<>();
+            versionDetailQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("STATUS", StatusEnum.Enable.getKey())
+                    .in("version_id", ids)
+                    .orderByDesc("gmt_create")
+                    .orderByAsc("order_no");
+
+            List<VersionDetail> datas = list(versionDetailQuery);
+            List<String> modifierid = new ArrayList<>();
+            modifierid = datas.stream().map(ac -> ac.getModifier()).collect(Collectors.toList());
+            Map<String, String> userNames = new HashMap<>();
+            if (modifierid.size() > 0) {
+                RespDTO<Map<String, String>> userNamesDTO = userServiceClient.getUserInfoByIds(modifierid);
+                if (userNamesDTO == null || !CommonErrorCode.OK.getCode().equals(userNamesDTO.code)) {
+                    throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                            "获取所有用户信息失败");
+                }
+                userNames = userNamesDTO.data;
+            }
+
+            // 过滤字段
+            for (VersionDetail versionData : datas) {
+                VersionDetailDTO versionDTO = new VersionDetailDTO();
+                versionDTO.setId(versionData.getId());
+                //versionDTO.setCreator(versionData.getCreator());
+                versionDTO.setModifierid(userNames.get(versionData.getModifier()));
+                versionDTO.setDescription(versionData.getDescription());
+                versionDTO.setGmtCreate(versionData.getGmtCreate());
+                versionDTO.setOrderNo(versionData.getOrderNo());
+                versionDTO.setRemark(versionData.getRemark());
+                versionDTO.setStatus(versionData.getStatus());
+                versionDTO.setTitle(versionData.getTitle());
+                versionDTO.setVersionId(versionData.getVersionId());
+                dataNew.add(versionDTO);
+            }
+        }
+        return dataNew;
+    }
+
+    /**
+     * 更新接口
+     *
+     * @param versionDetailVO
+     * @return
+     */
+    public boolean updateVersionDetail(VersionDetailVO versionDetailVO) {
+        // 1.先判断数据是否存在有效
+        VersionDetail versionDetailres = checkExist(versionDetailVO.getDetailId());
+        //验证主表是否是可修改状态
+        checkExistMain(versionDetailres.getVersionId());
+        // 3.修改版本详情信息
+        VersionDetail versionDetail = new VersionDetail();
+
+        versionDetail.setGmtModified(DateUtil.now());// 修改时间
+        versionDetail.setModifier(UserUtils.getCurrentPrincipleID());
+        versionDetail.setTitle(versionDetailVO.getTitle());
+        versionDetail.setOrderNo(versionDetailVO.getOrderNo());
+        versionDetail.setStatus(versionDetailVO.getStatus());
+        versionDetail.setId(versionDetailVO.getDetailId());
+        versionDetail.setDescription(versionDetailVO.getDescription());
+        versionDetail.setRemark(versionDetailVO.getRemark());
+        boolean res = updateById(versionDetail);
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+
+        return res;
+    }
+
+    /**
+     * 删除接口
+     *
+     * @param versionDetailIdVO
+     * @return
+     */
+    public boolean cancelVersionDetail(VersionDetailIdVO versionDetailIdVO) {
+        // 1.先判断数据是否存在有效
+        VersionDetail versionDetailres = checkExist(versionDetailIdVO.getId());
+        //验证主表是否是可修改状态
+        checkExistMain(versionDetailres.getVersionId());
+        UpdateWrapper<VersionDetail> versionDetailNew = new UpdateWrapper<>();
+        versionDetailNew
+                .eq("id", versionDetailIdVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        return update(new VersionDetail(), versionDetailNew);
+    }
+
+    /**
+     * 增加明细接口
+     *
+     * @param versionInfoAndDetailIdVO
+     * @return
+     */
+    public boolean addVersionDetail(VersionInfoAndDetailIdVO versionInfoAndDetailIdVO) {
+
+        //1.增加明细前先判断主版本号的id是否有效
+        checkExistMain(versionInfoAndDetailIdVO.getVersionInfoId());
+
+        List<VersionDetail> dataNew = new ArrayList<VersionDetail>();
+        List<VersionDetailVO> datas = versionInfoAndDetailIdVO.getVersionDetail();
+        for (VersionDetailVO data : datas) {
+            VersionDetail versionDetail = new VersionDetail();
+            versionDetail.setCreator(UserUtils.getCurrentPrincipleID());
+            versionDetail.setGmtCreate(DateUtil.now());
+            versionDetail.setGmtModified(DateUtil.now());
+            versionDetail.setModifier(UserUtils.getCurrentPrincipleID());
+            versionDetail.setDescription(data.getDescription());
+            versionDetail.setOrderNo(data.getOrderNo());
+            versionDetail.setTitle(data.getTitle());
+            versionDetail.setVersionId(versionInfoAndDetailIdVO.getVersionInfoId());
+            versionDetail.setRemark(data.getRemark());
+            versionDetail.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+            dataNew.add(versionDetail);
+
+        }
+
+        boolean res = versionDetailServiceImpl.saveBatch(dataNew);
+
+        return res;
+    }
+
+    /**
+     * 判断数据是否存在有效
+     *
+     * @param id
+     */
+    private VersionDetail checkExist(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<VersionDetail> VersionInfoFand = new QueryWrapper<>();
+        VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        VersionDetail versionDetail = getOne(VersionInfoFand, false);
+        if (null == versionDetail) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+        return versionDetail;
+    }
+
+
+    /**
+     * 判断数据是否存在有效(主版本)
+     *
+     * @param id
+     */
+    private void checkExistMain(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<VersionInfo> VersionInfoFand = new QueryWrapper<>();
+        VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", id);
+        VersionInfo versionInfo = versionInfoServiceImpl.getOne(VersionInfoFand, false);
+        if (null == versionInfo) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "主版本号数据不存在");
+        }
+        if (StringUtil.isNotBlank(versionInfo.getStatus())
+                && versionInfo.getStatus().equals(String.valueOf(StatusEnum.Disable.getKey()))) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该版本已停用");
+        }
+    }
+}
+

+ 268 - 0
cdssman-service/src/main/java/com/diagbot/facade/VersionInfoFacade.java

@@ -0,0 +1,268 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.VersionDetailDTO;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.entity.VersionDetail;
+import com.diagbot.entity.VersionInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.StatusEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.VersionDetailServiceImpl;
+import com.diagbot.service.impl.VersionInfoServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.VersionDetailVO;
+import com.diagbot.vo.VersionInfoAllVO;
+import com.diagbot.vo.VersionInfoIdVO;
+import com.diagbot.vo.VersionInfoVO;
+import com.diagbot.vo.VersionWrapperNameVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-08-06 9:35
+ */
+@Component
+public class VersionInfoFacade extends VersionInfoServiceImpl {
+
+    @Autowired
+    VersionDetailFacade versionDetailFacade;
+    @Autowired
+    VersionDetailServiceImpl versionDetailServiceImpl;
+    @Autowired
+    UserServiceClient userServiceClient;
+
+    /**
+     * 查询版本信息
+     *
+     * @return
+     */
+    public IPage<VersionWrapperDTO> getVersionInfoAll(VersionWrapperNameVO versionWrapperNameVO) {
+
+        IPage<VersionWrapperDTO> queryUserInformation = getVersionInfoAPage(versionWrapperNameVO);
+        List<VersionWrapperDTO> versionInfos = queryUserInformation.getRecords();
+        List<VersionWrapperDTO> versionLists = new ArrayList<VersionWrapperDTO>();
+        // 取出操作人id
+        List<String> modifierid = new ArrayList<>();
+        modifierid = versionInfos.stream().map(ac -> ac.getModifierid()).collect(Collectors.toList());
+        // 根据操作人的id获取操作人信息
+        Map<String, String> userNames = new HashMap<>();
+        if (ListUtil.isNotEmpty(modifierid)) {
+            RespDTO<Map<String, String>> userNamesDTO = userServiceClient.getUserInfoByIds(modifierid);
+            if (userNamesDTO == null || !CommonErrorCode.OK.getCode().equals(userNamesDTO.code)) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "获取所有用户信息失败");
+            }
+            userNames = userNamesDTO.data;
+        }
+        // 当查出的数据不为空时,取到版本id,再去版本明细表中查询详细的信息
+        for (VersionWrapperDTO versionInfo : versionInfos) {
+            VersionWrapperDTO versionList = new VersionWrapperDTO();
+            versionList.setId(versionInfo.getId());
+            versionList.setGmtCreate(versionInfo.getGmtCreate());
+            versionList.setName(versionInfo.getName());
+            versionList.setModifierid(userNames.get(versionInfo.getModifierid()));
+            versionList.setRefreshTime(versionInfo.getRefreshTime());
+            versionList.setStatus(versionInfo.getStatus());
+            versionList.setRemark(versionInfo.getRemark());
+            versionLists.add(versionList);
+        }
+        // 取版本id查明细
+        List<Long> ids = new ArrayList<>();
+        if (versionInfos != null) {
+            // 当查出的数据不为空时,取到版本id,再去版本明细表中查询详细的信息
+            for (VersionWrapperDTO versionInfo : versionInfos) {
+                ids.add(versionInfo.getId());
+            }
+            // 获取明细信息
+            List<VersionDetailDTO> details = versionDetailFacade.getByIds(ids);
+            Map<Long, List<VersionDetailDTO>> map = new HashMap<>();
+            // 获取所有用户开通的产品信息
+            map = EntityUtil.makeEntityListMap(details, "versionId");
+            if (map.size() > 0) {
+                for (VersionWrapperDTO versionList : versionLists) {
+                    List<VersionDetailDTO> userAndProdutUDTO = map.get(versionList.getId());
+                    if (ListUtil.isNotEmpty(userAndProdutUDTO)) {
+                        versionList.setDetail(userAndProdutUDTO);
+                    }
+                }
+            }
+        }
+        return queryUserInformation.setRecords(versionLists);
+
+    }
+
+    /**
+     * 保存版本信息
+     *
+     * @param versionInfoVO
+     * @return
+     */
+    public boolean saveVersionInfoAll(VersionInfoVO versionInfoVO) {
+        // 1.判断摸个产品该版本号是否存在名字相同的数据
+        QueryWrapper<VersionInfo> templateInfoFand = new QueryWrapper<>();
+        templateInfoFand
+                .eq("name", versionInfoVO.getName())
+                .eq("is_deleted", IsDeleteEnum.N.getKey());
+
+        VersionInfo dataInfo = getOne(templateInfoFand, false);
+        if (dataInfo != null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该产品该版本号已存在");
+        }
+        //2.把相同产品类型的版本状态修改为0,
+        UpdateWrapper<VersionInfo> versionInfoUp = new UpdateWrapper<>();
+        versionInfoUp
+                .eq("status", StatusEnum.Enable.getKey())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("status", StatusEnum.Disable.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        update(new VersionInfo(), versionInfoUp);
+
+        //3.增加版本数据
+        VersionInfo versionInfo = new VersionInfo();
+        versionInfo.setCreator(UserUtils.getCurrentPrincipleID());
+        versionInfo.setGmtCreate(DateUtil.now());
+        versionInfo.setName(versionInfoVO.getName());
+        versionInfo.setGmtModified(DateUtil.now());
+        versionInfo.setModifier(UserUtils.getCurrentPrincipleID());
+        versionInfo.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            versionInfo.setRefreshTime(sdf.parse(versionInfoVO.getRefreshTime()));
+        } catch (ParseException e) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "时间格式有误");
+        }
+        versionInfo.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+        versionInfo.setRemark(versionInfoVO.getRemark());
+        // 优先保存版本号,成功后再保存明细信息
+        boolean res = save(versionInfo);
+        if (res) {
+            List<VersionDetail> dataNew = new ArrayList<VersionDetail>();
+            List<VersionDetailVO> datas = versionInfoVO.getVersionDetail();
+            if (datas != null && datas.size() > 0) {
+                for (VersionDetailVO data : datas) {
+                    VersionDetail versionDetail = new VersionDetail();
+                    versionDetail.setCreator(UserUtils.getCurrentPrincipleID());
+                    versionDetail.setGmtCreate(DateUtil.now());
+                    versionDetail.setGmtModified(DateUtil.now());
+                    versionDetail.setModifier(UserUtils.getCurrentPrincipleID());
+                    versionDetail.setDescription(data.getDescription());
+                    versionDetail.setOrderNo(data.getOrderNo());
+                    versionDetail.setTitle(data.getTitle());
+                    versionDetail.setVersionId(versionInfo.getId());
+                    versionDetail.setRemark(data.getRemark());
+                    versionDetail.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+                    dataNew.add(versionDetail);
+                }
+
+                res = versionDetailServiceImpl.saveBatch(dataNew);
+            }
+        }
+        return res;
+    }
+
+    /**
+     * 更新
+     *
+     * @param versionInfoVO
+     * @return
+     */
+    public boolean updateVersionInfoAll(VersionInfoAllVO versionInfoVO) {
+        // 1.先判断数据是否存在有效
+        VersionInfo versionInfoRes = checkExist(versionInfoVO.getId());
+        //验证是否停用
+        if (versionInfoRes != null
+                && StringUtil.isNotBlank(versionInfoRes.getStatus())
+                && versionInfoRes.getStatus().equals(String.valueOf(StatusEnum.Disable.getKey()))) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该产品该版本号已停用");
+        }
+        // 2.判断该版本号是否存在名字相同的数据
+        QueryWrapper<VersionInfo> templateInfoFand = new QueryWrapper<>();
+        templateInfoFand
+                .eq("name", versionInfoVO.getName())
+                .eq("is_deleted", IsDeleteEnum.N.getKey());
+
+        VersionInfo dataInfo = getOne(templateInfoFand, false);
+        if (dataInfo != null && !dataInfo.getId().equals(versionInfoVO.getId())) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该产品该版本号已存在");
+        }
+        // 3.修改版本信息
+        VersionInfo versionInfo = new VersionInfo();
+        versionInfo.setId(versionInfoVO.getId());// 模板id
+        versionInfo.setName(versionInfoVO.getName());// 模板名称
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        if (versionInfoVO.getRefreshTime() != null) {
+            try {
+                versionInfo.setRefreshTime(sdf.parse(versionInfoVO.getRefreshTime()));
+            } catch (ParseException e) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "时间格式有误");
+                // e.printStackTrace();
+            }
+        }
+        versionInfo.setStatus(String.valueOf(StatusEnum.Enable.getKey()));
+        versionInfo.setRemark(versionInfoVO.getRemark());
+        versionInfo.setGmtModified(DateUtil.now());// 修改时间
+        versionInfo.setModifier(UserUtils.getCurrentPrincipleID());
+        boolean res = updateById(versionInfo);
+        if (!res) {
+            throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
+        }
+
+        return res;
+    }
+
+    /**
+     * 删除
+     *
+     * @param versionInfoVO
+     * @return
+     */
+    public boolean cancelVersionInfoAll(VersionInfoIdVO versionInfoVO) {
+        // 1.先判断数据是否存在有效
+        checkExist(versionInfoVO.getId());
+        UpdateWrapper<VersionInfo> versionInfoNew = new UpdateWrapper<>();
+        versionInfoNew
+                .eq("id", versionInfoVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .set("is_deleted", IsDeleteEnum.Y.getKey())
+                .set("modifier", UserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        return update(new VersionInfo(), versionInfoNew);
+    }
+
+    /**
+     * 判断数据是否存在有效
+     *
+     * @param id
+     */
+    private VersionInfo checkExist(Long id) {
+        // 1.先判断数据是否存在有效
+        QueryWrapper<VersionInfo> VersionInfoFand = new QueryWrapper<>();
+        VersionInfoFand.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("id", id);
+        VersionInfo versionInfo = getOne(VersionInfoFand, false);
+        if (null == versionInfo) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该数据不存在");
+        }
+        return versionInfo;
+    }
+
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DisclaimerInfoMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.DisclaimerInfoDTO;
+import com.diagbot.entity.DisclaimerInfo;
+import com.diagbot.vo.DisclaimerInfoTitleVO;
+
+/**
+ * <p>
+ * 免责申明详情 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-05
+ */
+public interface DisclaimerInfoMapper extends BaseMapper<DisclaimerInfo> {
+
+    IPage<DisclaimerInfoDTO> getDisclaimerInfoAll(DisclaimerInfoTitleVO disclaimerInfoTitleVO);
+}

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DiseaseConfigMapper.java

@@ -0,0 +1,36 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 诊断映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DiseaseConfigMapper extends BaseMapper<DiseaseConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/mapper/DrugConfigMapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 药品映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DrugConfigMapper extends BaseMapper<DrugConfig> {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/HospitalInfoMapper.java

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

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/mapper/LisConfigMapper.java

@@ -0,0 +1,36 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 化验公表映射 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface LisConfigMapper extends BaseMapper<LisConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/mapper/OperationConfigMapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 手术映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface OperationConfigMapper extends BaseMapper<OperationConfig> {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/mapper/PacsConfigMapper.java

@@ -0,0 +1,35 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 检查公表映射 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface PacsConfigMapper extends BaseMapper<PacsConfig> {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/PlanDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.PlanDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+public interface PlanDetailMapper extends BaseMapper<PlanDetail> {
+
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/mapper/PlanMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.PlanInfoPagesDTO;
+import com.diagbot.entity.Plan;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.HospitalPlanPageVO;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+public interface PlanMapper extends BaseMapper<Plan> {
+
+    IPage<PlanInfoPagesDTO> getPlanInfoPageAll(HospitalPlanPageVO hospitalPlanPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/SysLogMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.SysLog;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-08-02
+ */
+public interface SysLogMapper extends BaseMapper<SysLog> {
+
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/mapper/TokenHospitalMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.TokenHospitaDTO;
+import com.diagbot.entity.TokenHospital;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.TokenHospitalVO;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface TokenHospitalMapper extends BaseMapper<TokenHospital> {
+
+    IPage<TokenHospitaDTO> getTokenHospitalPages(TokenHospitalVO tokenHospitalVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/mapper/VersionDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.VersionDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 版本详情(关于) Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface VersionDetailMapper extends BaseMapper<VersionDetail> {
+
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/mapper/VersionInfoMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.entity.VersionInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.VersionWrapperNameVO;
+
+/**
+ * <p>
+ * 版本信息 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface VersionInfoMapper extends BaseMapper<VersionInfo> {
+
+    IPage<VersionWrapperDTO> getVersionInfoAPage(VersionWrapperNameVO versionWrapperNameVO);
+}

+ 23 - 0
cdssman-service/src/main/java/com/diagbot/rabbit/MyProcessor.java

@@ -0,0 +1,23 @@
+package com.diagbot.rabbit;
+
+import org.springframework.cloud.stream.annotation.Input;
+import org.springframework.cloud.stream.annotation.Output;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.SubscribableChannel;
+
+/**
+ * @Description: 自定义Stream发布和消费对象
+ * @author: gaodm
+ * @time: 2018/8/29 13:39
+ */
+public interface MyProcessor {
+
+    String INPUT_LOG = "inputLog";
+    String OUTPUT_LOG = "outputLog";
+
+    @Input(INPUT_LOG)
+    SubscribableChannel inputLog();
+
+    @Output(OUTPUT_LOG)
+    MessageChannel outputLog();
+}

+ 27 - 0
cdssman-service/src/main/java/com/diagbot/rabbit/MySender.java

@@ -0,0 +1,27 @@
+package com.diagbot.rabbit;
+
+import com.diagbot.biz.log.entity.SysLog;
+import com.diagbot.util.GsonUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.cloud.stream.annotation.EnableBinding;
+import org.springframework.integration.support.MessageBuilder;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 发布者
+ * @author: gaodm
+ * @time: 2018/8/29 13:41
+ */
+@Component
+@EnableBinding({ MyProcessor.class })
+public class MySender {
+    @Autowired
+    @Qualifier("outputLog")
+    MessageChannel outputLog;
+
+    public void outputLogSend(SysLog sysLog) {
+        outputLog.send(MessageBuilder.withPayload(GsonUtil.toJson(sysLog)).build());
+    }
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/service/DisclaimerInfoService.java

@@ -0,0 +1,20 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.DisclaimerInfoDTO;
+import com.diagbot.entity.DisclaimerInfo;
+import com.diagbot.vo.DisclaimerInfoTitleVO;
+
+/**
+ * <p>
+ * 免责申明详情 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-05
+ */
+public interface DisclaimerInfoService extends IService<DisclaimerInfo> {
+    public IPage<DisclaimerInfoDTO> getDisclaimerInformationAll(DisclaimerInfoTitleVO disclaimerInfoTitleVO);
+
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/service/DiseaseConfigService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 诊断映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DiseaseConfigService extends IService<DiseaseConfig> {
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/service/DrugConfigService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 药品映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface DrugConfigService extends IService<DrugConfig> {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/service/HospitalInfoService.java

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

+ 36 - 0
cdssman-service/src/main/java/com/diagbot/service/LisConfigService.java

@@ -0,0 +1,36 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 化验公表映射 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface LisConfigService extends IService<LisConfig> {
+
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/service/OperationConfigService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 手术映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface OperationConfigService extends IService<OperationConfig> {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 35 - 0
cdssman-service/src/main/java/com/diagbot/service/PacsConfigService.java

@@ -0,0 +1,35 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * <p>
+ * 检查公表映射 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+public interface PacsConfigService extends IService<PacsConfig> {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO);
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/service/PlanDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.PlanDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+public interface PlanDetailService extends IService<PlanDetail> {
+
+}

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/service/PlanService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.PlanInfoPagesDTO;
+import com.diagbot.entity.Plan;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.HospitalPlanPageVO;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+public interface PlanService extends IService<Plan> {
+    IPage<PlanInfoPagesDTO> getPlanInfoPageAll(HospitalPlanPageVO hospitalPlanPageVO);
+}

+ 15 - 0
cdssman-service/src/main/java/com/diagbot/service/SysLogService.java

@@ -0,0 +1,15 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.SysLog;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2018-08-02
+ */
+public interface SysLogService extends IService<SysLog> {
+}

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/service/TokenHospitalService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.TokenHospitaDTO;
+import com.diagbot.entity.TokenHospital;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.TokenHospitalVO;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface TokenHospitalService extends IService<TokenHospital> {
+    IPage<TokenHospitaDTO> getTokenHospitalPages(TokenHospitalVO tokenHospitalVO);
+}

+ 13 - 0
cdssman-service/src/main/java/com/diagbot/service/UploadService.java

@@ -0,0 +1,13 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.FileDTO;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @Description: 文件上传服务接口
+ * @author: gaodm
+ * @time: 2018/11/13 13:50
+ */
+public interface UploadService {
+    FileDTO singleFileUpload(MultipartFile file);
+}

+ 16 - 0
cdssman-service/src/main/java/com/diagbot/service/VersionDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.VersionDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 版本详情(关于) 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface VersionDetailService extends IService<VersionDetail> {
+
+}

+ 19 - 0
cdssman-service/src/main/java/com/diagbot/service/VersionInfoService.java

@@ -0,0 +1,19 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.VersionWrapperDTO;
+import com.diagbot.entity.VersionInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.VersionWrapperNameVO;
+
+/**
+ * <p>
+ * 版本信息 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-06
+ */
+public interface VersionInfoService extends IService<VersionInfo> {
+    IPage<VersionWrapperDTO> getVersionInfoAPage(VersionWrapperNameVO versionWrapperNameVO);
+}

+ 27 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DisclaimerInfoServiceImpl.java

@@ -0,0 +1,27 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.DisclaimerInfoDTO;
+import com.diagbot.entity.DisclaimerInfo;
+import com.diagbot.mapper.DisclaimerInfoMapper;
+import com.diagbot.service.DisclaimerInfoService;
+import com.diagbot.vo.DisclaimerInfoTitleVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 免责申明详情 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-05
+ */
+@Service
+public class DisclaimerInfoServiceImpl extends ServiceImpl<DisclaimerInfoMapper, DisclaimerInfo> implements DisclaimerInfoService {
+
+    @Override
+    public IPage<DisclaimerInfoDTO> getDisclaimerInformationAll(DisclaimerInfoTitleVO disclaimerInfoTitleVO) {
+        return baseMapper.getDisclaimerInfoAll(disclaimerInfoTitleVO);
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DiseaseConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DiseaseConfig;
+import com.diagbot.mapper.DiseaseConfigMapper;
+import com.diagbot.service.DiseaseConfigService;
+import com.diagbot.vo.DiseaseConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 诊断映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class DiseaseConfigServiceImpl extends ServiceImpl<DiseaseConfigMapper, DiseaseConfig> implements DiseaseConfigService {
+    /**
+     * 分页查询
+     *
+     * @param diseaseConfigPageVO
+     * @return
+     */
+    public IPage<DiseaseConfig> getPage(@Param("diseaseConfigPageVO") DiseaseConfigPageVO diseaseConfigPageVO){
+        return baseMapper.getPage(diseaseConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/DrugConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.DrugConfig;
+import com.diagbot.mapper.DrugConfigMapper;
+import com.diagbot.service.DrugConfigService;
+import com.diagbot.vo.DrugConfigPageVO;
+import com.diagbot.vo.HosRelationNumPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 药品映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class DrugConfigServiceImpl extends ServiceImpl<DrugConfigMapper, DrugConfig> implements DrugConfigService {
+    /**
+     * 分页查询
+     *
+     * @param drugConfigPageVO
+     * @return
+     */
+    public IPage<DrugConfig> getPage(@Param("drugConfigPageVO") DrugConfigPageVO drugConfigPageVO){
+        return baseMapper.getPage(drugConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/HospitalInfoServiceImpl.java

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

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/LisConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.LisConfig;
+import com.diagbot.mapper.LisConfigMapper;
+import com.diagbot.service.LisConfigService;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.LisConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 化验公表映射 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class LisConfigServiceImpl extends ServiceImpl<LisConfigMapper, LisConfig> implements LisConfigService {
+    /**
+     * 分页查询
+     *
+     * @param lisConfigPageVO
+     * @return
+     */
+    public IPage<LisConfig> getPage(@Param("lisConfigPageVO") LisConfigPageVO lisConfigPageVO) {
+        return baseMapper.getPage(lisConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/OperationConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.OperationConfig;
+import com.diagbot.mapper.OperationConfigMapper;
+import com.diagbot.service.OperationConfigService;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.OperationConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 手术映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class OperationConfigServiceImpl extends ServiceImpl<OperationConfigMapper, OperationConfig> implements OperationConfigService {
+    /**
+     * 分页查询
+     *
+     * @param operationConfigPageVO
+     * @return
+     */
+    public IPage<OperationConfig> getPage(@Param("operationConfigPageVO") OperationConfigPageVO operationConfigPageVO){
+        return baseMapper.getPage(operationConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 43 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/PacsConfigServiceImpl.java

@@ -0,0 +1,43 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.HosRelationNumDTO;
+import com.diagbot.entity.PacsConfig;
+import com.diagbot.mapper.PacsConfigMapper;
+import com.diagbot.service.PacsConfigService;
+import com.diagbot.vo.HosRelationNumPageVO;
+import com.diagbot.vo.PacsConfigPageVO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 检查公表映射 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2020-07-28
+ */
+@Service
+public class PacsConfigServiceImpl extends ServiceImpl<PacsConfigMapper, PacsConfig> implements PacsConfigService {
+    /**
+     * 分页查询
+     *
+     * @param pacsConfigPageVO
+     * @return
+     */
+    public IPage<PacsConfig> getPage(@Param("pacsConfigPageVO") PacsConfigPageVO pacsConfigPageVO) {
+        return baseMapper.getPage(pacsConfigPageVO);
+    }
+
+    /**
+     * 各医院映射关系数列表
+     *
+     * @param hosRelationNumPageVO
+     * @return
+     */
+    public IPage<HosRelationNumDTO> getRelationNumPage(@Param("hosRelationNumPageVO") HosRelationNumPageVO hosRelationNumPageVO) {
+        return baseMapper.getRelationNumPage(hosRelationNumPageVO);
+    }
+}

+ 20 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/PlanDetailServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.PlanDetail;
+import com.diagbot.mapper.PlanDetailMapper;
+import com.diagbot.service.PlanDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+@Service
+public class PlanDetailServiceImpl extends ServiceImpl<PlanDetailMapper, PlanDetail> implements PlanDetailService {
+
+}

+ 27 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/PlanServiceImpl.java

@@ -0,0 +1,27 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.PlanInfoPagesDTO;
+import com.diagbot.entity.Plan;
+import com.diagbot.mapper.PlanMapper;
+import com.diagbot.service.PlanService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.HospitalPlanPageVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-08-07
+ */
+@Service
+public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements PlanService {
+
+    @Override
+    public IPage<PlanInfoPagesDTO> getPlanInfoPageAll(HospitalPlanPageVO hospitalPlanPageVO) {
+        return baseMapper.getPlanInfoPageAll(hospitalPlanPageVO);
+    }
+}

+ 0 - 0
cdssman-service/src/main/java/com/diagbot/service/impl/SysLogServiceImpl.java


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