init:联众检查重采
commit
79ee0a2eb3
@ -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,14 @@
|
|||||||
|
package com.docus.server;
|
||||||
|
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication(scanBasePackages = {"com.docus"})
|
||||||
|
@MapperScan("com.docus.server.**.mapper")
|
||||||
|
public class AppRunBootstrap {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(AppRunBootstrap.class, args);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.docus.server.archive.controller;
|
||||||
|
|
||||||
|
import com.docus.infrastructure.web.api.CommonResult;
|
||||||
|
import com.docus.server.archive.service.LianzhongCollectCheckService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/1/16 17:10
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "联众检查接口")
|
||||||
|
@RequestMapping("/lianzhong")
|
||||||
|
@Slf4j
|
||||||
|
public class LianzhongController {
|
||||||
|
@Resource
|
||||||
|
private LianzhongCollectCheckService lianzhongCollectCheckService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "检查联众同步完成的患者,数量对不上和图片损坏则重采")
|
||||||
|
@GetMapping("/checkLianzhongSourceFile")
|
||||||
|
public CommonResult<String> checkLianzhongSourceFile() {
|
||||||
|
lianzhongCollectCheckService.checkLianzhongSourceFile();
|
||||||
|
return CommonResult.success("检查完成!");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.docus.server.archive.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.docus.server.archive.entity.TBasic;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者基础信息表mapper
|
||||||
|
*
|
||||||
|
* @author wyb
|
||||||
|
*/
|
||||||
|
@DS("archive-mysql")
|
||||||
|
@Mapper
|
||||||
|
public interface BasicMapper {
|
||||||
|
|
||||||
|
|
||||||
|
List<TBasic> getByPatientIds(@Param("patientIdList") List<String> patientIdList);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.docus.server.archive.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.docus.server.archive.entity.ScanAssort;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/3/3 22:22
|
||||||
|
*/
|
||||||
|
@DS("archive-mysql")
|
||||||
|
@Mapper
|
||||||
|
public interface ScanAssortMapper {
|
||||||
|
List<String> getPatientIdsBySource(@Param("source") String source);
|
||||||
|
|
||||||
|
List<ScanAssort> getByPatientIdAndSource(@Param("patientId") String patientId,@Param("source") String source);
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.docus.server.archive.service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/3/3 22:16
|
||||||
|
*/
|
||||||
|
public interface LianzhongCollectCheckService {
|
||||||
|
void checkLianzhongSourceFile();
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.docus.server.archive.service.impl;
|
||||||
|
|
||||||
|
import com.docus.core.util.Func;
|
||||||
|
import com.docus.server.archive.entity.ScanAssort;
|
||||||
|
import com.docus.server.archive.entity.TBasic;
|
||||||
|
import com.docus.server.archive.mapper.BasicMapper;
|
||||||
|
import com.docus.server.archive.mapper.ScanAssortMapper;
|
||||||
|
import com.docus.server.archive.service.LianzhongCollectCheckService;
|
||||||
|
import com.docus.server.lianzhong.entity.CardInfoUpload;
|
||||||
|
import com.docus.server.lianzhong.mapper.CardInfoUploadMapper;
|
||||||
|
import com.docus.server.lianzhong.mapper.PictureMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/3/3 22:16
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class LianzhongCollectCheckServiceImpl implements LianzhongCollectCheckService {
|
||||||
|
@Autowired
|
||||||
|
private BasicMapper basicMapper;
|
||||||
|
@Autowired
|
||||||
|
private ScanAssortMapper scanAssortMapper;
|
||||||
|
@Autowired
|
||||||
|
private CardInfoUploadMapper cardInfoUploadMapper;
|
||||||
|
@Autowired
|
||||||
|
private PictureMapper pictureMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void checkLianzhongSourceFile() {
|
||||||
|
final String source = "lianzhong";
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
List<String> lianzhongPatientIds = scanAssortMapper.getPatientIdsBySource(source);
|
||||||
|
log.info("联众文件检查,患者主键:{} 个。", lianzhongPatientIds.size());
|
||||||
|
for (String patientId : lianzhongPatientIds) {
|
||||||
|
try {
|
||||||
|
List<TBasic> basics = basicMapper.getByPatientIds(Collections.singletonList(patientId));
|
||||||
|
if (Func.isEmpty(basics)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
TBasic basic = basics.get(0);
|
||||||
|
List<ScanAssort> scanAssortList = scanAssortMapper.getByPatientIdAndSource(patientId, source);
|
||||||
|
|
||||||
|
String disDateFmt = sdf.format(basic.getDisDate());
|
||||||
|
String patno = basic.getInpatientNo();
|
||||||
|
List<CardInfoUpload> cardInfoUploadList = cardInfoUploadMapper.getSuccessByPatno(patno);
|
||||||
|
for (CardInfoUpload cardInfoUpload : cardInfoUploadList) {
|
||||||
|
if (disDateFmt.equals(sdf.format(cardInfoUpload.getOutdate()))) {
|
||||||
|
String fileid = cardInfoUpload.getId();
|
||||||
|
int lzFileCount = pictureMapper.fileCount(fileid);
|
||||||
|
if (scanAssortList.size() != lzFileCount) {
|
||||||
|
cardInfoUploadMapper.recollect(cardInfoUpload.getId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (hasDamage(scanAssortList)) {
|
||||||
|
cardInfoUploadMapper.recollect(cardInfoUpload.getId());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("联众检查,出错啦,病案主键:" + patientId, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasDamage(List<ScanAssort> scanAssortList) {
|
||||||
|
try {
|
||||||
|
for (ScanAssort assort : scanAssortList) {
|
||||||
|
String filePath = assort.getImagePath() + File.separator + assort.getScanPage();
|
||||||
|
BufferedImage image = ImageIO.read(new File(filePath));
|
||||||
|
if (image.getHeight() <= 0 || image.getWidth() <= 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
|
||||||
|
System.out.println(sdf.format(new Date()));
|
||||||
|
ScanAssort scanAssort = new ScanAssort();
|
||||||
|
scanAssort.setImagePath("C:\\Users\\wyb\\Pictures\\联想截图");
|
||||||
|
scanAssort.setScanPage("yuai2.png");
|
||||||
|
List<ScanAssort> scanAssortList = Arrays.asList(scanAssort);
|
||||||
|
System.out.println(new LianzhongCollectCheckServiceImpl().hasDamage(scanAssortList));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.docus.server.lianzhong.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CardInfoUpload {
|
||||||
|
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String patno;
|
||||||
|
|
||||||
|
private String patname;
|
||||||
|
|
||||||
|
private Date outdate;
|
||||||
|
|
||||||
|
private Date indate;
|
||||||
|
|
||||||
|
private String outdeptcode;
|
||||||
|
|
||||||
|
private String outdeptname;
|
||||||
|
|
||||||
|
private String patsex;
|
||||||
|
|
||||||
|
private Date patbirthday;
|
||||||
|
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
private String icdecode11;
|
||||||
|
|
||||||
|
private String icdename11;
|
||||||
|
|
||||||
|
private String mjwesticde;
|
||||||
|
|
||||||
|
private String mjwestname;
|
||||||
|
|
||||||
|
private String patciticard;
|
||||||
|
|
||||||
|
private Integer patage;
|
||||||
|
|
||||||
|
private String indeptcode;
|
||||||
|
|
||||||
|
private String indeptname;
|
||||||
|
|
||||||
|
private String outwardname;
|
||||||
|
|
||||||
|
private Integer patnum;
|
||||||
|
|
||||||
|
private String gestno;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.docus.server.lianzhong.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Picture {
|
||||||
|
private String picid;
|
||||||
|
|
||||||
|
private String picname;
|
||||||
|
|
||||||
|
private String fileid;
|
||||||
|
|
||||||
|
private Double rotatedegree;
|
||||||
|
|
||||||
|
private String pickind;
|
||||||
|
|
||||||
|
private Integer picno;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.docus.server.lianzhong.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.docus.server.lianzhong.entity.CardInfoUpload;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/3/3 22:32
|
||||||
|
*/
|
||||||
|
@DS("lianzhong-sqlserver")
|
||||||
|
@Mapper
|
||||||
|
public interface CardInfoUploadMapper {
|
||||||
|
List<CardInfoUpload> getSuccessByPatno(@Param("patno") String patno);
|
||||||
|
|
||||||
|
int recollect(@Param("id") String id);
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.docus.server.lianzhong.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author YongBin Wen
|
||||||
|
* @date 2025/3/3 22:32
|
||||||
|
*/
|
||||||
|
@DS("lianzhong-sqlserver")
|
||||||
|
@Mapper
|
||||||
|
public interface PictureMapper {
|
||||||
|
int fileCount(@Param("fileid") String fileid);
|
||||||
|
}
|
@ -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,8 @@
|
|||||||
|
<service>
|
||||||
|
<id>docus-task-ydzyy</id>
|
||||||
|
<name>生产-嘉时病案无纸化-英德中医院视图任务同步</name>
|
||||||
|
<description>生产-嘉时病案无纸化-英德中医院视图任务同步</description>
|
||||||
|
<startmode>Automatic</startmode>
|
||||||
|
<executable>%BASE%\start.bat</executable>
|
||||||
|
<log mode="none"></log>
|
||||||
|
</service>
|
@ -0,0 +1,78 @@
|
|||||||
|
server:
|
||||||
|
port: 8285
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: @artifactId@
|
||||||
|
datasource:
|
||||||
|
dynamic:
|
||||||
|
primary: archive-mysql
|
||||||
|
#是否用严格模式,如果启用在味匹配到指定数据源时抛出异常
|
||||||
|
strict: false
|
||||||
|
datasource:
|
||||||
|
# 多数据源
|
||||||
|
archive-mysql:
|
||||||
|
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
|
||||||
|
# 初始化配置
|
||||||
|
initial-size: 3
|
||||||
|
# 最小连接数
|
||||||
|
min-idle: 3
|
||||||
|
# 最大连接数
|
||||||
|
max-active: 15
|
||||||
|
# 获取连接超 时时间
|
||||||
|
max-wait: 5000
|
||||||
|
# 连接有效性检测时间
|
||||||
|
time-between-eviction-runs-millis: 90000
|
||||||
|
# 最大空闲时间
|
||||||
|
min-evictable-idle-time-millis: 1800000
|
||||||
|
test-while-idle: true
|
||||||
|
test-on-borrow: false
|
||||||
|
test-on-return: false
|
||||||
|
validation-query: select 1
|
||||||
|
|
||||||
|
lianzhong-sqlserver:
|
||||||
|
# url: jdbc:sqlserver://192.169.2.170:14330;DatabaseName=u_medrecord
|
||||||
|
# username: sa
|
||||||
|
# password: 17931@Uni
|
||||||
|
url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=u_medrecord
|
||||||
|
username: sa
|
||||||
|
password: 123456
|
||||||
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
# 初始化配置
|
||||||
|
initial-size: 3
|
||||||
|
# 最小连接数
|
||||||
|
min-idle: 3
|
||||||
|
# 最大连接数
|
||||||
|
max-active: 15
|
||||||
|
# 获取连接超 时时间
|
||||||
|
max-wait: 5000
|
||||||
|
# 连接有效性检测时间
|
||||||
|
time-between-eviction-runs-millis: 90000
|
||||||
|
# 最大空闲时间
|
||||||
|
min-evictable-idle-time-millis: 1800000
|
||||||
|
test-while-idle: true
|
||||||
|
test-on-borrow: false
|
||||||
|
test-on-return: false
|
||||||
|
validation-query: select 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
redis:
|
||||||
|
host: redis.docus.cn
|
||||||
|
password: JSdocus@702
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
|
||||||
|
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
|
@ -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,34 @@
|
|||||||
|
<?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.archive.mapper.BasicMapper">
|
||||||
|
<sql id="basicInfoColumns">
|
||||||
|
patient_id
|
||||||
|
AS patientId,
|
||||||
|
admiss_times AS admissTimes,
|
||||||
|
inpatient_no AS inpatientNo,
|
||||||
|
admiss_id AS admissId,
|
||||||
|
admiss_date AS admissDate,
|
||||||
|
dis_date AS disDate,
|
||||||
|
admiss_dept_name AS admissDeptName,
|
||||||
|
dis_dept_name AS disDeptName ,
|
||||||
|
jzh,
|
||||||
|
name,
|
||||||
|
id_card AS idCard
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getByPatientIds" resultType="com.docus.server.archive.entity.TBasic">
|
||||||
|
SELECT
|
||||||
|
<include refid="basicInfoColumns"></include>
|
||||||
|
FROM
|
||||||
|
docus_medicalrecord.t_basic
|
||||||
|
WHERE
|
||||||
|
patient_id IN
|
||||||
|
<foreach collection="patientIdList" item="patientId" separator="," open="(" close=")">
|
||||||
|
#{patientId}
|
||||||
|
</foreach>
|
||||||
|
ORDER BY dis_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?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.lianzhong.mapper.CardInfoUploadMapper">
|
||||||
|
<update id="recollect">
|
||||||
|
update dbo.t_card_info_upload
|
||||||
|
set state = 0
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getSuccessByPatno" resultType="com.docus.server.lianzhong.entity.CardInfoUpload">
|
||||||
|
select id, patno, outdate
|
||||||
|
from dbo.t_card_info_upload
|
||||||
|
where patno = #{patno} and state = 3
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,13 @@
|
|||||||
|
<?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.lianzhong.mapper.PictureMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="fileCount" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from dbo.T_Picture
|
||||||
|
where fileid = #{fileid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?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.archive.mapper.ScanAssortMapper">
|
||||||
|
|
||||||
|
<select id="getPatientIdsBySource" resultType="java.lang.String">
|
||||||
|
select patient_id
|
||||||
|
from t_scan_assort tsa
|
||||||
|
where source = #{source}
|
||||||
|
group by patient_id
|
||||||
|
</select>
|
||||||
|
<select id="getByPatientIdAndSource" resultType="com.docus.server.archive.entity.ScanAssort">
|
||||||
|
select id, patient_id, image_path, scan_page
|
||||||
|
from t_scan_assort
|
||||||
|
where source = #{source}
|
||||||
|
and patient_id = #{patientId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue