init: 广东省中医院,动态心电程序反编译初始代码

master
wyb 3 months ago
commit bbc3bfff82

35
.gitignore vendored

@ -0,0 +1,35 @@
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.iml
# 直接在这里添加即可,注意加上备注,好知道是忽略什么文件 #
##############################
## Folders ##
##############################
target
out
log
configLog
.idea
.project
**/.mvn
**/mvnw
**/mvnw.cmd

@ -0,0 +1,38 @@
<ESBEntry>
<AccessControl>
<SysFlag>1</SysFlag>
<UserName>WZHBAGL</UserName>
<Password>WZHBAGL_1127</Password>
<Fid>BS14002</Fid>
<OrderNo>BS14002S51001</OrderNo>
<SUBOR_HOSPITAL_DISTRICT>GZ</SUBOR_HOSPITAL_DISTRICT>
</AccessControl>
<MessageHeader>
<Fid>BS14002</Fid>
<OrderNo>BS14002S51001</OrderNo>
<SourceSysCode>S51</SourceSysCode>
<TargetSysCode>S00</TargetSysCode>
<MsgDate>2022-05-06 02:54:08</MsgDate>
</MessageHeader>
<RequestOption>
<triggerData>0</triggerData>
<dataAmount>500</dataAmount>
</RequestOption>
<MsgInfo flag="1">
<Msg/>
<distinct value="0"/>
<query item="WS_INPUT" compy="=" value="WS" splice="AND"/>
<query_ws action="GetJCBGMXCX">
<content>
<Request>
<Msg>
<EXAM_NO></EXAM_NO>
</Msg>
</Request>
</content>
</query_ws>
</MsgInfo>
<GroupInfo flag="0">
<AS ID="" linkField=""/>
</GroupInfo>
</ESBEntry>

@ -0,0 +1,45 @@
<ESBEntry>
<AccessControl>
<SysFlag>1</SysFlag>
<UserName>WZHBAGL</UserName>
<Password>WZHBAGL_1127</Password>
<Fid>BS14002</Fid>
<OrderNo>BS14002S51001</OrderNo>
<SUBOR_HOSPITAL_DISTRICT>GZ</SUBOR_HOSPITAL_DISTRICT>
</AccessControl>
<MessageHeader>
<Fid>BS14002</Fid>
<OrderNo>BS14002S51001</OrderNo>
<SourceSysCode>S51</SourceSysCode>
<TargetSysCode>S00</TargetSysCode>
<MsgDate>2020-05-06 02:54:08</MsgDate>
</MessageHeader>
<RequestOption>
<triggerData>0</triggerData>
<dataAmount>500</dataAmount>
</RequestOption>
<MsgInfo flag="1">
<Msg/>
<distinct value="0"/>
<query item="WS_INPUT" compy="=" value="WS" splice="AND"/>
<query_ws action="GetJCBGLBCX">
<content>
<Request>
<Msg>
<VUID></VUID>
<OUTHOSP_INDEX_NO></OUTHOSP_INDEX_NO>
<OUTHOSP_NO/>
<INHOSP_INDEX_NO/>
<INHOSP_NO/>
<EMPI_ID></EMPI_ID>
<BEGIN_DATE>2020-12-01</BEGIN_DATE>
<END_DATE>2023-12-31</END_DATE>
</Msg>
</Request>
</content>
</query_ws>
</MsgInfo>
<GroupInfo flag="0">
<AS ID="" linkField=""/>
</GroupInfo>
</ESBEntry>

@ -0,0 +1,54 @@
{
//,
"directory":["Msg","ReportInfo"],
//
"indexFlag":"INHOSP_NO",
//
"serialnum":"EXAM_NO",
//
"filetitle":"EXAM_ITEM_NAME",
//
"downurl":"IMAGE_URL",
//
"dateFormat": "yyyy-MM-dd HH:mm:ss",
//id
"assortid":"e4525abec7cb4c9097b81c56b551112f",
//id
"collectorid":"23",
//( 1:2)
"filesource":1,
//(1:2ftp3)
"filestoragetype":1,
//
"uploadConnector":"http://192.9.100.171:9291/api/downplatform/report",
//doubleBasic
"basicDirectory":["Msg","ReportInfo"],
//
"doubleBasic":["TestItemInfo","BioTestInfo"],
//
"bgtsParam":["Request","Msg","EMPI_ID"],
//
"bgtsRespon":["MsgInfo","Msg"],
//key
"examNo":"EXAM_NO",
//key
"examItemName":"EXAM_ITEM_NAME",
//
"pdfUrl":"IMAGE_URL",
//
"bgtsDetailParam":["Request","Msg","EXAM_NO"],
//
"bgtsDetailRespon":["MsgInfo","Msg","ReportInfo"],
//
"collectStartDate": "2022-09-03",
//
"collectEndDate": "2022-09-03",
// 1: 0:
"collectOpen": "1",
//0 1: 0:
"intervalDayOpen": "1",
//pacs
"intervalDay":3
}

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 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.5.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.docus</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>docus-active-query-service</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/jaxen/jaxen -->
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.75</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.15</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.14</version>
</dependency>
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.9.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.4</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.axis</groupId>-->
<!--<artifactId>axis</artifactId>-->
<!--<version>1.4</version>-->
<!--</dependency>-->
<!--&lt;!&ndash; https://mvnrepository.com/artifact/org.apache.axis/axis-jaxrpc &ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>org.apache.axis</groupId>-->
<!--<artifactId>axis-jaxrpc</artifactId>-->
<!--<version>1.4</version>-->
<!--</dependency>-->
<!--&lt;!&ndash; https://mvnrepository.com/artifact/commons-discovery/commons-discovery &ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>commons-discovery</groupId>-->
<!--<artifactId>commons-discovery</artifactId>-->
<!--<version>0.2</version>-->
<!--</dependency>-->
<!--&lt;!&ndash; https://mvnrepository.com/artifact/commons-logging/commons-logging &ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>commons-logging</groupId>-->
<!--<artifactId>commons-logging</artifactId>-->
<!--<version>1.1.1</version>-->
<!--</dependency>-->
<!--&lt;!&ndash; https://mvnrepository.com/artifact/wsdl4j/wsdl4j &ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>wsdl4j</groupId>-->
<!--<artifactId>wsdl4j</artifactId>-->
<!--<version>1.6.2</version>-->
<!--</dependency>-->
<!--webService-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.8</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc7 -->
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc6 -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.1.8</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,32 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
@EnableScheduling
@SpringBootApplication(
exclude = {MybatisPlusAutoConfiguration.class}
)
public class DemoApplication {
public static void main(String[] args) {
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
SpringApplication.run(DemoApplication.class, args);
}
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setPoolSize(3);
return taskScheduler;
}
}

@ -0,0 +1,65 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import com.alibaba.druid.pool.DruidDataSource;
import com.baomidou.mybatisplus.core.MybatisConfiguration;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
@Configuration
@MapperScan(
basePackages = {"com.docus.bgts.mapper.dbmysql"},
sqlSessionFactoryRef = "dbmysqlSqlSessionFactory"
)
public class DbMysqlConfig {
static final String PACKAGE = "com.docus.bgts.mapper.dbmysql";
static final String MAPPER_LOCATION = "classpath:mapper/dbmysql/*.xml";
@Bean(
name = {"dbmysqlDataSource"}
)
@ConfigurationProperties(
prefix = "spring.datasource.mysql-docus"
)
public DataSource secondDataSource() {
return new DruidDataSource();
}
@Bean(
name = {"dbmysqlTransactionManager"}
)
public DataSourceTransactionManager secondTransactionManager() {
return new DataSourceTransactionManager(this.secondDataSource());
}
@Bean(
name = {"dbmysqlSqlSessionFactory"}
)
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbmysqlDataSource") DataSource dataSource) throws Exception {
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
bean.setMapperLocations(resolver.getResources("classpath:mapper/dbmysql/*.xml"));
bean.setTypeAliasesPackage("com.docus.bgts.entity.*");
MybatisConfiguration configuration = new MybatisConfiguration();
configuration.setMapUnderscoreToCamelCase(true);
configuration.setJdbcTypeForNull(JdbcType.NULL);
bean.setDataSource(dataSource);
bean.setConfiguration(configuration);
return bean.getObject();
}
}

@ -0,0 +1,56 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import com.alibaba.druid.pool.DruidDataSource;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import javax.sql.DataSource;
@Configuration
@MapperScan(
basePackages = {"com.docus.bgts.mapper.dboracle"},
sqlSessionFactoryRef = "dboracleSqlSessionFactory"
)
public class DbOracleConfig {
static final String PACKAGE = "com.docus.bgts.mapper.dboracle";
static final String MAPPER_LOCATION = "classpath:mapper/dboracle/*.xml";
@Bean(
name = {"dboracleDataSource"}
)
@ConfigurationProperties(
prefix = "spring.datasource.oracle-docus"
)
public DataSource secondDataSource() {
return new DruidDataSource();
}
@Bean(
name = {"dboracleTransactionManager"}
)
public DataSourceTransactionManager secondTransactionManager() {
return new DataSourceTransactionManager(this.secondDataSource());
}
@Bean(
name = {"dboracleSqlSessionFactory"}
)
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dboracleDataSource") DataSource secondDataSource) throws Exception {
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(secondDataSource);
sessionFactory.setMapperLocations((new PathMatchingResourcePatternResolver()).getResources("classpath:mapper/dboracle/*.xml"));
return sessionFactory.getObject();
}
}

@ -0,0 +1,23 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LocalBusFactory extends BusFactory {
private static Logger logger = LoggerFactory.getLogger(LocalBusFactory.class);
public Bus createBus() {
return null;
}
public static void printTHREAD_BUSSES() {
logger.info("THREAD_BUSSES SIZE {}", THREAD_BUSSES.size());
}
}

@ -0,0 +1,24 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import com.docus.bgts.facade.IBgtsService;
import javax.annotation.PreDestroy;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class MyConstruct {
@Autowired
IBgtsService bgtsService;
private Logger logger = LogManager.getLogger(MyConstruct.class);
@PreDestroy
public void destroy() {
}
}

@ -0,0 +1,87 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import com.docus.bgts.facade.IBgtsService;
import com.docus.bgts.service.CheckIntegrityService;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class MyScheduling {
@Value("${beat.url}")
private String beatUrl;
public static String syncFlag;
private final String tempfilePrefix = "dataConfig\\temp";
private final String tempDataFileName = "collectTimeTemp";
private final String lastTimeStr = "lastTime";
@Autowired
IBgtsService bgtsService;
@Autowired
CheckIntegrityService checkIntegrityService;
private Logger logger = LogManager.getLogger(MyScheduling.class);
@Autowired
private ThreadPoolExecutor threadPoolExecutor;
@Scheduled(
fixedRate = 5000L
)
public void beat() {
Map<String, String> params = new HashMap();
params.put("code", String.valueOf(FileUtils.getJsonByName("collectorid")));
try {
HttpUtils.get(this.beatUrl, params);
} catch (Exception e) {
e.printStackTrace();
this.logger.info("心跳推送出错,可能是住院服务没有开启");
}
}
@Scheduled(
cron = "0 0 0 * * ?"
)
public void collect() {
String intervalDayOpen = String.valueOf(FileUtils.getJsonByName("intervalDayOpen"));
if (intervalDayOpen.equals("1")) {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
int day = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("intervalDay")));
this.logger.info("0点采集前" + day + "天出院数据");
Map<String, String> dateCollectionTime = getDateCollectionTime(new Date(), day);
this.logger.info("采集" + (String)dateCollectionTime.get("startDate") + "至-------" + (String)dateCollectionTime.get("endDate") + "数据");
this.bgtsService.collectByDate((String)dateCollectionTime.get("startDate"), (String)dateCollectionTime.get("endDate"), collectorid);
}
}
public static Map<String, String> getDateCollectionTime(Date date, int day) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(5, -day);
Date dBefore = calendar.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String defaultStartDate = sdf.format(dBefore);
defaultStartDate = defaultStartDate + " 00:00:00";
String defaultEndDate = defaultStartDate.substring(0, 10) + " 23:59:59";
Map<String, String> map = new HashMap();
map.put("startDate", defaultStartDate);
map.put("endDate", defaultEndDate);
return map;
}
}

@ -0,0 +1,28 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@Configuration
public class ThreadPoolConfig {
@Bean
public ThreadPoolExecutor threadPoolExecutor() {
return new ThreadPoolExecutor(Runtime.getRuntime().availableProcessors(), (int)((double)Runtime.getRuntime().availableProcessors() / 0.09999999999999998), 60L, TimeUnit.SECONDS, new LinkedBlockingQueue(Runtime.getRuntime().availableProcessors()), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());
}
@Bean
public ScheduledThreadPoolExecutor scheduledThreadPoolExecutor() {
return new ScheduledThreadPoolExecutor(Runtime.getRuntime().availableProcessors(), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());
}
}

@ -0,0 +1,248 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.controller;
import com.docus.bgts.config.MyScheduling;
import com.docus.bgts.entity.CommonResult;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.facade.IBgtsService;
import com.docus.bgts.service.CheckIntegrityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Api(
value = "采集接口",
tags = {"采集接口"}
)
@RestController
public class BgtsController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
CheckIntegrityService checkIntegrityService;
@Autowired
IBgtsService bgtsService;
@Autowired
IAfCollectTaskService afCollectTaskService;
@ApiOperation("完整性同步程序开关0关闭 1开启")
@GetMapping({"/onOffSync"})
public void onOffSync(@RequestParam(value = "flag",defaultValue = "0") String flag) {
MyScheduling.syncFlag = flag;
}
@GetMapping({"/addSyncIntegrality"})
public void addSyncIntegrality(@RequestParam("startDate") String startDate, String endDate) {
this.checkIntegrityService.addSyncIntegrality(startDate, endDate);
}
@GetMapping({"/addSyncIntegralityByJzhs"})
public CommonResult<String> addSyncIntegrality(@RequestParam("jzhs") String jzhs) {
if (jzhs.split(",").length > 100) {
return CommonResult.failed("jzh个数不能超过100个");
} else {
this.checkIntegrityService.addSyncIntegralityByJzhs(jzhs);
return CommonResult.success("完成");
}
}
@ApiOperation("采集接口")
@ApiImplicitParams({@ApiImplicitParam(
name = "empId",
value = "患者主索引号",
required = true,
dataTypeClass = String.class
), @ApiImplicitParam(
name = "collectSubId",
value = "af_interface_collect_sub表id",
required = true
)})
@GetMapping({"/collect"})
public CommonResult<String> collect(@RequestParam("collectSubId") String collectSubId, @RequestParam("empId") String empId) {
try {
this.logger.info("采集接口接收到参数:\nempId--" + empId + "\ncollectSubId--" + collectSubId);
this.bgtsService.collect(empId);
this.logger.info("采集完成");
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 1);
this.logger.info("------------采集结束-----------");
} catch (RuntimeException e) {
e.printStackTrace();
try {
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 0);
} catch (Exception e1) {
this.logger.info(e1.getMessage());
return CommonResult.failed(e1.getMessage());
}
return CommonResult.failed(e.getMessage());
} catch (Exception e) {
e.printStackTrace();
} catch (Throwable t) {
t.printStackTrace();
this.logger.error("throwable{}", t.getMessage());
}
return CommonResult.success("ok");
}
@ApiOperation("Pacs采集接口")
@ApiImplicitParams({@ApiImplicitParam(
name = "empId",
value = "患者主索引号",
required = true,
dataTypeClass = String.class
), @ApiImplicitParam(
name = "collectSubId",
value = "af_interface_collect_sub表id",
required = true
), @ApiImplicitParam(
name = "admissDate",
value = "入院时间",
required = true
), @ApiImplicitParam(
name = "disDate",
value = "出院时间",
required = true
), @ApiImplicitParam(
name = "times",
value = "住院次数",
required = true
)})
@GetMapping({"/collectPacs"})
public CommonResult<String> collect(@RequestParam("collectSubId") String collectSubId, @RequestParam("empId") String empId, @RequestParam("admissDate") String admissDate, @RequestParam("disDate") String disDate, @RequestParam("times") String times) {
try {
this.logger.info("采集接口接收到参数:\nempId--" + empId + "\ncollectSubId--" + collectSubId);
this.bgtsService.collectPacs(empId, admissDate, disDate, times);
this.logger.info("采集完成");
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 1);
this.logger.info("------------采集结束-----------");
} catch (RuntimeException e) {
e.printStackTrace();
try {
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 0);
} catch (Exception e1) {
this.logger.info(e1.getMessage());
return CommonResult.failed(e1.getMessage());
}
return CommonResult.failed(e.getMessage());
} catch (Exception e) {
e.printStackTrace();
}
return CommonResult.success("ok");
}
@ApiOperation("动态心电采集接口")
@ApiImplicitParams({@ApiImplicitParam(
name = "empId",
value = "患者主索引号",
required = true,
dataTypeClass = String.class
), @ApiImplicitParam(
name = "collectSubId",
value = "af_interface_collect_sub表id",
required = true
), @ApiImplicitParam(
name = "admissDate",
value = "入院时间",
required = true
), @ApiImplicitParam(
name = "disDate",
value = "出院时间",
required = true
), @ApiImplicitParam(
name = "times",
value = "住院次数",
required = true
)})
@GetMapping({"/collectEcg"})
public CommonResult<String> collectEcg(@RequestParam("collectSubId") String collectSubId, @RequestParam("empId") String empId, @RequestParam("admissDate") String admissDate, @RequestParam("disDate") String disDate, @RequestParam("times") String times) {
try {
this.logger.info("采集接口接收到参数:\nempId--" + empId + "\ncollectSubId--" + collectSubId);
this.bgtsService.collectEcg(empId, admissDate, disDate, times);
this.logger.info("采集完成");
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 1);
this.logger.info("------------采集结束-----------");
} catch (RuntimeException e) {
e.printStackTrace();
try {
this.afCollectTaskService.updateInterfaceCollect(collectSubId, 0);
} catch (Exception e1) {
this.logger.info(e1.getMessage());
return CommonResult.failed(e1.getMessage());
}
return CommonResult.failed(e.getMessage());
} catch (Exception e) {
e.printStackTrace();
}
return CommonResult.success("ok");
}
@ApiOperation("按需采集接口")
@ApiImplicitParams({@ApiImplicitParam(
name = "emamNo",
value = "报告单号",
required = true,
dataTypeClass = String.class
), @ApiImplicitParam(
name = "empId",
value = "患者主索引号",
required = true,
dataTypeClass = String.class
)})
@GetMapping({"/collectByExamNo"})
public CommonResult<String> collectByExamNo(@RequestParam("emamNo") String emamNo, @RequestParam("empId") String empId) {
try {
this.logger.info("按需采集接口接受参数:\nempId--" + empId + "\nemamNo--" + emamNo);
this.bgtsService.collectByExamNo(emamNo, empId);
} catch (RuntimeException e) {
e.printStackTrace();
return CommonResult.failed(e.getMessage());
} catch (Exception e) {
e.printStackTrace();
}
return CommonResult.success("ok");
}
@GetMapping({"/collectByEx"})
public CommonResult<String> collectByEx(@RequestParam("empId") String empId) {
try {
this.bgtsService.collect(empId);
} catch (Exception e) {
e.printStackTrace();
return CommonResult.failed(e.getMessage());
}
return CommonResult.success("ok");
}
@ApiOperation("pacs按需采集接口")
@GetMapping({"/collectByPacs"})
public CommonResult<String> collectByPacs() {
try {
this.bgtsService.collectPacss();
} catch (Exception e) {
e.printStackTrace();
return CommonResult.failed(e.getMessage());
}
return CommonResult.success("ok");
}
}

@ -0,0 +1,115 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel("采集日志")
public class AfCollectAdd {
@ApiModelProperty("id")
@TableId(
value = "id",
type = IdType.ASSIGN_ID
)
private Long id;
@ApiModelProperty("上次更新时间")
private Date beginStageDate;
@ApiModelProperty("分类")
private Integer classify;
public Long getId() {
return this.id;
}
public Date getBeginStageDate() {
return this.beginStageDate;
}
public Integer getClassify() {
return this.classify;
}
public void setId(final Long id) {
this.id = id;
}
public void setBeginStageDate(final Date beginStageDate) {
this.beginStageDate = beginStageDate;
}
public void setClassify(final Integer classify) {
this.classify = classify;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof AfCollectAdd)) {
return false;
} else {
AfCollectAdd other = (AfCollectAdd)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$beginStageDate = this.getBeginStageDate();
Object other$beginStageDate = other.getBeginStageDate();
if (this$beginStageDate == null) {
if (other$beginStageDate != null) {
return false;
}
} else if (!this$beginStageDate.equals(other$beginStageDate)) {
return false;
}
Object this$classify = this.getClassify();
Object other$classify = other.getClassify();
if (this$classify == null) {
if (other$classify != null) {
return false;
}
} else if (!this$classify.equals(other$classify)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof AfCollectAdd;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $beginStageDate = this.getBeginStageDate();
result = result * 59 + ($beginStageDate == null ? 43 : $beginStageDate.hashCode());
Object $classify = this.getClassify();
result = result * 59 + ($classify == null ? 43 : $classify.hashCode());
return result;
}
public String toString() {
return "AfCollectAdd(id=" + this.getId() + ", beginStageDate=" + this.getBeginStageDate() + ", classify=" + this.getClassify() + ")";
}
}

@ -0,0 +1,362 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
@ApiModel(
value = "AfCollectTask对象",
description = "病案采集任务"
)
public class AfCollectTask implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id 雪花算法")
@TableId(
value = "id",
type = IdType.ASSIGN_ID
)
private Long id;
@ApiModelProperty("病案主键")
private String patientId;
@ApiModelProperty("af_archive_detail表id")
private Long afArchiveDetailId;
@ApiModelProperty("来源 1护理文书2 电子病历3 Pacs检查4心电图5手麻系统6 Lis检验7病案首页8长临医嘱")
private String sysflag;
@ApiModelProperty("开始时间")
private Date startTime;
@ApiModelProperty("结束时间")
private Date endTime;
@ApiModelProperty("任务状态 0未开始1:完成2重新采集")
private String state;
@ApiModelProperty("同步时间")
private Date syncTime;
@ApiModelProperty("最新重新采集时间")
private Date recollectTime;
@ApiModelProperty("最新重新采集人")
private String recollectName;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("报告唯一单号")
private String c1;
@ApiModelProperty("文件标题")
private String c2;
@ApiModelProperty("记账号")
private String c3;
public Long getId() {
return this.id;
}
public String getPatientId() {
return this.patientId;
}
public Long getAfArchiveDetailId() {
return this.afArchiveDetailId;
}
public String getSysflag() {
return this.sysflag;
}
public Date getStartTime() {
return this.startTime;
}
public Date getEndTime() {
return this.endTime;
}
public String getState() {
return this.state;
}
public Date getSyncTime() {
return this.syncTime;
}
public Date getRecollectTime() {
return this.recollectTime;
}
public String getRecollectName() {
return this.recollectName;
}
public String getRemark() {
return this.remark;
}
public String getC1() {
return this.c1;
}
public String getC2() {
return this.c2;
}
public String getC3() {
return this.c3;
}
public void setId(final Long id) {
this.id = id;
}
public void setPatientId(final String patientId) {
this.patientId = patientId;
}
public void setAfArchiveDetailId(final Long afArchiveDetailId) {
this.afArchiveDetailId = afArchiveDetailId;
}
public void setSysflag(final String sysflag) {
this.sysflag = sysflag;
}
public void setStartTime(final Date startTime) {
this.startTime = startTime;
}
public void setEndTime(final Date endTime) {
this.endTime = endTime;
}
public void setState(final String state) {
this.state = state;
}
public void setSyncTime(final Date syncTime) {
this.syncTime = syncTime;
}
public void setRecollectTime(final Date recollectTime) {
this.recollectTime = recollectTime;
}
public void setRecollectName(final String recollectName) {
this.recollectName = recollectName;
}
public void setRemark(final String remark) {
this.remark = remark;
}
public void setC1(final String c1) {
this.c1 = c1;
}
public void setC2(final String c2) {
this.c2 = c2;
}
public void setC3(final String c3) {
this.c3 = c3;
}
public String toString() {
return "AfCollectTask(id=" + this.getId() + ", patientId=" + this.getPatientId() + ", afArchiveDetailId=" + this.getAfArchiveDetailId() + ", sysflag=" + this.getSysflag() + ", startTime=" + this.getStartTime() + ", endTime=" + this.getEndTime() + ", state=" + this.getState() + ", syncTime=" + this.getSyncTime() + ", recollectTime=" + this.getRecollectTime() + ", recollectName=" + this.getRecollectName() + ", remark=" + this.getRemark() + ", c1=" + this.getC1() + ", c2=" + this.getC2() + ", c3=" + this.getC3() + ")";
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof AfCollectTask)) {
return false;
} else {
AfCollectTask other = (AfCollectTask)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$patientId = this.getPatientId();
Object other$patientId = other.getPatientId();
if (this$patientId == null) {
if (other$patientId != null) {
return false;
}
} else if (!this$patientId.equals(other$patientId)) {
return false;
}
Object this$afArchiveDetailId = this.getAfArchiveDetailId();
Object other$afArchiveDetailId = other.getAfArchiveDetailId();
if (this$afArchiveDetailId == null) {
if (other$afArchiveDetailId != null) {
return false;
}
} else if (!this$afArchiveDetailId.equals(other$afArchiveDetailId)) {
return false;
}
Object this$sysflag = this.getSysflag();
Object other$sysflag = other.getSysflag();
if (this$sysflag == null) {
if (other$sysflag != null) {
return false;
}
} else if (!this$sysflag.equals(other$sysflag)) {
return false;
}
Object this$startTime = this.getStartTime();
Object other$startTime = other.getStartTime();
if (this$startTime == null) {
if (other$startTime != null) {
return false;
}
} else if (!this$startTime.equals(other$startTime)) {
return false;
}
Object this$endTime = this.getEndTime();
Object other$endTime = other.getEndTime();
if (this$endTime == null) {
if (other$endTime != null) {
return false;
}
} else if (!this$endTime.equals(other$endTime)) {
return false;
}
Object this$state = this.getState();
Object other$state = other.getState();
if (this$state == null) {
if (other$state != null) {
return false;
}
} else if (!this$state.equals(other$state)) {
return false;
}
Object this$syncTime = this.getSyncTime();
Object other$syncTime = other.getSyncTime();
if (this$syncTime == null) {
if (other$syncTime != null) {
return false;
}
} else if (!this$syncTime.equals(other$syncTime)) {
return false;
}
Object this$recollectTime = this.getRecollectTime();
Object other$recollectTime = other.getRecollectTime();
if (this$recollectTime == null) {
if (other$recollectTime != null) {
return false;
}
} else if (!this$recollectTime.equals(other$recollectTime)) {
return false;
}
Object this$recollectName = this.getRecollectName();
Object other$recollectName = other.getRecollectName();
if (this$recollectName == null) {
if (other$recollectName != null) {
return false;
}
} else if (!this$recollectName.equals(other$recollectName)) {
return false;
}
Object this$remark = this.getRemark();
Object other$remark = other.getRemark();
if (this$remark == null) {
if (other$remark != null) {
return false;
}
} else if (!this$remark.equals(other$remark)) {
return false;
}
Object this$c1 = this.getC1();
Object other$c1 = other.getC1();
if (this$c1 == null) {
if (other$c1 != null) {
return false;
}
} else if (!this$c1.equals(other$c1)) {
return false;
}
Object this$c2 = this.getC2();
Object other$c2 = other.getC2();
if (this$c2 == null) {
if (other$c2 != null) {
return false;
}
} else if (!this$c2.equals(other$c2)) {
return false;
}
Object this$c3 = this.getC3();
Object other$c3 = other.getC3();
if (this$c3 == null) {
if (other$c3 != null) {
return false;
}
} else if (!this$c3.equals(other$c3)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof AfCollectTask;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $patientId = this.getPatientId();
result = result * 59 + ($patientId == null ? 43 : $patientId.hashCode());
Object $afArchiveDetailId = this.getAfArchiveDetailId();
result = result * 59 + ($afArchiveDetailId == null ? 43 : $afArchiveDetailId.hashCode());
Object $sysflag = this.getSysflag();
result = result * 59 + ($sysflag == null ? 43 : $sysflag.hashCode());
Object $startTime = this.getStartTime();
result = result * 59 + ($startTime == null ? 43 : $startTime.hashCode());
Object $endTime = this.getEndTime();
result = result * 59 + ($endTime == null ? 43 : $endTime.hashCode());
Object $state = this.getState();
result = result * 59 + ($state == null ? 43 : $state.hashCode());
Object $syncTime = this.getSyncTime();
result = result * 59 + ($syncTime == null ? 43 : $syncTime.hashCode());
Object $recollectTime = this.getRecollectTime();
result = result * 59 + ($recollectTime == null ? 43 : $recollectTime.hashCode());
Object $recollectName = this.getRecollectName();
result = result * 59 + ($recollectName == null ? 43 : $recollectName.hashCode());
Object $remark = this.getRemark();
result = result * 59 + ($remark == null ? 43 : $remark.hashCode());
Object $c1 = this.getC1();
result = result * 59 + ($c1 == null ? 43 : $c1.hashCode());
Object $c2 = this.getC2();
result = result * 59 + ($c2 == null ? 43 : $c2.hashCode());
Object $c3 = this.getC3();
result = result * 59 + ($c3 == null ? 43 : $c3.hashCode());
return result;
}
}

@ -0,0 +1,175 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
@ApiModel("文件库中的省中医病案采集表")
public class AfInterfaceCollect implements Serializable {
private Long id;
@ApiModelProperty("任务流水号")
private String serialnum;
@ApiModelProperty("记账号")
private String jzh;
@ApiModelProperty("任务数")
private Integer taskCount;
@ApiModelProperty("完成数")
private Integer completeCount;
@ApiModelProperty("创建时间")
private Date createTime;
public Long getId() {
return this.id;
}
public String getSerialnum() {
return this.serialnum;
}
public String getJzh() {
return this.jzh;
}
public Integer getTaskCount() {
return this.taskCount;
}
public Integer getCompleteCount() {
return this.completeCount;
}
public Date getCreateTime() {
return this.createTime;
}
public void setId(final Long id) {
this.id = id;
}
public void setSerialnum(final String serialnum) {
this.serialnum = serialnum;
}
public void setJzh(final String jzh) {
this.jzh = jzh;
}
public void setTaskCount(final Integer taskCount) {
this.taskCount = taskCount;
}
public void setCompleteCount(final Integer completeCount) {
this.completeCount = completeCount;
}
public void setCreateTime(final Date createTime) {
this.createTime = createTime;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof AfInterfaceCollect)) {
return false;
} else {
AfInterfaceCollect other = (AfInterfaceCollect)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$serialnum = this.getSerialnum();
Object other$serialnum = other.getSerialnum();
if (this$serialnum == null) {
if (other$serialnum != null) {
return false;
}
} else if (!this$serialnum.equals(other$serialnum)) {
return false;
}
Object this$jzh = this.getJzh();
Object other$jzh = other.getJzh();
if (this$jzh == null) {
if (other$jzh != null) {
return false;
}
} else if (!this$jzh.equals(other$jzh)) {
return false;
}
Object this$taskCount = this.getTaskCount();
Object other$taskCount = other.getTaskCount();
if (this$taskCount == null) {
if (other$taskCount != null) {
return false;
}
} else if (!this$taskCount.equals(other$taskCount)) {
return false;
}
Object this$completeCount = this.getCompleteCount();
Object other$completeCount = other.getCompleteCount();
if (this$completeCount == null) {
if (other$completeCount != null) {
return false;
}
} else if (!this$completeCount.equals(other$completeCount)) {
return false;
}
Object this$createTime = this.getCreateTime();
Object other$createTime = other.getCreateTime();
if (this$createTime == null) {
if (other$createTime != null) {
return false;
}
} else if (!this$createTime.equals(other$createTime)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof AfInterfaceCollect;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $serialnum = this.getSerialnum();
result = result * 59 + ($serialnum == null ? 43 : $serialnum.hashCode());
Object $jzh = this.getJzh();
result = result * 59 + ($jzh == null ? 43 : $jzh.hashCode());
Object $taskCount = this.getTaskCount();
result = result * 59 + ($taskCount == null ? 43 : $taskCount.hashCode());
Object $completeCount = this.getCompleteCount();
result = result * 59 + ($completeCount == null ? 43 : $completeCount.hashCode());
Object $createTime = this.getCreateTime();
result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
return result;
}
public String toString() {
return "AfInterfaceCollect(id=" + this.getId() + ", serialnum=" + this.getSerialnum() + ", jzh=" + this.getJzh() + ", taskCount=" + this.getTaskCount() + ", completeCount=" + this.getCompleteCount() + ", createTime=" + this.getCreateTime() + ")";
}
}

@ -0,0 +1,224 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
@ApiModel("文件库中的省中医病案采集-子任务表")
public class AfInterfaceCollectSub implements Serializable {
@TableId(
value = "id",
type = IdType.ASSIGN_ID
)
private Long id;
@ApiModelProperty("af_interface_collect表id")
private Long afInterfaceCollectId;
@ApiModelProperty("采集器id")
private String collectsysCode;
@ApiModelProperty("子任务流水号 同一份文件子任务需一致")
private String serialnumSub;
@ApiModelProperty("记账号")
private String jzh;
@ApiModelProperty("分类名称")
private String assortName;
@ApiModelProperty("状态 0:未发起1成功2失败")
private Integer state;
@ApiModelProperty("请求信息")
private String requestMessage;
public Long getId() {
return this.id;
}
public Long getAfInterfaceCollectId() {
return this.afInterfaceCollectId;
}
public String getCollectsysCode() {
return this.collectsysCode;
}
public String getSerialnumSub() {
return this.serialnumSub;
}
public String getJzh() {
return this.jzh;
}
public String getAssortName() {
return this.assortName;
}
public Integer getState() {
return this.state;
}
public String getRequestMessage() {
return this.requestMessage;
}
public void setId(final Long id) {
this.id = id;
}
public void setAfInterfaceCollectId(final Long afInterfaceCollectId) {
this.afInterfaceCollectId = afInterfaceCollectId;
}
public void setCollectsysCode(final String collectsysCode) {
this.collectsysCode = collectsysCode;
}
public void setSerialnumSub(final String serialnumSub) {
this.serialnumSub = serialnumSub;
}
public void setJzh(final String jzh) {
this.jzh = jzh;
}
public void setAssortName(final String assortName) {
this.assortName = assortName;
}
public void setState(final Integer state) {
this.state = state;
}
public void setRequestMessage(final String requestMessage) {
this.requestMessage = requestMessage;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof AfInterfaceCollectSub)) {
return false;
} else {
AfInterfaceCollectSub other = (AfInterfaceCollectSub)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$afInterfaceCollectId = this.getAfInterfaceCollectId();
Object other$afInterfaceCollectId = other.getAfInterfaceCollectId();
if (this$afInterfaceCollectId == null) {
if (other$afInterfaceCollectId != null) {
return false;
}
} else if (!this$afInterfaceCollectId.equals(other$afInterfaceCollectId)) {
return false;
}
Object this$collectsysCode = this.getCollectsysCode();
Object other$collectsysCode = other.getCollectsysCode();
if (this$collectsysCode == null) {
if (other$collectsysCode != null) {
return false;
}
} else if (!this$collectsysCode.equals(other$collectsysCode)) {
return false;
}
Object this$serialnumSub = this.getSerialnumSub();
Object other$serialnumSub = other.getSerialnumSub();
if (this$serialnumSub == null) {
if (other$serialnumSub != null) {
return false;
}
} else if (!this$serialnumSub.equals(other$serialnumSub)) {
return false;
}
Object this$jzh = this.getJzh();
Object other$jzh = other.getJzh();
if (this$jzh == null) {
if (other$jzh != null) {
return false;
}
} else if (!this$jzh.equals(other$jzh)) {
return false;
}
Object this$assortName = this.getAssortName();
Object other$assortName = other.getAssortName();
if (this$assortName == null) {
if (other$assortName != null) {
return false;
}
} else if (!this$assortName.equals(other$assortName)) {
return false;
}
Object this$state = this.getState();
Object other$state = other.getState();
if (this$state == null) {
if (other$state != null) {
return false;
}
} else if (!this$state.equals(other$state)) {
return false;
}
Object this$requestMessage = this.getRequestMessage();
Object other$requestMessage = other.getRequestMessage();
if (this$requestMessage == null) {
if (other$requestMessage != null) {
return false;
}
} else if (!this$requestMessage.equals(other$requestMessage)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof AfInterfaceCollectSub;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $afInterfaceCollectId = this.getAfInterfaceCollectId();
result = result * 59 + ($afInterfaceCollectId == null ? 43 : $afInterfaceCollectId.hashCode());
Object $collectsysCode = this.getCollectsysCode();
result = result * 59 + ($collectsysCode == null ? 43 : $collectsysCode.hashCode());
Object $serialnumSub = this.getSerialnumSub();
result = result * 59 + ($serialnumSub == null ? 43 : $serialnumSub.hashCode());
Object $jzh = this.getJzh();
result = result * 59 + ($jzh == null ? 43 : $jzh.hashCode());
Object $assortName = this.getAssortName();
result = result * 59 + ($assortName == null ? 43 : $assortName.hashCode());
Object $state = this.getState();
result = result * 59 + ($state == null ? 43 : $state.hashCode());
Object $requestMessage = this.getRequestMessage();
result = result * 59 + ($requestMessage == null ? 43 : $requestMessage.hashCode());
return result;
}
public String toString() {
return "AfInterfaceCollectSub(id=" + this.getId() + ", afInterfaceCollectId=" + this.getAfInterfaceCollectId() + ", collectsysCode=" + this.getCollectsysCode() + ", serialnumSub=" + this.getSerialnumSub() + ", jzh=" + this.getJzh() + ", assortName=" + this.getAssortName() + ", state=" + this.getState() + ", requestMessage=" + this.getRequestMessage() + ")";
}
}

@ -0,0 +1,170 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.beans.ConstructorProperties;
@ApiModel("响应")
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;
}
public static <T> CommonResult<T> success(T data) {
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
}
public static <T> CommonResult<T> success(T data, String message) {
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data);
}
public static <T> CommonResult<T> failed(IErrorCode errorCode) {
return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(),null);
}
public static <T> CommonResult<T> failed(IErrorCode errorCode, String message) {
return new CommonResult<T>(errorCode.getCode(), message,null);
}
public static <T> CommonResult<T> failed(String message) {
return new CommonResult<T>(ResultCode.FAILED.getCode(), message,null);
}
public static <T> CommonResult<T> failed() {
return failed((IErrorCode)ResultCode.FAILED);
}
public static <T> CommonResult<T> validateFailed() {
return failed((IErrorCode)ResultCode.VALIDATE_FAILED);
}
public static <T> CommonResult<T> validateFailed(String message) {
return new CommonResult<T>(ResultCode.VALIDATE_FAILED.getCode(), message,null);
}
public static <T> CommonResult<T> unauthorized(T data) {
return new CommonResult<T>(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data);
}
public static <T> CommonResult<T> preventreplay(T data) {
return new CommonResult<T>(ResultCode.PREVENT_REPLAY.getCode(), ResultCode.PREVENT_REPLAY.getMessage(), data);
}
public static <T> CommonResult<T> forbidden(T data) {
return new CommonResult<T>(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data);
}
public Integer getCode() {
return this.code;
}
public String getMsg() {
return this.msg;
}
public T getData() {
return this.data;
}
public void setCode(final Integer code) {
this.code = code;
}
public void setMsg(final String msg) {
this.msg = msg;
}
public void setData(final T data) {
this.data = data;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof CommonResult)) {
return false;
} else {
CommonResult<?> other = (CommonResult)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$code = this.getCode();
Object other$code = other.getCode();
if (this$code == null) {
if (other$code != null) {
return false;
}
} else if (!this$code.equals(other$code)) {
return false;
}
Object this$msg = this.getMsg();
Object other$msg = other.getMsg();
if (this$msg == null) {
if (other$msg != null) {
return false;
}
} else if (!this$msg.equals(other$msg)) {
return false;
}
Object this$data = this.getData();
Object other$data = other.getData();
if (this$data == null) {
if (other$data != null) {
return false;
}
} else if (!this$data.equals(other$data)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof CommonResult;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $code = this.getCode();
result = result * 59 + ($code == null ? 43 : $code.hashCode());
Object $msg = this.getMsg();
result = result * 59 + ($msg == null ? 43 : $msg.hashCode());
Object $data = this.getData();
result = result * 59 + ($data == null ? 43 : $data.hashCode());
return result;
}
public String toString() {
return "CommonResult(code=" + this.getCode() + ", msg=" + this.getMsg() + ", data=" + this.getData() + ")";
}
@ConstructorProperties({"code", "msg", "data"})
public CommonResult(final Integer code, final String msg, final T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public CommonResult() {
}
}

@ -0,0 +1,12 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
public interface IErrorCode {
Integer getCode();
String getMessage();
}

@ -0,0 +1,82 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import java.util.List;
public class JzhListSync {
private String jzh;
private List<TaskDetail> taskDetails;
public String getJzh() {
return this.jzh;
}
public List<TaskDetail> getTaskDetails() {
return this.taskDetails;
}
public void setJzh(final String jzh) {
this.jzh = jzh;
}
public void setTaskDetails(final List<TaskDetail> taskDetails) {
this.taskDetails = taskDetails;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof JzhListSync)) {
return false;
} else {
JzhListSync other = (JzhListSync)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$jzh = this.getJzh();
Object other$jzh = other.getJzh();
if (this$jzh == null) {
if (other$jzh != null) {
return false;
}
} else if (!this$jzh.equals(other$jzh)) {
return false;
}
Object this$taskDetails = this.getTaskDetails();
Object other$taskDetails = other.getTaskDetails();
if (this$taskDetails == null) {
if (other$taskDetails != null) {
return false;
}
} else if (!this$taskDetails.equals(other$taskDetails)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof JzhListSync;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $jzh = this.getJzh();
result = result * 59 + ($jzh == null ? 43 : $jzh.hashCode());
Object $taskDetails = this.getTaskDetails();
result = result * 59 + ($taskDetails == null ? 43 : $taskDetails.hashCode());
return result;
}
public String toString() {
return "JzhListSync(jzh=" + this.getJzh() + ", taskDetails=" + this.getTaskDetails() + ")";
}
}

@ -0,0 +1,137 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel("错误日志表")
public class MrReportError {
@ApiModelProperty("id")
@TableId(
value = "id",
type = IdType.ASSIGN_ID
)
private Long id;
@ApiModelProperty("上报信息")
private String xml;
@ApiModelProperty("上报类型")
private Integer reportType;
@ApiModelProperty("上报时间")
private Date createTime;
public Long getId() {
return this.id;
}
public String getXml() {
return this.xml;
}
public Integer getReportType() {
return this.reportType;
}
public Date getCreateTime() {
return this.createTime;
}
public void setId(final Long id) {
this.id = id;
}
public void setXml(final String xml) {
this.xml = xml;
}
public void setReportType(final Integer reportType) {
this.reportType = reportType;
}
public void setCreateTime(final Date createTime) {
this.createTime = createTime;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof MrReportError)) {
return false;
} else {
MrReportError other = (MrReportError)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$xml = this.getXml();
Object other$xml = other.getXml();
if (this$xml == null) {
if (other$xml != null) {
return false;
}
} else if (!this$xml.equals(other$xml)) {
return false;
}
Object this$reportType = this.getReportType();
Object other$reportType = other.getReportType();
if (this$reportType == null) {
if (other$reportType != null) {
return false;
}
} else if (!this$reportType.equals(other$reportType)) {
return false;
}
Object this$createTime = this.getCreateTime();
Object other$createTime = other.getCreateTime();
if (this$createTime == null) {
if (other$createTime != null) {
return false;
}
} else if (!this$createTime.equals(other$createTime)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof MrReportError;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $xml = this.getXml();
result = result * 59 + ($xml == null ? 43 : $xml.hashCode());
Object $reportType = this.getReportType();
result = result * 59 + ($reportType == null ? 43 : $reportType.hashCode());
Object $createTime = this.getCreateTime();
result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
return result;
}
public String toString() {
return "MrReportError(id=" + this.getId() + ", xml=" + this.getXml() + ", reportType=" + this.getReportType() + ", createTime=" + this.getCreateTime() + ")";
}
}

@ -0,0 +1,87 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@ApiModel("梅州完整性校验同步类")
public class MzSync {
@ApiModelProperty("记账号")
private String jzh;
@ApiModelProperty("文件详情列表")
private List<MzSyncDetails> mzSyncDetails;
public String getJzh() {
return this.jzh;
}
public List<MzSyncDetails> getMzSyncDetails() {
return this.mzSyncDetails;
}
public void setJzh(final String jzh) {
this.jzh = jzh;
}
public void setMzSyncDetails(final List<MzSyncDetails> mzSyncDetails) {
this.mzSyncDetails = mzSyncDetails;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof MzSync)) {
return false;
} else {
MzSync other = (MzSync)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$jzh = this.getJzh();
Object other$jzh = other.getJzh();
if (this$jzh == null) {
if (other$jzh != null) {
return false;
}
} else if (!this$jzh.equals(other$jzh)) {
return false;
}
Object this$mzSyncDetails = this.getMzSyncDetails();
Object other$mzSyncDetails = other.getMzSyncDetails();
if (this$mzSyncDetails == null) {
if (other$mzSyncDetails != null) {
return false;
}
} else if (!this$mzSyncDetails.equals(other$mzSyncDetails)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof MzSync;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $jzh = this.getJzh();
result = result * 59 + ($jzh == null ? 43 : $jzh.hashCode());
Object $mzSyncDetails = this.getMzSyncDetails();
result = result * 59 + ($mzSyncDetails == null ? 43 : $mzSyncDetails.hashCode());
return result;
}
public String toString() {
return "MzSync(jzh=" + this.getJzh() + ", mzSyncDetails=" + this.getMzSyncDetails() + ")";
}
}

@ -0,0 +1,175 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@ApiModel("文件详情")
public class MzSyncDetails {
@ApiModelProperty("采集流水号")
private String serialnum;
@ApiModelProperty("文件标题")
private String fileTitle;
@ApiModelProperty("文件url")
private String fileUrl;
@ApiModelProperty("分类名称")
private String assortName;
@ApiModelProperty("采集器标识")
private String collectid;
@ApiModelProperty("创建时间")
private Date createTime;
public String getSerialnum() {
return this.serialnum;
}
public String getFileTitle() {
return this.fileTitle;
}
public String getFileUrl() {
return this.fileUrl;
}
public String getAssortName() {
return this.assortName;
}
public String getCollectid() {
return this.collectid;
}
public Date getCreateTime() {
return this.createTime;
}
public void setSerialnum(final String serialnum) {
this.serialnum = serialnum;
}
public void setFileTitle(final String fileTitle) {
this.fileTitle = fileTitle;
}
public void setFileUrl(final String fileUrl) {
this.fileUrl = fileUrl;
}
public void setAssortName(final String assortName) {
this.assortName = assortName;
}
public void setCollectid(final String collectid) {
this.collectid = collectid;
}
public void setCreateTime(final Date createTime) {
this.createTime = createTime;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof MzSyncDetails)) {
return false;
} else {
MzSyncDetails other = (MzSyncDetails)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$serialnum = this.getSerialnum();
Object other$serialnum = other.getSerialnum();
if (this$serialnum == null) {
if (other$serialnum != null) {
return false;
}
} else if (!this$serialnum.equals(other$serialnum)) {
return false;
}
Object this$fileTitle = this.getFileTitle();
Object other$fileTitle = other.getFileTitle();
if (this$fileTitle == null) {
if (other$fileTitle != null) {
return false;
}
} else if (!this$fileTitle.equals(other$fileTitle)) {
return false;
}
Object this$fileUrl = this.getFileUrl();
Object other$fileUrl = other.getFileUrl();
if (this$fileUrl == null) {
if (other$fileUrl != null) {
return false;
}
} else if (!this$fileUrl.equals(other$fileUrl)) {
return false;
}
Object this$assortName = this.getAssortName();
Object other$assortName = other.getAssortName();
if (this$assortName == null) {
if (other$assortName != null) {
return false;
}
} else if (!this$assortName.equals(other$assortName)) {
return false;
}
Object this$collectid = this.getCollectid();
Object other$collectid = other.getCollectid();
if (this$collectid == null) {
if (other$collectid != null) {
return false;
}
} else if (!this$collectid.equals(other$collectid)) {
return false;
}
Object this$createTime = this.getCreateTime();
Object other$createTime = other.getCreateTime();
if (this$createTime == null) {
if (other$createTime != null) {
return false;
}
} else if (!this$createTime.equals(other$createTime)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof MzSyncDetails;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $serialnum = this.getSerialnum();
result = result * 59 + ($serialnum == null ? 43 : $serialnum.hashCode());
Object $fileTitle = this.getFileTitle();
result = result * 59 + ($fileTitle == null ? 43 : $fileTitle.hashCode());
Object $fileUrl = this.getFileUrl();
result = result * 59 + ($fileUrl == null ? 43 : $fileUrl.hashCode());
Object $assortName = this.getAssortName();
result = result * 59 + ($assortName == null ? 43 : $assortName.hashCode());
Object $collectid = this.getCollectid();
result = result * 59 + ($collectid == null ? 43 : $collectid.hashCode());
Object $createTime = this.getCreateTime();
result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
return result;
}
public String toString() {
return "MzSyncDetails(serialnum=" + this.getSerialnum() + ", fileTitle=" + this.getFileTitle() + ", fileUrl=" + this.getFileUrl() + ", assortName=" + this.getAssortName() + ", collectid=" + this.getCollectid() + ", createTime=" + this.getCreateTime() + ")";
}
}

@ -0,0 +1,150 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
public class ReportDownDto {
@ApiModelProperty("采集器id")
private String collectorid;
@ApiModelProperty("采集器ip")
private String ip;
@ApiModelProperty("文件信息")
private List<ReportDownScanFileDto> scanfiles;
private ReportDownPatientDto patient;
@ApiModelProperty("分类id")
private String assortid;
public String getCollectorid() {
return this.collectorid;
}
public String getIp() {
return this.ip;
}
public List<ReportDownScanFileDto> getScanfiles() {
return this.scanfiles;
}
public ReportDownPatientDto getPatient() {
return this.patient;
}
public String getAssortid() {
return this.assortid;
}
public void setCollectorid(final String collectorid) {
this.collectorid = collectorid;
}
public void setIp(final String ip) {
this.ip = ip;
}
public void setScanfiles(final List<ReportDownScanFileDto> scanfiles) {
this.scanfiles = scanfiles;
}
public void setPatient(final ReportDownPatientDto patient) {
this.patient = patient;
}
public void setAssortid(final String assortid) {
this.assortid = assortid;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ReportDownDto)) {
return false;
} else {
ReportDownDto other = (ReportDownDto)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$collectorid = this.getCollectorid();
Object other$collectorid = other.getCollectorid();
if (this$collectorid == null) {
if (other$collectorid != null) {
return false;
}
} else if (!this$collectorid.equals(other$collectorid)) {
return false;
}
Object this$ip = this.getIp();
Object other$ip = other.getIp();
if (this$ip == null) {
if (other$ip != null) {
return false;
}
} else if (!this$ip.equals(other$ip)) {
return false;
}
Object this$scanfiles = this.getScanfiles();
Object other$scanfiles = other.getScanfiles();
if (this$scanfiles == null) {
if (other$scanfiles != null) {
return false;
}
} else if (!this$scanfiles.equals(other$scanfiles)) {
return false;
}
Object this$patient = this.getPatient();
Object other$patient = other.getPatient();
if (this$patient == null) {
if (other$patient != null) {
return false;
}
} else if (!this$patient.equals(other$patient)) {
return false;
}
Object this$assortid = this.getAssortid();
Object other$assortid = other.getAssortid();
if (this$assortid == null) {
if (other$assortid != null) {
return false;
}
} else if (!this$assortid.equals(other$assortid)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ReportDownDto;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $collectorid = this.getCollectorid();
result = result * 59 + ($collectorid == null ? 43 : $collectorid.hashCode());
Object $ip = this.getIp();
result = result * 59 + ($ip == null ? 43 : $ip.hashCode());
Object $scanfiles = this.getScanfiles();
result = result * 59 + ($scanfiles == null ? 43 : $scanfiles.hashCode());
Object $patient = this.getPatient();
result = result * 59 + ($patient == null ? 43 : $patient.hashCode());
Object $assortid = this.getAssortid();
result = result * 59 + ($assortid == null ? 43 : $assortid.hashCode());
return result;
}
public String toString() {
return "ReportDownDto(collectorid=" + this.getCollectorid() + ", ip=" + this.getIp() + ", scanfiles=" + this.getScanfiles() + ", patient=" + this.getPatient() + ", assortid=" + this.getAssortid() + ")";
}
}

@ -0,0 +1,106 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModelProperty;
public class ReportDownPatientDto {
@ApiModelProperty("记帐号")
private String jzh;
@ApiModelProperty("住院号")
private String inPatientNo;
@ApiModelProperty("住院次数")
private String visitId;
public String getJzh() {
return this.jzh;
}
public String getInPatientNo() {
return this.inPatientNo;
}
public String getVisitId() {
return this.visitId;
}
public void setJzh(final String jzh) {
this.jzh = jzh;
}
public void setInPatientNo(final String inPatientNo) {
this.inPatientNo = inPatientNo;
}
public void setVisitId(final String visitId) {
this.visitId = visitId;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ReportDownPatientDto)) {
return false;
} else {
ReportDownPatientDto other = (ReportDownPatientDto)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$jzh = this.getJzh();
Object other$jzh = other.getJzh();
if (this$jzh == null) {
if (other$jzh != null) {
return false;
}
} else if (!this$jzh.equals(other$jzh)) {
return false;
}
Object this$inPatientNo = this.getInPatientNo();
Object other$inPatientNo = other.getInPatientNo();
if (this$inPatientNo == null) {
if (other$inPatientNo != null) {
return false;
}
} else if (!this$inPatientNo.equals(other$inPatientNo)) {
return false;
}
Object this$visitId = this.getVisitId();
Object other$visitId = other.getVisitId();
if (this$visitId == null) {
if (other$visitId != null) {
return false;
}
} else if (!this$visitId.equals(other$visitId)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ReportDownPatientDto;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $jzh = this.getJzh();
result = result * 59 + ($jzh == null ? 43 : $jzh.hashCode());
Object $inPatientNo = this.getInPatientNo();
result = result * 59 + ($inPatientNo == null ? 43 : $inPatientNo.hashCode());
Object $visitId = this.getVisitId();
result = result * 59 + ($visitId == null ? 43 : $visitId.hashCode());
return result;
}
public String toString() {
return "ReportDownPatientDto(jzh=" + this.getJzh() + ", inPatientNo=" + this.getInPatientNo() + ", visitId=" + this.getVisitId() + ")";
}
}

@ -0,0 +1,178 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModelProperty;
public class ReportDownScanFileDto {
@ApiModelProperty("文件标题")
private String filetitle;
@ApiModelProperty("采集类型(文件来源 1:采集器2扫描生产软件)")
private int filesource;
@ApiModelProperty("下载类型(1:服务器本地2ftp服务器3共享文件夹)")
private int filestoragetype;
@ApiModelProperty("下载地址")
private String downurl;
@ApiModelProperty("档案信息")
private String recordid;
@ApiModelProperty("采集流水号")
private String serialnum;
@ApiModelProperty("任务id")
private Long taskid;
public String getFiletitle() {
return this.filetitle;
}
public int getFilesource() {
return this.filesource;
}
public int getFilestoragetype() {
return this.filestoragetype;
}
public String getDownurl() {
return this.downurl;
}
public String getRecordid() {
return this.recordid;
}
public String getSerialnum() {
return this.serialnum;
}
public Long getTaskid() {
return this.taskid;
}
public void setFiletitle(final String filetitle) {
this.filetitle = filetitle;
}
public void setFilesource(final int filesource) {
this.filesource = filesource;
}
public void setFilestoragetype(final int filestoragetype) {
this.filestoragetype = filestoragetype;
}
public void setDownurl(final String downurl) {
this.downurl = downurl;
}
public void setRecordid(final String recordid) {
this.recordid = recordid;
}
public void setSerialnum(final String serialnum) {
this.serialnum = serialnum;
}
public void setTaskid(final Long taskid) {
this.taskid = taskid;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ReportDownScanFileDto)) {
return false;
} else {
ReportDownScanFileDto other = (ReportDownScanFileDto)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$filetitle = this.getFiletitle();
Object other$filetitle = other.getFiletitle();
if (this$filetitle == null) {
if (other$filetitle != null) {
return false;
}
} else if (!this$filetitle.equals(other$filetitle)) {
return false;
}
if (this.getFilesource() != other.getFilesource()) {
return false;
} else if (this.getFilestoragetype() != other.getFilestoragetype()) {
return false;
} else {
Object this$downurl = this.getDownurl();
Object other$downurl = other.getDownurl();
if (this$downurl == null) {
if (other$downurl != null) {
return false;
}
} else if (!this$downurl.equals(other$downurl)) {
return false;
}
Object this$recordid = this.getRecordid();
Object other$recordid = other.getRecordid();
if (this$recordid == null) {
if (other$recordid != null) {
return false;
}
} else if (!this$recordid.equals(other$recordid)) {
return false;
}
Object this$serialnum = this.getSerialnum();
Object other$serialnum = other.getSerialnum();
if (this$serialnum == null) {
if (other$serialnum != null) {
return false;
}
} else if (!this$serialnum.equals(other$serialnum)) {
return false;
}
Object this$taskid = this.getTaskid();
Object other$taskid = other.getTaskid();
if (this$taskid == null) {
if (other$taskid != null) {
return false;
}
} else if (!this$taskid.equals(other$taskid)) {
return false;
}
return true;
}
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ReportDownScanFileDto;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $filetitle = this.getFiletitle();
result = result * 59 + ($filetitle == null ? 43 : $filetitle.hashCode());
result = result * 59 + this.getFilesource();
result = result * 59 + this.getFilestoragetype();
Object $downurl = this.getDownurl();
result = result * 59 + ($downurl == null ? 43 : $downurl.hashCode());
Object $recordid = this.getRecordid();
result = result * 59 + ($recordid == null ? 43 : $recordid.hashCode());
Object $serialnum = this.getSerialnum();
result = result * 59 + ($serialnum == null ? 43 : $serialnum.hashCode());
Object $taskid = this.getTaskid();
result = result * 59 + ($taskid == null ? 43 : $taskid.hashCode());
return result;
}
public String toString() {
return "ReportDownScanFileDto(filetitle=" + this.getFiletitle() + ", filesource=" + this.getFilesource() + ", filestoragetype=" + this.getFilestoragetype() + ", downurl=" + this.getDownurl() + ", recordid=" + this.getRecordid() + ", serialnum=" + this.getSerialnum() + ", taskid=" + this.getTaskid() + ")";
}
}

@ -0,0 +1,33 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
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;
}
public Integer getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
}

@ -0,0 +1,90 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import org.springframework.util.StringUtils;
public class TableJsonRead {
public <T> T Read(String path, String fileName, Class<T> clazz) {
String currentPath = this.CurrentPath();
path = currentPath + "\\" + path;
StringBuilder sb = new StringBuilder();
T dto = null;
File file = new File(path + "\\" + fileName);
try {
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
} else {
BufferedReader bufferedReader = null;
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String line;
while(!StringUtils.isEmpty(line = bufferedReader.readLine())) {
sb.append(line);
}
if (sb.length() > 0) {
ObjectMapper objectMapper = new ObjectMapper();
dto = (T)objectMapper.readValue(sb.toString(), clazz);
}
bufferedReader.close();
}
return dto;
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
private String CurrentPath() {
File dir = new File(".");
String currentpath = "";
try {
currentpath = dir.getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
return currentpath;
}
public void Save(String path, String fileName, String data) {
String currentPath = this.CurrentPath();
path = currentPath + "\\" + path;
FileWriter fwriter = null;
try {
fwriter = new FileWriter(path + "\\" + fileName);
fwriter.write(data);
} catch (IOException ex) {
ex.printStackTrace();
} finally {
try {
fwriter.flush();
fwriter.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}

@ -0,0 +1,101 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
public class TaskDetail {
private Long id;
private String fileTitle;
private String state;
public Long getId() {
return this.id;
}
public String getFileTitle() {
return this.fileTitle;
}
public String getState() {
return this.state;
}
public void setId(final Long id) {
this.id = id;
}
public void setFileTitle(final String fileTitle) {
this.fileTitle = fileTitle;
}
public void setState(final String state) {
this.state = state;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof TaskDetail)) {
return false;
} else {
TaskDetail other = (TaskDetail)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$id = this.getId();
Object other$id = other.getId();
if (this$id == null) {
if (other$id != null) {
return false;
}
} else if (!this$id.equals(other$id)) {
return false;
}
Object this$fileTitle = this.getFileTitle();
Object other$fileTitle = other.getFileTitle();
if (this$fileTitle == null) {
if (other$fileTitle != null) {
return false;
}
} else if (!this$fileTitle.equals(other$fileTitle)) {
return false;
}
Object this$state = this.getState();
Object other$state = other.getState();
if (this$state == null) {
if (other$state != null) {
return false;
}
} else if (!this$state.equals(other$state)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof TaskDetail;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $id = this.getId();
result = result * 59 + ($id == null ? 43 : $id.hashCode());
Object $fileTitle = this.getFileTitle();
result = result * 59 + ($fileTitle == null ? 43 : $fileTitle.hashCode());
Object $state = this.getState();
result = result * 59 + ($state == null ? 43 : $state.hashCode());
return result;
}
public String toString() {
return "TaskDetail(id=" + this.getId() + ", fileTitle=" + this.getFileTitle() + ", state=" + this.getState() + ")";
}
}

@ -0,0 +1,147 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import io.swagger.annotations.ApiModel;
import java.util.Date;
@ApiModel("手麻采集器")
public class VDocumentPdf {
private String ;
private String ;
private String WEB_ADDRESS;
private String PATIENT_ID;
private Date ARCHIVE_DATE_TIME;
public String get() {
return this.;
}
public String get() {
return this.;
}
public String getWEB_ADDRESS() {
return this.WEB_ADDRESS;
}
public String getPATIENT_ID() {
return this.PATIENT_ID;
}
public Date getARCHIVE_DATE_TIME() {
return this.ARCHIVE_DATE_TIME;
}
public void set(final String ) {
this. = ;
}
public void set(final String ) {
this. = ;
}
public void setWEB_ADDRESS(final String WEB_ADDRESS) {
this.WEB_ADDRESS = WEB_ADDRESS;
}
public void setPATIENT_ID(final String PATIENT_ID) {
this.PATIENT_ID = PATIENT_ID;
}
public void setARCHIVE_DATE_TIME(final Date ARCHIVE_DATE_TIME) {
this.ARCHIVE_DATE_TIME = ARCHIVE_DATE_TIME;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof VDocumentPdf)) {
return false;
} else {
VDocumentPdf other = (VDocumentPdf)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$ = this.get();
Object other$ = other.get();
if (this$ == null) {
if (other$ != null) {
return false;
}
} else if (!this$.equals(other$)) {
return false;
}
Object this$ = this.get();
Object other$ = other.get();
if (this$ == null) {
if (other$ != null) {
return false;
}
} else if (!this$.equals(other$)) {
return false;
}
Object this$WEB_ADDRESS = this.getWEB_ADDRESS();
Object other$WEB_ADDRESS = other.getWEB_ADDRESS();
if (this$WEB_ADDRESS == null) {
if (other$WEB_ADDRESS != null) {
return false;
}
} else if (!this$WEB_ADDRESS.equals(other$WEB_ADDRESS)) {
return false;
}
Object this$PATIENT_ID = this.getPATIENT_ID();
Object other$PATIENT_ID = other.getPATIENT_ID();
if (this$PATIENT_ID == null) {
if (other$PATIENT_ID != null) {
return false;
}
} else if (!this$PATIENT_ID.equals(other$PATIENT_ID)) {
return false;
}
Object this$ARCHIVE_DATE_TIME = this.getARCHIVE_DATE_TIME();
Object other$ARCHIVE_DATE_TIME = other.getARCHIVE_DATE_TIME();
if (this$ARCHIVE_DATE_TIME == null) {
if (other$ARCHIVE_DATE_TIME != null) {
return false;
}
} else if (!this$ARCHIVE_DATE_TIME.equals(other$ARCHIVE_DATE_TIME)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof VDocumentPdf;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $ = this.get();
result = result * 59 + ($ == null ? 43 : $.hashCode());
Object $ = this.get();
result = result * 59 + ($ == null ? 43 : $.hashCode());
Object $WEB_ADDRESS = this.getWEB_ADDRESS();
result = result * 59 + ($WEB_ADDRESS == null ? 43 : $WEB_ADDRESS.hashCode());
Object $PATIENT_ID = this.getPATIENT_ID();
result = result * 59 + ($PATIENT_ID == null ? 43 : $PATIENT_ID.hashCode());
Object $ARCHIVE_DATE_TIME = this.getARCHIVE_DATE_TIME();
result = result * 59 + ($ARCHIVE_DATE_TIME == null ? 43 : $ARCHIVE_DATE_TIME.hashCode());
return result;
}
public String toString() {
return "VDocumentPdf(手术申请单号=" + this.get() + ", 文书名=" + this.get() + ", WEB_ADDRESS=" + this.getWEB_ADDRESS() + ", PATIENT_ID=" + this.getPATIENT_ID() + ", ARCHIVE_DATE_TIME=" + this.getARCHIVE_DATE_TIME() + ")";
}
}

@ -0,0 +1,203 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
@ApiModel(
value = "ZdAssort对象",
description = "病案分类"
)
public class ZdAssort implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@ApiModelProperty("分类id")
private String assortId;
@ApiModelProperty("分类名称")
private String assortName;
@ApiModelProperty("分类排序")
private Integer assortSort;
@ApiModelProperty("是否启用 1是0否")
private Integer effective;
@ApiModelProperty("是否校验 1是0否")
private Integer isCheck;
@ApiModelProperty("代码分类")
private String assortCode;
@ApiModelProperty("等级")
private Integer level;
public String getAssortId() {
return this.assortId;
}
public String getAssortName() {
return this.assortName;
}
public Integer getAssortSort() {
return this.assortSort;
}
public Integer getEffective() {
return this.effective;
}
public Integer getIsCheck() {
return this.isCheck;
}
public String getAssortCode() {
return this.assortCode;
}
public Integer getLevel() {
return this.level;
}
public void setAssortId(final String assortId) {
this.assortId = assortId;
}
public void setAssortName(final String assortName) {
this.assortName = assortName;
}
public void setAssortSort(final Integer assortSort) {
this.assortSort = assortSort;
}
public void setEffective(final Integer effective) {
this.effective = effective;
}
public void setIsCheck(final Integer isCheck) {
this.isCheck = isCheck;
}
public void setAssortCode(final String assortCode) {
this.assortCode = assortCode;
}
public void setLevel(final Integer level) {
this.level = level;
}
public String toString() {
return "ZdAssort(assortId=" + this.getAssortId() + ", assortName=" + this.getAssortName() + ", assortSort=" + this.getAssortSort() + ", effective=" + this.getEffective() + ", isCheck=" + this.getIsCheck() + ", assortCode=" + this.getAssortCode() + ", level=" + this.getLevel() + ")";
}
public boolean equals(final Object o) {
if (o == this) {
return true;
} else if (!(o instanceof ZdAssort)) {
return false;
} else {
ZdAssort other = (ZdAssort)o;
if (!other.canEqual(this)) {
return false;
} else {
Object this$assortId = this.getAssortId();
Object other$assortId = other.getAssortId();
if (this$assortId == null) {
if (other$assortId != null) {
return false;
}
} else if (!this$assortId.equals(other$assortId)) {
return false;
}
Object this$assortName = this.getAssortName();
Object other$assortName = other.getAssortName();
if (this$assortName == null) {
if (other$assortName != null) {
return false;
}
} else if (!this$assortName.equals(other$assortName)) {
return false;
}
Object this$assortSort = this.getAssortSort();
Object other$assortSort = other.getAssortSort();
if (this$assortSort == null) {
if (other$assortSort != null) {
return false;
}
} else if (!this$assortSort.equals(other$assortSort)) {
return false;
}
Object this$effective = this.getEffective();
Object other$effective = other.getEffective();
if (this$effective == null) {
if (other$effective != null) {
return false;
}
} else if (!this$effective.equals(other$effective)) {
return false;
}
Object this$isCheck = this.getIsCheck();
Object other$isCheck = other.getIsCheck();
if (this$isCheck == null) {
if (other$isCheck != null) {
return false;
}
} else if (!this$isCheck.equals(other$isCheck)) {
return false;
}
Object this$assortCode = this.getAssortCode();
Object other$assortCode = other.getAssortCode();
if (this$assortCode == null) {
if (other$assortCode != null) {
return false;
}
} else if (!this$assortCode.equals(other$assortCode)) {
return false;
}
Object this$level = this.getLevel();
Object other$level = other.getLevel();
if (this$level == null) {
if (other$level != null) {
return false;
}
} else if (!this$level.equals(other$level)) {
return false;
}
return true;
}
}
}
protected boolean canEqual(final Object other) {
return other instanceof ZdAssort;
}
public int hashCode() {
int PRIME = 59;
int result = 1;
Object $assortId = this.getAssortId();
result = result * 59 + ($assortId == null ? 43 : $assortId.hashCode());
Object $assortName = this.getAssortName();
result = result * 59 + ($assortName == null ? 43 : $assortName.hashCode());
Object $assortSort = this.getAssortSort();
result = result * 59 + ($assortSort == null ? 43 : $assortSort.hashCode());
Object $effective = this.getEffective();
result = result * 59 + ($effective == null ? 43 : $effective.hashCode());
Object $isCheck = this.getIsCheck();
result = result * 59 + ($isCheck == null ? 43 : $isCheck.hashCode());
Object $assortCode = this.getAssortCode();
result = result * 59 + ($assortCode == null ? 43 : $assortCode.hashCode());
Object $level = this.getLevel();
result = result * 59 + ($level == null ? 43 : $level.hashCode());
return result;
}
}

@ -0,0 +1,43 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.enums;
public enum Codes {
SUCCESS("0", "成功"),
ERROR("1", "失败"),
RESPONSE("100", "Response"),
RET_INFO("101", "RetInfo"),
RET_CODE("102", "RetCode"),
RET_CON("103", "RetCon"),
EXTERNAL("9202", "201_P_WS_JYBGTS"),
JSON_ADDRESS("999", "\\dataConfig\\homeQualitySet.json"),
MSG("201", "Msg"),
DIRECTORY("1000", "directory"),
UPLOAD("0", "uploadConnector"),
SMCODE("5", "手麻代码"),
ZZCODE("15", "重症代码"),
REQUEST_XML("0", "\\dataConfig\\RequestParams.xml"),
REQUEST_details_XML("0", "\\dataConfig\\RequestDetailsParams.xml"),
EMP_ID("0", "indexFlag"),
ERROR_CODE("500", "12"),
SELECT_COLUMNS("10000", "selectColumns");
private String code;
private String message;
private Codes(String code, String messgae) {
this.code = code;
this.message = messgae;
}
public String getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
}

@ -0,0 +1,38 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.facade;
import com.baomidou.mybatisplus.extension.service.IService;
import com.docus.bgts.entity.AfCollectTask;
import com.docus.bgts.entity.ReportDownDto;
import java.util.List;
import java.util.Map;
public interface IAfCollectTaskService extends IService<AfCollectTask> {
String getpatientIdByEmpId(String empId);
void insert(ReportDownDto reportDownDto);
String getJzhByInpatientNo(String inPatientNo, String visitId);
String getJzhByJzh(String jzh);
void insertServer(ReportDownDto reportDownDto);
void updateInterfaceCollect(String collectSubId, int state);
List<Map> getjzhByDate(String startDate, String endDate, int size, int current);
List<String> getC1ByPatientId(List<String> patientIds, String collectorId);
List<String> getPatientIdByC1(List<String> C1s);
List<String> getJzhByPatientId(List<String> patientIds);
String getPatientIdByInpatientNo(String inPatientNo, String visitId);
List<Map> getCompleteIntegrity(List<String> jzhs);
}

@ -0,0 +1,24 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.facade;
public interface IBgtsService {
void collect(String empId) throws Exception;
void collectPacs(String empId, String admissDate, String disDate, String times) throws Exception;
void collectEcg(String empId, String admissDate, String disDate, String times) throws Exception;
void collectPacss();
void collectByExamNo(String emamNo, String empId) throws Exception;
void collectByDate(String startDate, String endDate, String collectorId);
void collectAll();
void timerCollect();
}

@ -0,0 +1,13 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.facade;
import java.util.List;
import java.util.Map;
public interface IMzSyncService {
List<Map> getCompleteIntegrity(List<String> jzhs);
}

@ -0,0 +1,32 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.AfCollectAdd;
import com.docus.bgts.entity.MzSync;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
public interface AfCollectAddMapper extends BaseMapper<AfCollectAdd> {
Date getTimeByAdd(Integer classIfy);
List<String> listJzh(@Param("pageNumber") int pageNumber, @Param("pageSize") Integer pageSize);
Map<String, Date> selectDate(@Param("jzh") String jzh);
List<Map> integrality(@Param("mzSyncs") List<MzSync> mzSyncs);
@Select({"${sqlStr}"})
void dynamicSql(@Param("sqlStr") String sql);
void updateTBasic(@Param("result") String result, @Param("jzh") String jzh);
List<String> listJzhAndAdd(@Param("front") int front, @Param("later") int later, @Param("startDate") String startDate, @Param("endDate") String endDate);
}

@ -0,0 +1,34 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.AfCollectTask;
import com.docus.bgts.entity.JzhListSync;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;
public interface AfCollectTaskMapper extends BaseMapper<AfCollectTask> {
String getpatientIdByEmpId(@Param("jzh") String empId);
String getPatientIdByInpatientNo(@Param("inPatientNo") String inPatientNo, @Param("visitId") String visitId);
String getJzhByInpatientNo(@Param("inPatientNo") String inPatientNo, @Param("visitId") String visitId);
String getJzhByJzh(@Param("jzh") String jzh);
List<Map> getjzhByDate(@Param("startDate") String startDate, @Param("endDate") String endDate, @RequestParam("size") int size, @RequestParam("current") int current);
List<String> getC1ByPatientId(@Param("patientIds") List<String> patientIds, @Param("collectorId") String collectorId);
List<String> getPatientIdByC1(@Param("C1s") List<String> C1s);
List<String> getJzhByPatientId(@Param("patientIds") List<String> patientIds);
List<JzhListSync> selectListByJzhs(@Param("jzhs") List<String> jzhs);
}

@ -0,0 +1,12 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.AfInterfaceCollect;
public interface AfInterfaceCollectMapper extends BaseMapper<AfInterfaceCollect> {
}

@ -0,0 +1,12 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.AfInterfaceCollectSub;
public interface AfInterfaceCollectSubMapper extends BaseMapper<AfInterfaceCollectSub> {
}

@ -0,0 +1,13 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.docus.bgts.entity.MrReportError;
import org.apache.ibatis.annotations.Param;
public interface MrReportErrorMapper {
void insert(@Param("mrReportError") MrReportError mrReportError);
}

@ -0,0 +1,14 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.docus.bgts.entity.MzSync;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TScanAssortMapper {
List<MzSync> selectFilesByJzhs(@Param("jzhs") List<String> jzhs);
}

@ -0,0 +1,17 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dbmysql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.bgts.entity.ZdAssort;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ZdAssortMapper extends BaseMapper<ZdAssort> {
List<ZdAssort> selectAll(@Param("assortName") String assortName);
void insertZdAssort(@Param("zdAssort") ZdAssort zdAssort);
}

@ -0,0 +1,14 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dboracle;
import com.docus.bgts.entity.MzSync;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface MzSyncMapper {
List<MzSync> listMzSync(@Param("jzhs") List<String> jzhs, @Param("tableName") String tableName, @Param("tableNamespace") String tableNamespace);
}

@ -0,0 +1,12 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dboracle;
import java.util.List;
public interface TestMapper {
List<String> getA();
}

@ -0,0 +1,15 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.mapper.dboracle;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface VDocumentPdfMapper {
List<Map> listCollectPage(@Param("current") int current, @Param("size") int size, @Param("startTime") String startCollectTime, @Param("endTime") String date, @Param("namespace") String namespace, @Param("tableName") String tableName, @Param("fieldArr") List<String> fieldArr, @Param("collectTimeName") String collectTimeName);
}

@ -0,0 +1,275 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.docus.bgts.entity.AfCollectTask;
import com.docus.bgts.entity.AfInterfaceCollect;
import com.docus.bgts.entity.AfInterfaceCollectSub;
import com.docus.bgts.entity.JzhListSync;
import com.docus.bgts.entity.ReportDownDto;
import com.docus.bgts.entity.ReportDownScanFileDto;
import com.docus.bgts.entity.TaskDetail;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.mapper.dbmysql.AfCollectTaskMapper;
import com.docus.bgts.mapper.dbmysql.AfInterfaceCollectMapper;
import com.docus.bgts.mapper.dbmysql.AfInterfaceCollectSubMapper;
import com.docus.bgts.mapper.dboracle.TestMapper;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@Service
public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, AfCollectTask> implements IAfCollectTaskService {
public static int MAX_SIZE_PER_TIME = 10;
@Autowired
TestMapper testMapper;
@Autowired
AfCollectTaskMapper afCollectTaskMapper;
@Autowired
AfInterfaceCollectMapper afInterfaceCollectMapper;
@Autowired
AfInterfaceCollectSubMapper afInterfaceCollectSubMapper;
public String getpatientIdByEmpId(String empId) {
String patientId = this.afCollectTaskMapper.getpatientIdByEmpId(empId);
return patientId;
}
public void insert(ReportDownDto reportDownDto) {
try {
String patientId = this.getpatientIdByEmpId(reportDownDto.getPatient().getJzh());
if (StringUtils.isBlank(patientId)) {
throw new RuntimeException("操作的病案信息不存在");
}
Date date = new Date();
Integer save = null;
List<ReportDownScanFileDto> scanfiles = reportDownDto.getScanfiles();
for(ReportDownScanFileDto scanfile : scanfiles) {
AfCollectTask afCollectTask = (AfCollectTask)this.afCollectTaskMapper.selectOne((Wrapper)((QueryWrapper)(new QueryWrapper()).eq("C1", scanfile.getSerialnum())).eq("sysflag", reportDownDto.getCollectorid()));
if (afCollectTask == null) {
afCollectTask = new AfCollectTask();
afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDownDto.getCollectorid());
afCollectTask.setState("0");
afCollectTask.setSyncTime(date);
afCollectTask.setC1(scanfile.getSerialnum());
afCollectTask.setC2(scanfile.getFiletitle());
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
save = this.afCollectTaskMapper.insert(afCollectTask);
if (save <= 0) {
throw new RuntimeException("插入病案任务表数据出错");
}
this.log.warn("插入病案成功");
} else {
afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDownDto.getCollectorid());
afCollectTask.setState("0");
afCollectTask.setSyncTime(date);
afCollectTask.setC1(scanfile.getSerialnum());
afCollectTask.setC2(scanfile.getFiletitle());
save = this.afCollectTaskMapper.updateById(afCollectTask);
this.log.warn("修改病案成功");
}
scanfile.setTaskid(afCollectTask.getId());
}
reportDownDto.setScanfiles(scanfiles);
} catch (Exception e) {
this.log.error(reportDownDto.getPatient().getJzh() + "插入任务表出错! " + e.getMessage());
}
}
public String getJzhByInpatientNo(String inPatientNo, String visitId) {
return this.afCollectTaskMapper.getJzhByInpatientNo(inPatientNo, visitId);
}
public String getJzhByJzh(String jzh) {
return this.afCollectTaskMapper.getJzhByJzh(jzh);
}
public void insertServer(ReportDownDto reportDownDto) {
String patientId;
if (StringUtils.isBlank(reportDownDto.getPatient().getJzh())) {
patientId = this.getPatientIdByInpatientNo(reportDownDto.getPatient().getInPatientNo(), reportDownDto.getPatient().getVisitId());
} else {
patientId = this.getpatientIdByEmpId(reportDownDto.getPatient().getJzh());
}
if (StringUtils.isBlank(patientId)) {
throw new RuntimeException("操作的病案信息不存在");
} else {
Date date = new Date();
Integer save = null;
List<ReportDownScanFileDto> scanfiles = reportDownDto.getScanfiles();
for(ReportDownScanFileDto scanfile : scanfiles) {
AfCollectTask afCollectTask = (AfCollectTask)this.afCollectTaskMapper.selectOne((Wrapper)((QueryWrapper)(new QueryWrapper()).eq("C1", scanfile.getSerialnum())).eq("sysflag", reportDownDto.getCollectorid()));
if (afCollectTask == null) {
afCollectTask = new AfCollectTask();
afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDownDto.getCollectorid());
afCollectTask.setState("0");
afCollectTask.setSyncTime(date);
afCollectTask.setC1(scanfile.getSerialnum());
afCollectTask.setC2(scanfile.getFiletitle());
afCollectTask.setC3(reportDownDto.getPatient().getJzh());
save = this.afCollectTaskMapper.insert(afCollectTask);
if (save <= 0) {
throw new RuntimeException("插入病案任务表数据出错");
}
this.log.warn("插入病案成功");
} else {
afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDownDto.getCollectorid());
afCollectTask.setState("0");
afCollectTask.setSyncTime(date);
afCollectTask.setC1(scanfile.getSerialnum());
afCollectTask.setC2(scanfile.getFiletitle());
save = this.afCollectTaskMapper.updateById(afCollectTask);
this.log.warn("修改病案成功");
}
scanfile.setTaskid(afCollectTask.getId());
}
reportDownDto.setScanfiles(scanfiles);
}
}
public void updateInterfaceCollect(String collectSubId, int state) {
this.log.warn("开始记录采集");
AfInterfaceCollectSub afInterfaceCollectSub = (AfInterfaceCollectSub)this.afInterfaceCollectSubMapper.selectById(collectSubId);
this.log.warn("操作记录:" + afInterfaceCollectSub);
if (afInterfaceCollectSub == null) {
throw new RuntimeException("afInterfaceCollectSub表数据为空");
} else {
afInterfaceCollectSub.setState(state);
int i = this.afInterfaceCollectSubMapper.updateById(afInterfaceCollectSub);
if (i <= 0) {
throw new RuntimeException("记录任务数时出错");
} else {
if (state == 1) {
AfInterfaceCollect afInterfaceCollect = (AfInterfaceCollect)this.afInterfaceCollectMapper.selectById(afInterfaceCollectSub.getAfInterfaceCollectId());
afInterfaceCollect.setCompleteCount(afInterfaceCollect.getCompleteCount() + 1);
i = this.afInterfaceCollectMapper.updateById(afInterfaceCollect);
if (i <= 0) {
throw new RuntimeException("记录任务数时出错");
}
}
}
}
}
public List<Map> getjzhByDate(String startDate, String endDate, int size, int current) {
List<Map> patientIds = this.afCollectTaskMapper.getjzhByDate(startDate, endDate, size, current);
return patientIds;
}
public List<String> getC1ByPatientId(List<String> patientIds, String collectorId) {
List<List<String>> batchPatientIds = Lists.partition(patientIds, MAX_SIZE_PER_TIME);
List<String> c1s = new ArrayList();
for(List<String> batchPatientId : batchPatientIds) {
List<String> c1 = this.afCollectTaskMapper.getC1ByPatientId(batchPatientId, collectorId);
if (c1 != null && c1.size() != 0) {
for(String s : c1) {
c1s.add(s);
}
}
}
return c1s;
}
public List<String> getPatientIdByC1(List<String> C1s) {
List<List<String>> batchPatientIds = Lists.partition(C1s, MAX_SIZE_PER_TIME);
List<String> patientIds = new ArrayList();
for(List<String> batchC1s : batchPatientIds) {
List<String> patientId = this.afCollectTaskMapper.getPatientIdByC1(batchC1s);
if (patientId != null && patientId.size() != 0) {
for(String s : patientId) {
patientIds.add(s);
}
}
}
return patientIds;
}
public List<String> getJzhByPatientId(List<String> patientIds) {
List<String> jzhs = new ArrayList();
for(List<String> batchPatientId : Lists.partition(patientIds, MAX_SIZE_PER_TIME)) {
List<String> jzh = this.afCollectTaskMapper.getJzhByPatientId(batchPatientId);
if (jzh != null && jzh.size() != 0) {
for(String s : jzh) {
jzhs.add(s);
}
}
}
return jzhs;
}
public String getPatientIdByInpatientNo(String inPatientNo, String visitId) {
return this.afCollectTaskMapper.getPatientIdByInpatientNo(inPatientNo, visitId);
}
public List<Map> getCompleteIntegrity(List<String> jzhs) {
List<JzhListSync> taskList = this.afCollectTaskMapper.selectListByJzhs(jzhs);
List<Map> maps = new ArrayList();
if (!CollectionUtils.isEmpty(taskList)) {
for(String jzh : jzhs) {
StringBuilder integrity = new StringBuilder();
for(JzhListSync jzhListSync : taskList) {
if (jzhListSync.getJzh().equals(jzh)) {
for(TaskDetail taskDetail : jzhListSync.getTaskDetails()) {
String state = taskDetail.getState();
if (StringUtils.isBlank(state) || !"3".equals(state)) {
if (StringUtils.isNotBlank(integrity)) {
integrity.append(",");
}
integrity.append(taskDetail.getFileTitle()).append("缺失");
}
}
break;
}
}
Map<String, String> map = new HashMap();
if (StringUtils.isBlank(integrity)) {
integrity = new StringBuilder("完整");
}
map.put("jzh", jzh);
map.put("file_title", integrity.toString());
maps.add(map);
}
}
return maps;
}
}

@ -0,0 +1,706 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.service;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.docus.bgts.entity.AfCollectAdd;
import com.docus.bgts.entity.AfCollectTask;
import com.docus.bgts.entity.MrReportError;
import com.docus.bgts.entity.ReportDownDto;
import com.docus.bgts.entity.ReportDownPatientDto;
import com.docus.bgts.entity.ReportDownScanFileDto;
import com.docus.bgts.enums.Codes;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.facade.IBgtsService;
import com.docus.bgts.mapper.dbmysql.AfCollectAddMapper;
import com.docus.bgts.mapper.dbmysql.AfCollectTaskMapper;
import com.docus.bgts.mapper.dbmysql.AfInterfaceCollectSubMapper;
import com.docus.bgts.mapper.dbmysql.MrReportErrorMapper;
import com.docus.bgts.mapper.dboracle.VDocumentPdfMapper;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import com.docus.bgts.utils.SnowflakeIdWorker;
import com.docus.bgts.utils.XmlUtils;
import java.io.ByteArrayInputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dom4j.Element;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@Service
public class BgtsServiceImpl implements IBgtsService {
@Value("${ws.url}")
private String wsUrl;
@Value("${ws.localMethod}")
private String wsLocalMethod;
@Value("${ws.LocalMethodNj:null}")
private String wsLocalMethodNj;
private Logger logger = LogManager.getLogger(BgtsServiceImpl.class);
@Autowired
IAfCollectTaskService afCollectTaskService;
@Autowired
VDocumentPdfMapper vDocumentPdfMapper;
@Autowired
AfInterfaceCollectSubMapper afInterfaceCollectSubMapper;
@Autowired
MrReportErrorMapper mrReportErrorMapper;
@Autowired
AfCollectAddMapper afCollectAddMapper;
@Autowired
AfCollectTaskMapper afCollectTaskMapper;
@Autowired
private ThreadPoolExecutor threadPoolExecutor;
private static List<String> date = new ArrayList();
private static int currentIndex = 0;
private static JaxWsDynamicClientFactory wsDynamicClientFactory = JaxWsDynamicClientFactory.newInstance();
private static volatile Client client = null;
public void collect(String empId) throws Exception {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
new ArrayList();
List exams;
if (collectorid.equals("14")) {
exams = this.getExamNoNj(empId);
} else {
exams = this.getExamNo(empId);
}
ReportDownDto reportDownDto = this.getUrlCreateReportDto(exams, empId);
this.afCollectTaskService.insert(reportDownDto);
this.collectExams(exams, empId, reportDownDto);
}
public void collectPacs(String empId, String admissDate, String disDate, String times) throws Exception {
SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
Date ad = sim.parse(admissDate);
Date di = sim.parse(disDate);
String admiss = sim.format(ad);
String dis = sim.format(di);
List<String[]> exams = this.getExamNo(empId, admiss, dis);
String jzh = this.afCollectTaskService.getJzhByInpatientNo(empId, times);
if (null == jzh) {
this.logger.info("通过住院号与住院次数未匹配到患者");
} else {
ReportDownDto reportDownDto = this.getUrlCreateReportDto(exams, jzh);
this.afCollectTaskService.insert(reportDownDto);
this.collectExams(exams, empId, reportDownDto);
}
}
public void collectEcg(String empId, String admissDate, String disDate, String times) throws Exception {
Map<String, String> smCollectionTime = getSmCollectionTimeEcg(admissDate, disDate);
List<String[]> exams = this.getExamNoEcg(empId, (String)smCollectionTime.get("admissDate"), (String)smCollectionTime.get("disDate"));
String jzh = this.afCollectTaskService.getpatientIdByEmpId(empId);
if (null == jzh) {
this.logger.info(empId + " 通过jzh未匹配到患者");
} else {
ReportDownDto reportDownDto = this.getUrlCreateReportDto(exams, empId);
this.afCollectTaskService.insert(reportDownDto);
this.collectExams(exams, empId, reportDownDto);
}
}
public void collectByExamNo(String emamNo, String empId) throws Exception {
String[] strings = new String[2];
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
AfCollectTask afCollectTask = (AfCollectTask)this.afCollectTaskService.getOne((Wrapper)((QueryWrapper)(new QueryWrapper()).eq("C1", emamNo)).eq("sysflag", collectorid));
strings[0] = emamNo;
strings[1] = afCollectTask.getC2();
List<String[]> exams = new ArrayList();
exams.add(strings);
ReportDownDto reportDownDto = this.getUrlCreateReportDto(exams, empId);
this.collectExams(exams, empId, reportDownDto);
}
public void collectAll() {
this.logger.info("----------全量采集开始-----------");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startCollectTime = null;
startCollectTime = String.valueOf(FileUtils.getJsonByName("startCollectTime"));
this.logger.info("----------采集初始时间:" + startCollectTime + " -------------------");
Date date = new Date();
String dateStr = simpleDateFormat.format(date);
this.collectByDates(startCollectTime, dateStr);
this.addAfCollectAdd(date);
this.logger.info("--------------全量采集结束------------------");
}
private static void initDate() throws Exception {
String configStart = String.valueOf(FileUtils.getJsonByName("collectStartDate"));
String configEnd = String.valueOf(FileUtils.getJsonByName("collectEndDate"));
if (!StrUtil.isBlank(configStart) && !StrUtil.isBlank(configEnd)) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate localDate = LocalDate.parse(configStart, dtf);
for(LocalDate end = LocalDate.parse(configEnd); !localDate.isAfter(end); localDate = localDate.plusDays(1L)) {
date.add(localDate.toString());
}
} else {
throw new RuntimeException("check homeQualitySet.json collectStartDate AND collectEndDate confg");
}
}
public void collectPacss() {
this.logger.info("按需采集任务执行----");
this.logger.info("index:{},Thread {}", currentIndex, Thread.currentThread().getName());
String collectStartDate = FileUtils.getJsonByName("collectStartDate") + "\t00:00:00";
String collectEndDate = FileUtils.getJsonByName("collectEndDate") + "\t23:59:59";
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
CountDownLatch countDownLatch = new CountDownLatch(1);
this.threadPoolExecutor.execute(() -> {
try {
this.collectByDate(collectStartDate, collectEndDate, collectorid);
} catch (Exception e) {
this.logger.info("按需采集出错{}", e.getMessage());
}
countDownLatch.countDown();
});
try {
countDownLatch.await();
} catch (Exception e) {
this.logger.error("JUC countDownLatch error {}", e.getMessage());
}
this.logger.info("{},采集结束----", collectStartDate);
System.gc();
}
private void collectByDates(String startDate, String endDate) {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
String assortid = String.valueOf(FileUtils.getJsonByName("assortid"));
int filesource = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filesource")));
int filestoragetype = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filestoragetype")));
Map<String, Object> headMap = new HashMap();
headMap.put("Content-Type", "application/json");
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0L, 0L);
String indexFlag = String.valueOf(FileUtils.getJsonByName("indexFlag"));
String serialnum = String.valueOf(FileUtils.getJsonByName("serialnum"));
String downurl = String.valueOf(FileUtils.getJsonByName("downurl"));
String inPatientNo = String.valueOf(FileUtils.getJsonByName("inPatientNo"));
String visitId = String.valueOf(FileUtils.getJsonByName("visitId"));
String inJzh = String.valueOf(FileUtils.getJsonByName("jzh"));
List<String> fieldArr = new ArrayList();
fieldArr.add(indexFlag);
fieldArr.add(serialnum);
fieldArr.add(inPatientNo);
fieldArr.add(visitId);
fieldArr.add(inJzh);
fieldArr.add(downurl);
String namespace = String.valueOf(FileUtils.getJsonByName("namespace"));
String tableName = String.valueOf(FileUtils.getJsonByName("tableName"));
String collectTimeName = String.valueOf(FileUtils.getJsonByName("collectTimeName"));
this.logger.info("开始时间-----" + startDate + "结束时间-----\n" + endDate);
int current = 1;
while(true) {
int size = 10 * current;
List<Map> maps = this.vDocumentPdfMapper.listCollectPage(size - 10, size, startDate, endDate, namespace, tableName, fieldArr, collectTimeName);
this.logger.info("处理采集数据:" + maps);
if (null == maps || maps.size() <= 0) {
return;
}
maps.stream().forEach((map) -> {
ReportDownDto reportDownDto = new ReportDownDto();
reportDownDto.setCollectorid(collectorid);
reportDownDto.setAssortid(assortid);
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto();
if (collectorid.equals("15")) {
reportDownPatientDto.setJzh(String.valueOf(map.get(inJzh)));
} else {
reportDownPatientDto.setInPatientNo(String.valueOf(map.get(inPatientNo)));
reportDownPatientDto.setVisitId(String.valueOf(map.get(visitId)));
}
reportDownDto.setPatient(reportDownPatientDto);
List<ReportDownScanFileDto> reportDownScanFileDtos = new ArrayList();
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto();
reportDownScanFileDto.setDownurl(String.valueOf(map.get(downurl)));
reportDownScanFileDto.setFilestoragetype(filestoragetype);
reportDownScanFileDto.setFilesource(filesource);
reportDownScanFileDto.setFiletitle(StringUtils.isNotBlank(String.valueOf(map.get(serialnum))) ? String.valueOf(map.get(serialnum)) : String.valueOf(idWorker.nextId()));
reportDownScanFileDto.setSerialnum(StringUtils.isNotBlank(String.valueOf(map.get(serialnum))) ? String.valueOf(map.get(serialnum)) : String.valueOf(idWorker.nextId()));
reportDownScanFileDtos.add(reportDownScanFileDto);
reportDownDto.setScanfiles(reportDownScanFileDtos);
try {
this.afCollectTaskService.insertServer(reportDownDto);
String jzh = this.afCollectTaskService.getJzhByJzh(reportDownDto.getPatient().getJzh());
if (null != jzh && !"".equals(jzh)) {
reportDownPatientDto.setJzh(jzh);
reportDownDto.setPatient(reportDownPatientDto);
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), headMap, (Map)JSON.parseObject(JSON.toJSONString(reportDownDto), Map.class));
Map resMap = (Map)JSON.parseObject(post, Map.class);
this.logger.info(reportDownDto.getPatient().getJzh() + " 调用下载参数:--\n" + JSON.parseObject(JSON.toJSONString(reportDownDto)));
if (String.valueOf(resMap.get("code")).equals("500")) {
this.logger.info(reportDownDto.getPatient().getJzh() + " 下载失败!");
throw new RuntimeException(String.valueOf(resMap.get("msg")));
}
this.logger.info(reportDownDto.getPatient().getJzh() + " 下载成功!");
}
} catch (Exception e) {
this.logger.info(reportDownDto.getPatient().getJzh() + " 采集出错:" + reportDownDto + e.getMessage());
this.addMrReportErrorLog(reportDownDto);
e.printStackTrace();
}
});
++current;
}
}
public void timerCollect() {
this.logger.info("------采集器开始采集---------");
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
Date time;
if (collectorid.equals("5")) {
time = this.afCollectAddMapper.getTimeByAdd(5);
} else {
time = this.afCollectAddMapper.getTimeByAdd(15);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startDate = simpleDateFormat.format(time);
Date date = new Date();
String endDate = simpleDateFormat.format(date);
this.collectByDates(startDate, endDate);
this.addAfCollectAdd(date);
this.logger.info("--------采集器结束采集------");
}
private void addAfCollectAdd(Date date) {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
AfCollectAdd afCollectAdd = new AfCollectAdd();
afCollectAdd.setBeginStageDate(date);
this.afCollectAddMapper.update(afCollectAdd, (Wrapper)(new QueryWrapper()).eq("classify", collectorid));
}
private void addMrReportErrorLog(ReportDownDto reportDownDto) {
MrReportError mrReportError = new MrReportError();
mrReportError.setCreateTime(new Date());
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
mrReportError.setReportType(Integer.parseInt(collectorid));
mrReportError.setXml(JSON.toJSONString(reportDownDto));
this.mrReportErrorMapper.insert(mrReportError);
}
private void collectExams(List<String[]> exams, String empId, ReportDownDto reportDownDto) throws Exception {
Map<String, Object> headMap = new HashMap();
headMap.put("Content-Type", "application/json");
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), headMap, (Map)JSON.parseObject(JSON.toJSONString(reportDownDto), Map.class));
Map resMap = (Map)JSON.parseObject(post, Map.class);
this.logger.info(empId + " 调用下载Map参数{}", JSON.toJSONString(reportDownDto));
if (String.valueOf(resMap.get("code")).equals("500")) {
this.logger.info(empId + "调用下载服务错误: " + resMap.get("msg"));
throw new RuntimeException(String.valueOf(resMap.get("msg")));
}
}
private ReportDownDto getUrlCreateReportDto(List<String[]> exams, String empId) throws Exception {
ReportDownDto reportDownDto = new ReportDownDto();
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto();
reportDownPatientDto.setJzh(empId);
reportDownDto.setPatient(reportDownPatientDto);
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
String assortid = String.valueOf(FileUtils.getJsonByName("assortid"));
reportDownDto.setAssortid(assortid);
reportDownDto.setCollectorid(collectorid);
List<ReportDownScanFileDto> reportDownScanFileDtos = new ArrayList();
int filesource = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filesource")));
int filestoragetype = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("filestoragetype")));
for(String[] exam : exams) {
try {
ReportDownScanFileDto reportDownScanFileDto = this.getScanByExam(exam);
reportDownScanFileDto.setFilesource(filesource);
reportDownScanFileDto.setFilestoragetype(filestoragetype);
if (collectorid.equals("3")) {
if (!reportDownScanFileDto.getDownurl().contains("病理") && !reportDownScanFileDto.getDownurl().contains("胃肠镜") && !reportDownScanFileDto.getDownurl().contains("心电")) {
reportDownScanFileDtos.add(reportDownScanFileDto);
}
} else {
reportDownScanFileDtos.add(reportDownScanFileDto);
}
} catch (Exception e) {
this.logger.error(exam[0] + "调用明细错误信息-----" + e.getMessage());
}
}
reportDownDto.setScanfiles(reportDownScanFileDtos);
return reportDownDto;
}
private ReportDownScanFileDto getScanByExam(String[] exam) throws Exception {
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto();
reportDownScanFileDto.setSerialnum(exam[0]);
reportDownScanFileDto.setFiletitle(exam[1]);
XmlUtils reqXmlUtils = new XmlUtils(FileUtils.getXmlDetailsPath());
Element esbEntry = reqXmlUtils.getMsgElement();
esbEntry.element("EXAM_NO").setText(exam[0]);
this.logger.info("明细入参------------" + reqXmlUtils.getDocument().asXML());
String resXml;
if (collectorid.equals("14")) {
resXml = this.invokeWsNj(reqXmlUtils.getDocument().asXML());
} else {
resXml = this.invokeWs(reqXmlUtils.getDocument().asXML());
}
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
String success = xmlUtils.isSuccess();
if (!success.equals("ok")) {
this.logger.info("发送错误:" + success);
throw new RuntimeException("发送错误:" + success);
} else {
List<String> dis = (List)FileUtils.getJsonByName("bgtsDetailRespon");
Element element = xmlUtils.getElement(dis);
reportDownScanFileDto.setDownurl(element.element(String.valueOf(FileUtils.getJsonByName("pdfUrl"))) == null ? "" : element.element(String.valueOf(FileUtils.getJsonByName("pdfUrl"))).getText());
return reportDownScanFileDto;
}
}
private List<String[]> getExamNo(String empId) throws Exception {
List<String[]> exams = new ArrayList();
XmlUtils reqXmlUtils = new XmlUtils(FileUtils.getXmlPath());
Element reqElement = reqXmlUtils.getMsgElement();
Map<String, Date> map = this.afCollectAddMapper.selectDate(empId);
reqElement.element("INHOSP_NO").setText(empId);
reqElement.element("BEGIN_DATE").setText((new SimpleDateFormat(FileUtils.getJsonByName("dateFormat").toString())).format((Date)map.get("admiss_date")));
reqElement.element("END_DATE").setText((new SimpleDateFormat(FileUtils.getJsonByName("dateFormat").toString())).format((Date)map.get("dis_date")));
this.logger.info("-------根据患者主索引号查询多个报告单号,地址:" + this.wsUrl + ",方法:" + this.wsLocalMethod + "---------");
String xml = reqXmlUtils.getDocument().asXML();
this.logger.info("---------------------------");
this.logger.info(xml);
this.logger.info("----------------------------");
String resXml = this.invokeWs(xml);
this.logger.info("---------返回值-------------");
this.logger.info(resXml);
this.logger.info("-----------------------------");
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
String success = xmlUtils.isSuccess();
if (!success.equals("ok")) {
this.logger.info("发送错误:" + success);
throw new RuntimeException(success);
} else {
List<String> dis = (List)FileUtils.getJsonByName("bgtsRespon");
Element element = xmlUtils.getElement(dis);
for(Element examInfo : element.elements("ExamInfo")) {
String[] key = new String[2];
Element examNo = examInfo.element(String.valueOf(FileUtils.getJsonByName("examNo")));
if (examNo != null) {
key[0] = examNo.getText();
}
Element examItemInfo = examInfo.element("ExamItemInfo");
if (examItemInfo != null) {
key[1] = examItemInfo.element(String.valueOf(FileUtils.getJsonByName("examItemName"))).getText();
}
exams.add(key);
}
return exams;
}
}
private List<String[]> getExamNoNj(String empId) throws Exception {
List<String[]> exams = new ArrayList();
XmlUtils reqXmlUtils = new XmlUtils(FileUtils.getXmlPath());
Element reqElement = reqXmlUtils.getMsgElement();
Map<String, Date> map = this.afCollectAddMapper.selectDate(empId);
reqElement.element("INHOSP_NO").setText(empId);
reqElement.element("BEGIN_DATE").setText((new SimpleDateFormat(FileUtils.getJsonByName("dateFormat").toString())).format((Date)map.get("admiss_date")));
reqElement.element("END_DATE").setText((new SimpleDateFormat(FileUtils.getJsonByName("dateFormat").toString())).format((Date)map.get("dis_date")));
this.logger.info("-------根据患者主索引号查询多个报告单号,地址:" + this.wsUrl + ",方法:" + this.wsLocalMethod + "---------");
String xml = reqXmlUtils.getDocument().asXML();
this.logger.info("---------------------------");
this.logger.info(xml);
this.logger.info("----------------------------");
String resXml = this.invokeWs(xml);
this.logger.info("---------返回值-------------");
this.logger.info(resXml);
this.logger.info("-----------------------------");
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
String success = xmlUtils.isSuccess();
if (!success.equals("ok")) {
this.logger.info("发送错误:" + success);
throw new RuntimeException(success);
} else {
List<String> dis = (List)FileUtils.getJsonByName("bgtsRespon");
Element element = xmlUtils.getElement(dis);
List<Element> elements = element.elements("Msg");
for(int i = 0; i < elements.size(); ++i) {
List<Element> examInfo = ((Element)elements.get(i)).elements("ExamInfo");
for(int j = 0; j < examInfo.size(); ++j) {
String examNo = ((Element)examInfo.get(j)).element(String.valueOf(FileUtils.getJsonByName("examNo"))).getText();
String[] key = new String[2];
if (examNo != null) {
key[0] = examNo;
}
Element examItemInfo = ((Element)examInfo.get(j)).element("ExamItemInfo");
if (examItemInfo != null) {
key[1] = examItemInfo.element(String.valueOf(FileUtils.getJsonByName("examItemName"))).getText();
}
exams.add(key);
this.logger.info("报告单号---{}", examNo);
}
}
return exams;
}
}
public static Map<String, String> getSmCollectionTime(String admissDate, String disDate) {
Calendar calendar = Calendar.getInstance();
Map<String, String> map = new HashMap();
try {
calendar.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(admissDate));
calendar.add(10, -6);
Date dBefore = calendar.getTime();
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(disDate));
calendar1.add(10, 6);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String defaultStartDate = sdf.format(dBefore);
String defaultEndDate = sdf.format(calendar1.getTime());
map.put("admissDate", defaultStartDate);
map.put("disDate", defaultEndDate);
} catch (ParseException e) {
e.printStackTrace();
}
return map;
}
public static Map<String, String> getSmCollectionTimeEcg(String admissDate, String disDate) {
Calendar calendar = Calendar.getInstance();
Map<String, String> map = new HashMap();
try {
calendar.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(admissDate));
calendar.add(10, -6);
Date dBefore = calendar.getTime();
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).parse(disDate));
calendar1.add(10, 30);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String defaultStartDate = sdf.format(dBefore);
String defaultEndDate = sdf.format(calendar1.getTime());
map.put("admissDate", defaultStartDate);
map.put("disDate", defaultEndDate);
} catch (ParseException e) {
e.printStackTrace();
}
return map;
}
private List<String[]> getExamNo(String empId, String admissDate, String disDate) throws Exception {
List<String[]> exams = new ArrayList();
XmlUtils reqXmlUtils = new XmlUtils(FileUtils.getXmlPath());
Element reqElement = reqXmlUtils.getMsgElement();
reqElement.element("INHOSP_INDEX_NO").setText(empId);
reqElement.element("BEGIN_DATE").setText(String.valueOf(admissDate));
reqElement.element("END_DATE").setText(String.valueOf(disDate));
this.logger.info("-------根据患者主索引号查询多个报告单号,地址:" + this.wsUrl + ",方法:" + this.wsLocalMethod + "---------");
String xml = reqXmlUtils.getDocument().asXML();
this.logger.info("---------------------------");
this.logger.info(xml);
this.logger.info("----------------------------");
String resXml = this.invokeWs(xml);
this.logger.info("---------返回值-------------");
this.logger.info(resXml);
this.logger.info("-----------------------------");
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
String success = xmlUtils.isSuccess();
if (!success.equals("ok")) {
this.logger.info("发送错误:" + success);
throw new RuntimeException(success);
} else {
List<String> dis = (List)FileUtils.getJsonByName("bgtsRespon");
Element element = xmlUtils.getElement(dis);
for(Element examInfo : element.elements("ExamInfo")) {
String[] key = new String[2];
Element examNo = examInfo.element(String.valueOf(FileUtils.getJsonByName("examNo")));
for(Element element1 : examInfo.elements("ExamItemInfo")) {
if (examNo != null) {
key[0] = examNo.getText();
}
key[1] = element1.element(String.valueOf(FileUtils.getJsonByName("examItemName"))).getText();
}
exams.add(key);
}
return exams;
}
}
private List<String[]> getExamNoEcg(String empId, String admissDate, String disDate) throws Exception {
List<String[]> exams = new ArrayList();
XmlUtils reqXmlUtils = new XmlUtils(FileUtils.getXmlPath());
Element reqElement = reqXmlUtils.getMsgElement();
reqElement.element("INHOSP_NO").setText(empId);
reqElement.element("BEGIN_DATE").setText(String.valueOf(admissDate));
reqElement.element("END_DATE").setText(String.valueOf(disDate));
this.logger.info("-------根据患者主索引号查询多个报告单号,地址:" + this.wsUrl + ",方法:" + this.wsLocalMethod + "---------");
String xml = reqXmlUtils.getDocument().asXML();
this.logger.info("---------------------------");
this.logger.info(xml);
this.logger.info("----------------------------");
String resXml = this.invokeWs(xml);
this.logger.info("---------返回值-------------");
this.logger.info(resXml);
this.logger.info("-----------------------------");
XmlUtils xmlUtils = new XmlUtils(new ByteArrayInputStream(resXml.getBytes("UTF-8")));
String success = xmlUtils.isSuccess();
if (!success.equals("ok")) {
this.logger.info("发送错误:" + success);
throw new RuntimeException(success);
} else {
List<String> dis = (List)FileUtils.getJsonByName("bgtsRespon");
Element element = xmlUtils.getElement(dis);
for(Element examInfo : element.elements("ExamInfo")) {
String[] key = new String[2];
Element examNo = examInfo.element(String.valueOf(FileUtils.getJsonByName("examNo")));
if (examNo != null) {
key[0] = examNo.getText();
}
Element examItemInfo = examInfo.element("ExamItemInfo");
if (examItemInfo != null) {
key[1] = examItemInfo.element(String.valueOf(FileUtils.getJsonByName("examItemName"))).getText();
}
exams.add(key);
}
return exams;
}
}
public void collectByDate(String startDate, String endDate, String collectorId) {
this.logger.info("按需采集开始----------开始时间---" + startDate + "------结束时间---" + endDate);
int endrow = 10;
try {
int startrow = 0;
while(true) {
List<Map> patientIds = this.afCollectTaskService.getjzhByDate(startDate, endDate, startrow, endrow);
if (null == patientIds || patientIds.size() <= 0) {
this.logger.info("未查询到按需采集患者!");
break;
}
for(Map patientId : patientIds) {
if (patientId != null) {
try {
this.logger.info("按需采集------患者" + patientId.get("inpatient_no"));
this.logger.info("处理按需采集第" + startrow + "条数据----");
if (collectorId.equals("3")) {
this.collectPacs(String.valueOf(patientId.get("inpatient_no")), String.valueOf(patientId.get("admiss_date")), String.valueOf(patientId.get("dis_date")), String.valueOf(patientId.get("admiss_times")));
} else if (!collectorId.equals("4") && !collectorId.equals("23")) {
this.collect(String.valueOf(patientId.get("jzh")));
} else {
this.collectEcg(String.valueOf(patientId.get("jzh")), String.valueOf(patientId.get("admiss_date")), String.valueOf(patientId.get("dis_date")), String.valueOf(patientId.get("admiss_times")));
}
} catch (Exception e) {
this.logger.error("按需采集-患者inpatient_no{},collectPacs() Error:{}", patientId.get("inpatient_no"), e.getMessage());
}
}
}
patientIds.clear();
startrow += 10;
}
} catch (Exception e) {
this.logger.error(e.getMessage());
} catch (Throwable t) {
t.printStackTrace();
this.logger.error("throwable{}", t.getMessage());
}
}
private Client getClient() {
if (client == null) {
synchronized(this.getClass()) {
client = wsDynamicClientFactory.createClient(this.wsUrl);
}
}
return client;
}
public String invokeWs(String xml) throws Exception {
this.logger.info("-----\n客户端调用服务端" + this.wsUrl + "方法:" + this.wsLocalMethod + "\n------------");
Client client = this.getClient();
HTTPConduit conduit = (HTTPConduit)client.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(10000L);
policy.setReceiveTimeout(10000L);
conduit.setClient(policy);
this.logger.info("Client started!");
Object[] objects = client.invoke(this.wsLocalMethod, new Object[]{xml});
this.logger.info("Client invoke after!");
String str = objects[0].toString();
this.logger.info("----------结果---------\n{}", str);
return str;
}
public String invokeWsNj(String xml) throws Exception {
this.logger.info("-----\n客户端调用服务端" + this.wsUrl + "方法:" + this.wsLocalMethodNj + "\n------------");
Client client = this.getClient();
HTTPConduit conduit = (HTTPConduit)client.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(10000L);
policy.setReceiveTimeout(10000L);
conduit.setClient(policy);
this.logger.info("Client started!");
Object[] objects = client.invoke(this.wsLocalMethodNj, new Object[]{xml});
this.logger.info("Client invoke after!");
String str = objects[0].toString();
this.logger.info("----------结果---------\n{}", str);
return str;
}
}

@ -0,0 +1,105 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.service;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.facade.IMzSyncService;
import com.docus.bgts.mapper.dbmysql.AfCollectAddMapper;
import com.docus.bgts.utils.FileUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@Service
public class CheckIntegrityService {
private final Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
AfCollectAddMapper afCollectAddMapper;
@Autowired
IMzSyncService iMzSyncService;
@Autowired
IAfCollectTaskService afCollectTaskService;
public boolean addSyncIntegrality(String startDate, String endDate) {
boolean flag = true;
this.log.info("增量完整性同步开始");
long startTime = System.currentTimeMillis();
Integer pageSize = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("pageSize")));
int i = 0;
while(true) {
int front = i * pageSize;
List<String> jzhs = this.afCollectAddMapper.listJzhAndAdd(front, pageSize, startDate, endDate);
if (jzhs.size() == 0) {
if (i == 0) {
flag = false;
}
long endTime = System.currentTimeMillis();
this.log.info("增量完整性同步结束,程序执行时间为:" + (endTime - startTime) + "毫秒");
return flag;
}
this.addSyncIntegralityByJzhsMethod(jzhs);
++i;
}
}
public void addSyncIntegralityByJzhsMethod(List<String> jzhs) {
List<Map> maps = this.getCompleteInegruty(jzhs);
this.integralityBySyncs(maps);
this.log.info("本次成功同步数:" + maps.size());
}
private List<Map> getCompleteInegruty(List<String> jzhs) {
Integer checkIntegrityType = Integer.parseInt(String.valueOf(FileUtils.getJsonByName("checkIntegrityType")));
if (null == checkIntegrityType) {
throw new RuntimeException("homeQualitySet文件中校验方式checkIntegrityType需要配置");
} else {
List<Map> maps = new ArrayList();
if (checkIntegrityType == 1) {
maps = this.afCollectTaskService.getCompleteIntegrity(jzhs);
} else if (checkIntegrityType == 2) {
maps = this.iMzSyncService.getCompleteIntegrity(jzhs);
}
return maps;
}
}
private void integralityBySyncs(List<Map> maps) {
if (!CollectionUtils.isEmpty(maps)) {
StringBuilder sql = new StringBuilder();
for(Map map : maps) {
sql.append("update docus_medicalrecord.t_basic set integrity_desc=");
sql.append("'");
sql.append(map.get("file_title"));
sql.append("',update_time=now()");
sql.append(" where jzh=");
sql.append("'");
sql.append(map.get("jzh"));
sql.append("'");
sql.append(";");
}
System.out.println(sql);
this.afCollectAddMapper.dynamicSql(sql.toString());
}
}
public void addSyncIntegralityByJzhs(String jzhs) {
List<String> jzhList = Arrays.asList(jzhs.split(","));
this.addSyncIntegralityByJzhsMethod(jzhList);
}
}

@ -0,0 +1,119 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.service;
import com.docus.bgts.entity.MzSync;
import com.docus.bgts.entity.MzSyncDetails;
import com.docus.bgts.facade.IMzSyncService;
import com.docus.bgts.mapper.dbmysql.AfCollectAddMapper;
import com.docus.bgts.mapper.dbmysql.TScanAssortMapper;
import com.docus.bgts.mapper.dboracle.MzSyncMapper;
import com.docus.bgts.utils.FileUtils;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@Service
public class MzSyncService implements IMzSyncService {
private String tableName = String.valueOf(FileUtils.getJsonByName("syncTableName"));
private String tableNamespaces = String.valueOf(FileUtils.getJsonByName("syncTableNamespaces"));
private String newSyncTime;
@Autowired
AfCollectAddMapper afCollectAddMapper;
@Autowired
MzSyncMapper mzSyncMapper;
@Autowired
TScanAssortMapper tScanAssortMapper;
@Autowired
UpdateFileService updateFileService;
public MzSyncService() {
DateTimeFormatter isoDate = DateTimeFormatter.ISO_DATE;
this.newSyncTime = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).minusDays(1L).format(isoDate);
}
public List<Map> getCompleteIntegrity(List<String> jzhs) {
List<MzSync> mzSyncs = this.mzSyncMapper.listMzSync(jzhs, this.tableName, this.tableNamespaces);
List<Map> maps = this.verifyIntegrity(mzSyncs, jzhs);
return maps;
}
private List<Map> verifyIntegrity(List<MzSync> mzSyncs, List<String> jzhs) {
List<Map> maps = new ArrayList();
List<MzSync> fileList = this.tScanAssortMapper.selectFilesByJzhs(jzhs);
for(MzSync mzSync : mzSyncs) {
Map map = new HashMap();
String jzh = mzSync.getJzh();
List<MzSyncDetails> mzSyncDetails = mzSync.getMzSyncDetails();
boolean recordFlag = false;
StringBuilder faultFileTitles = new StringBuilder();
for(MzSyncDetails mzSyncDetail : mzSyncDetails) {
String fileTitle = mzSyncDetail.getFileTitle();
if (StringUtils.isNotBlank(fileTitle) && fileTitle.contains("急诊病历")) {
recordFlag = true;
}
String serialnum = mzSyncDetail.getSerialnum();
String collectid = mzSyncDetail.getCollectid();
boolean flag = false;
if (!CollectionUtils.isEmpty(fileList)) {
for(MzSync obj : fileList) {
String jzh1 = obj.getJzh();
if (jzh1.equals(jzh)) {
for(MzSyncDetails vo : obj.getMzSyncDetails()) {
String serialnum1 = vo.getSerialnum();
String collectid1 = vo.getCollectid();
if (serialnum.equals(serialnum1) && collectid.equals(collectid1)) {
flag = true;
mzSyncDetail.setCollectid(vo.getCollectid());
break;
}
}
}
}
}
if (!flag) {
if (StringUtils.isNotBlank(faultFileTitles)) {
faultFileTitles.append(",");
}
faultFileTitles.append(fileTitle + "缺失");
this.updateFileService.updateFile(jzh, mzSyncDetail);
}
}
if (!recordFlag) {
if (StringUtils.isNotBlank(faultFileTitles)) {
faultFileTitles.append(",");
}
faultFileTitles.append("急诊病历缺失");
}
if (StringUtils.isBlank(faultFileTitles)) {
faultFileTitles = new StringBuilder("完整");
}
map.put("jzh", jzh);
map.put("file_title", faultFileTitles.toString());
maps.add(map);
}
return maps;
}
}

@ -0,0 +1,124 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.service;
import com.alibaba.fastjson.JSON;
import com.docus.bgts.entity.MzSyncDetails;
import com.docus.bgts.entity.ReportDownDto;
import com.docus.bgts.entity.ReportDownPatientDto;
import com.docus.bgts.entity.ReportDownScanFileDto;
import com.docus.bgts.entity.ZdAssort;
import com.docus.bgts.enums.Codes;
import com.docus.bgts.facade.IAfCollectTaskService;
import com.docus.bgts.mapper.dbmysql.ZdAssortMapper;
import com.docus.bgts.utils.FileUtils;
import com.docus.bgts.utils.HttpUtils;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
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 org.springframework.util.CollectionUtils;
@Service
public class UpdateFileService {
private final Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
IAfCollectTaskService afCollectTaskService;
@Autowired
ZdAssortMapper zdAssortMapper;
public void updateFile(String jzh, MzSyncDetails mzSyncDetail) {
String collectorid = "";
String assortid = this.getAssortid(mzSyncDetail.getAssortName());
ReportDownDto reportDownDto = new ReportDownDto();
reportDownDto.setAssortid(assortid);
List<ReportDownScanFileDto> reportDownDtoArr = new ArrayList();
ReportDownPatientDto reportDownPatientDto = new ReportDownPatientDto();
reportDownPatientDto.setJzh(jzh);
this.log.info("患者主索引号:" + jzh);
reportDownDto.setPatient(reportDownPatientDto);
String filetitle = mzSyncDetail.getFileTitle();
String downurl = mzSyncDetail.getFileUrl();
if (!StringUtils.isBlank(downurl)) {
downurl = this.subStrUrl(downurl);
if (!StringUtils.isBlank(downurl)) {
String serialnum = mzSyncDetail.getSerialnum();
collectorid = mzSyncDetail.getCollectid();
ReportDownScanFileDto reportDownScanFileDto = new ReportDownScanFileDto();
reportDownScanFileDto.setDownurl(downurl);
reportDownScanFileDto.setFiletitle(filetitle);
reportDownScanFileDto.setSerialnum(serialnum);
reportDownScanFileDto.setFilesource(1);
reportDownScanFileDto.setFilestoragetype(1);
reportDownDtoArr.add(reportDownScanFileDto);
reportDownDto.setCollectorid(collectorid);
reportDownDto.setScanfiles(reportDownDtoArr);
this.afCollectTaskService.insert(reportDownDto);
String post = "";
this.log.info("--------执行上传功能----------");
Map params = (Map)JSON.parseObject(JSON.toJSONString(reportDownDto), Map.class);
Map<String, Object> headMap = new HashMap();
headMap.put("Content-Type", "application/json");
try {
post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.UPLOAD.getMessage())), headMap, params);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
if (StringUtils.isBlank(post)) {
this.log.info("--------上传时出现错误,可能是文件服务没有启动----------");
throw new RuntimeException("上传时出现错误,可能是文件服务没有启动");
} else {
Map resMap = (Map)JSON.parseObject(post, Map.class);
if (String.valueOf(resMap.get("code")).equals("500")) {
throw new RuntimeException(String.valueOf(resMap.get("msg")));
} else {
this.log.info("----------执行成功-----------");
}
}
}
}
}
private String getAssortid(String assortName) {
String assortId = String.valueOf(FileUtils.getJsonByName("assortid"));
if (StringUtils.isBlank(assortId)) {
List<ZdAssort> zdAssorts = this.zdAssortMapper.selectAll(assortName);
if (CollectionUtils.isEmpty(zdAssorts)) {
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
ZdAssort zdAssort = new ZdAssort();
zdAssort.setAssortName(assortName);
zdAssort.setAssortId(uuid);
zdAssort.setEffective(1);
this.zdAssortMapper.insertZdAssort(zdAssort);
assortId = uuid;
} else {
assortId = ((ZdAssort)zdAssorts.get(0)).getAssortId();
}
}
return assortId;
}
private String subStrUrl(String str) {
List<String> replaceUrls = (List)FileUtils.getJsonByName("replaceUrl");
if (null != replaceUrls) {
for(String replaceUrl : replaceUrls) {
str = str.replaceAll(replaceUrl, "");
}
}
return str;
}
}

@ -0,0 +1,44 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
import com.alibaba.fastjson.JSON;
import com.docus.bgts.enums.Codes;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class FileUtils {
public static String currentPath() {
File dir = new File(".");
String currentpath = "";
try {
currentpath = dir.getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
return currentpath;
}
public static String getXmlPath() {
String path = currentPath();
return path + Codes.REQUEST_XML.getMessage();
}
public static String getXmlDetailsPath() {
String path = currentPath();
return path + Codes.REQUEST_details_XML.getMessage();
}
public static Object getJsonByName(String name) {
String path = currentPath();
String json = JsonUtils.readJsonFile(path + Codes.JSON_ADDRESS.getMessage());
Map jsonMap = (Map)JSON.parseObject(json, Map.class);
return jsonMap.get(name);
}
}

@ -0,0 +1,219 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
import com.alibaba.fastjson.JSON;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.dom4j.Element;
public class HttpUtils {
private static PoolingHttpClientConnectionManager cm;
private static String EMPTY_STR = "";
private static String UTF_8 = "UTF-8";
private static void init() {
if (cm == null) {
cm = new PoolingHttpClientConnectionManager();
cm.setMaxTotal(50);
cm.setDefaultMaxPerRoute(5);
}
}
private static CloseableHttpClient getHttpClient() {
init();
return HttpClients.custom().setConnectionManager(cm).build();
}
public static String get(String url) {
HttpGet httpGet = new HttpGet(url);
return getResult((HttpRequestBase)httpGet);
}
public static String get(String url, Map<String, String> params) throws URISyntaxException {
URIBuilder ub = new URIBuilder();
ub.setPath(url);
ArrayList<NameValuePair> pairs = covertParams2NVPS(params);
ub.setParameters(pairs);
HttpGet httpGet = new HttpGet(ub.build());
return getResult((HttpRequestBase)httpGet);
}
public static String get(String url, Map<String, Object> headers, Map<String, String> params) throws URISyntaxException {
URIBuilder ub = new URIBuilder();
ub.setPath(url);
if (params != null) {
ArrayList<NameValuePair> pairs = covertParams2NVPS(params);
ub.setParameters(pairs);
}
HttpGet httpGet = new HttpGet(ub.build());
for(Map.Entry<String, Object> param : headers.entrySet()) {
httpGet.addHeader((String)param.getKey(), String.valueOf(param.getValue()));
}
return getResult((HttpRequestBase)httpGet);
}
public static String post(String url) {
HttpPost httpPost = new HttpPost(url);
return getResult((HttpRequestBase)httpPost);
}
public static String post(String url, Map<String, String> params) throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(covertParams2NVPS(params), "utf-8"));
return getResult((HttpRequestBase)httpPost);
}
public static String post(String url, Object params, Map<String, Object> head) throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
System.out.println(params);
httpPost.setEntity(new StringEntity(params.toString()));
if (params != null) {
for(Map.Entry<String, Object> param : head.entrySet()) {
httpPost.addHeader((String)param.getKey(), String.valueOf(param.getValue()));
}
}
return getResult((HttpRequestBase)httpPost);
}
private static ArrayList<NameValuePair> covertParams2NVPS(Map<String, String> params) {
ArrayList<NameValuePair> pairs = new ArrayList();
for(Map.Entry<String, String> param : params.entrySet()) {
if (param.getValue() != null) {
pairs.add(new BasicNameValuePair((String)param.getKey(), (String)param.getValue()));
}
}
return pairs;
}
public static String post(String url, Map<String, Object> headers, Map<String, Object> params) throws UnsupportedEncodingException {
HttpPost httpPost = new HttpPost(url);
System.out.println(params);
if (params != null) {
for(Map.Entry<String, Object> param : headers.entrySet()) {
httpPost.addHeader((String)param.getKey(), String.valueOf(param.getValue()));
}
}
httpPost.setEntity(new StringEntity(JSON.toJSONString(params), ContentType.APPLICATION_JSON));
return getResult((HttpRequestBase)httpPost);
}
private static String getResult(HttpRequestBase request) {
CloseableHttpClient httpClient = getHttpClient();
try {
CloseableHttpResponse response = httpClient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null) {
String result = EntityUtils.toString(entity, UTF_8);
response.close();
return result;
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
;
}
return EMPTY_STR;
}
private static String getResult(RequestBuilder requestBuilder) {
CloseableHttpClient httpClient = getHttpClient();
try {
CloseableHttpResponse response = httpClient.execute(requestBuilder.build());
HttpEntity entity = response.getEntity();
if (entity != null) {
String result = EntityUtils.toString(entity, UTF_8);
response.close();
return result;
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
;
}
return EMPTY_STR;
}
public static Element reqElement(Element esbEntry, Integer code) {
Element accessControl = esbEntry.addElement("AccessControl");
accessControl.addElement("SysFlag").setText("1");
accessControl.addElement("UserName").setText("WZHBAGL");
accessControl.addElement("Password").setText("WZHBAGL_1127");
accessControl.addElement("Fid").setText("BS04102");
accessControl.addElement("OrderNo").setText("BS04102S51001");
accessControl.addElement("SUBOR_HOSPITAL_DISTRICT").setText("GZ");
Element messageHeader = esbEntry.addElement("MessageHeader");
messageHeader.addElement("Fid").setText("BS04102");
messageHeader.addElement("OrderNo").setText("BS04102S51001");
messageHeader.addElement("SourceSysCode").setText("S51");
messageHeader.addElement("TargetSysCode").setText("S00");
messageHeader.addElement("MsgDate").setText("2021-10-27 17:05:19");
Element requestOption = esbEntry.addElement("RequestOption");
requestOption.addElement("triggerData").setText("0");
requestOption.addElement("dataAmount").setText("500");
Element msgInfo = esbEntry.addElement("MsgInfo");
msgInfo.addAttribute("flag", "1");
msgInfo.addElement("Msg");
Element distinct = msgInfo.addElement("distinct");
distinct.addAttribute("value", "0");
Element query = msgInfo.addElement("query");
query.addAttribute("item", "WS_INPUT");
query.addAttribute("compy", " = ");
query.addAttribute("value", " 1 ");
query.addAttribute("splice", "AND");
Element queryWs = msgInfo.addElement("query_ws");
if (code == 1) {
queryWs.addAttribute("action", "queueReportList");
} else {
queryWs.addAttribute("action", "queueReportInfo");
}
Element res = queryWs.addElement("content").addElement("Request").addElement("Msg");
Element groupInfo = esbEntry.addElement("GroupInfo");
groupInfo.addAttribute("flag", "0");
Element as = groupInfo.addElement("AS");
as.addAttribute("ID", "");
as.addAttribute("linkField", "");
System.out.println(esbEntry.asXML());
return res;
}
}

@ -0,0 +1,43 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.CXFBusFactory;
import org.apache.cxf.common.util.Compiler;
import org.apache.cxf.endpoint.EndpointImplFactory;
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
import org.apache.cxf.jaxws.support.JaxWsEndpointImplFactory;
import java.util.List;
public class JAXDynamicClientFactory extends DynamicClientFactory {
protected JAXDynamicClientFactory(Bus bus) {
super(bus);
}
protected EndpointImplFactory getEndpointImplFactory() {
return JaxWsEndpointImplFactory.getSingleton();
}
protected boolean allowWrapperOps() {
return true;
}
public static JAXDynamicClientFactory newInstance() {
Bus bus = CXFBusFactory.getThreadDefaultBus();
return new JAXDynamicClientFactory(bus);
}
public boolean compileJavaSrc(String classPath, List srcList, String dest) {
Compiler javaCompiler = new Compiler();
javaCompiler.setEncoding("UTF-8");
javaCompiler.setClassPath(classPath);
javaCompiler.setOutputDir(dest);
javaCompiler.setTarget("1.8");
return javaCompiler.compileFiles(srcList);
}
}

@ -0,0 +1,50 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
public class JsonUtils {
public static String readJsonFile(String fileName) {
String jsonStr = "";
Reader reader = null;
FileReader fileReader = null;
try {
File jsonFile = new File(fileName);
fileReader = new FileReader(jsonFile);
reader = new InputStreamReader(new FileInputStream(jsonFile), "utf-8");
int ch = 0;
StringBuffer sb = new StringBuffer();
while((ch = reader.read()) != -1) {
sb.append((char)ch);
}
fileReader.close();
reader.close();
jsonStr = sb.toString();
String var7 = jsonStr;
return var7;
} catch (IOException e) {
e.printStackTrace();
return null;
} finally {
try {
reader.close();
fileReader.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

@ -0,0 +1,78 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
public class SnowflakeIdWorker {
private final long twepoch = 1420041600000L;
private final long workerIdBits = 5L;
private final long datacenterIdBits = 5L;
private final long maxWorkerId = 31L;
private final long maxDatacenterId = 31L;
private final long sequenceBits = 12L;
private final long workerIdShift = 12L;
private final long datacenterIdShift = 17L;
private final long timestampLeftShift = 22L;
private final long sequenceMask = 4095L;
private long workerId;
private long datacenterId;
private long sequence = 0L;
private long lastTimestamp = -1L;
public SnowflakeIdWorker(long workerId, long datacenterId) {
if (workerId <= 31L && workerId >= 0L) {
if (datacenterId <= 31L && datacenterId >= 0L) {
this.workerId = workerId;
this.datacenterId = datacenterId;
} else {
throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", 31L));
}
} else {
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", 31L));
}
}
public synchronized long nextId() {
long timestamp = this.timeGen();
if (timestamp < this.lastTimestamp) {
throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", this.lastTimestamp - timestamp));
} else {
if (this.lastTimestamp == timestamp) {
this.sequence = this.sequence + 1L & 4095L;
if (this.sequence == 0L) {
timestamp = this.tilNextMillis(this.lastTimestamp);
}
} else {
this.sequence = 0L;
}
this.lastTimestamp = timestamp;
return timestamp - 1420041600000L << 22 | this.datacenterId << 17 | this.workerId << 12 | this.sequence;
}
}
protected long tilNextMillis(long lastTimestamp) {
long timestamp;
for(timestamp = this.timeGen(); timestamp <= lastTimestamp; timestamp = this.timeGen()) {
}
return timestamp;
}
protected long timeGen() {
return System.currentTimeMillis();
}
public static void main(String[] args) throws InterruptedException {
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0L, 0L);
for(int i = 0; i < 10; ++i) {
long id = idWorker.nextId();
Thread.sleep(1L);
System.out.println(id);
}
}
}

@ -0,0 +1,132 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.utils;
import com.alibaba.fastjson.JSON;
import com.docus.bgts.enums.Codes;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class XmlUtils {
private SAXReader saxReader = new SAXReader();
private Document document;
public Element getDocument() {
return this.document.getRootElement();
}
public XmlUtils(String path) {
try {
this.document = this.saxReader.read(path);
} catch (DocumentException e) {
e.printStackTrace();
}
}
public XmlUtils(InputStream path) {
try {
this.document = this.saxReader.read(path);
} catch (DocumentException e) {
e.printStackTrace();
}
}
public String isSuccess() {
Element root = this.document.getRootElement();
Element retInfo = root.element("RetInfo");
Element retCode = retInfo.element("RetCode");
String code = retCode.getText();
return code.equals("0") ? "ok" : retInfo.element("RetCon").getText();
}
public String getElement(String name) {
Element root = this.document.getRootElement();
Object directory = FileUtils.getJsonByName(Codes.DIRECTORY.getMessage());
Element current = root;
if (directory == null) {
throw new RuntimeException("没有定义目录结构");
} else {
List<String> directorys = JSON.parseArray(JSON.toJSONString(directory), String.class);
for(String dire :directorys) {
current = current.element(dire);
}
return current.element(name) == null ? "" : current.element(name).getText();
}
}
public Element getMsgElement() {
List<String> argsArr = new ArrayList();
argsArr.add("MsgInfo");
argsArr.add("query_ws");
argsArr.add("content");
argsArr.add("Request");
argsArr.add("Msg");
Element element = this.getElement(argsArr);
return element;
}
public Element getElement(List<String> directory) {
Element root = this.document.getRootElement();
Element current = root;
for(String dire : directory) {
current = current.element(dire);
}
if (current == null) {
throw new RuntimeException("未找到对应节点");
} else {
return current;
}
}
public List<Element> getJsonByName() {
String path = FileUtils.currentPath();
String json = JsonUtils.readJsonFile(path + Codes.JSON_ADDRESS.getMessage());
Map jsonMap = (Map)JSON.parseObject(json, Map.class);
List<String> basicArr = (List)jsonMap.get("doubleBasic");
List<String> directory = (List)jsonMap.get("basicDirectory");
List<Element> elements = null;
Element root = this.getElement(directory);
for(String basic : basicArr) {
elements = root.elements(basic);
if (elements != null && elements.size() > 0) {
break;
}
}
if (elements == null || elements.size() == 0) {
List<String> rootDirectory = (List)jsonMap.get("directory");
root = this.getElement(rootDirectory);
elements = new ArrayList();
elements.add(root);
}
return elements;
}
public String getElementText(String name) {
Element root = this.document.getRootElement();
Element msg = root.element(Codes.MSG.getMessage());
if (msg == null) {
throw new RuntimeException("没有" + Codes.MSG.getMessage() + "节点");
} else {
Element element = msg.element(name);
return element == null ? null : element.getText();
}
}
}

@ -0,0 +1,20 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.web;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FilterConfig {
@Bean
public FilterRegistrationBean getFilter() {
FilterRegistrationBean bean = new FilterRegistrationBean(new MyFilter(), new ServletRegistrationBean[0]);
return bean;
}
}

@ -0,0 +1,39 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.docus.bgts.web;
import com.docus.bgts.enums.Codes;
import com.docus.bgts.utils.FileUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
public class MyFilter implements Filter {
private Logger logger = LogManager.getLogger();
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
this.logger.info("------拦截开始------");
String collectorid = String.valueOf(FileUtils.getJsonByName("collectorid"));
if (collectorid.equals(Codes.SMCODE.getCode())) {
this.logger.info("-----当前请求已被拦截...------");
} else if (collectorid.equals(Codes.ZZCODE.getCode())) {
this.logger.info("-----当前请求已被拦截...------");
} else {
this.logger.info("----已放行----");
filterChain.doFilter(servletRequest, servletResponse);
}
}
public void destroy() {
}
}

@ -0,0 +1,37 @@
server:
port: 9308
# http
docus:
downloadPlatformAddress: http://192.9.100.171:9291
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
field-strategy: NOT_EMPTY
db-type: MYSQL
beat:
url: http://localhost:9399/beat
ws:
#url: http://localhost:8010/ws_server/weather?wsdl
#url: http://192.9.200.89:7827/Ewell_WS_S51?wsdl
url: http://192.9.200.89:7828/Ewell_WS_S51?wsdl
localMethod: OperationA
spring:
datasource:
mysql-docus:
driver-class-name: com.mysql.cj.jdbc.Driver
username: docus
password: docus702
url: jdbc:mysql://db.docus.cn:3306/docus_archivefile?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
oracle-docus:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@192.168.117.100:1521:helowin
username: docus
password: docus702

@ -0,0 +1,76 @@
<?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.docus.bgts.mapper.dbmysql.AfCollectAddMapper">
<select id="getTimeByAdd" resultType="date">
select begin_stage_date from af_collect_add where classify=#{classIfy} limit 0,1
</select>
<select id="listJzh" resultType="string">
select jzh
from docus_medicalrecord.t_basic
where jzh is not null
order by create_time desc
limit ${pageNumber},${pageSize}
</select>
<select id="selectDate" resultType="java.util.Map">
select admiss_date,dis_date
from docus_medicalrecord.t_basic
where jzh=#{jzh}
</select>
<select id="integrality" resultType="map">
<foreach collection="mzSyncs" item="mzSync" separator=" union all ">
SELECT
ifnull( GROUP_CONCAT( concat( file_title, '缺失' ) ), '完整' ) AS file_title,${mzSync.jzh} as jzh
FROM
<foreach collection="mzSync.mzSyncDetails" item="mzSyncDetail" separator=" UNION ALL SELECT" open="( SELECT" close=") as t">
'${mzSyncDetail.serialnum}' as serialnum,
'${mzSyncDetail.fileTitle}' AS file_title
</foreach>
WHERE
serialnum NOT IN (
SELECT
a.serialnum
FROM
af_downfile a
JOIN docus_medicalrecord.t_basic b ON a.patient_id = b.patient_id
WHERE
b.jzh = #{mzSync.jzh}
AND a.serialnum IN
<foreach collection="mzSync.mzSyncDetails" close=")" open="(" separator="," item="mzSyncDetail">
'${mzSyncDetail.serialnum}'
</foreach>
)
</foreach>
</select>
<update id="updateTBasic">
update docus_medicalrecord.t_basic
set integrity_desc=#{result}
where jzh=#{jzh}
</update>
<select id="listJzhAndAdd" resultType="string">
SELECT
jzh
FROM
docus_medicalrecord.t_basic a
JOIN t_scan_assort b ON a.patient_id = b.patient_id
WHERE
<choose>
<when test="endDate != null and endDate != ''">
b.create_time BETWEEN #{startDate} AND concat(#{endDate},' 23:59:59')
</when>
<otherwise>
b.create_time >= #{startDate}
</otherwise>
</choose>
AND a.jzh IS NOT NULL
GROUP BY
jzh
limit ${front},${later}
</select>
</mapper>

@ -0,0 +1,90 @@
<?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.docus.bgts.mapper.dbmysql.AfCollectTaskMapper">
<select id="getpatientIdByEmpId" resultType="string">
select patient_id
from docus_medicalrecord.t_basic
where jzh = #{jzh}
</select>
<select id="getjzhByDate" resultType="map">
select inpatient_no,admiss_date,dis_date,admiss_times,jzh
from docus_medicalrecord.t_basic
where dis_date between #{startDate} and #{endDate}
order by dis_date
limit #{size},#{current}
</select>
<select id="getC1ByPatientId" resultType="string">
select C1
from af_collect_task
where
patient_id in
<foreach collection="patientIds" open="(" close=")" item="patientId" separator=",">
#{patientId}
</foreach>
and sysflag=#{collectorId}
</select>
<select id="getJzhByPatientId" resultType="String">
select jzh
from docus_medicalrecord.t_basic
where
patient_id in
<foreach collection="patientIds" open="(" close=")" item="patientId" separator=",">
#{patientId}
</foreach>
</select>
<select id="getPatientIdByC1" resultType="String">
select patient_id
from af_collect_task
where
C1 in
<foreach collection="C1s" open="(" close=")" item="c1" separator=",">
#{c1}
</foreach>
</select>
<!--根据jzh分组查询任务完成情况-->
<select id="selectListByJzhs" resultMap="groupByJzh">
SELECT
id,
c3 jzh,
c2 fileTitle,
state
FROM
af_collect_task
WHERE
c3 IN
(<foreach collection="jzhs" item="jzh" separator=",">
#{jzh}
</foreach>)
</select>
<select id="getPatientIdByInpatientNo" resultType="java.lang.String">
select patient_id
from docus_medicalrecord.t_basic
where inpatient_no=#{inPatientNo}
and admiss_times=#{visitId}
</select>
<select id="getJzhByInpatientNo" resultType="java.lang.String">
select jzh
from docus_medicalrecord.t_basic
where inpatient_no=#{inPatientNo}
and admiss_times=#{visitId}
and jzh is not null
</select>
<select id="getJzhByJzh" resultType="java.lang.String">
select jzh
from docus_medicalrecord.t_basic
where jzh=#{jzh}
</select>
<resultMap id="groupByJzh" type="com.docus.bgts.entity.JzhListSync">
<result property="jzh" column="jzh"></result>
<collection property="taskDetails" ofType="com.docus.bgts.entity.TaskDetail">
<result property="id" column="id"></result>
<result property="state" column="state"></result>
<result property="fileTitle" column="fileTitle"></result>
</collection>
</resultMap>
</mapper>

@ -0,0 +1,10 @@
<?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.docus.bgts.mapper.dbmysql.MrReportErrorMapper">
<insert id="insert">
insert into docus_medicalrecord.mr_report_error(xml,report_type,create_time)
values(#{mrReportError.xml},#{mrReportError.reportType},#{mrReportError.createTime})
</insert>
</mapper>

@ -0,0 +1,25 @@
<?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.docus.bgts.mapper.dbmysql.TScanAssortMapper">
<!--根据记账号集合查询文件信息集合-->
<select id="selectFilesByJzhs" resultMap="mzSyncAnddeI">
SELECT
C3 jzh,
sysflag collectid,
c1 serialnum,
c2 fileTitle
FROM
af_collect_task
WHERE
state = '3'
AND C3 IN <foreach collection="jzhs" item="jzh" close=")" open="(" separator=",">#{jzh}</foreach>
</select>
<resultMap id="mzSyncAnddeI" type="com.docus.bgts.entity.MzSync">
<result property="jzh" column="jzh"></result>
<collection property="mzSyncDetails" ofType="com.docus.bgts.entity.MzSyncDetails">
<result property="serialnum" column="serialnum"></result>
<result property="fileTitle" column="file_title"></result>
<result property="collectid" column="collectid"></result>
</collection>
</resultMap>
</mapper>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.bgts.mapper.dbmysql.ZdAssortMapper">
<resultMap id="BaseResultMap" type="com.docus.bgts.entity.ZdAssort">
</resultMap>
<select id="selectAll" resultMap="BaseResultMap">
SELECT
assort_id,
assort_name
FROM
zd_assort
WHERE
effective = 1
<if test="assortName != null and assortName != ''">
AND assort_name = #{assortName}
</if>
</select>
<insert id="insertZdAssort">
insert into zd_assort(assort_id,assort_name,effective) values(#{zdAssort.assortId},#{zdAssort.assortName},#{zdAssort.effective})
</insert>
</mapper>

@ -0,0 +1,38 @@
<?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.docus.bgts.mapper.dboracle.MzSyncMapper">
<select id="listMzSync" resultMap="mzSyncAnddeI">
SELECT *
FROM
(SELECT "NAVICAT_TABLE".*, ROWNUM "NAVICAT_ROWNUM"
FROM
(SELECT
a.DOCUMENT_TOPIC as assortName,
a.DOCUMENT_TITLE as file_title,
a.UNIQUE_ID as serialnum,
a.VISITING_SERIAL_NUMBER as jzh,
a.ARCHIVED_URL as fileUrl,
a.DOCUMENT_PRODUCER as collectid,
ROWID "NAVICAT_ROWID"
FROM "${tableNamespace}"."${tableName}" a
where VISITING_SERIAL_NUMBER in
<foreach collection="jzhs" item="jzh" close=")" open="(" separator=",">
#{jzh}
</foreach>
) "NAVICAT_TABLE"
)
</select>
<resultMap id="mzSyncAnddeI" type="com.docus.bgts.entity.MzSync">
<result property="jzh" column="jzh"></result>
<collection property="mzSyncDetails" ofType="com.docus.bgts.entity.MzSyncDetails">
<result property="assortName" column="assortName"></result>
<result property="serialnum" column="serialnum"></result>
<result property="fileTitle" column="file_title"></result>
<result property="fileUrl" column="fileUrl"></result>
<result property="collectid" column="collectid"></result>
</collection>
</resultMap>
</mapper>

@ -0,0 +1,10 @@
<?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.docus.bgts.mapper.dboracle.TestMapper">
<select id="getA" resultType="string">
SELECT "DOCUS"."student"."id" FROM "DOCUS"."student"
</select>
</mapper>

@ -0,0 +1,33 @@
<?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.docus.bgts.mapper.dboracle.VDocumentPdfMapper">
<select id="listCollectPage" resultType="map">
SELECT
*
FROM
(
SELECT
"NAVICAT_TABLE".*,
ROWNUM "NAVICAT_ROWNUM"
FROM
(
SELECT
<foreach collection="fieldArr" item="field" separator=",">
${namespace}.${tableName}.${field}
</foreach>
FROM
${namespace}.${tableName}
WHERE
${collectTimeName} BETWEEN TO_DATE ( #{startTime}, 'YYYY-MM-DD HH24:MI:SS' )
AND TO_DATE ( #{endTime}, 'YYYY-MM-DD HH24:MI:SS' )
) "NAVICAT_TABLE"
WHERE
ROWNUM &lt;= ${size}
)
WHERE
"NAVICAT_ROWNUM" &gt; ${current}
</select>
</mapper>
Loading…
Cancel
Save