湛江补偿下载器初始化
parent
a1f5cc5410
commit
42caa9dfa8
@ -1,186 +1,105 @@
|
||||
<?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"
|
||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.8.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>springbootDemo</artifactId>
|
||||
<artifactId>tool_zj</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>springbootDemo</name>
|
||||
<description>springbootDemo</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<skipTests>true</skipTests>
|
||||
<mybatisPlus.version>3.4.1</mybatisPlus.version>
|
||||
<alibabadruid.version>1.2.1</alibabadruid.version>
|
||||
<knife4j.version>2.0.9</knife4j.version>
|
||||
<fastjson.version>2.0.11</fastjson.version>
|
||||
<commons-pool2.version>2.6.0</commons-pool2.version>
|
||||
<itext.version>2.1.7</itext.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring Boot Web Starter -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--swagger2-->
|
||||
<!-- MyBatis-Plus Starter -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.9.2</version>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatisPlus.version}</version>
|
||||
</dependency>
|
||||
<!-- Apache Commons Lang -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<!-- Apache HttpClient -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
</dependency>
|
||||
<!--mybatis-plus-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>${mybatisPlus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>${mybatisPlus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!--druid监控-->
|
||||
|
||||
<!-- json -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${alibabadruid.version}</version>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.4</version>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- swaggerui相关依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
<version>2.0.9</version>
|
||||
</dependency>
|
||||
<!-- Jackson Json处理工具包 -->
|
||||
<!-- Druid 数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<!-- spring2.X集成redis所需common-pool2-->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>${commons-pool2.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.ofdrw</groupId>
|
||||
<artifactId>ofdrw-full</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>2.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lowagie</groupId>
|
||||
<artifactId>itext</artifactId>
|
||||
<version>2.1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime.3_7_1</groupId>
|
||||
<artifactId>com.lowagie.text</artifactId>
|
||||
<version>2.1.7</version>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${alibabadruid.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- sqlserver相关依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>sqljdbc4</artifactId>
|
||||
<version>4.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Spring Boot Test -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.10</version>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>wsjz-releases</id>
|
||||
<name>Releases Repository</name>
|
||||
<url>http://localhost:8081/nexus/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>wsjz-snapshots</id>
|
||||
<name>Snapshot Repository</name>
|
||||
<url>http://localhost:8081/nexus/content/repositories/snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
@ -1,34 +0,0 @@
|
||||
package com.example;
|
||||
|
||||
import org.quartz.*;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @ClassName QuartzConfig
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/8/14 15:47
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class QuartzConfig {
|
||||
|
||||
@Bean
|
||||
public JobDetail teatQuartzDetail(){
|
||||
|
||||
return JobBuilder.newJob(TestQuartz.class).withIdentity("testQuartz").storeDurably().build();
|
||||
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Trigger testQuartzTrigger(){
|
||||
|
||||
return TriggerBuilder.newTrigger().forJob(teatQuartzDetail())
|
||||
|
||||
.withIdentity("testQuartz")
|
||||
.withSchedule(CronScheduleBuilder.cronSchedule("0 0 1 * * ?"))
|
||||
.build();
|
||||
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.example;
|
||||
|
||||
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
public class TestQuartz extends QuartzJobBean {
|
||||
|
||||
|
||||
@Value("${waterPicPath}")
|
||||
private String waterPicPath;
|
||||
|
||||
@Value("${waterPicPathFlag}")
|
||||
private String waterPicPathFlag;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void executeInternal(JobExecutionContext jobExecutionContext) {
|
||||
if (waterPicPathFlag == "0") {
|
||||
return;
|
||||
}
|
||||
String filePath = waterPicPath;
|
||||
File file = new File(filePath);
|
||||
if (file.isDirectory()) {
|
||||
for (File f : file.listFiles()) {
|
||||
f.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.example.config;
|
||||
|
||||
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.Parameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2WebMvc
|
||||
public class Knife4jConfiguration {
|
||||
/**
|
||||
* 需要配置controller层包名
|
||||
*/
|
||||
String controllerPackagePath = "com.example";
|
||||
@Bean(value = "defaultApi2")
|
||||
public Docket defaultApi2() {
|
||||
List<Parameter> pars = new ArrayList<>();
|
||||
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||
tokenPar.name("token")
|
||||
.description("用户token")
|
||||
.defaultValue("")
|
||||
.modelRef(new ModelRef("string"))
|
||||
.parameterType("header")
|
||||
.required(false)
|
||||
.build();
|
||||
pars.add(tokenPar.build());
|
||||
//添加head参数end
|
||||
|
||||
Docket docket=new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
//.title("swagger-bootstrap-ui-demo RESTful APIs")
|
||||
.description("# swagger-bootstrap-ui-demo RESTful APIs")
|
||||
.termsOfServiceUrl("www.codeleader.top")
|
||||
.version("1.0")
|
||||
.build())
|
||||
.globalOperationParameters(pars)
|
||||
//分组名称
|
||||
.groupName("2.X版本")
|
||||
.select()
|
||||
//这里指定Controller扫描包路径
|
||||
.apis(RequestHandlerSelectors.basePackage(controllerPackagePath))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
return docket;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.example.controller;
|
||||
|
||||
import com.example.service.SubordinateService;
|
||||
import com.example.utils.CommonResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName ZJYYController
|
||||
* @Description 湛江医院接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 10:33
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/subordinate")
|
||||
@Api(value = "湛江医院处理消息接口", tags = "湛江医院处理消息接口")
|
||||
@Slf4j
|
||||
public class SubordinateController {
|
||||
@Autowired
|
||||
private SubordinateService subordinateService;
|
||||
@PostMapping("/againTask")
|
||||
@ApiOperation("重新采集文件下载器任务接口")
|
||||
@ResponseBody
|
||||
public CommonResult<?> AgainTask() {
|
||||
return subordinateService.CompensateTask();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.db.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveDetailDao
|
||||
* @Description 文件表接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 16:08
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveDetailDao {
|
||||
|
||||
List<String> getPdfPath(@Param("masterId") String masterId, @Param("applyId") String applyId);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.db.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveMasterDao
|
||||
* @Description 患者基础信息接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 15:54
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveMasterDao {
|
||||
|
||||
List<String> getMasterIdByInpNoAndVisitId(@Param("inpNo")String inpNo, @Param("visitId")String visitId);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.example.db.dao;
|
||||
|
||||
import com.example.vo.MessageSubordinateVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MessageSubordinateDao
|
||||
* @Description MessageSubordinate接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 11:02
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageSubordinateDao {
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 查询需要重新采集的消息体
|
||||
* @DateTime: 2025/4/8 11:04
|
||||
* @Params: []
|
||||
* @Return java.util.List<com.example.vo.MessageSubordinateVo>
|
||||
*/
|
||||
List<MessageSubordinateVo> getMessageSubordinate(Integer status);
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 修改文件状态
|
||||
* @DateTime: 2025/4/8 16:18
|
||||
* @Params: [status]
|
||||
* @Return java.lang.Boolean
|
||||
*/
|
||||
Boolean updateStatus(@Param("status")Integer status, @Param("id")String id);
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
package com.example.duplicate.common;
|
||||
|
||||
public class CommonUtil {
|
||||
public static final String USERKEY = "hj:mr:user";
|
||||
|
||||
public static final int DEFAULTPAGESIZE = 1000;
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.example.duplicate.common;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 曾文和
|
||||
* @description: XXX类
|
||||
* @createTime 2023/5/9 15:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("响应")
|
||||
public class ResultBody <T>{
|
||||
@ApiModelProperty("响应码")
|
||||
private Integer code;
|
||||
@ApiModelProperty("响应消息")
|
||||
private String msg;
|
||||
@ApiModelProperty("响应实体")
|
||||
private T data;
|
||||
|
||||
private ResultBody(Integer code, String msg,T data) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
private ResultBody(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static <T> ResultBody<T> success(T data) {
|
||||
ResultBody result = new ResultBody(200, "success",data);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> ResultBody<T> failed(String msg) {
|
||||
ResultBody result = new ResultBody(500,msg);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package com.example.duplicate.config;
|
||||
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* @ClassName SwaggerConfig
|
||||
* @Description swagger配置类
|
||||
* @Author linjj
|
||||
* @Date 2023/11/13 10:02
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig extends WebMvcConfigurationSupport {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
//是否开启 (true 开启 false隐藏。生产环境建议隐藏)
|
||||
//.enable(false)
|
||||
.select()
|
||||
//扫描的路径包,设置basePackage会将包下的所有被@Api标记类的所有方法作为api
|
||||
.apis(RequestHandlerSelectors.basePackage("com.example.duplicate.controller"))
|
||||
//指定路径处理PathSelectors.any()代表所有的路径
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
// .title("明阳HR集成AD接口")
|
||||
// .description("使用RestFul风格, 创建人:白领说事")
|
||||
// .version("1.0")
|
||||
// .build();
|
||||
//设置文档标题(API名称)
|
||||
.title("接口测试")
|
||||
//文档描述
|
||||
.description("接口说明")
|
||||
// //服务条款URL
|
||||
// .termsOfServiceUrl("http://localhost:8089/")
|
||||
//版本号
|
||||
.version("1.0.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
// 解决静态资源无法访问
|
||||
registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
|
||||
// 解决swagger无法访问
|
||||
registry.addResourceHandler("/swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
// 解决swagger的js文件无法访问
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package com.example.duplicate.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
import com.example.duplicate.common.ResultBody;
|
||||
import com.example.duplicate.service.DuplicateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @ClassName DuplicateController
|
||||
* @Description 医院复印预约接口
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 11:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/duplicate")
|
||||
@Api(value="测试",tags = "对外接口")
|
||||
public class DuplicateController {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
DuplicateService duplicateService;
|
||||
|
||||
@RequestMapping(value = "getFilePath", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value="微信接口")
|
||||
public ResultBody getFilePath(String inpatientNo, Integer admissTimes) {
|
||||
if (StringUtils.isEmpty(inpatientNo)) {
|
||||
return ResultBody.failed("住院号不得为空");
|
||||
}
|
||||
if (null == admissTimes) {
|
||||
return ResultBody.failed("住院次数不得为空");
|
||||
}
|
||||
return ResultBody.success(duplicateService.getFilePath(inpatientNo, admissTimes));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 高级检查
|
||||
* @params: startRange
|
||||
* @params: endRange
|
||||
* @return: String
|
||||
* @author linjj
|
||||
* @date: 2023/4/14 9:32
|
||||
*/
|
||||
@RequestMapping(value = "SeniorExamine", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value="文件质检接口")
|
||||
public String SeniorExamine(String startRange, String endRange) {
|
||||
if (StringUtils.isEmpty(startRange) && StringUtils.isEmpty(endRange)) {
|
||||
return "开始范围,结束范围不能全部为空";
|
||||
}
|
||||
if (StringUtils.isNotEmpty(startRange) && StringUtils.isNotEmpty(endRange)) {
|
||||
if (startRange.compareTo(endRange) > 0) {
|
||||
return "开始范围不能小于结束范围";
|
||||
}
|
||||
}
|
||||
String s = duplicateService.SeniorExamine(startRange, endRange);
|
||||
return JSON.toJSONString(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package com.example.duplicate.controller;
|
||||
|
||||
|
||||
import com.example.duplicate.common.ResultBody;
|
||||
import com.example.duplicate.service.LzRmService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName LzRmController
|
||||
* @Description 连州人民接口
|
||||
* @Author linjj
|
||||
* @Date 2023/11/10 15:38
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/LzRm")
|
||||
@Api(value = "连州人民接口", tags = "连州人民相关接口", description = "连州人民相关接口")
|
||||
public class LzRmController {
|
||||
@Autowired
|
||||
private LzRmService lzRmService;
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "splitFile", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "拆分影像信息", notes = "拆分影像信息")
|
||||
public ResultBody LzRmSplit(){
|
||||
int i = lzRmService.LzRmSplit();
|
||||
if (i==1){
|
||||
return ResultBody.success("完成");
|
||||
}
|
||||
return ResultBody.success("失败");
|
||||
}
|
||||
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package com.example.duplicate.controller;
|
||||
|
||||
import com.example.duplicate.controller.vo.CommomtableCopyVo;
|
||||
import com.example.duplicate.infrastructure.configOneDao.CommomtableMapper;
|
||||
import com.example.duplicate.service.MessageLogService;
|
||||
import com.example.duplicate.service.MessageLogTwoService;
|
||||
import com.example.duplicate.service.MessageSubordinateService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ZJYYController
|
||||
* @Description 湛江医院接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@Api(value = "湛江医院接口", tags = "湛江医院相关接口", description = "湛江医院相关接口")
|
||||
@RequestMapping("/ZJYY")
|
||||
@Slf4j
|
||||
public class ZJYYController {
|
||||
|
||||
@Autowired
|
||||
MessageSubordinateService messageSubordinateService;
|
||||
@Autowired
|
||||
MessageLogService messageLogService;
|
||||
@Autowired
|
||||
MessageLogTwoService messageLogTwoService;
|
||||
@Autowired
|
||||
CommomtableMapper commomtableMapper;
|
||||
@RequestMapping(value = "delMessage" , method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "删除messageSubordinate内容" , notes = "删除messageSubordinate内容")
|
||||
public int delMessage() {
|
||||
return messageSubordinateService.delMessage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "delMessageLog" , method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "删除messageLog内容" , notes = "删除messageLog内容")
|
||||
public int delMessageLog() {
|
||||
return messageLogService.delMessageLog();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "addMessageLog" , method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "移动messageLog内容" , notes = "移动messageLog内容")
|
||||
public int addMessageLog(){
|
||||
return messageLogTwoService.addMessageLog();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "addMessage" , method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "移动messageScanning表数据" , notes = "移动messageScanning表数据")
|
||||
public int addMessage(){
|
||||
return messageSubordinateService.addMessage();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "com" , method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public String com(){
|
||||
List<CommomtableCopyVo> com = commomtableMapper.com();
|
||||
for (CommomtableCopyVo list:com){
|
||||
StringBuffer sb=new StringBuffer();
|
||||
sb.append("(inp_no =' "+list.getInpatientNo()+" 'and visit_id = '"+list.getAdmissTimes()+" ' ) or");
|
||||
log.info(sb.toString());
|
||||
}
|
||||
return"";
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName addLzRmCommVo
|
||||
* @Description 连州人民新增commomtableVo
|
||||
* @Author linjj
|
||||
* @Date 2023/11/17 9:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AddLzRmCommVo {
|
||||
|
||||
private String patientId;
|
||||
|
||||
private String admissId;
|
||||
|
||||
private String admissTimes;
|
||||
|
||||
private String inpatientNo;
|
||||
|
||||
private String name;
|
||||
|
||||
private String disDate;
|
||||
|
||||
private String disDeptName;
|
||||
|
||||
private String ph;
|
||||
|
||||
private String gdh;
|
||||
|
||||
private String splitName;
|
||||
|
||||
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLog
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("message_log")
|
||||
public class AddMessageLogVo {
|
||||
|
||||
@TableField("id")
|
||||
private String id;
|
||||
@TableField("create_time")
|
||||
private String createTime;
|
||||
@TableField("end_time")
|
||||
private String endTime;
|
||||
@TableField("execution_time")
|
||||
private int executionTime;
|
||||
@TableField("input_content")
|
||||
private String inputContent;
|
||||
@TableField("interface_name")
|
||||
private String interfaceName;
|
||||
@TableField("out_content")
|
||||
private String outContent;
|
||||
@TableField("out_json")
|
||||
private String outJson;
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
@TableField("result")
|
||||
private int result;
|
||||
@TableField("type")
|
||||
private String type;
|
||||
@TableField("xml_create_time")
|
||||
private String xmlCreateTime;
|
||||
@TableField("xml_execution_time")
|
||||
private int xml_execution_time;
|
||||
@TableField("master_id")
|
||||
private String masterId;
|
||||
@TableField("webservice_info")
|
||||
private String webserviceInfo;
|
||||
@TableField("discharge_date_time")
|
||||
private String dischargeDateTime;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ArchiveMasterVo
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/17 10:15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ArchiveMasterVo {
|
||||
|
||||
private String id;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName CommomtableCopy
|
||||
* @Author linjj
|
||||
* @Date 2023/11/10 16:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class CommomtableCopyVo {
|
||||
|
||||
private String id;
|
||||
//患者姓名
|
||||
private String name;
|
||||
//住院号
|
||||
private String inpatientNo;
|
||||
//住院次数
|
||||
private String admissTimes;
|
||||
//出院时间
|
||||
private String disDate;
|
||||
//图像号
|
||||
private String pageNumber;
|
||||
//旧病案号
|
||||
private String inpatientNoPast;
|
||||
//出院科室
|
||||
private String disDept;
|
||||
//盘号
|
||||
private String ph;
|
||||
//盘号格式
|
||||
private String phString;
|
||||
//拆分状态
|
||||
private int spilStatic;
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName commomtableVo
|
||||
* @Description commomtable表
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 15:57
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="commomtable表对象", description="查询路径返回参数实体")
|
||||
public class CommomtableVo {
|
||||
|
||||
@ApiModelProperty(value = "文件保存目录地址")
|
||||
private String filePath;
|
||||
@ApiModelProperty(value = "图片类型")
|
||||
private String assortName;
|
||||
@ApiModelProperty(value = "文件类型id")
|
||||
private String assortId;
|
||||
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName commomtableVo
|
||||
* @Description 返回给第三方路径参数
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 15:57
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DuplicateVo {
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
@ApiModelProperty(value = "文件分类")
|
||||
private String assortName;
|
||||
@ApiModelProperty(value = "页数")
|
||||
private String pageCount;
|
||||
@ApiModelProperty(value = "路径")
|
||||
private String pdfUrl;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName fliePath
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/6/6 15:45
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("fliePath")
|
||||
public class FliePath {
|
||||
|
||||
@TableField("ph")
|
||||
private String patientId;
|
||||
|
||||
@TableField("fliePath")
|
||||
private String fliePath;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLog
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:15
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageLog {
|
||||
|
||||
// @TableField("id")
|
||||
// private String id;
|
||||
// @TableField("create_time")
|
||||
// private String createTime;
|
||||
// @TableField("end_time")
|
||||
// private String endTime;
|
||||
// @TableField("execution_time")
|
||||
// private int executionTime;
|
||||
// @TableField("input_content")
|
||||
// private String inputContent;
|
||||
// @TableField("interface_name")
|
||||
// private String interfaceName;
|
||||
// @TableField("out_content")
|
||||
// private String outContent;
|
||||
// @TableField("out_json")
|
||||
// private String outJson;
|
||||
// @TableField("remark")
|
||||
// private String remark;
|
||||
// @TableField("result")
|
||||
// private int result;
|
||||
// @TableField("type")
|
||||
// private String type;
|
||||
// @TableField("xml_create_time")
|
||||
// private String xmlCreateTime;
|
||||
// @TableField("xml_execution_time")
|
||||
// private int xmlExecutionTime;
|
||||
// @TableField("master_id")
|
||||
// private String masterId;
|
||||
// @TableField("webservice_info")
|
||||
// private String webserviceInfo;
|
||||
// @TableField(exist = false)
|
||||
// private String dischargeDateTime;
|
||||
|
||||
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
private String createTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private int executionTime;
|
||||
|
||||
private String inputContent;
|
||||
|
||||
private String interfaceName;
|
||||
|
||||
private String outContent;
|
||||
|
||||
private String outJson;
|
||||
|
||||
private String remark;
|
||||
|
||||
private int result;
|
||||
|
||||
private String type;
|
||||
|
||||
private String xmlCreateTime;
|
||||
|
||||
private int xmlExecutionTime;
|
||||
|
||||
private String masterId;
|
||||
private String webserviceInfo;
|
||||
private String dischargeDateTime;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogVo
|
||||
* @Description 返回实体
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:25
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageLogVo {
|
||||
private String id;
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageSubordinate
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageSubordinate {
|
||||
// @TableField("id")
|
||||
// private String id;
|
||||
// @TableField("content_json")
|
||||
// private String contentJson;
|
||||
// @TableField("message_id")
|
||||
// private String messageId;
|
||||
// @TableField("patient_main")
|
||||
// private String patientMain;
|
||||
// @TableField("status")
|
||||
// private int status;
|
||||
// @TableField("remark")
|
||||
// private String remark;
|
||||
// @TableField("runs")
|
||||
// private int runs;
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
private String contentJson;
|
||||
|
||||
private String messageId;
|
||||
|
||||
private String patientMain;
|
||||
|
||||
private int status;
|
||||
|
||||
private String remark;
|
||||
private int runs;
|
||||
private String dischargeDateTime;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageSubordinateVo
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 14:03
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageSubordinateVo {
|
||||
private String id;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName commomtableVo
|
||||
* @Description commomtable表
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 15:57
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="commomtable表对象", description="查询路径返回参数实体")
|
||||
public class PageCountVo {
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private String assortName;
|
||||
@ApiModelProperty(value = "文件数量")
|
||||
private String pageCount;
|
||||
|
||||
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName phVo
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/6/5 16:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PhVo {
|
||||
|
||||
private String ph;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName TscanAssort
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/6/6 13:43
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class TscanAssort {
|
||||
private String patientId;
|
||||
private String assortId;
|
||||
private String scanPage;
|
||||
|
||||
private Integer source;
|
||||
|
||||
private Integer isDel;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ZdAssortVo
|
||||
* @Author linjj
|
||||
* @Date 2023/11/13 9:31
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class ZdAssortVo {
|
||||
//分段id
|
||||
private String assortId;
|
||||
//分段名称
|
||||
private String assortName;
|
||||
//分段排序
|
||||
private String assortSort;
|
||||
//打印标识
|
||||
private String printFlag;
|
||||
//病案id
|
||||
private String patientId;
|
||||
private String DISCHARGEDISPOSITION;
|
||||
//文件路径
|
||||
private String PDFPATH;
|
||||
//标识
|
||||
private String flag;
|
||||
//来源
|
||||
private String Sys;
|
||||
//最近更新时间
|
||||
private String UpLoadDateTime;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
import com.example.duplicate.controller.vo.AddArchiveDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @InterfaceName ArchiveDetailMapper
|
||||
* @Description 文件表实体
|
||||
* @Author linjj
|
||||
* @Date 2023/11/13 16:04
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveDetailMapper {
|
||||
|
||||
int addArchiveDetail(AddArchiveDetail addArchiveDetail);
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
import com.example.duplicate.controller.vo.AddArchiveMasterVo;
|
||||
import com.example.duplicate.controller.vo.ArchiveMasterVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName ArchiveMasterMapper
|
||||
* @Author linjj
|
||||
* @Date 2023/10/16 19:36
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ArchiveMasterMapper {
|
||||
|
||||
List<ArchiveMasterVo> getMasterId(String dateTime);
|
||||
|
||||
int masterIdNum(String dateTime);
|
||||
|
||||
int add(@Param("idList") List<String> idList);
|
||||
|
||||
|
||||
int addArchiveMaster(AddArchiveMasterVo addArchiveMasterVo);
|
||||
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
|
||||
import com.example.duplicate.controller.vo.AddLzRmCommVo;
|
||||
import com.example.duplicate.controller.vo.CommomtableCopyVo;
|
||||
import com.example.duplicate.controller.vo.CommomtableVo;
|
||||
import com.example.duplicate.controller.vo.PageCountVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName CommomtableMapper
|
||||
* @Description 路径信息Mapper接口
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 16:30
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface CommomtableMapper {
|
||||
|
||||
List<String> getCommomtable(@Param("inpatientNo")String inpatientNo, @Param("admissTimes")Integer admissTimes,@Param("assortId") String assortId);
|
||||
|
||||
|
||||
List<CommomtableVo> getZdAssort(@Param("inpatientNo")String inpatientNo, @Param("admissTimes")Integer admissTimes);
|
||||
|
||||
|
||||
PageCountVo getPageCount(@Param("inpatientNo")String inpatientNo, @Param("admissTimes")Integer admissTimes, @Param("assortId") String assortId);
|
||||
|
||||
int addAddLzRmComm(AddLzRmCommVo addLzRmCommVo);
|
||||
|
||||
List<CommomtableCopyVo>com();
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
import com.example.duplicate.controller.vo.CommomtableCopyVo;
|
||||
import com.example.duplicate.controller.vo.ZdAssortVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName LzRmMapper
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/11/10 15:59
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LzRmMapper {
|
||||
|
||||
List<CommomtableCopyVo> getCommomtableCopyInfo();
|
||||
|
||||
int updateSynchronousTime(@Param("spilStatic") int spilStatic,@Param("inpatientNoPast") String inpatientNoPast,@Param("phString") String phString,@Param("pageNumber") String pageNumber);
|
||||
|
||||
|
||||
List<ZdAssortVo> getZdAssortInfo(@Param("inpNo") String inpNo, @Param("LockInfo") String LockInfo,@Param("assortName")String assortName);
|
||||
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
|
||||
import com.example.duplicate.controller.vo.MessageLog;
|
||||
import com.example.duplicate.controller.vo.MessageLogVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogMapper
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:58
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageLogMapper {
|
||||
|
||||
int getMessageLogNum(String dateTime);
|
||||
|
||||
List<MessageLogVo>getAllByIds(String dateTime);
|
||||
|
||||
String getSynchronousTime();
|
||||
|
||||
int updateSynchronousTime(String dischargeDateTime);
|
||||
|
||||
List<MessageLog>getAllBy(String synchronousTime);
|
||||
int del(@Param(value = "messageLogIds")String messageLogIds);
|
||||
|
||||
List<MessageLog>getAllByMasterId(@Param(value = "masterIds")String masterIds);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
|
||||
import com.example.duplicate.controller.vo.MessageSubordinate;
|
||||
import com.example.duplicate.controller.vo.MessageSubordinateVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName messageSubordinateMapper
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:58
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageSubordinateMapper {
|
||||
|
||||
int getMessageNum(String dateTime);
|
||||
|
||||
|
||||
List<MessageSubordinateVo>getAllByIds();
|
||||
|
||||
int del(@Param(value = "messageLogIds")String messageLogIds);
|
||||
|
||||
String getSynchronousTime();
|
||||
|
||||
int updateSynchronousTime(String dischargeDateTime);
|
||||
|
||||
|
||||
List<MessageSubordinate>getAllByTime(String synchronousTime);
|
||||
|
||||
List<MessageSubordinate>getAllByMessageLogId(@Param(value = "messageLogIds")String messageLogIds);
|
||||
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
import com.example.duplicate.controller.vo.AddArchiveDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface MidMapper {
|
||||
|
||||
List<String> getMid();
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configOneDao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.example.duplicate.controller.vo.FliePath;
|
||||
import com.example.duplicate.controller.vo.PhVo;
|
||||
import com.example.duplicate.controller.vo.TscanAssort;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName QualityMapper
|
||||
* @Description 文件质检
|
||||
* @Author linjj
|
||||
* @Date 2023/4/13 15:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityMapper extends BaseMapper<FliePath> {
|
||||
|
||||
Integer getPhNum(@Param("startRange")String startRange, @Param("endRange")String endRange);
|
||||
|
||||
Integer getFileNum(@Param("startRange")String startRange, @Param("endRange")String endRange);
|
||||
|
||||
List<String> getFliePath(@Param("ph")String ph);
|
||||
List<String> getFliePaths(@Param("phs")List<String> phs);
|
||||
List<String>getPh(@Param("startRange")String startRange, @Param("endRange")String endRange);
|
||||
|
||||
List<FliePath>getPhAndFliePath(@Param("startRange")String startRange, @Param("endRange")String endRange);
|
||||
|
||||
int addPh(@Param("list")List<PhVo>list);
|
||||
|
||||
int addFliePath(@Param("ph")String ph,@Param("fliePath")String fliePath);
|
||||
|
||||
int addTscanAssort(TscanAssort tscanAssort);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configTwoDao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.example.duplicate.controller.vo.MessageLog;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogMapper
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:58
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageLogTwoMapper {
|
||||
|
||||
int addAll(@Param("list")List<MessageLog> list);
|
||||
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package com.example.duplicate.infrastructure.configTwoDao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.example.duplicate.controller.vo.MessageLog;
|
||||
import com.example.duplicate.controller.vo.MessageSubordinate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogMapper
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:58
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageSubordinateTwoMapper {
|
||||
|
||||
int addAll(@Param("list")List<MessageSubordinate> list);
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package com.example.duplicate.service;
|
||||
|
||||
|
||||
|
||||
import com.example.duplicate.controller.vo.DuplicateVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @InterfaceName DuplicateService
|
||||
* @Description 174查询影响图片地址 服务
|
||||
* @Author linjj
|
||||
* @Date 2023/5/12 15:55
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface DuplicateService {
|
||||
|
||||
List<DuplicateVo> getFilePath(String inpatientNo, Integer admissTimes);
|
||||
|
||||
|
||||
String SeniorExamine(String startRange,String endRange);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.example.duplicate.service;
|
||||
|
||||
/**
|
||||
* @InterfaceName LzRmService
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/11/10 15:42
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface LzRmService {
|
||||
|
||||
int LzRmSplit();
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.example.duplicate.service;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogService
|
||||
* @Description MessageLog接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface MessageLogService {
|
||||
|
||||
int delMessageLog();
|
||||
|
||||
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.example.duplicate.service;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogService
|
||||
* @Description MessageLog接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface MessageLogTwoService {
|
||||
|
||||
int addMessageLog();
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.example.duplicate.service;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName ZJYYService
|
||||
* @Description 湛江医院接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
public interface MessageSubordinateService {
|
||||
int delMessage();
|
||||
|
||||
int addMessage();
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,193 +0,0 @@
|
||||
package com.example.duplicate.service.impl;
|
||||
|
||||
import com.example.duplicate.controller.vo.*;
|
||||
import com.example.duplicate.infrastructure.configOneDao.ArchiveDetailMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.ArchiveMasterMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.CommomtableMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.LzRmMapper;
|
||||
import com.example.duplicate.service.LzRmService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName LzRmServiceImpl
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/11/10 15:42
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LzRmServiceImpl implements LzRmService {
|
||||
|
||||
|
||||
@Resource
|
||||
private LzRmMapper lzRmMapper;
|
||||
@Resource
|
||||
private ArchiveMasterMapper archiveMasterMapper;
|
||||
@Resource
|
||||
private ArchiveDetailMapper archiveDetailMapper;
|
||||
@Resource
|
||||
private CommomtableMapper commomtableMapper;
|
||||
|
||||
private static SimpleDateFormat inSDF = new SimpleDateFormat("yyyy.mm.dd");
|
||||
private static SimpleDateFormat outSDF = new SimpleDateFormat("yyyy-mm-dd");
|
||||
|
||||
@Override
|
||||
public int LzRmSplit() {
|
||||
//新增状态
|
||||
int addStatic = 0;
|
||||
//查询需要处理记录
|
||||
List<CommomtableCopyVo> CommomtableCopyList = lzRmMapper.getCommomtableCopyInfo();
|
||||
//根据住院号盘号查询影像信息
|
||||
for (CommomtableCopyVo list : CommomtableCopyList) {
|
||||
String LockInfo = list.getPh();
|
||||
String phString = list.getPhString();
|
||||
String pageNumber = list.getPageNumber();
|
||||
String inpatientNoPast = String.format("%010d", Integer.parseInt(list.getInpatientNoPast()));
|
||||
//页码不存在跳出当前循环
|
||||
if (StringUtils.isBlank(pageNumber)) {
|
||||
log.info("-------旧住院号:" + inpatientNoPast + "盘号:" + LockInfo + "新住院号:" + list.getInpatientNo() + "的病案页码为空-----------------");
|
||||
lzRmMapper.updateSynchronousTime(2,list.getInpatientNoPast(), phString, pageNumber);
|
||||
continue;
|
||||
}
|
||||
//截取第一个数
|
||||
String assortName = intercept(list.getPageNumber());
|
||||
List<ZdAssortVo> zdAssorList = lzRmMapper.getZdAssortInfo(inpatientNoPast, LockInfo, assortName);
|
||||
if (zdAssorList.isEmpty()) {
|
||||
log.info("----------------旧住院号:" + inpatientNoPast + "盘号:" + LockInfo + "页码:" + assortName + "的病案不存在---------------------");
|
||||
lzRmMapper.updateSynchronousTime(3,list.getInpatientNoPast(), phString, pageNumber);
|
||||
continue;
|
||||
}
|
||||
//插入一条数据到Archive_Master表跟Archive_Detail表
|
||||
addStatic = add(list, zdAssorList);
|
||||
//修改状态
|
||||
lzRmMapper.updateSynchronousTime(1,list.getInpatientNoPast(), phString, pageNumber);
|
||||
}
|
||||
|
||||
return addStatic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 插入一条数据到Archive_Master表
|
||||
* @params: commomtableCopyVo
|
||||
* @params: zdAssorList
|
||||
* @return: addArchiveMasterVo
|
||||
* @author linjj
|
||||
* @date: 2023/11/13 14:58
|
||||
*/
|
||||
private int add(CommomtableCopyVo commomtableCopyVo, List<ZdAssortVo> zdAssorList) {
|
||||
//新增文件表状态
|
||||
int addDetailStatic = 0;
|
||||
//新增comm表状态
|
||||
int addAddLzRmCommStatic = 0;
|
||||
//使用时间生成一个id
|
||||
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
//获取今天日期
|
||||
String id = fmt.format(new Date());
|
||||
//转换不规则时间字符串
|
||||
String s = formatDate(commomtableCopyVo.getDisDate());
|
||||
ZdAssortVo zdAssortVo = zdAssorList.get(0);
|
||||
AddArchiveMasterVo addArchiveMasterVo = new AddArchiveMasterVo();
|
||||
addArchiveMasterVo.setID(id);
|
||||
addArchiveMasterVo.setPatientId(commomtableCopyVo.getInpatientNo());
|
||||
addArchiveMasterVo.setInpNo(commomtableCopyVo.getInpatientNo());
|
||||
addArchiveMasterVo.setVisitId(commomtableCopyVo.getAdmissTimes());
|
||||
addArchiveMasterVo.setName(commomtableCopyVo.getName());
|
||||
addArchiveMasterVo.setDeptName(commomtableCopyVo.getDisDept());
|
||||
addArchiveMasterVo.setDischargeDateTime(s);
|
||||
addArchiveMasterVo.setArchiveState("缩微");
|
||||
addArchiveMasterVo.setAdmissionDateTime(s);
|
||||
addArchiveMasterVo.setLockInfo(commomtableCopyVo.getPh());
|
||||
addArchiveMasterVo.setDISCHARGEDISPOSITION(zdAssortVo.getDISCHARGEDISPOSITION());
|
||||
addArchiveMasterVo.setSplitName("Ljj");
|
||||
int i = archiveMasterMapper.addArchiveMaster(addArchiveMasterVo);
|
||||
//插入文件表数据
|
||||
if (i == 1) {
|
||||
AddArchiveDetail addArchiveDetail = new AddArchiveDetail();
|
||||
//使用时间生成一个id
|
||||
SimpleDateFormat detailFmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
//获取今天日期
|
||||
String detailId = detailFmt.format(new Date());
|
||||
addArchiveDetail.setID(detailId);
|
||||
addArchiveDetail.setPDFPATH(zdAssortVo.getPDFPATH());
|
||||
addArchiveDetail.setMasterID(id);
|
||||
addArchiveDetail.setUpLoadDateTime(zdAssortVo.getUpLoadDateTime());
|
||||
addArchiveDetail.setAssortID(zdAssortVo.getAssortId());
|
||||
addArchiveDetail.setSource("缩微");
|
||||
addArchiveDetail.setFlag(zdAssortVo.getFlag());
|
||||
addArchiveDetail.setSys(zdAssortVo.getSys());
|
||||
addArchiveDetail.setSplitName("Ljj");
|
||||
addDetailStatic = archiveDetailMapper.addArchiveDetail(addArchiveDetail);
|
||||
//向commomtable表增加数据
|
||||
if (addDetailStatic == 1) {
|
||||
AddLzRmCommVo addLzRmCommVo = new AddLzRmCommVo();
|
||||
addLzRmCommVo.setPatientId(id);
|
||||
addLzRmCommVo.setAdmissId(commomtableCopyVo.getInpatientNo());
|
||||
addLzRmCommVo.setAdmissTimes(commomtableCopyVo.getAdmissTimes());
|
||||
addLzRmCommVo.setInpatientNo(commomtableCopyVo.getInpatientNo());
|
||||
addLzRmCommVo.setName(commomtableCopyVo.getName());
|
||||
addLzRmCommVo.setDisDate(s);
|
||||
addLzRmCommVo.setDisDeptName(commomtableCopyVo.getDisDept());
|
||||
addLzRmCommVo.setPh(commomtableCopyVo.getPh());
|
||||
addLzRmCommVo.setGdh(commomtableCopyVo.getPh());
|
||||
addLzRmCommVo.setSplitName("Ljj");
|
||||
addAddLzRmCommStatic = commomtableMapper.addAddLzRmComm(addLzRmCommVo);
|
||||
}
|
||||
|
||||
}
|
||||
return addAddLzRmCommStatic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 按照规则截取
|
||||
* @params: pageNumber
|
||||
* @return: assortName
|
||||
* @author linjj
|
||||
* @date: 2023/11/13 14:57
|
||||
*/
|
||||
private String intercept(String pageNumber) {
|
||||
//如果包含--就截取--前
|
||||
if (pageNumber.contains("--")) {
|
||||
pageNumber = pageNumber.substring(0, pageNumber.indexOf("--"));
|
||||
return pageNumber;
|
||||
}
|
||||
//如果包含-就截取-前
|
||||
if (pageNumber.contains("-")) {
|
||||
pageNumber = pageNumber.substring(0, pageNumber.indexOf("-"));
|
||||
return pageNumber;
|
||||
}
|
||||
return pageNumber;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 转换不规则时间字符串
|
||||
* @params: inDate
|
||||
* @return: outDate
|
||||
* @author linjj
|
||||
* @date: 2023/11/13 15:13
|
||||
*/
|
||||
public static String formatDate(String inDate) {
|
||||
String outDate = "";
|
||||
if (inDate != null) {
|
||||
try {
|
||||
Date date = inSDF.parse(inDate);
|
||||
outDate = outSDF.format(date);
|
||||
} catch (ParseException ex) {
|
||||
}
|
||||
}
|
||||
return outDate;
|
||||
}
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package com.example.duplicate.service.impl;
|
||||
|
||||
import com.example.duplicate.controller.vo.MessageLogVo;
|
||||
import com.example.duplicate.infrastructure.configOneDao.MessageLogMapper;
|
||||
import com.example.duplicate.service.MessageLogService;
|
||||
import com.example.utils.ListUtilsNew;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogServiceImpl
|
||||
* @Description 湛江医院接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class MessageLogServiceImpl implements MessageLogService {
|
||||
@Autowired
|
||||
MessageLogMapper messageLogMapper;
|
||||
@Value("${ZJ_DATE_TIME_LOG}")
|
||||
private String dateTime;
|
||||
@Override
|
||||
public int delMessageLog() {
|
||||
//查询需要删除数据条数
|
||||
int messageLogNum = messageLogMapper.getMessageLogNum(dateTime);
|
||||
//需要次数
|
||||
double num = ((double) messageLogNum) / 100;
|
||||
int circulateNum= (int) Math.ceil(num);
|
||||
for (int i=0;i<circulateNum;i++){
|
||||
//查询需要删除数据的id每次查100条
|
||||
List<MessageLogVo> list = messageLogMapper.getAllByIds(dateTime);
|
||||
//id集合
|
||||
List<String> idList = ListUtilsNew.distinctSelect(list, MessageLogVo::getId);
|
||||
//转成逗号拼接
|
||||
String ids = String.join(",", idList);
|
||||
messageLogMapper.del(ids);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.example.duplicate.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.duplicate.controller.vo.MessageLog;
|
||||
import com.example.duplicate.infrastructure.configOneDao.MessageLogMapper;
|
||||
import com.example.duplicate.infrastructure.configTwoDao.MessageLogTwoMapper;
|
||||
import com.example.duplicate.service.MessageLogTwoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName MessageLogServiceImpl
|
||||
* @Description 湛江医院接口
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class MessageLogTwoServiceImpl implements MessageLogTwoService {
|
||||
@Autowired
|
||||
private MessageLogMapper messageLogMapper;
|
||||
@Autowired
|
||||
private MessageLogTwoMapper messageLogTwoMapper;
|
||||
@Value("${ZJ_DATE_TIME_LOG}")
|
||||
private String dateTime;
|
||||
|
||||
|
||||
@Override
|
||||
public int addMessageLog() {
|
||||
//查询需要移动数据条数
|
||||
int messageLogNum = messageLogMapper.getMessageLogNum(dateTime);
|
||||
//需要次数
|
||||
double num = ((double) messageLogNum) / 100;
|
||||
int circulateNum= (int) Math.ceil(num);
|
||||
for (int i=0;i<circulateNum;i++){
|
||||
//查询同步时间
|
||||
String synchronousTime = messageLogMapper.getSynchronousTime();
|
||||
//查询需要同步的数据每次查100条
|
||||
List<MessageLog> allBy = messageLogMapper.getAllBy(synchronousTime);
|
||||
//插入新数据库
|
||||
messageLogTwoMapper.addAll(allBy);
|
||||
//记录更新时间
|
||||
String dischargeDateTime = allBy.get(allBy.size() - 1).getDischargeDateTime();
|
||||
messageLogMapper.updateSynchronousTime(dischargeDateTime);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -1,143 +0,0 @@
|
||||
package com.example.duplicate.service.impl;
|
||||
|
||||
|
||||
import com.example.duplicate.controller.vo.ArchiveMasterVo;
|
||||
import com.example.duplicate.controller.vo.MessageLog;
|
||||
import com.example.duplicate.controller.vo.MessageSubordinate;
|
||||
import com.example.duplicate.controller.vo.MessageSubordinateVo;
|
||||
import com.example.duplicate.infrastructure.configOneDao.ArchiveMasterMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.MessageLogMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.MessageSubordinateMapper;
|
||||
import com.example.duplicate.infrastructure.configTwoDao.MessageLogTwoMapper;
|
||||
import com.example.duplicate.infrastructure.configTwoDao.MessageSubordinateTwoMapper;
|
||||
import com.example.duplicate.service.MessageSubordinateService;
|
||||
import com.example.utils.ListUtilsNew;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName ZJYYServiceImpl
|
||||
* @Description 湛江医院接口实现类
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 13:50
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MessageSubordinateServiceImpl implements MessageSubordinateService {
|
||||
|
||||
static final Logger logger = LoggerFactory.getLogger(MessageSubordinateServiceImpl.class);
|
||||
|
||||
@Value("${ZJ_DATE_TIME_MESSAGE}")
|
||||
private String dateTime;
|
||||
@Autowired
|
||||
MessageSubordinateMapper messageSubordinateMapper;
|
||||
@Autowired
|
||||
MessageSubordinateTwoMapper messageSubordinateTwoMapper;
|
||||
@Autowired
|
||||
ArchiveMasterMapper archiveMasterMapper;
|
||||
@Autowired
|
||||
MessageLogMapper messageLogMapper;
|
||||
@Autowired
|
||||
MessageLogTwoMapper messageLogTwoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public int delMessage() {
|
||||
//查询需要删除数据条数
|
||||
int messageNum = messageSubordinateMapper.getMessageNum(dateTime);
|
||||
//需要次数
|
||||
double num = ((double) messageNum) / 100;
|
||||
int circulateNum = (int) Math.ceil(num);
|
||||
for (int i = 0; i < circulateNum; i++) {
|
||||
//查询需要删除数据的id每次查100条
|
||||
List<MessageSubordinateVo> list = messageSubordinateMapper.getAllByIds();
|
||||
//id集合
|
||||
List<String> idList = ListUtilsNew.distinctSelect(list, MessageSubordinateVo::getId);
|
||||
//转成逗号拼接
|
||||
String ids = String.join(",", idList);
|
||||
messageSubordinateMapper.del(ids);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addMessage() {
|
||||
//查询一共有多少份病历需要同步
|
||||
int masterIdNum = archiveMasterMapper.masterIdNum(dateTime);
|
||||
//需要次数
|
||||
double num = ((double) masterIdNum) / 100;
|
||||
//少数往前进1确保不丢失数据
|
||||
int circulateNum = (int) Math.ceil(num);
|
||||
for (int i = 0; i < circulateNum; i++) {
|
||||
//每次查询100份病历
|
||||
List<ArchiveMasterVo> masterId = archiveMasterMapper.getMasterId(dateTime);
|
||||
if (masterId.size() == 0) {
|
||||
return 0;
|
||||
}
|
||||
//masterId集合
|
||||
List<String> idList = ListUtilsNew.distinctSelect(masterId, ArchiveMasterVo::getId);
|
||||
//转成逗号拼接
|
||||
String masterIds = String.join(",", idList);
|
||||
//根据masterId查询message_log表
|
||||
List<MessageLog> messageLogList = messageLogMapper.getAllByMasterId(masterIds);
|
||||
//获取message_log表id集合
|
||||
List<String> messageLogId = ListUtilsNew.distinctSelect(messageLogList, MessageLog::getId);
|
||||
//如果档次100条记录没有messageLogId那么保存记录后结束本次循环
|
||||
if (messageLogId.size() == 0) {
|
||||
//保存处理过的masterId
|
||||
archiveMasterMapper.add(idList);
|
||||
continue;
|
||||
}
|
||||
//根据message_log表id操作message_subordinate表
|
||||
messageSubordinate(messageLogId);
|
||||
//操作完message_subordinate表操作message_log表
|
||||
messageLog(messageLogList);
|
||||
//保存处理过的masterId
|
||||
archiveMasterMapper.add(idList);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void messageSubordinate(List<String> messageLogId) {
|
||||
//分批次
|
||||
List<List<String>> newList = ListUtils.partition(messageLogId, 100);
|
||||
for (List<String> messageList : newList) {
|
||||
//转成字符串类型逗号拼接
|
||||
String messageLogIds = String.join(",", messageList);
|
||||
//查询100条
|
||||
List<MessageSubordinate> list = messageSubordinateMapper.getAllByMessageLogId(messageLogIds);
|
||||
if (list.size()==0){
|
||||
continue;
|
||||
}
|
||||
//往新表插入
|
||||
messageSubordinateTwoMapper.addAll(list);
|
||||
//新表插入完成删除旧表
|
||||
messageSubordinateMapper.del(messageLogIds);
|
||||
}
|
||||
}
|
||||
|
||||
private void messageLog(List<MessageLog> messageLogList) {
|
||||
List<List<MessageLog>> newList = ListUtils.partition(messageLogList, 100);
|
||||
for (List<MessageLog> messageList : newList) {
|
||||
//往新表中拆入数据
|
||||
messageLogTwoMapper.addAll(messageList);
|
||||
//获取这100条message_log表id集合
|
||||
List<String> ids = ListUtilsNew.distinctSelect(messageList, MessageLog::getId);
|
||||
//移除旧表数据
|
||||
String messageLogIds = String.join(",", ids);
|
||||
messageLogMapper.del(messageLogIds);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.utils.CommonResult;
|
||||
|
||||
/**
|
||||
* @ClassName SubordinateService
|
||||
* @Description 处理消息接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 10:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface SubordinateService {
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 补偿下载失败消息
|
||||
* @DateTime: 2025/4/8 11:02
|
||||
* @Params: []
|
||||
* @Return com.example.utils.CommonResult<?>
|
||||
*/
|
||||
CommonResult<?> CompensateTask();
|
||||
}
|
@ -0,0 +1,175 @@
|
||||
package com.example.service.serviceImpl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.example.db.dao.ArchiveDetailDao;
|
||||
import com.example.db.dao.ArchiveMasterDao;
|
||||
import com.example.db.dao.MessageSubordinateDao;
|
||||
import com.example.service.SubordinateService;
|
||||
import com.example.utils.CommonResult;
|
||||
import com.example.vo.MessageDto;
|
||||
import com.example.vo.MessageLog;
|
||||
import com.example.vo.MessageSubordinateVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName SubordinateServiceImpl
|
||||
* @Description 处理消息接口
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 10:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SubordinateServiceImpl implements SubordinateService {
|
||||
|
||||
@Autowired
|
||||
private MessageSubordinateDao messageSubordinateDao;
|
||||
@Autowired
|
||||
private ArchiveMasterDao archiveMasterDao;
|
||||
@Autowired
|
||||
private ArchiveDetailDao archiveDetailDao;
|
||||
|
||||
@Override
|
||||
public CommonResult<?> CompensateTask() {
|
||||
//查询哪些消息需要补偿0为未开始状态
|
||||
List<MessageSubordinateVo> list = messageSubordinateDao.getMessageSubordinate(0);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
log.info("当前没有需要补偿的数据");
|
||||
return CommonResult.success("当前没有需要补偿的数据");
|
||||
}
|
||||
for (MessageSubordinateVo messageSubordinate : list) {
|
||||
//解析json返回患者基础信息
|
||||
MessageDto messageDto = parseMessage(messageSubordinate);
|
||||
if (messageDto == null) {
|
||||
//不存在数据时,将该记录状态改为4
|
||||
messageSubordinateDao.updateStatus(4, messageSubordinate.getMessageId());
|
||||
continue;
|
||||
}
|
||||
//采集失败将状态该为2,成功将状态改为1
|
||||
if (!compensate(messageDto)){
|
||||
log.info("采集失败:"+messageSubordinate.getMessageId());
|
||||
messageSubordinateDao.updateStatus(2, messageSubordinate.getMessageId());
|
||||
}else {
|
||||
log.info("采集成功:"+messageSubordinate.getMessageId());
|
||||
messageSubordinateDao.updateStatus(1, messageSubordinate.getMessageId());
|
||||
}
|
||||
}
|
||||
return CommonResult.success("采集完成");
|
||||
}
|
||||
|
||||
private Boolean compensate(MessageDto messageDto) {
|
||||
//获取下载地址
|
||||
String reportAddress = messageDto.getReportAddress();
|
||||
//查询该患者主键id
|
||||
List<String> ids = archiveMasterDao.getMasterIdByInpNoAndVisitId(messageDto.getInpNo(), messageDto.getVisitId());
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return false;
|
||||
}
|
||||
//根据患者id查询文件表该文件的保存路径
|
||||
List<String> pdfPaths = archiveDetailDao.getPdfPath(ids.get(0), messageDto.getApplyId());
|
||||
//删除原地址文件
|
||||
if (!delPdf(pdfPaths)) {
|
||||
return false;
|
||||
}
|
||||
if (!DownloadFile(reportAddress, pdfPaths.get(0))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 删除原地址文件
|
||||
* @DateTime: 2025/4/8 16:26
|
||||
* @Params: [pdfPaths]
|
||||
* @Return java.lang.Boolean
|
||||
*/
|
||||
private Boolean delPdf(List<String> pdfPaths) {
|
||||
//删除原地址文件
|
||||
File file = new File(pdfPaths.get(0));
|
||||
try {
|
||||
file.delete(); // 删除照片
|
||||
} catch (Exception e) {
|
||||
log.error("删除图像失败地址:" + pdfPaths.get(0) + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 解析json返回患者基础信息
|
||||
* @DateTime: 2025/4/8 12:03
|
||||
* @Params: [messageSubordinate]
|
||||
* @Return com.example.vo.MessageDto
|
||||
*/
|
||||
private MessageDto parseMessage(MessageSubordinateVo messageSubordinate) {
|
||||
MessageDto messageDto = null;
|
||||
String id = messageSubordinate.getId();
|
||||
//判断消息中是否包含甲亢核医学PET-CT门诊不包含直接跳过不需要采集
|
||||
if (!messageSubordinate.getContentJson().contains("甲亢核医学PET-CT门诊")) {
|
||||
log.info("消息id为:" + id + "不包含甲亢核医学PET-CT门诊");
|
||||
return messageDto;
|
||||
}
|
||||
// 解析内容
|
||||
MessageLog messageLog = JSON.parseObject(messageSubordinate.getContentJson(), MessageLog.class);
|
||||
if (messageLog == null) {
|
||||
log.info("消息id为:" + id + "messageLog为空");
|
||||
return messageDto;
|
||||
}
|
||||
//获取患者基本信息
|
||||
String outJson = messageLog.getOutJson();
|
||||
if (outJson == null) {
|
||||
log.info("消息id为:" + id + "outJson");
|
||||
return messageDto;
|
||||
}
|
||||
messageDto = JSON.parseObject(outJson, MessageDto.class);
|
||||
return messageDto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Author: linjj
|
||||
* @Description: 文件下载
|
||||
* @DateTime: 2025/4/08 14:50
|
||||
* @Params: [fileURL, savePath]
|
||||
* @Return java.lang.Boolean
|
||||
*/
|
||||
private Boolean DownloadFile(String fileURL, String savePath) {
|
||||
try {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
try (CloseableHttpResponse response = httpClient.execute(new HttpGet(fileURL))) {
|
||||
HttpEntity entity = response.getEntity();
|
||||
try (InputStream in = entity.getContent();
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(savePath)) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
fileOutputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("文件下载失败" + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package com.example.utils;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author docus
|
||||
* @date 2020/3/28 16:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("响应")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CommonResult<T> {
|
||||
@ApiModelProperty("响应码")
|
||||
private Integer code;
|
||||
@ApiModelProperty("响应消息")
|
||||
private String msg;
|
||||
@ApiModelProperty("响应实体")
|
||||
private T data;
|
||||
|
||||
public CommonResult(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> success(T data) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> success(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param errorCode 错误码
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(IErrorCode errorCode) {
|
||||
return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param errorCode 错误码
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(IErrorCode errorCode, String message) {
|
||||
return new CommonResult<T>(errorCode.getCode(), message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed(String message) {
|
||||
return new CommonResult<T>(ResultCode.FAILED.getCode(), message, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> failed() {
|
||||
return failed(ResultCode.FAILED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数验证失败返回结果
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> validateFailed() {
|
||||
return failed(ResultCode.VALIDATE_FAILED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
*
|
||||
* @param message 提示信息
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> validateFailed(String message) {
|
||||
return new CommonResult<T>(ResultCode.VALIDATE_FAILED.getCode(), message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未登录返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> unauthorized(T data) {
|
||||
return new CommonResult<T>(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重防及重复请求
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> preventreplay(T data) {
|
||||
return new CommonResult<T>(ResultCode.PREVENT_REPLAY.getCode(), ResultCode.PREVENT_REPLAY.getMessage(), data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未授权返回结果
|
||||
*
|
||||
* @param data 获取的数据
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> forbidden(T data) {
|
||||
return new CommonResult<T>(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.example.utils;
|
||||
|
||||
/**
|
||||
* @InterfaceName FieldSelector
|
||||
* @Description
|
||||
* @Author linjj
|
||||
* @Date 2023/6/29 16:41
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface FieldSelector<Type, FieldType> {
|
||||
FieldType select(Type type);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.example.utils;
|
||||
|
||||
/**
|
||||
* @Description 封装API的错误码
|
||||
* @Author JacksonTu
|
||||
* @Date 2020/3/28 16:26
|
||||
*/
|
||||
public interface IErrorCode {
|
||||
Integer getCode();
|
||||
|
||||
String getMessage();
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package com.example.utils;
|
||||
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public final class ListUtilsNew {
|
||||
public static <T, K> Map<K, T> toMap(List<T> list, FieldSelector<T, K> selector) {
|
||||
if (CollectionUtils.isEmpty(list)) return Collections.emptyMap();
|
||||
Map<K, T> map = new HashMap<>(list.size());
|
||||
for (T t : list) {
|
||||
K key = selector.select(t);
|
||||
if (key != null) map.put(key, t);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public static <T, K> Map<K, List<T>> groupBy(List<T> list, FieldSelector<T, K> selector) {
|
||||
if (CollectionUtils.isEmpty(list)) return Collections.emptyMap();
|
||||
Map<K, List<T>> map = new HashMap<>();
|
||||
for (T t : list) {
|
||||
K key = selector.select(t);
|
||||
if (key == null) continue;
|
||||
if (!map.containsKey(key)) {
|
||||
map.put(key, new ArrayList<T>());
|
||||
}
|
||||
map.get(key).add(t);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public static <T, K> List<K> select(List<T> list, FieldSelector<T, K> selector) {
|
||||
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
|
||||
List<K> filedList = new ArrayList<>(list.size());
|
||||
for (T t : list) {
|
||||
K key = selector.select(t);
|
||||
if (key != null) filedList.add(key);
|
||||
}
|
||||
return filedList;
|
||||
}
|
||||
|
||||
public static <T, K> List<K> distinctSelect(List<T> list, FieldSelector<T, K> selector) {
|
||||
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
|
||||
Set<K> filedSet = new HashSet<>();
|
||||
for (T t : list) {
|
||||
K key = selector.select(t);
|
||||
if (key != null) filedSet.add(key);
|
||||
}
|
||||
return new ArrayList<>(filedSet);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static <T> List<T> unionWithoutDuplicate(List<T>... values) {
|
||||
if (null == values || values.length <= 0) return Collections.emptyList();
|
||||
Set<T> unionFiledSet = new HashSet<>();
|
||||
for (List<T> value : values) {
|
||||
if (!CollectionUtils.isEmpty(value)) {
|
||||
unionFiledSet.addAll(value);
|
||||
}
|
||||
}
|
||||
return new ArrayList<>(unionFiledSet);
|
||||
}
|
||||
|
||||
public static <T, K> List<T> skipDuplicateKey(List<T> list, FieldSelector<T, K> selector) {
|
||||
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
|
||||
List<T> filedList = new ArrayList<>(list.size());
|
||||
Map<K, T> map = toMap(list, selector);
|
||||
for (K key : map.keySet()) {
|
||||
filedList.add(map.get(key));
|
||||
}
|
||||
return filedList;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.example.utils;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
|
||||
public class Md5Util {
|
||||
public static String encrypt(String dataStr) {
|
||||
try {
|
||||
MessageDigest m = MessageDigest.getInstance("MD5");
|
||||
m.update(dataStr.getBytes("UTF8"));
|
||||
byte[] s = m.digest();
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (int i = 0; i < s.length; i++) {
|
||||
result.append(Integer.toHexString((0x000000FF & s[i]) | 0xFFFFFF00).substring(6));
|
||||
}
|
||||
return result.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.utils;
|
||||
|
||||
|
||||
/**
|
||||
* @Description 枚举一些常用API操作码
|
||||
* @Author JacksonTu
|
||||
* @Date 2020/3/28 16:26
|
||||
*/
|
||||
public enum ResultCode implements IErrorCode {
|
||||
|
||||
SUCCESS(0, "操作成功"),
|
||||
FAILED(500, "操作失败"),
|
||||
VALIDATE_FAILED(404, "参数检验失败"),
|
||||
UNAUTHORIZED(401, "暂未登录或token已经过期"),
|
||||
FORBIDDEN(403, "没有相关权限"),
|
||||
PREVENT_REPLAY(405,"重复请求"),
|
||||
NOT_EXIST(601,"数据不存在"),
|
||||
NOT_ENABLE(600,"数据未启用");
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
|
||||
private ResultCode(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
package com.example.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
@ -1,7 +1,5 @@
|
||||
package com.example.duplicate.controller.vo;
|
||||
package com.example.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
@ -0,0 +1,102 @@
|
||||
package com.example.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Lob;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName MessageLog
|
||||
* @Description 解析 患者基础信息
|
||||
* @Author linjj
|
||||
* @Date 2025/4/8 11:12
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageLog {
|
||||
private String id;
|
||||
|
||||
@Lob
|
||||
/**
|
||||
* 输入内容
|
||||
* */
|
||||
private String inputContent;
|
||||
|
||||
/**
|
||||
* 输出内容
|
||||
*/
|
||||
@Lob
|
||||
private String outContent;
|
||||
|
||||
/**
|
||||
* 类型 与 字典表匹配
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 消息结果 0 未成功 1是成功
|
||||
*/
|
||||
private Integer result;
|
||||
|
||||
/**
|
||||
* 返回json
|
||||
*/
|
||||
@Lob
|
||||
private String outJson;
|
||||
|
||||
/**
|
||||
* 接口名称
|
||||
*/
|
||||
private String interfaceName;
|
||||
|
||||
/**
|
||||
* xml创建时间
|
||||
*/
|
||||
private Date xmlCreateTime;
|
||||
|
||||
/**
|
||||
* 执行时间
|
||||
*/
|
||||
private Long executionTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* xml执行时间
|
||||
*/
|
||||
private Long xmlExecutionTime;
|
||||
|
||||
public MessageLog(String inputContent, String interfaceName, Date createTime) {
|
||||
this.inputContent = inputContent;
|
||||
this.interfaceName = interfaceName;
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public MessageLog() {
|
||||
|
||||
}
|
||||
|
||||
public void setValue(String outContent, Integer result, String outJson, Date xmlCreateTime, Long executionTime, Date endTime, String type) {
|
||||
this.outContent = outContent;
|
||||
this.result = result;
|
||||
this.outJson = outJson;
|
||||
this.xmlCreateTime = xmlCreateTime;
|
||||
this.executionTime = executionTime;
|
||||
this.endTime = endTime;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.example.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName MessageSubordinate
|
||||
* @Description MessageSubordinate表
|
||||
* @Author linjj
|
||||
* @Date 2023/10/13 15:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MessageSubordinateVo {
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
private String contentJson;
|
||||
|
||||
private String messageId;
|
||||
|
||||
private String patientMain;
|
||||
|
||||
private int status;
|
||||
|
||||
private String remark;
|
||||
private int runs;
|
||||
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.ArchiveDetailMapper">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.example.db.dao.ArchiveDetailDao">
|
||||
|
||||
<insert id="addArchiveDetail">
|
||||
insert into Archive_Detail (ID, PDF_PATH, MasterID, UpLoadDateTime, AssortID, Source, flag,
|
||||
Sys, splitName)
|
||||
values (#{ID}, #{PDFPATH}, #{MasterID}, #{UpLoadDateTime}, #{AssortID}, #{Source}, #{flag}, #{Sys},#{splitName})
|
||||
</insert>
|
||||
|
||||
<select id="getPdfPath" resultType="java.lang.String">
|
||||
select PDF_PATH from Archive_Detail where MasterID=#{masterId} and apply_id=#{applyId}
|
||||
</select>
|
||||
</mapper>
|
@ -1,31 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.ArchiveMasterMapper">
|
||||
<insert id="add">
|
||||
insert into master_id (masterId)
|
||||
values
|
||||
<foreach collection="idList" item="item" separator=",">(#{item})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="addArchiveMaster">
|
||||
insert into Archive_Master (ID, patient_id, inp_no, visit_id, name, dept_name, discharge_date_time,
|
||||
ArchiveState, admission_date_time, LockInfo,
|
||||
DISCHARGE_DISPOSITION,split_name)
|
||||
values (#{ID}, #{patientId}, #{inpNo}, #{visitId}, #{name}, #{deptName}, #{dischargeDateTime}, #{ArchiveState},
|
||||
#{admissionDateTime}, #{LockInfo}, #{DISCHARGEDISPOSITION}, #{splitName})
|
||||
</insert>
|
||||
|
||||
<mapper namespace="com.example.db.dao.ArchiveMasterDao">
|
||||
|
||||
<select id="masterIdNum" resultType="java.lang.Integer">
|
||||
<![CDATA[
|
||||
SELECT COUNT(ID) FROM Archive_Master WHERE discharge_date_time<=#{dateTime}
|
||||
]]>
|
||||
</select>
|
||||
<select id="getMasterId" resultType="com.example.duplicate.controller.vo.ArchiveMasterVo">
|
||||
<![CDATA[
|
||||
SELECT TOP 100 id FROM Archive_Master m WHERE discharge_date_time<=#{dateTime} and NOT EXISTS(SELECT masterId FROM master_id a WHERE masterId=m.ID )
|
||||
]]>
|
||||
|
||||
<select id="getMasterIdByInpNoAndVisitId" resultType="java.lang.String">
|
||||
select ID from Archive_Master where inp_no=#{inpNo} AND visit_id=#{visitId}
|
||||
</select>
|
||||
</mapper>
|
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.CommomtableMapper">
|
||||
<insert id="addAddLzRmComm">
|
||||
insert into CommonTable (patient_id, admiss_id, admiss_times, inpatient_no, name, dis_date, dis_dept_name,
|
||||
ph, gdh,splitName)
|
||||
values (#{patientId}, #{admissId}, #{admissTimes}, #{inpatientNo}, #{name}, #{disDate}, #{disDeptName}, #{ph},#{gdh},#{splitName})
|
||||
</insert>
|
||||
|
||||
<select id="getZdAssort" resultType="com.example.duplicate.controller.vo.CommomtableVo">
|
||||
SELECT
|
||||
t.assort_id
|
||||
FROM
|
||||
commomtable c
|
||||
LEFT JOIN t_scan_assort t ON c.patient_id= t.patient_id
|
||||
LEFT JOIN zd_assort z ON z.assort_id= t.assort_id
|
||||
WHERE
|
||||
c.inpatient_no = #{inpatientNo}
|
||||
AND c.admiss_times= #{admissTimes}
|
||||
GROUP BY t.assort_id,assort_sort
|
||||
ORDER BY assort_sort
|
||||
</select>
|
||||
<select id="getCommomtable" resultType="java.lang.String">
|
||||
SELECT
|
||||
( c.file_path+ '\' + t.scan_page )filePath
|
||||
FROM
|
||||
commomtable c
|
||||
LEFT JOIN t_scan_assort t ON c.patient_id= t.patient_id
|
||||
LEFT JOIN zd_assort z ON t.assort_id= z.assort_id
|
||||
WHERE
|
||||
c.inpatient_no = #{inpatientNo}
|
||||
AND c.admiss_times= #{admissTimes}
|
||||
AND t.assort_id= #{assortId}
|
||||
</select>
|
||||
<select id="getPageCount" resultType="com.example.duplicate.controller.vo.PageCountVo">
|
||||
SELECT
|
||||
COUNT(file_path) as pageCount,z.assort_name
|
||||
FROM
|
||||
commomtable c
|
||||
LEFT JOIN t_scan_assort t ON c.patient_id= t.patient_id
|
||||
LEFT JOIN zd_assort z ON t.assort_id= z.assort_id
|
||||
WHERE
|
||||
c.inpatient_no = #{inpatientNo}
|
||||
AND c.admiss_times= #{admissTimes}
|
||||
AND t.assort_id= #{assortId}
|
||||
GROUP BY z.assort_id,z.assort_name
|
||||
</select>
|
||||
<select id="com" resultType="com.example.duplicate.controller.vo.CommomtableCopyVo">
|
||||
select * from com
|
||||
</select>
|
||||
</mapper>
|
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.LzRmMapper">
|
||||
<update id="updateSynchronousTime">
|
||||
update commomtable_copy
|
||||
set spilStatic=#{spilStatic}
|
||||
where inpatientNoPast = #{inpatientNoPast}
|
||||
and ph = #{phString}
|
||||
and pageNumber=#{pageNumber}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getCommomtableCopyInfo" resultType="com.example.duplicate.controller.vo.CommomtableCopyVo">
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
inpatientNo,
|
||||
admissTimes,
|
||||
disDate,
|
||||
pageNumber,
|
||||
inpatientNoPast,
|
||||
disDept,
|
||||
'00' + ph ph,
|
||||
ph phString,
|
||||
spilStatic
|
||||
FROM
|
||||
commomtable_copy
|
||||
WHERE
|
||||
spilStatic = 0
|
||||
ORDER BY
|
||||
id
|
||||
</select>
|
||||
<select id="getZdAssortInfo" resultType="com.example.duplicate.controller.vo.ZdAssortVo">
|
||||
SELECT
|
||||
zd.assort_id as assortId,zd.assort_name as assortName,zd.assort_sort as assortSort,zd.print_flag as printFlag,zd.parent_id as parentId,
|
||||
ad.PDF_PATH as PDFPATH,am.DISCHARGE_DISPOSITION as DISCHARGEDISPOSITION,ad.UpLoadDateTime,ad.flag,ad.Sys
|
||||
FROM
|
||||
archive_master am
|
||||
INNER JOIN archive_detail ad ON ad.MasterID = am.ID
|
||||
AND inp_no = #{inpNo}
|
||||
AND am.LockInfo= #{LockInfo}
|
||||
LEFT JOIN zd_assort zd ON zd.assort_id= ad.AssortID
|
||||
WHERE assort_name=#{assortName}
|
||||
</select>
|
||||
</mapper>
|
@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.MessageLogMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.duplicate.controller.vo.MessageLog">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="end_time" property="endTime" />
|
||||
<result column="execution_time" property="executionTime" />
|
||||
<result column="input_content" property="inputContent" />
|
||||
<result column="interface_name" property="interfaceName" />
|
||||
<result column="out_content" property="outContent" />
|
||||
<result column="out_json" property="outJson" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="result" property="result" />
|
||||
<result column="type" property="type" />
|
||||
<result column="xml_create_time" property="xmlCreateTime" />
|
||||
<result column="xml_execution_time" property="xmlExecutionTime" />
|
||||
<result column="master_id" property="masterId" />
|
||||
<result column="webservice_info" property="webserviceInfo" />
|
||||
<result column="discharge_date_time" property="dischargeDateTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<update id="updateSynchronousTime">
|
||||
update synchronous_time set addTime=#{dischargeDateTime}
|
||||
</update>
|
||||
<delete id="del">
|
||||
delete from message_log where id in
|
||||
<foreach item="item" collection="messageLogIds.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getAllByIds" resultType="com.example.duplicate.controller.vo.MessageLogVo">
|
||||
<![CDATA[
|
||||
SELECT TOP 100
|
||||
m.id
|
||||
FROM message_log m
|
||||
INNER JOIN Archive_Master a ON m.master_id = a.id
|
||||
WHERE a.discharge_date_time <= #{dateTime}
|
||||
order by a.discharge_date_time desc
|
||||
]]>
|
||||
</select>
|
||||
|
||||
<select id="getMessageLogNum" resultType="java.lang.Integer">
|
||||
<![CDATA[
|
||||
SELECT COUNT(m.id)
|
||||
FROM message_log m
|
||||
INNER JOIN Archive_Master a ON m.master_id = a.id
|
||||
WHERE a.discharge_date_time <= #{dateTime}
|
||||
]]>
|
||||
</select>
|
||||
<select id="getSynchronousTime" resultType="java.lang.String">
|
||||
SELECT addTime FROM synchronous_time
|
||||
</select>
|
||||
<select id="getAllBy" resultMap="BaseResultMap">
|
||||
<![CDATA[
|
||||
SELECT TOP 100
|
||||
m.*,a.discharge_date_time
|
||||
FROM message_log m
|
||||
INNER JOIN Archive_Master a ON m.master_id = a.id
|
||||
WHERE a.discharge_date_time < #{synchronousTime}
|
||||
order by a.discharge_date_time desc
|
||||
]]>
|
||||
</select>
|
||||
<select id="getAllByMasterId" resultMap="BaseResultMap">
|
||||
SELECT * FROM message_log WHERE master_id in
|
||||
<foreach item="item" collection="masterIds.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
@ -1,72 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.MessageSubordinateMapper">
|
||||
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.duplicate.controller.vo.MessageSubordinate">
|
||||
<id column="id" property="id" />
|
||||
<result column="content_json" property="contentJson" />
|
||||
<result column="message_id" property="messageId" />
|
||||
<result column="patient_main" property="patientMain" />
|
||||
<result column="status" property="status" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="runs" property="runs" />
|
||||
<result column="discharge_date_time" property="dischargeDateTime" />
|
||||
</resultMap>
|
||||
<update id="updateSynchronousTime">
|
||||
update synchronous_time1 set addTime=#{dischargeDateTime}
|
||||
<mapper namespace="com.example.db.dao.MessageSubordinateDao">
|
||||
<update id="updateStatus">
|
||||
update message_subordinate_20250407 set status=#{status} where id=#{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="del">
|
||||
delete from message_subordinate where message_id in
|
||||
<foreach item="item" collection="messageLogIds.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getMessageNum" resultType="java.lang.Integer">
|
||||
<![CDATA[
|
||||
SELECT COUNT(m.id)
|
||||
FROM message_subordinate m
|
||||
INNER JOIN message_log b on b.id = m.message_id
|
||||
INNER JOIN Archive_Master a ON b.master_id = a.id
|
||||
WHERE a.discharge_date_time <= #{dateTime}
|
||||
]]>
|
||||
</select>
|
||||
<select id="getAllByIds" resultType="com.example.duplicate.controller.vo.MessageSubordinateVo">
|
||||
<![CDATA[
|
||||
SELECT TOP 100
|
||||
m.id
|
||||
FROM message_subordinate m
|
||||
INNER JOIN message_log b on b.id = m.message_id
|
||||
INNER JOIN Archive_Master a ON b.master_id = a.id
|
||||
WHERE a.discharge_date_time <= '2022-12-31 23:59:59'
|
||||
order by a.discharge_date_time desc
|
||||
]]>
|
||||
</select>
|
||||
<select id="getSynchronousTime" resultType="java.lang.String">
|
||||
select addTime from synchronous_time1
|
||||
</select>
|
||||
|
||||
<select id="getAllByTime" resultMap="BaseResultMap">
|
||||
<![CDATA[
|
||||
SELECT TOP 100
|
||||
m.*,a.discharge_date_time
|
||||
FROM message_subordinate m
|
||||
INNER JOIN message_log b on b.id = m.message_id
|
||||
INNER JOIN Archive_Master a ON b.master_id = a.id
|
||||
WHERE a.discharge_date_time <= #{synchronousTime}
|
||||
order by a.discharge_date_time desc
|
||||
]]>
|
||||
</select>
|
||||
<select id="getAllByMessageLogId" resultMap="BaseResultMap">
|
||||
SELECT * FROM message_subordinate WHERE message_id in
|
||||
<foreach item="item" collection="messageLogIds.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<select id="getMessageSubordinate" resultType="com.example.vo.MessageSubordinateVo">
|
||||
select * from message_subordinate_20250407 where status=#{status}
|
||||
</select>
|
||||
</mapper>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.MidMapper">
|
||||
|
||||
<select id="getMid" resultType="java.lang.String">
|
||||
SELECT
|
||||
mid
|
||||
FROM mid
|
||||
</select>
|
||||
</mapper>
|
@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configOneDao.QualityMapper" >
|
||||
<insert id="addPh" parameterType="java.util.List">
|
||||
insert into ph (ph
|
||||
)
|
||||
values <foreach collection="list" item="item" separator=",">(#{item.ph}
|
||||
)</foreach>
|
||||
</insert>
|
||||
<insert id="addFliePath">
|
||||
insert into fliePath (ph,fliePath
|
||||
)
|
||||
values (#{ph},#{fliePath}
|
||||
)
|
||||
</insert>
|
||||
<insert id="addTscanAssort">
|
||||
insert into t_scan_assort (patient_id,assort_id,scan_page,source,is_del
|
||||
)
|
||||
values (#{patientId},#{assortId},#{scanPage},#{source},#{isDel}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="getPhNum" resultType="java.lang.Integer">
|
||||
SELECT COUNT(distinct ph) FROM commomtable
|
||||
<where> 1=1
|
||||
<if test="startRange != null and startRange != ''">
|
||||
and ph >= #{startRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
<if test="endRange != null and endRange != ''">
|
||||
and ph <= #{endRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getFileNum" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(t.patient_id)
|
||||
FROM
|
||||
commomtable c
|
||||
LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id
|
||||
<where> t.is_del!=1
|
||||
<!-- <if test="startRange != null and startRange != '' and endRange != null and endRange != ''">-->
|
||||
<!-- and ph >= #{startRange,jdbcType=NVARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="startRange != null and startRange != '' and endRange != null and endRange != ''">-->
|
||||
<!-- and ph <= #{endRange,jdbcType=NVARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="startRange != null and startRange != '' and endRange = null and endRange = ''">-->
|
||||
<!-- and ph = #{startRange,jdbcType=NVARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="startRange = null and startRange = '' and endRange != null and endRange != ''">-->
|
||||
<!-- and ph = #{endRange,jdbcType=NVARCHAR}-->
|
||||
<!-- </if>-->
|
||||
<if test="startRange != null and startRange != '' ">
|
||||
and ph >= #{startRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
<if test="endRange != null and endRange != ''">
|
||||
and ph <= #{endRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getFliePath" resultType="java.lang.String">
|
||||
SELECT
|
||||
c.file_path+'\'+t.scan_page as fliePath
|
||||
FROM
|
||||
commomtable c
|
||||
inner JOIN t_scan_assort t on c.patient_id=t.patient_id
|
||||
where t.is_del!=1 and c.patient_id=#{ph,jdbcType=NVARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="getFliePaths" resultType="java.lang.String">
|
||||
SELECT
|
||||
c.file_path+'\'+t.scan_page as fliePath
|
||||
FROM
|
||||
commomtable c
|
||||
inner JOIN t_scan_assort t on c.patient_id=t.patient_id
|
||||
where t.is_del!=1 and c.patient_id in
|
||||
<foreach item="item" collection="phs" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getPh" resultType="java.lang.String">
|
||||
SELECT patient_id FROM commomtable
|
||||
<where> 1=1
|
||||
<if test="startRange != null and startRange != '' ">
|
||||
and dis_date >= #{startRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
<if test="endRange != null and endRange != ''">
|
||||
and dis_date <= #{endRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getPhAndFliePath" resultType="com.example.duplicate.controller.vo.FliePath">
|
||||
SELECT
|
||||
c.patient_id,c.file_path+'\'+t.scan_page as fliePath
|
||||
FROM
|
||||
commomtable c
|
||||
inner JOIN t_scan_assort t on c.patient_id=t.patient_id
|
||||
<where> 1=1
|
||||
<if test="startRange != null and startRange != '' ">
|
||||
and dis_date >= #{startRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
<if test="endRange != null and endRange != ''">
|
||||
and dis_date <= #{endRange,jdbcType=NVARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configTwoDao.MessageLogTwoMapper">
|
||||
<insert id="addAll">
|
||||
insert into message_log (id,create_time,end_time,execution_time,input_content,
|
||||
interface_name,out_content,out_json,remark,result,type,xml_create_time,xml_execution_time,
|
||||
master_id,webservice_info)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">(#{item.id},#{item.createTime},#{item.endTime},
|
||||
#{item.executionTime},#{item.inputContent},#{item.interfaceName},#{item.outContent},
|
||||
#{item.outJson},#{item.remark},#{item.result},#{item.type},#{item.xmlCreateTime},#{item.xmlExecutionTime},
|
||||
#{item.masterId},#{item.webserviceInfo}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.duplicate.infrastructure.configTwoDao.MessageSubordinateTwoMapper">
|
||||
|
||||
|
||||
<insert id="addAll">
|
||||
insert into message_subordinate (id,content_json,message_id,patient_main,status,remark,runs)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">(#{item.id},#{item.contentJson},#{item.messageId},
|
||||
#{item.patientMain},#{item.status},#{item.remark},#{item.runs}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mr-file</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="E:/ideaObject/mr/mr-file/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
@ -1,141 +0,0 @@
|
||||
package com.example;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.example.duplicate.infrastructure.configOneDao.MidMapper;
|
||||
import com.example.duplicate.infrastructure.configOneDao.QualityMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.ofdrw.converter.ofdconverter.ImageConverter;
|
||||
import org.ofdrw.layout.OFDDoc;
|
||||
import org.ofdrw.layout.PageLayout;
|
||||
import org.ofdrw.layout.element.Img;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = com.example.SpringbootDemoApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@Slf4j
|
||||
public class DemoApplicationTests {
|
||||
|
||||
private static SimpleDateFormat inSDF = new SimpleDateFormat("yyyy.mm.dd");
|
||||
private static SimpleDateFormat outSDF = new SimpleDateFormat("yyyy-mm-dd");
|
||||
|
||||
@Autowired
|
||||
QualityMapper qualityMapper;
|
||||
@Autowired
|
||||
MidMapper midMapper;
|
||||
|
||||
|
||||
@Test
|
||||
public void getPic() {
|
||||
List<String> mid = midMapper.getMid();
|
||||
String curl = " curl -X POST http://10.36.116.108:3391/makeUp/makeUpPacsByMasterId -d";
|
||||
String param = "masterId=";
|
||||
for (String masterId:mid){
|
||||
log.info(curl+" "+param+masterId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void ImageConverterTest() throws IOException {
|
||||
String directoryPath = "D:\\tmp1\\004624"; // 替换为你的目录路径
|
||||
List<Path> imagePaths = findImageFiles(directoryPath);
|
||||
for (int i=0;i<imagePaths.size();i++){
|
||||
try(ImageConverter converter= new ImageConverter(Paths.get("D:\\tmp1\\ofd\\"+i+".ofd"))) {
|
||||
BufferedImage bufferedImage = ImageIO.read(imagePaths.get(i).toFile());
|
||||
double imageHeight = bufferedImage.getHeight();
|
||||
double imageWidth = bufferedImage.getWidth();
|
||||
double scale = PageLayout.A4().getWidth() / imageWidth;
|
||||
double height = imageHeight * scale;
|
||||
PageLayout pageLayout=new PageLayout(PageLayout.A4().getWidth(),height);
|
||||
converter.setPageSize(pageLayout);
|
||||
converter.append(imagePaths.get(i),PageLayout.A4().getWidth(), height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<Path> findImageFiles(String directoryPath) {
|
||||
List<String> jpgPath = new ArrayList<>();
|
||||
List<Path> imgPaths=new ArrayList<>();
|
||||
File directory = new File(directoryPath);
|
||||
|
||||
// 遍历目录
|
||||
File[] files = directory.listFiles((dir, name) -> name.toLowerCase().matches(".*\\.(jpg)$"));
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isFile()) {
|
||||
jpgPath.add(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String path:jpgPath){
|
||||
imgPaths.add(Paths.get(path));
|
||||
}
|
||||
return imgPaths;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void intercept() {
|
||||
String pageNumber = "66";
|
||||
//如果包含--就截取--前
|
||||
if (pageNumber.contains("--")) {
|
||||
pageNumber = pageNumber.substring(0, pageNumber.indexOf("--"));
|
||||
}
|
||||
//如果包含--就截取-前
|
||||
if (pageNumber.contains("-")) {
|
||||
pageNumber = pageNumber.substring(0, pageNumber.indexOf("-"));
|
||||
}
|
||||
System.out.println("pageNumber:" + pageNumber);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void intercept1() {
|
||||
String a = "0000000002";
|
||||
String s = String.format("%010d", Integer.parseInt(a));
|
||||
System.out.println("s:" + s);
|
||||
}
|
||||
|
||||
|
||||
public static String bytesToHexString(byte[] src) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (src == null || src.length <= 0) {
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < src.length; i++) {
|
||||
int v = src[i] & 0xFF;
|
||||
String hv = Integer.toHexString(v);
|
||||
if (hv.length() < 2) {
|
||||
stringBuilder.append(0);
|
||||
}
|
||||
stringBuilder.append(hv);
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue