master
commit
101123bd3f
@ -0,0 +1,35 @@
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
docus-services/docus-services-system1/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
*.log
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
mvnw*
|
||||
*.cmd
|
||||
*.mvn
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
logs*
|
||||
@ -0,0 +1,73 @@
|
||||
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.0.0.xsd">
|
||||
|
||||
<id>exe</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<fileSets>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/lib</outputDirectory>
|
||||
<directory>${basedir}/target/lib</directory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/config</outputDirectory>
|
||||
<directory>${basedir}/target/resources</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.xml</include>
|
||||
<include>*.yml</include>
|
||||
<include>*.properties</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/dataConfig</outputDirectory>
|
||||
<directory>${basedir}/target/dataConfig</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.json</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}/target/resources/bin</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.bat</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}/target/resources/bin</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<directory>${basedir}</directory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>*.exe</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<!-- 将项目启动jar打包到boot目录中 -->
|
||||
<fileSet>
|
||||
<directory>${basedir}/target</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<fileMode>0755</fileMode>
|
||||
<includes>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
@ -0,0 +1,19 @@
|
||||
{
|
||||
"mappings": [{
|
||||
"hospital": "emr",
|
||||
"wzh": "1"
|
||||
},
|
||||
{
|
||||
"hospital": "hl",
|
||||
"wzh": "3"
|
||||
},
|
||||
{
|
||||
"hospital": "sy",
|
||||
"wzh": "6"
|
||||
},
|
||||
{
|
||||
"hospital": "hz",
|
||||
"wzh": "13"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"startTime":"2023-02-16 00:00:00",
|
||||
"pageNum":"1"
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.docus.server;
|
||||
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.jms.annotation.EnableJms;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages ={"com.docus","com.neusoft"})
|
||||
@EnableJms
|
||||
@EnableFeignClients
|
||||
public class AppRunBootstrap {
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
|
||||
SpringApplication.run(AppRunBootstrap.class,args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.docus.server.collection.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
|
||||
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.boot.context.properties.EnableConfigurationProperties;
|
||||
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.server.collection.config.DbMysqlConfig.PACKAGE, sqlSessionFactoryRef = "dbmysqlSqlSessionFactory")
|
||||
@EnableConfigurationProperties(MybatisPlusProperties.class)
|
||||
public class DbMysqlConfig {
|
||||
// 这里一定要指定精准 否则后果不堪设想
|
||||
static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.mapper";
|
||||
static final String MAPPER_LOCATION = "classpath:mapper/*.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(secondDataSource());
|
||||
}
|
||||
|
||||
@Bean(name = "dbmysqlSqlSessionFactory")
|
||||
public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbmysqlDataSource") DataSource dataSource)
|
||||
throws Exception {
|
||||
//配置mybatis-plus源
|
||||
MybatisSqlSessionFactoryBean bean = new MybatisSqlSessionFactoryBean();
|
||||
//添加XML目录
|
||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||
bean.setMapperLocations(resolver.getResources(MAPPER_LOCATION));
|
||||
// 实体类别名
|
||||
bean.setTypeAliasesPackage("com.docus.server.collection.infrastructure.dao.entity.*");
|
||||
MybatisConfiguration configuration = new MybatisConfiguration();
|
||||
//开启下划线转驼峰
|
||||
configuration.setMapUnderscoreToCamelCase(true);
|
||||
configuration.setJdbcTypeForNull(JdbcType.NULL);
|
||||
bean.setDataSource(dataSource);
|
||||
bean.setConfiguration(configuration);
|
||||
return bean.getObject();
|
||||
//
|
||||
// final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
||||
// sessionFactory.setDataSource(secondDataSource);
|
||||
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
|
||||
// .getResources(DbMysqlConfig.MAPPER_LOCATION));
|
||||
// return sessionFactory.getObject();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
//package com.docus.server.collection.config;
|
||||
//
|
||||
//import com.alibaba.druid.pool.DruidDataSource;
|
||||
//import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
|
||||
//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.boot.context.properties.EnableConfigurationProperties;
|
||||
//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.server.collection.config.DbSqlserverConfig.PACKAGE, sqlSessionFactoryRef = "dbsqlserverSqlSessionFactory")
|
||||
//@EnableConfigurationProperties(MybatisPlusProperties.class)
|
||||
//public class DbSqlserverConfig {
|
||||
// // 这里一定要指定精准 否则后果不堪设想
|
||||
// static final String PACKAGE = "com.docus.server.collection.infrastructure.dao.sqlserver";
|
||||
// static final String MAPPER_LOCATION = "classpath:sqlserver/*.xml";
|
||||
//
|
||||
// @Bean(name = "dbsqlserverDataSource")
|
||||
// @ConfigurationProperties(prefix = "spring.datasource.sqlserver-docus")
|
||||
// public DataSource secondDataSource(){
|
||||
// return new DruidDataSource();
|
||||
// }
|
||||
//
|
||||
// /*注入事务*/
|
||||
// @Bean(name = "dbsqlserverTransactionManager")
|
||||
// public DataSourceTransactionManager secondTransactionManager() {
|
||||
// return new DataSourceTransactionManager(secondDataSource());
|
||||
// }
|
||||
//
|
||||
// @Bean(name = "dbsqlserverSqlSessionFactory")
|
||||
// public SqlSessionFactory secondSqlSessionFactory(@Qualifier("dbsqlserverDataSource") DataSource secondDataSource)
|
||||
// throws Exception {
|
||||
// final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
|
||||
// sessionFactory.setDataSource(secondDataSource);
|
||||
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
|
||||
// .getResources(com.docus.server.collection.config.DbSqlserverConfig.MAPPER_LOCATION));
|
||||
// return sessionFactory.getObject();
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.docus.server.collection.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 用户同步配置
|
||||
* @author wyb
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class UserSyncConfig {
|
||||
@Value("${docus.user.defpwd:}")
|
||||
private String password;
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.docus.server.collection.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.docus.infrastructure.web.api.CommonResult;
|
||||
import com.docus.server.collection.dto.*;
|
||||
import com.docus.server.collection.service.IPowerDeptService;
|
||||
import com.docus.server.collection.service.IPowerUserService;
|
||||
import com.docus.server.collection.service.ITBasicService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("省中医珠海分院相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/szy")
|
||||
public class SzyZhController {
|
||||
|
||||
@Autowired
|
||||
private ITBasicService tBasicService;
|
||||
|
||||
@Autowired
|
||||
private IPowerDeptService powerDeptService;
|
||||
|
||||
@Autowired
|
||||
private IPowerUserService powerUserService;
|
||||
|
||||
@ApiOperation("基础数据同步")
|
||||
@PostMapping("/setRecord")
|
||||
public CommonResult setRecord(@RequestBody List<SzyTBasicDto> dtos) {
|
||||
if(ObjectUtil.isEmpty(dtos)){
|
||||
return CommonResult.failed("数据为空");
|
||||
}
|
||||
for (SzyTBasicDto dto : dtos) {
|
||||
if(ObjectUtil.isEmpty(dto.getInpatientNo())){
|
||||
log.error("住院号为空"+dto.toString());
|
||||
return CommonResult.failed("住院号为空");
|
||||
}
|
||||
if(ObjectUtil.isEmpty(dto.getJzh())){
|
||||
log.error("住院号为空"+dto.toString());
|
||||
return CommonResult.failed("住院流水号为空");
|
||||
}
|
||||
}
|
||||
tBasicService.setSzyTBasic(dtos);
|
||||
return CommonResult.success("同步成功");
|
||||
}
|
||||
|
||||
@ApiOperation("科室数据同步")
|
||||
@PostMapping("/setDept")
|
||||
public CommonResult setDept(@RequestBody List<SzyDeptDto> dtos) {
|
||||
if(ObjectUtil.isEmpty(dtos)){
|
||||
return CommonResult.failed("数据为空");
|
||||
}
|
||||
for (SzyDeptDto dto : dtos) {
|
||||
if(ObjectUtil.isEmpty(dto.getDeptCode())){
|
||||
log.error("科室编号为空"+dto.toString());
|
||||
return CommonResult.failed("科室编号为空");
|
||||
}
|
||||
if(ObjectUtil.isEmpty(dto.getDeptName())){
|
||||
log.error("科室名为空"+dto.toString());
|
||||
return CommonResult.failed("科室名为空");
|
||||
}
|
||||
powerDeptService.add(dto);
|
||||
}
|
||||
return CommonResult.success("同步成功");
|
||||
}
|
||||
|
||||
@ApiOperation("用户数据同步")
|
||||
@PostMapping("/setUser")
|
||||
public CommonResult setUser(@RequestBody List<SzyUserDto> dtos) {
|
||||
if(ObjectUtil.isEmpty(dtos)){
|
||||
return CommonResult.failed("数据为空");
|
||||
}
|
||||
for (SzyUserDto dto : dtos) {
|
||||
if(ObjectUtil.isEmpty(dto.getUserName())){
|
||||
log.error("用户工号为空"+dto.toString());
|
||||
return CommonResult.failed("用户工号为空");
|
||||
}
|
||||
powerUserService.add(dto);
|
||||
}
|
||||
return CommonResult.success("同步成功");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.docus.server.collection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wen yongbin
|
||||
* @date 2023年2月26日00:21:00
|
||||
*/
|
||||
@Data
|
||||
public class DeptModifyParam {
|
||||
|
||||
/**
|
||||
* 科室主键id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 科室代码
|
||||
*/
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人名称
|
||||
*/
|
||||
private String authorName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
private String authorId;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.docus.server.collection.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wen yongbin
|
||||
* @date 2023年2月26日00:21:00
|
||||
*/
|
||||
@Data
|
||||
public class SzyDeptDto {
|
||||
|
||||
/**
|
||||
* 科室代码
|
||||
*/
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
@ApiModelProperty(value = "科室名称")
|
||||
private String deptName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人名称")
|
||||
private String authorName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人ID")
|
||||
private String authorId;
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.docus.server.collection.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fang Ruichuan
|
||||
* @date 2022-11-14 19:02
|
||||
*/
|
||||
@Data
|
||||
public class SzyUserDto {
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "用户姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 用户工号
|
||||
*/
|
||||
@ApiModelProperty(value = "用户工号")
|
||||
private String userName;
|
||||
/**
|
||||
* 所属科室编号
|
||||
*/
|
||||
@ApiModelProperty(value = "所属科室编号")
|
||||
private String deptId;
|
||||
/**
|
||||
* 角色Id 初始 0
|
||||
*/
|
||||
@ApiModelProperty(value = "角色Id 初始 0")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 操作人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人名称")
|
||||
private String authorName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
@ApiModelProperty(value = "操作人ID")
|
||||
private String authorId;
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.docus.server.collection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-webservice-sdry
|
||||
* @BelongsPackage: com.docus.server.collection.webservice
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-02-25 14:44
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class TBasicDto {
|
||||
private String jzh;
|
||||
private String inpatientNo;
|
||||
private String admissTimes;
|
||||
private String name ;
|
||||
private String admissDate ;
|
||||
private String disDate ;
|
||||
private String admissDeptName ;
|
||||
private String disDeptName ;
|
||||
private String attending;
|
||||
private String attendingName;
|
||||
private String dutyNurse;
|
||||
private String age;
|
||||
private String sex;
|
||||
private String idCard;
|
||||
private String disDept;
|
||||
private String admissDept;
|
||||
private String bedNum;
|
||||
private String isDead;
|
||||
private String admissDays;
|
||||
private String motherInpatientNo;
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.docus.server.collection.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
|
||||
public class CollectSysDictionary implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "id 雪花算法")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "采集来源系统编号")
|
||||
private String sysCode;
|
||||
|
||||
@ApiModelProperty(value = "采集来源系统名称")
|
||||
private String sysName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.docus.server.collection.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.metadata.BaseRowModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-mzzy-collector
|
||||
* @BelongsPackage: com.docus.server.collection.entity
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2024-07-31 15:47
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class VJsjWzh7addnjreport extends BaseRowModel {
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
@ExcelProperty(value = {"姓名"}, index =0 )
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "住院号")
|
||||
@ExcelProperty(value = {"住院号"}, index =1 )
|
||||
private String inpatientNo;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@ExcelProperty(value = {"类型"}, index =2 )
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "申请科室")
|
||||
@ExcelProperty(value = {"申请科室"}, index =3 )
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty(value = "项目")
|
||||
@ExcelProperty(value = {"项目"}, index =4 )
|
||||
private String item;
|
||||
|
||||
@ApiModelProperty(value = "登记时间")
|
||||
@ExcelProperty(value = {"登记时间"}, index =5 )
|
||||
private Date registDateTime;
|
||||
|
||||
@ApiModelProperty(value = "报告时间")
|
||||
@ExcelProperty(value = {"报告时间"}, index =6 )
|
||||
private Date reportDateTime;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.docus.server.collection.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.metadata.BaseRowModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-mzzy-collector
|
||||
* @BelongsPackage: com.docus.server.collection.entity
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2024-07-31 15:47
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class VJsjWzh7addnjreportVo extends BaseRowModel {
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
@ExcelProperty(value = {"姓名"}, index =0 )
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "住院号")
|
||||
@ExcelProperty(value = {"住院号"}, index =1 )
|
||||
private String inpatientNo;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@ExcelProperty(value = {"类型"}, index =2 )
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "申请科室")
|
||||
@ExcelProperty(value = {"申请科室"}, index =3 )
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty(value = "项目")
|
||||
@ExcelProperty(value = {"项目"}, index =4 )
|
||||
private String item;
|
||||
|
||||
@ApiModelProperty(value = "登记时间")
|
||||
@ExcelProperty(value = {"登记时间"}, index =5 )
|
||||
private String registDateTime;
|
||||
|
||||
@ApiModelProperty(value = "报告时间")
|
||||
@ExcelProperty(value = {"报告时间"}, index =6 )
|
||||
private String reportDateTime;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.docus.server.collection.enums;
|
||||
|
||||
/**
|
||||
* 同步文件的方式 全部或者根据系统id同步
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
public enum FileSyncMethod {
|
||||
/**
|
||||
* 全部同步
|
||||
*/
|
||||
ALL,
|
||||
/**
|
||||
* 根据系统id同步
|
||||
*/
|
||||
BY_SYS_ID
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.docus.server.collection.infrastructure.dao.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 科室
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "PowerDept对象", description = "科室")
|
||||
public class PowerDept implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "科室id")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "科室名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "字典id")
|
||||
private Integer dictId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
private Integer effective;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String creater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateDate;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updater;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "临床科室排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "0:非临床科室,1:临床科室")
|
||||
private Integer type;
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.docus.server.collection.infrastructure.dao.entity;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="PowerUser对象", description="用户表")
|
||||
public class PowerUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "登陆名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户密码")
|
||||
private String userPwd;
|
||||
|
||||
@ApiModelProperty(value = "性别 0 男 1 女")
|
||||
private Integer userSex;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer userAge;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String userTel;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(value = "微信信息")
|
||||
private String wxBank;
|
||||
|
||||
@ApiModelProperty(value = "职位")
|
||||
private String userPosition;
|
||||
|
||||
@ApiModelProperty(value = "角色")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
private Integer effective;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String creater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateDate;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updater;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "登录标志 默认为0为未登录 1登录")
|
||||
private Integer loginFlag;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "所属科室代码 多个以,分隔")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "权限科室 拥有对科室查阅权限")
|
||||
private String powerDept;
|
||||
|
||||
@ApiModelProperty(value = "权限 拥有对主管医生查阅权限")
|
||||
private String powerAttending;
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.docus.server.collection.infrastructure.dao.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-webservice-sdry
|
||||
* @BelongsPackage: com.docus.server.collection.entity
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-03-07 15:29
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "tBasicExtend对象", description = "病案基本信息扩展")
|
||||
public class TBasicExtend implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "病案主键")
|
||||
private String patientId;
|
||||
|
||||
@ApiModelProperty(value = "病区编号")
|
||||
private String wardCode;
|
||||
|
||||
@ApiModelProperty(value = "病区名称")
|
||||
private String wardName;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.docus.server.collection.infrastructure.dao.mapper;
|
||||
|
||||
import com.docus.server.collection.entity.CollectSysDictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 采集系统字典 mapper
|
||||
* </p>
|
||||
*
|
||||
* @author wen yongbin
|
||||
* @since 2023-7-26 08:45:51
|
||||
*/
|
||||
public interface CollectSysDictionaryMapper {
|
||||
|
||||
/**
|
||||
* 查询无纸化系统所有的采集系统字典
|
||||
* @return 无纸化系统所有的采集系统字典
|
||||
*/
|
||||
List<CollectSysDictionary> findAll();
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.docus.server.collection.infrastructure.dao.mapper;
|
||||
|
||||
import com.docus.server.collection.dto.DeptModifyParam;
|
||||
import com.docus.server.collection.infrastructure.dao.entity.PowerDept;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 科室表 mapper
|
||||
* </p>
|
||||
*
|
||||
* @author wen yongbin
|
||||
* @since 2023年2月25日22:28:58
|
||||
*/
|
||||
public interface PowerDeptMapper {
|
||||
|
||||
/**
|
||||
* 根据科室编码查询科室信息
|
||||
* @param deptCode 科室编码
|
||||
* @return 科室信息
|
||||
*/
|
||||
PowerDept getDeptByDeptCode(@Param("deptCode") String deptCode);
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
* @param deptModifyParam 科室操作参数
|
||||
* @return 数据库更新信息
|
||||
*/
|
||||
int updateDept(@Param("dept") DeptModifyParam deptModifyParam);
|
||||
|
||||
/**
|
||||
* 添加新科室
|
||||
* @param deptModifyParam 科室操作参数
|
||||
* @return 数据库添加信息
|
||||
*/
|
||||
int addDept(@Param("dept") DeptModifyParam deptModifyParam);
|
||||
|
||||
/**
|
||||
* 根据科室编码删除科室信息
|
||||
* @param deptCode 科室编码
|
||||
* @return 数据库删除信息
|
||||
*/
|
||||
int delDeptByDeptCode(@Param("deptCode") String deptCode);
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.docus.server.collection.infrastructure.dao.mapper;
|
||||
|
||||
import com.docus.server.collection.dto.UserModifyParam;
|
||||
import com.docus.server.collection.infrastructure.dao.entity.PowerUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 mapper
|
||||
* </p>
|
||||
*
|
||||
* @author wen yongbin
|
||||
* @since 2023年2月25日22:28:58
|
||||
*/
|
||||
public interface PowerUserMapper {
|
||||
|
||||
/**
|
||||
* 根据用户工号查询用户信息
|
||||
* @param userName 用户工号
|
||||
* @return 用户信息
|
||||
*/
|
||||
PowerUser getUserByUserName(@Param("userName") String userName);
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
* @param userModifyParam 用户操作参数
|
||||
* @return 数据库更新信息
|
||||
*/
|
||||
int updateUser(@Param("user") UserModifyParam userModifyParam);
|
||||
|
||||
/**
|
||||
* 添加新用户
|
||||
* @param userModifyParam 用户操作参数
|
||||
* @return 数据库添加信息
|
||||
*/
|
||||
int addUser(@Param("user") UserModifyParam userModifyParam);
|
||||
|
||||
/**
|
||||
* 根据用户工号删除用户信息
|
||||
* @param userName 用户工号
|
||||
* @return 数据库删除信息
|
||||
*/
|
||||
int delUserByUserName(@Param("userName") String userName);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.docus.server.collection.infrastructure.dao.mapper;
|
||||
|
||||
|
||||
import com.docus.server.collection.infrastructure.dao.entity.TBasic;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 病案基本信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-14
|
||||
*/
|
||||
public interface TBasicMapper{
|
||||
|
||||
Integer selectOne(@Param("jzh") String jzh);
|
||||
|
||||
Integer insertBatch(@Param("tBasicList") List<TBasic> tBasicList);
|
||||
|
||||
Integer update(@Param("tBasic") TBasic tBasic);
|
||||
|
||||
String getPatientIdByJzh(@Param("jzh") String jzh);
|
||||
|
||||
List<String> getPatientIdByMomJzh(@Param("momJzh") String momJzh);
|
||||
|
||||
List<String> getPid();
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.docus.server.collection.infrastructure.dao.sqlserver;
|
||||
|
||||
import com.docus.server.collection.dto.VJsjWzh7addnjreportDto;
|
||||
import com.docus.server.collection.entity.VJsjWzh7addnjreport;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-mzzy-collector
|
||||
* @BelongsPackage: com.docus.server.collection.infrastructure.dao.mapper.sqlserver
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2024-07-31 14:31
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface VJsjWzh7addnjreportMapper {
|
||||
List<String> getList();
|
||||
|
||||
List<VJsjWzh7addnjreport> getReport(@Param("dto") VJsjWzh7addnjreportDto dto);
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.docus.server.collection.service;
|
||||
|
||||
import com.docus.server.collection.dto.DeptDto;
|
||||
import com.docus.server.collection.dto.SzyDeptDto;
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*/
|
||||
public interface IPowerDeptService {
|
||||
/**
|
||||
* 科室注册
|
||||
*
|
||||
* @param deptDto 用户注册参数
|
||||
* @return 处理结果
|
||||
*/
|
||||
boolean register(DeptDto deptDto);
|
||||
|
||||
/**
|
||||
* 根据科室编号删除科室
|
||||
*
|
||||
* @param deptCode 科室编码
|
||||
* @return 删除结果
|
||||
*/
|
||||
boolean delDeptByDeptCode(String deptCode);
|
||||
|
||||
/**
|
||||
* 科室注册
|
||||
*
|
||||
* @param deptDto 用户注册参数
|
||||
* @return 处理结果
|
||||
*/
|
||||
void add(SzyDeptDto deptDto);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.docus.server.collection.service;
|
||||
|
||||
import com.docus.server.collection.dto.SzyUserDto;
|
||||
import com.docus.server.collection.dto.UserDto;
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*/
|
||||
public interface IPowerUserService {
|
||||
/**
|
||||
* 用户注册
|
||||
*
|
||||
* @param userDto 用户注册参数
|
||||
* @return 处理结果
|
||||
*/
|
||||
boolean register(UserDto userDto);
|
||||
|
||||
/**
|
||||
* 根据用户工号删除用户
|
||||
*
|
||||
* @param userName 用户工号
|
||||
* @return 删除结果
|
||||
*/
|
||||
boolean delUserByUserName(String userName);
|
||||
|
||||
void add(SzyUserDto dto);
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.docus.server.collection.service;
|
||||
|
||||
import com.docus.server.collection.dto.SzyTBasicDto;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public interface ITBasicService {
|
||||
|
||||
void setSzyTBasic(List<SzyTBasicDto> dtos) ;
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.docus.server.collection.service.impl;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.collection.dto.DeptDto;
|
||||
import com.docus.server.collection.dto.DeptModifyParam;
|
||||
import com.docus.server.collection.dto.SzyDeptDto;
|
||||
import com.docus.server.collection.infrastructure.dao.entity.PowerDept;
|
||||
import com.docus.server.collection.infrastructure.dao.mapper.PowerDeptMapper;
|
||||
import com.docus.server.collection.service.IPowerDeptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 科室服务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class PowerDeptServiceImpl implements IPowerDeptService {
|
||||
@Resource
|
||||
private PowerDeptMapper powerDeptMapper;
|
||||
@Resource
|
||||
private IdService idService;
|
||||
|
||||
@Override
|
||||
public boolean register(DeptDto deptDto) {
|
||||
PowerDept powerDept = powerDeptMapper.getDeptByDeptCode(deptDto.getDeptCode());
|
||||
DeptModifyParam deptModifyParam = deptDto.transDeptAddParam();
|
||||
if (Func.isEmpty(powerDept)) {
|
||||
long deptId = idService.getDateSeq();
|
||||
deptModifyParam.setDeptId(deptId);
|
||||
powerDeptMapper.addDept(deptModifyParam);
|
||||
return true;
|
||||
}
|
||||
deptModifyParam.setDeptId(powerDept.getDeptId());
|
||||
powerDeptMapper.updateDept(deptModifyParam);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delDeptByDeptCode(String deptCode) {
|
||||
PowerDept powerDept = powerDeptMapper.getDeptByDeptCode(deptCode);
|
||||
if (Func.isEmpty(powerDept)) {
|
||||
return true;
|
||||
}
|
||||
powerDeptMapper.delDeptByDeptCode(deptCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SzyDeptDto deptDto) {
|
||||
PowerDept powerDept = powerDeptMapper.getDeptByDeptCode(deptDto.getDeptCode());
|
||||
DeptModifyParam deptModifyParam =new DeptModifyParam();
|
||||
deptModifyParam.setAuthorId(deptDto.getAuthorId());
|
||||
deptModifyParam.setAuthorName(deptDto.getAuthorName());
|
||||
deptModifyParam.setDeptCode(deptDto.getDeptCode());
|
||||
deptModifyParam.setDeptName(deptDto.getDeptName());
|
||||
if (Func.isEmpty(powerDept)) {
|
||||
long deptId = idService.getDateSeq();
|
||||
deptModifyParam.setDeptId(deptId);
|
||||
powerDeptMapper.addDept(deptModifyParam);
|
||||
return;
|
||||
}
|
||||
deptModifyParam.setDeptId(powerDept.getDeptId());
|
||||
powerDeptMapper.updateDept(deptModifyParam);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.docus.server.collection.service.impl;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.collection.config.UserSyncConfig;
|
||||
import com.docus.server.collection.dto.SzyUserDto;
|
||||
import com.docus.server.collection.dto.UserDto;
|
||||
import com.docus.server.collection.dto.UserModifyParam;
|
||||
import com.docus.server.collection.infrastructure.dao.entity.PowerUser;
|
||||
import com.docus.server.collection.infrastructure.dao.mapper.PowerUserMapper;
|
||||
import com.docus.server.collection.service.IPowerUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 用户服务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class PowerUserServiceImpl implements IPowerUserService {
|
||||
@Resource
|
||||
private PowerUserMapper powerUserMapper;
|
||||
@Resource
|
||||
private IdService idService;
|
||||
@Resource
|
||||
private UserSyncConfig syncConfig;
|
||||
|
||||
@Override
|
||||
public boolean register(UserDto userDto) {
|
||||
PowerUser powerUser = powerUserMapper.getUserByUserName(userDto.getUserName());
|
||||
UserModifyParam userModifyParam = userDto.transUserAddParam();
|
||||
if (Func.isEmpty(powerUser)) {
|
||||
long userId = idService.getDateSeq();
|
||||
userModifyParam.setUserId(userId);
|
||||
userModifyParam.setUserPwd(syncConfig.getPassword());
|
||||
powerUserMapper.addUser(userModifyParam);
|
||||
return true;
|
||||
}
|
||||
userModifyParam.setUserId(powerUser.getUserId());
|
||||
powerUserMapper.updateUser(userModifyParam);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delUserByUserName(String userName) {
|
||||
PowerUser powerUser = powerUserMapper.getUserByUserName(userName);
|
||||
if (Func.isEmpty(powerUser)) {
|
||||
return true;
|
||||
}
|
||||
powerUserMapper.delUserByUserName(userName);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SzyUserDto dto) {
|
||||
PowerUser powerUser = powerUserMapper.getUserByUserName(dto.getUserName());
|
||||
UserModifyParam userModifyParam = new UserModifyParam();
|
||||
userModifyParam.setAuthorId(dto.getAuthorId());
|
||||
userModifyParam.setAuthorName(dto.getAuthorName());
|
||||
userModifyParam.setDeptId(dto.getDeptId());
|
||||
userModifyParam.setName(dto.getName());
|
||||
userModifyParam.setRoleId(dto.getRoleId());
|
||||
userModifyParam.setUserName(dto.getUserName());
|
||||
if (Func.isEmpty(powerUser)) {
|
||||
long userId = idService.getDateSeq();
|
||||
userModifyParam.setUserId(userId);
|
||||
userModifyParam.setUserPwd(syncConfig.getPassword());
|
||||
powerUserMapper.addUser(userModifyParam);
|
||||
return ;
|
||||
}
|
||||
userModifyParam.setUserId(powerUser.getUserId());
|
||||
powerUserMapper.updateUser(userModifyParam);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.docus.server.collection.service.impl;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.core.util.ObjectUtil;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.collection.dto.SzyTBasicDto;
|
||||
import com.docus.server.collection.dto.TBasicDto;
|
||||
import com.docus.server.collection.infrastructure.dao.entity.TBasic;
|
||||
import com.docus.server.collection.infrastructure.dao.mapper.TBasicMapper;
|
||||
import com.docus.server.collection.service.ITBasicService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.*;
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-webservice-sdry
|
||||
* @BelongsPackage: com.docus.server.collection.service.impl
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-02-28 08:37
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TBasicServiceImpl implements ITBasicService {
|
||||
|
||||
@Resource
|
||||
private TBasicMapper tBasicMapper;
|
||||
|
||||
@Resource
|
||||
private IdService idService;
|
||||
|
||||
@Override
|
||||
public void setSzyTBasic(List<SzyTBasicDto> dtos) {
|
||||
//持久化对像集合转化
|
||||
List<TBasic> tBasicList=new ArrayList<TBasic>();
|
||||
for(SzyTBasicDto dto:dtos){
|
||||
//判断jzh是否重复
|
||||
Integer num = tBasicMapper.selectOne(dto.getJzh());
|
||||
|
||||
Long patientId = idService.getDateSeq();
|
||||
|
||||
String sexName="";
|
||||
if("1".equals(dto.getSex())){
|
||||
sexName="男";
|
||||
}
|
||||
if("2".equals(dto.getSex())){
|
||||
sexName="女";
|
||||
}
|
||||
|
||||
//组装数据
|
||||
TBasic tBasic=new TBasic();
|
||||
tBasic.setPatientId(patientId);
|
||||
tBasic.setJzh(dto.getJzh());
|
||||
tBasic.setInpatientNo(dto.getInpatientNo());
|
||||
tBasic.setAdmissTimes(dto.getAdmissTimes());
|
||||
tBasic.setAdmissDays(dto.getAdmissDays());
|
||||
tBasic.setName(dto.getName());
|
||||
tBasic.setAge(dto.getAge());
|
||||
tBasic.setSexName(sexName);
|
||||
tBasic.setSex(dto.getSex());
|
||||
tBasic.setIsDead(dto.getIsDead());
|
||||
tBasic.setAttendingName(dto.getAttendingName());
|
||||
tBasic.setAttending(dto.getAttending());
|
||||
tBasic.setIdCard(dto.getIdCard());
|
||||
tBasic.setAdmissDate(dto.getAdmissDate());
|
||||
tBasic.setAdmissDept(dto.getAdmissDept());
|
||||
tBasic.setAdmissDeptName(dto.getAdmissDeptName());
|
||||
tBasic.setDisDate(dto.getDisDate());
|
||||
tBasic.setDisDept(dto.getDisDept());
|
||||
tBasic.setDisDeptName(dto.getDisDeptName());
|
||||
tBasic.setCreateTime(DateUtil.now());
|
||||
if (num>0) {
|
||||
log.info("更新,jzh为"+tBasic.getJzh());
|
||||
tBasicMapper.update(tBasic);
|
||||
}else{
|
||||
tBasicList.add(tBasic);
|
||||
}
|
||||
log.info("tBasic:"+tBasic.toString());
|
||||
}
|
||||
//批量插入
|
||||
if(Func.isNotEmpty(tBasicList)){
|
||||
log.info("新增"+tBasicList.size()+"条基础数据开始");
|
||||
tBasicMapper.insertBatch(tBasicList);
|
||||
log.info("新增"+tBasicList.size()+"条基础数据结束");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.docus.server.collection.util;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@Data
|
||||
public class IdUtil {
|
||||
/**
|
||||
* 得到一个标准的 8-4-4-4-12 UUID
|
||||
* @return 标准的 8-4-4-4-12 UUID
|
||||
*/
|
||||
public static String standardUUID(){
|
||||
ThreadLocalRandom random = ThreadLocalRandom.current();
|
||||
return (new UUID(random.nextLong(), random.nextLong())).toString();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.docus.server.collection.util;
|
||||
|
||||
import com.docus.core.util.DateUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wyb
|
||||
*/
|
||||
public class PersistRequestUtil {
|
||||
private final static Logger logger = LoggerFactory.getLogger(PersistRequestUtil.class);
|
||||
|
||||
public static void persistRequest(String method, String content) {
|
||||
String persistDir = currentPath() + File.separator + "persist";
|
||||
FileWriter fileWriter = null;
|
||||
BufferedWriter bufferedWriter = null;
|
||||
try {
|
||||
File persistDirFile = new File(persistDir);
|
||||
if (!persistDirFile.exists()) {
|
||||
persistDirFile.mkdirs();
|
||||
}
|
||||
String persistFilePath = persistDir + File.separator + method;
|
||||
fileWriter = new FileWriter(persistFilePath, true);
|
||||
bufferedWriter = new BufferedWriter(fileWriter);
|
||||
content = "[" + DateUtil.formatDateTime(new Date()) + "] " + content + "\n";
|
||||
bufferedWriter.write(content);
|
||||
} catch (Exception ex) {
|
||||
logger.error(ex.getMessage(), ex);
|
||||
} finally {
|
||||
if (bufferedWriter != null) {
|
||||
try {
|
||||
bufferedWriter.close();
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
if (fileWriter != null) {
|
||||
try {
|
||||
fileWriter.close();
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
persistRequest("test","{xxcc}");
|
||||
}
|
||||
public static String currentPath() {
|
||||
File dir = new File(".");
|
||||
String currentpath = "";
|
||||
|
||||
try {
|
||||
currentpath = dir.getCanonicalPath();
|
||||
} catch (IOException var4) {
|
||||
var4.printStackTrace();
|
||||
}
|
||||
|
||||
return currentpath;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.docus.server.collection.util;
|
||||
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-webservice-sdry
|
||||
* @BelongsPackage: com.docus.server.collection.util
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-02-25 16:59
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class Result {
|
||||
|
||||
|
||||
|
||||
public static String success(String serialId,String receive,String send){
|
||||
|
||||
String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
|
||||
String message="成功";
|
||||
|
||||
return "<MCCI_IN000002UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/MCCI _IN000002UV01.xsd\"> \n" +
|
||||
" <id extension=\""+Func.randomUUID()+"\"/> \n" +
|
||||
" <creationTime value=\""+createTime+"\"/> \n" +
|
||||
" <interactionId root=\"2.16.840.1.113883.1.6\" extension=\"MCCI_IN000002UV01\"/> \n" +
|
||||
" <processingCode code=\"P\"/> \n" +
|
||||
" <processingModeCode/> \n" +
|
||||
" <acceptAckCode code=\"AL\"/> \n" +
|
||||
" <receiver typeCode=\"RCV\"> \n" +
|
||||
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
|
||||
" <id> \n" +
|
||||
" <item extension=\""+receive+"\"/> \n" +
|
||||
" </id> \n" +
|
||||
" </device> \n" +
|
||||
" </receiver> \n" +
|
||||
" <sender typeCode=\"SND\"> \n" +
|
||||
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
|
||||
" <id> \n" +
|
||||
" <item extension=\""+send+"\"/> \n" +
|
||||
" </id> \n" +
|
||||
" </device> \n" +
|
||||
" </sender> \n" +
|
||||
" <acknowledgement typeCode=\"AA\"> \n" +
|
||||
" <!--请求消息ID--> \n" +
|
||||
" <targetMessage> \n" +
|
||||
" <id extension=\""+serialId+"\"/> \n" +
|
||||
" </targetMessage> \n" +
|
||||
" <acknowledgementDetail> \n" +
|
||||
" <text value=\""+message+"\"/> \n" +
|
||||
" </acknowledgementDetail> \n" +
|
||||
" </acknowledgement> \n" +
|
||||
"</MCCI_IN000002UV01>\n";
|
||||
}
|
||||
public static String failed(String serialId,String message,String receive,String send){
|
||||
|
||||
String createTime= Func.format(new Date(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
|
||||
|
||||
return "<MCCI_IN000002UV01 xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\" xsi:schemaLocation=\"urn:hl7-org:v3 file:///E:/hl7/HL7/v3ballot_fullsite_2011MAY/v3ballot/html/processable/multicacheschemas/MCCI_IN000002UV01.xsd\"> \n" +
|
||||
" <id extension=\""+Func.randomUUID()+"\"/> \n" +
|
||||
" <creationTime value=\""+createTime+"\"/> \n" +
|
||||
" <interactionId root=\"2.16.840.1.113883.1.6\" extension=\"MCCI_IN000002UV01\" displayable=\"true\"/> \n" +
|
||||
" <processingCode code=\"P\"/> \n" +
|
||||
" <processingModeCode/> \n" +
|
||||
" <acceptAckCode code=\"AL\"/> \n" +
|
||||
" <receiver typeCode=\"RCV\"> \n" +
|
||||
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
|
||||
" <id> \n" +
|
||||
" <item extension=\""+receive+"\"/> \n" +
|
||||
" </id> \n" +
|
||||
" </device> \n" +
|
||||
" </receiver> \n" +
|
||||
" <sender typeCode=\"SND\"> \n" +
|
||||
" <device classCode=\"DEV\" determinerCode=\"INSTANCE\"> \n" +
|
||||
" <id> \n" +
|
||||
" <item extension=\""+send+"\"/> \n" +
|
||||
" </id> \n" +
|
||||
" </device> \n" +
|
||||
" </sender> \n" +
|
||||
" <acknowledgement typeCode=\"AE\"> \n" +
|
||||
" <!--请求消息ID--> \n" +
|
||||
" <targetMessage> \n" +
|
||||
" <id extension=\""+serialId+"\"/> \n" +
|
||||
" </targetMessage> \n" +
|
||||
" <acknowledgementDetail> \n" +
|
||||
" <text value=\""+message+"\"/> \n" +
|
||||
" </acknowledgementDetail> \n" +
|
||||
" </acknowledgement> \n" +
|
||||
"</MCCI_IN000002UV01>\n";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by FernFlower decompiler)
|
||||
//
|
||||
|
||||
package com.docus.server.collection.util;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class TableJsonRead {
|
||||
public 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 var11) {
|
||||
var11.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 = objectMapper.readValue(sb.toString(), new TypeReference<T>() {
|
||||
});
|
||||
}
|
||||
|
||||
bufferedReader.close();
|
||||
}
|
||||
|
||||
return dto;
|
||||
} catch (Exception var12) {
|
||||
var12.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String readContent(String path, String fileName) {
|
||||
String currentPath = this.CurrentPath();
|
||||
path = currentPath + "\\" + path;
|
||||
StringBuilder content = new StringBuilder();
|
||||
T dto = null;
|
||||
File file = new File(path + "\\" + fileName);
|
||||
|
||||
try {
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException var11) {
|
||||
var11.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
BufferedReader bufferedReader = null;
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
|
||||
String line;
|
||||
while((line = bufferedReader.readLine())!=null) {
|
||||
content.append(line);
|
||||
}
|
||||
}
|
||||
return content.toString();
|
||||
} catch (Exception var12) {
|
||||
var12.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String CurrentPath() {
|
||||
File dir = new File(".");
|
||||
String currentpath = "";
|
||||
|
||||
try {
|
||||
currentpath = dir.getCanonicalPath();
|
||||
} catch (IOException var4) {
|
||||
var4.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 var15) {
|
||||
var15.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
fwriter.flush();
|
||||
fwriter.close();
|
||||
} catch (IOException var14) {
|
||||
var14.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.docus.server.collection.util;
|
||||
|
||||
import com.docus.server.collection.service.ITBasicService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-mzzy-collector
|
||||
* @BelongsPackage: com.docus.server.collection.util
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-03-13 11:33
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class jobUtil {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ITBasicService tBasicService;
|
||||
|
||||
@XxlJob("tBasicJob")
|
||||
public void tBasicJob(){
|
||||
try {
|
||||
log.info("tBasicJob------开始");
|
||||
log.info("tBasicJob------结束");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.docus.server.collection.validator;
|
||||
|
||||
/**
|
||||
* 请求参数验证
|
||||
* @author WYBDEV
|
||||
*/
|
||||
public interface RequestValidator {
|
||||
/**
|
||||
* 验证
|
||||
* @return 返回验证结果
|
||||
*/
|
||||
ValidateResult validate();
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.docus.server.collection.validator;
|
||||
|
||||
import com.docus.infrastructure.web.api.ResultCode;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author WYBDEV
|
||||
*/
|
||||
@Data
|
||||
public class ValidateResult {
|
||||
/**
|
||||
* 验证结果代码
|
||||
*/
|
||||
private ResultCode resultCode;
|
||||
/**
|
||||
* 验证结果信息
|
||||
*/
|
||||
private String msg;
|
||||
public ValidateResult(ResultCode resultCode,String msg){
|
||||
this.resultCode=resultCode;
|
||||
this.msg=msg;
|
||||
}
|
||||
public static ValidateResult success(String msg){
|
||||
return new ValidateResult(ResultCode.SUCCESS,msg);
|
||||
}
|
||||
|
||||
public static ValidateResult failed(String msg){
|
||||
return new ValidateResult(ResultCode.FAILED,msg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.docus.server.collection.xml.parsers;
|
||||
|
||||
import com.docus.core.util.XmlUtil;
|
||||
import com.docus.server.collection.dto.DeptDto;
|
||||
import com.docus.server.collection.dto.UserDto;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
/**
|
||||
* 梅州中医 XML 解析
|
||||
* @author jishi
|
||||
*/
|
||||
public class MzZyParser {
|
||||
public static DeptDto parseCreateDept(String xml){
|
||||
XmlUtil xmlParseUtil = XmlUtil.of(xml);
|
||||
Node deptCodeNode = xmlParseUtil.getNode("/PRPM_IN401030UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/id/item/@extension");
|
||||
Node deptNameNode = xmlParseUtil.getNode("/PRPM_IN401030UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/assignedPrincipalOrganization/name/item[@use='OR']/part/@value");
|
||||
Node authorIdNode = xmlParseUtil.getNode("/PRPM_IN401030UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
|
||||
Node authorNameNode = xmlParseUtil.getNode("/PRPM_IN401030UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
|
||||
|
||||
DeptDto deptDto = new DeptDto();
|
||||
deptDto.setDeptCode(deptCodeNode.getNodeValue());
|
||||
deptDto.setDeptName(deptNameNode.getNodeValue());
|
||||
deptDto.setAuthorId(authorIdNode.getNodeValue());
|
||||
deptDto.setAuthorName(authorNameNode.getNodeValue());
|
||||
return deptDto;
|
||||
}
|
||||
|
||||
public static DeptDto parseUpdateDept(String xml){
|
||||
XmlUtil xmlParseUtil = XmlUtil.of(xml);
|
||||
Node deptCodeNode = xmlParseUtil.getNode("/PRPM_IN403010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/id/item/@extension");
|
||||
Node deptNameNode = xmlParseUtil.getNode("/PRPM_IN403010UV01/controlActProcess/subject/registrationRequest/subject1/assignedEntity/assignedPrincipalOrganization/name/item[@use='OR']/part/@value");
|
||||
Node authorIdNode = xmlParseUtil.getNode("/PRPM_IN403010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
|
||||
Node authorNameNode = xmlParseUtil.getNode("/PRPM_IN403010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
|
||||
|
||||
DeptDto deptDto = new DeptDto();
|
||||
deptDto.setDeptCode(deptCodeNode.getNodeValue());
|
||||
deptDto.setDeptName(deptNameNode.getNodeValue());
|
||||
deptDto.setAuthorId(authorIdNode.getNodeValue());
|
||||
deptDto.setAuthorName(authorNameNode.getNodeValue());
|
||||
return deptDto;
|
||||
}
|
||||
|
||||
public static UserDto parseCreateUser(String xml){
|
||||
XmlUtil xmlParseUtil = XmlUtil.of(xml);
|
||||
Node employeeCodeNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/id/item/@extension");
|
||||
Node employeeNameNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/name/item[@use='OR']/part/@value");
|
||||
Node deptCodeNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/asAffiliate/affiliatedPrincipalOrganization/id/item/@extension");
|
||||
Node positionNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/relatedTo/assignedEntity/relatedTo/assignedEntity/code[@codeSystem='2.16.156.10011.0.9.2.3.2.122']/displayName/@value");
|
||||
Node authorIdNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
|
||||
Node authorNameNode = xmlParseUtil.getNode("/PRPM_IN301010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
|
||||
|
||||
UserDto userDto = new UserDto();
|
||||
userDto.setDeptId(deptCodeNode.getNodeValue());
|
||||
userDto.setUserName(employeeCodeNode.getNodeValue());
|
||||
userDto.setName(employeeNameNode.getNodeValue());
|
||||
userDto.setPosition(positionNode.getNodeValue());
|
||||
userDto.setAuthorId(authorIdNode.getNodeValue());
|
||||
userDto.setAuthorName(authorNameNode.getNodeValue());
|
||||
userDto.setRoleId(0L);
|
||||
return userDto;
|
||||
}
|
||||
|
||||
|
||||
public static UserDto parseUpdateUser(String xml){
|
||||
XmlUtil xmlParseUtil = XmlUtil.of(xml);
|
||||
Node employeeCodeNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/id/item/@extension");
|
||||
Node employeeNameNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/name/item[@use='OR']/part/@value");
|
||||
Node deptCodeNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/healthCarePrincipalPerson/asAffiliate/affiliatedPrincipalOrganization/id/item/@extension");
|
||||
Node positionNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/subject1/healthCareProvider/relatedTo/assignedEntity/relatedTo/assignedEntity/code[@codeSystem='2.16.156.10011.0.9.2.3.2.122']/displayName/@value");
|
||||
Node authorIdNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/id/item/@extension");
|
||||
Node authorNameNode = xmlParseUtil.getNode("/PRPM_IN303010UV01/controlActProcess/subject/registrationRequest/author/assignedEntity/assignedPerson/name/item/part/@value");
|
||||
|
||||
UserDto userDto = new UserDto();
|
||||
userDto.setDeptId(deptCodeNode.getNodeValue());
|
||||
userDto.setUserName(employeeCodeNode.getNodeValue());
|
||||
userDto.setName(employeeNameNode.getNodeValue());
|
||||
userDto.setPosition(positionNode.getNodeValue());
|
||||
userDto.setAuthorId(authorIdNode.getNodeValue());
|
||||
userDto.setAuthorName(authorNameNode.getNodeValue());
|
||||
userDto.setRoleId(0L);
|
||||
return userDto;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
|
||||
|
||||
WinSW.exe status|findstr NonExistent && winsw install
|
||||
|
||||
WinSW.exe status|findstr stopped && winsw start
|
||||
@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
|
||||
set deployDir=%1\@project.artifactId@
|
||||
if %deployDir%=="" set deployDir=d:\webroot\@project.artifactId@
|
||||
|
||||
set curr_file=%cd%
|
||||
cd /d %deployDir%
|
||||
call stop.bat
|
||||
sc query @project.artifactId@ |Find "RUNNING" && ping 127.0.0.1 -n 10 >nul
|
||||
cd %curr_file%
|
||||
rd/s/q %deployDir%\lib
|
||||
rd/s/q %deployDir%\dataConfig
|
||||
rd/s/q %deployDir%\config
|
||||
del /s/q %deployDir%\*.jar
|
||||
xcopy /Y/E/I * %deployDir%
|
||||
|
||||
cd /d %deployDir%
|
||||
call auto.bat
|
||||
cd %curr_file%
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
set java_opts=-Xms512m -Xmx512m
|
||||
set key="java_opts"
|
||||
|
||||
|
||||
rem 文件不存在,就跳过
|
||||
if not exist java-ops.ini goto end
|
||||
|
||||
for /f "tokens=1,2 delims==" %%i in (java-ops.ini) do (
|
||||
if "%%i"==%key% set java_opts=%%j)
|
||||
echo java_opts is : %java_opts%
|
||||
|
||||
:end
|
||||
|
||||
rem 启动java
|
||||
|
||||
java %java_opts% -Dfile.encoding=utf-8 -jar -Dspring.profiles.active=@profile.name@ -Dloader.path=config,lib @project.build.finalName@.jar
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
winsw stop
|
||||
@ -0,0 +1,47 @@
|
||||
@echo off
|
||||
|
||||
set curr_file=%cd%
|
||||
|
||||
set parentDir=%1
|
||||
if %parentDir%=="" set deployDir=d:\webroot
|
||||
|
||||
|
||||
set deployDir=%parentDir%\@project.artifactId@
|
||||
|
||||
set backupDir=%parentDir%\backup
|
||||
|
||||
set dateStr=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%
|
||||
|
||||
|
||||
cd /d %deployDir%
|
||||
|
||||
call stop.bat
|
||||
sc query @project.artifactId@ |Find "RUNNING" && ping 127.0.0.1 -n 10 >nul
|
||||
|
||||
cd /d %parentDir%
|
||||
|
||||
xcopy /Y/E/I project.artifactId@\lib %backupDir%\%dateStr%\@project.artifactId@lib
|
||||
xcopy /Y/E/I project.artifactId@\config %backupDir%\%dateStr%\@project.artifactId@config
|
||||
xcopy /Y/E/I project.artifactId@\*.jar %backupDir%\%dateStr%\@project.artifactId@
|
||||
xcopy /Y/E/I project.artifactId@\*.bat %backupDir%\%dateStr%\@project.artifactId@
|
||||
xcopy /Y/E/I project.artifactId@\*.exe %backupDir%\%dateStr%\@project.artifactId@
|
||||
xcopy /Y/E/I project.artifactId@\*.xml %backupDir%\%dateStr%\@project.artifactId@
|
||||
|
||||
|
||||
cd %curr_file%
|
||||
|
||||
rd/s/q %deployDir%\lib
|
||||
rd/s/q %deployDir%\config
|
||||
del /s/q %deployDir%\*.jar
|
||||
|
||||
|
||||
xcopy /Y/E/I lib %deployDir%\lib
|
||||
xcopy /Y/E/I config %deployDir%\config
|
||||
xcopy /Y/E/I *.jar %deployDir%
|
||||
xcopy /Y/E/I *.bat %deployDir%
|
||||
xcopy /Y/E/I *.exe %deployDir%
|
||||
xcopy /Y/E/I *.xml %deployDir%
|
||||
|
||||
cd /d %deployDir%
|
||||
call auto.bat
|
||||
cd %curr_file%
|
||||
@ -0,0 +1,8 @@
|
||||
<service>
|
||||
<id>docus-mzzy-collector</id>
|
||||
<name>生产-梅州中医基础数据同步</name>
|
||||
<description>生产-梅州中医基础数据同步</description>
|
||||
<startmode>Automatic</startmode>
|
||||
<executable>%BASE%\start.bat</executable>
|
||||
<log mode="none"></log>
|
||||
</service>
|
||||
@ -0,0 +1,62 @@
|
||||
server:
|
||||
port: 9315
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
application:
|
||||
name: @artifactId@
|
||||
datasource:
|
||||
mysql-docus:
|
||||
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_archivefile?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
||||
username: docus
|
||||
password: docus702
|
||||
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
redis:
|
||||
host: redis.docus.cn
|
||||
password: JSdocus@702
|
||||
|
||||
docus:
|
||||
dbtype: mysql
|
||||
user:
|
||||
# 用户默认密码
|
||||
defpwd: fd29cd53ec12616e5f36b77d4afffbff
|
||||
url:
|
||||
# 采集任务补偿地址
|
||||
compensate-task-url: http://localhost:9295/
|
||||
# 签出调用
|
||||
sign-out-url: http://localhost:9102/
|
||||
|
||||
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
|
||||
xxl:
|
||||
job:
|
||||
accessToken:
|
||||
admin:
|
||||
addresses: http://job.docus.cn:8180/xxl-job-admin
|
||||
executor:
|
||||
appname: docus-mzzy-collector
|
||||
address:
|
||||
ip:
|
||||
port: 17781
|
||||
logretentiondays: 30
|
||||
logpath: D:/xxl-job/inspection
|
||||
|
||||
TBasic:
|
||||
url: http://localhost:8989/tbasic
|
||||
|
||||
mzzyy:
|
||||
roc-domain: WZHBA
|
||||
roc-key: b91b0ac7-665f-4874-a282-2f5511a44263
|
||||
url:
|
||||
roc:
|
||||
curr-web: http://199.168.91.110:7800/roc/curr-web
|
||||
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
# If you use SLF4J. First, you need to tell log4jdbc-log4j2 that you want to use the SLF4J logger
|
||||
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.collection.infrastructure.dao.mapper.CollectSysDictionaryMapper">
|
||||
|
||||
<select id="findAll" resultType="com.docus.server.collection.entity.CollectSysDictionary">
|
||||
SELECT id,sys_code sysCode,sys_name sysName
|
||||
FROM `docus_archivefile`.`af_collectsys_dictionary`
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,31 @@
|
||||
<?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.server.collection.infrastructure.dao.mapper.PowerDeptMapper">
|
||||
<insert id="addDept">
|
||||
INSERT INTO `docus_system`.`power_dept`(`dept_id`,
|
||||
`dept_code`,
|
||||
`dept_name`,
|
||||
`create_date`,
|
||||
`creater`,
|
||||
`update_date`,
|
||||
`updater`)
|
||||
VALUES (#{dept.deptId},#{dept.deptCode},#{dept.deptName},now(),#{dept.authorName},now(),#{dept.authorName})
|
||||
</insert>
|
||||
<update id="updateDept">
|
||||
update `docus_system`.`power_dept` set
|
||||
`dept_name`=#{dept.deptName},
|
||||
`updater`=#{dept.authorName},
|
||||
`update_date`=now()
|
||||
where `dept_code`=#{dept.deptCode}
|
||||
</update>
|
||||
<delete id="delDeptByDeptCode">
|
||||
delete from `docus_system`.`power_dept` where `dept_code` = #{deptCode}
|
||||
</delete>
|
||||
|
||||
<select id="getDeptByDeptCode" resultType="com.docus.server.collection.infrastructure.dao.entity.PowerDept">
|
||||
SELECT `dept_id`,`dept_code`,`dept_name` FROM `docus_system`.`power_dept`
|
||||
WHERE `dept_code` = #{deptCode} LIMIT 1
|
||||
</select>
|
||||
</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.server.collection.infrastructure.dao.mapper.PowerUserMapper">
|
||||
<insert id="addUser">
|
||||
INSERT INTO `docus_system`.`power_user`(`user_id`,
|
||||
`user_name`,
|
||||
`name`,
|
||||
`user_pwd`,
|
||||
`user_position`,
|
||||
`role_id`,
|
||||
`dept_id`,
|
||||
`create_date`,
|
||||
`creater`,
|
||||
`update_date`,
|
||||
`updater`)
|
||||
VALUES (#{user.userId},#{user.userName},#{user.name},#{user.userPwd},#{user.position},#{user.roleId}
|
||||
,#{user.deptId},now(),#{user.authorName},now(),#{user.authorName})
|
||||
</insert>
|
||||
<update id="updateUser">
|
||||
update `docus_system`.`power_user` set
|
||||
`updater`=#{user.authorName},
|
||||
`dept_id`=#{user.deptId},
|
||||
`user_position`=#{user.position},
|
||||
`name`=#{user.name},
|
||||
`update_date`=now()
|
||||
where `user_id`=#{user.userId}
|
||||
</update>
|
||||
<delete id="delUserByUserName">
|
||||
delete from `docus_system`.`power_user` where `user_name` = #{userName}
|
||||
</delete>
|
||||
|
||||
<select id="getUserByUserName" resultType="com.docus.server.collection.infrastructure.dao.entity.PowerUser">
|
||||
SELECT `user_id`,`user_name`,`user_pwd` FROM `docus_system`.`power_user`
|
||||
WHERE `user_name` = #{userName} LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,97 @@
|
||||
<?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.server.collection.infrastructure.dao.mapper.TBasicMapper">
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO `docus_medicalrecord`.`t_basic`
|
||||
(`admiss_dept`,
|
||||
`attending`,
|
||||
`create_time`,
|
||||
`admiss_days`,
|
||||
`is_dead`,
|
||||
`sex_name`,
|
||||
`bed_num`,
|
||||
`age`,
|
||||
`sex`,
|
||||
`id_card`,
|
||||
`dis_dept`,
|
||||
`patient_id`,
|
||||
`admiss_times`,
|
||||
`inpatient_no`,
|
||||
`name`,
|
||||
`admiss_date`,
|
||||
`admiss_dept_name`,
|
||||
`dis_date`,
|
||||
`dis_dept_name`,
|
||||
`attending_name`,
|
||||
`jzh`,
|
||||
`is_other`,
|
||||
`mother_inpatient_no`)
|
||||
VALUES
|
||||
<foreach collection="tBasicList" item="tBasic" separator=",">
|
||||
(#{tBasic.admissDept},
|
||||
#{tBasic.attending},
|
||||
#{tBasic.createTime},
|
||||
#{tBasic.admissDays},
|
||||
#{tBasic.isDead},
|
||||
#{tBasic.sexName},
|
||||
#{tBasic.bedNum},
|
||||
#{tBasic.age},
|
||||
#{tBasic.sex},
|
||||
#{tBasic.idCard},
|
||||
#{tBasic.disDept},
|
||||
#{tBasic.patientId},
|
||||
#{tBasic.admissTimes},
|
||||
#{tBasic.inpatientNo},
|
||||
#{tBasic.name},
|
||||
#{tBasic.admissDate},
|
||||
#{tBasic.admissDeptName},
|
||||
#{tBasic.disDate},
|
||||
#{tBasic.disDeptName},
|
||||
#{tBasic.attendingName},
|
||||
#{tBasic.jzh},
|
||||
#{tBasic.isOther},
|
||||
#{tBasic.motherInpatientNo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
UPDATE `docus_medicalrecord`.`t_basic` SET
|
||||
`admiss_dept` = #{tBasic.admissDept},
|
||||
`attending` = #{tBasic.attending},
|
||||
`update_time` = #{tBasic.createTime},
|
||||
`admiss_days` = #{tBasic.admissDays},
|
||||
`is_dead` = #{tBasic.isDead},
|
||||
`sex_name` = #{tBasic.sexName},
|
||||
`bed_num` = #{tBasic.bedNum},
|
||||
`age` = #{tBasic.age},
|
||||
`sex` = #{tBasic.sex},
|
||||
`id_card` = #{tBasic.idCard},
|
||||
`dis_dept` = #{tBasic.disDept},
|
||||
`admiss_times` = #{tBasic.admissTimes},
|
||||
`name` = #{tBasic.name},
|
||||
`admiss_date` = #{tBasic.admissDate},
|
||||
`admiss_dept_name` = #{tBasic.admissDeptName},
|
||||
`dis_date` = #{tBasic.disDate},
|
||||
`dis_dept_name` = #{tBasic.disDeptName},
|
||||
`attending_name` = #{tBasic.attendingName},
|
||||
`is_other` = #{tBasic.isOther},
|
||||
`mother_inpatient_no`= #{tBasic.motherInpatientNo}
|
||||
WHERE
|
||||
`jzh` = #{tBasic.jzh}
|
||||
</update>
|
||||
|
||||
<select id="selectOne" resultType="java.lang.Integer">
|
||||
select count(patient_id) from docus_medicalrecord.t_basic where jzh=#{jzh}
|
||||
</select>
|
||||
<select id="getPatientIdByJzh" resultType="java.lang.String">
|
||||
select patient_id from `docus_medicalrecord`.`t_basic` where jzh=#{jzh}
|
||||
</select>
|
||||
<select id="getPatientIdByMomJzh" resultType="java.lang.String">
|
||||
select patient_id from `docus_medicalrecord`.`t_basic` where mother_inpatient_no=#{momJzh}
|
||||
</select>
|
||||
<select id="getPid" resultType="java.lang.String">
|
||||
select patient_id from `docus_medicalrecord`.`t_basic` limit 10
|
||||
</select>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue