feat:广东省中医报告作废电生理项目初始化
commit
7a4519ff15
@ -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,26 @@
|
||||
package com.docus.server;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages ={"com.docus"})
|
||||
@MapperScan("com.docus.server.**.mapper")
|
||||
@EnableAsync
|
||||
public class AppRunBootstrap {
|
||||
public static void main(String[] args) {
|
||||
Properties props = System.getProperties();
|
||||
props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
|
||||
props.setProperty("UseSunHttpHandler", "true");
|
||||
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
|
||||
SpringApplication.run(AppRunBootstrap.class, args);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.docus.server.reportmanager.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class AfCollectTask {
|
||||
private Long id;
|
||||
private String patientId;
|
||||
private Long afArchiveDetailId;
|
||||
private String sysflag;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private Long consumingTime;
|
||||
private String state;
|
||||
private Date syncTime;
|
||||
private Date recollectTime;
|
||||
private String recollectName;
|
||||
private String remark;
|
||||
private String pResult;
|
||||
private String C1;
|
||||
private String C2;
|
||||
private String C3;
|
||||
private String C4;
|
||||
private String C5;
|
||||
private String C6;
|
||||
private String C7;
|
||||
private String C8;
|
||||
private String C9;
|
||||
private String C10;
|
||||
private Double N1;
|
||||
private Double N2;
|
||||
private Double N3;
|
||||
private Double N4;
|
||||
private Double N5;
|
||||
private Date T1;
|
||||
private Date T2;
|
||||
private Date T3;
|
||||
private Date T4;
|
||||
private Date T5;
|
||||
private Date T6;
|
||||
private String C11;
|
||||
private String C12;
|
||||
private String C13;
|
||||
private String C14;
|
||||
private String C15;
|
||||
private String C16;
|
||||
private String C17;
|
||||
private String C18;
|
||||
private String C19;
|
||||
private String C20;
|
||||
private Date createTime;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.docus.server.reportmanager.mapper;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wyb
|
||||
*/
|
||||
@Mapper
|
||||
public interface ScanAssortMapper {
|
||||
/**
|
||||
* 根据id作废文件
|
||||
*
|
||||
* @param ids id集合
|
||||
* @return int
|
||||
* @date 2024/1/3 17:06
|
||||
* @author YongBin Wen
|
||||
*/
|
||||
int cancel(@Param("ids") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据病案习习和任务信息查询文件id
|
||||
*
|
||||
* @param patientId 病案主键
|
||||
* @param taskId 任务id
|
||||
* @return java.util.List<java.lang.Long> 文件id
|
||||
* @date 2024/1/3 17:06
|
||||
* @author YongBin Wen
|
||||
*/
|
||||
List<Long> getIdByPatientTask(@Param("patientId") String patientId, @Param("taskId") Long taskId);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.server.reportmanager.service;
|
||||
|
||||
import javax.jws.WebService;
|
||||
|
||||
/**
|
||||
* 报告管理服务接口
|
||||
*
|
||||
* @author YongBin Wen
|
||||
* @date 2024/1/3 16:11
|
||||
*/
|
||||
@WebService
|
||||
public interface ReportManagerService {
|
||||
/**
|
||||
* 报告删除
|
||||
*
|
||||
* @param message 删除信息
|
||||
* @return 处理结果
|
||||
*/
|
||||
String DeleteReport(String message);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.docus.server.reportmanager.util;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* http 地址工具
|
||||
*
|
||||
* @author WYBDEV
|
||||
*/
|
||||
public class HttpUrlUtil {
|
||||
/**
|
||||
* 添加url参数
|
||||
*
|
||||
* @param url url
|
||||
* @param param 参数
|
||||
* @return 处理过后的url
|
||||
*/
|
||||
public static String addUrlParam(String url, Map<String, String> param) {
|
||||
if (Func.isEmpty(param)) {
|
||||
return url;
|
||||
}
|
||||
StringBuilder urlBuilder = new StringBuilder(url);
|
||||
// url已经添加过参数的标记
|
||||
String addFlag = "?";
|
||||
// url 参数连接符号,如果没有添加过,连接符号置为空
|
||||
String connect = "&";
|
||||
if (!url.contains(addFlag)) {
|
||||
urlBuilder.append("?");
|
||||
connect = "";
|
||||
}
|
||||
|
||||
for (Map.Entry<String, String> entry : param.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
urlBuilder.append(connect).append(key).append("=").append(value);
|
||||
// 添加过参数,连接符置为&
|
||||
connect = "&";
|
||||
|
||||
}
|
||||
return urlBuilder.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(addUrlParam("http://www.baidu.com", null));
|
||||
System.out.println(addUrlParam("http://www.baidu.com?word=1", null));
|
||||
HashMap<String, String> stringStringHashMap = new HashMap<>();
|
||||
stringStringHashMap.put("en","some");
|
||||
System.out.println(addUrlParam("http://www.baidu.com", stringStringHashMap));
|
||||
System.out.println(addUrlParam("http://www.baidu.com?word=1", stringStringHashMap));
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.docus.server.reportmanager.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,196 @@
|
||||
package com.docus.server.reportmanager.util;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class TableJsonRead {
|
||||
|
||||
/**
|
||||
* 读取数据结构
|
||||
* @param path 路径后缀
|
||||
* @param fileName 文件名称
|
||||
* @return
|
||||
*/
|
||||
public <T> T Read(String path,String fileName,Class<T> clazz){
|
||||
String currentPath=CurrentPath();
|
||||
path = currentPath+"\\"+path;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
T dto =null;
|
||||
File file = new File(path+"\\"+fileName);
|
||||
try {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
BufferedReader bufferedReader = null;
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
String line;
|
||||
while (!StringUtils.isEmpty(line = bufferedReader.readLine())) {
|
||||
sb.append(line);
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
//dto = (T)JSONObject.parse(sb.toString());
|
||||
dto= objectMapper.readValue(sb.toString(), clazz);
|
||||
//dto = objectMapper.convertValue(o, new TypeReference<T>() { });
|
||||
}
|
||||
bufferedReader.close();
|
||||
}
|
||||
|
||||
return dto;
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T Read(File file,Class<T> clazz) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
T dto =null;
|
||||
try {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
BufferedReader bufferedReader = null;
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
String line;
|
||||
while (!StringUtils.isEmpty(line = bufferedReader.readLine())) {
|
||||
sb.append(line);
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
//dto = (T)JSONObject.parse(sb.toString());
|
||||
dto= objectMapper.readValue(sb.toString(), clazz);
|
||||
//dto = objectMapper.convertValue(o, new TypeReference<T>() { });
|
||||
}
|
||||
bufferedReader.close();
|
||||
}
|
||||
|
||||
return dto;
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 取得当前jar路径
|
||||
* @return
|
||||
*/
|
||||
public static String CurrentPath(){
|
||||
File dir = new File(".");
|
||||
String currentpath ="";
|
||||
try {
|
||||
currentpath = dir.getCanonicalPath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return currentpath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取得当前jar路径
|
||||
* @return
|
||||
*/
|
||||
public static String currentPath(String dir){
|
||||
String path = CurrentPath() + File.separator + dir;
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 读取文件内容
|
||||
* @param path
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
public String ReadContent(String path,String fileName){
|
||||
String currentPath=CurrentPath();
|
||||
path = currentPath+"\\"+path;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
File file = new File(path+"\\"+fileName);
|
||||
try {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
BufferedReader bufferedReader = null;
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
String line;
|
||||
while (!StringUtils.isEmpty(line = bufferedReader.readLine())) {
|
||||
sb.append(line);
|
||||
}
|
||||
|
||||
bufferedReader.close();
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存json至文件
|
||||
* @param path 路径后缀
|
||||
* @param fileName 文件名称
|
||||
* @param data json信息
|
||||
* @return
|
||||
*/
|
||||
public void Save(String path,String fileName,String data){
|
||||
String currentPath=CurrentPath();
|
||||
path = currentPath+"\\"+path;
|
||||
FileWriter fwriter = null;
|
||||
try {
|
||||
File file = new File(path);
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
fwriter = new FileWriter(path+"\\"+fileName);
|
||||
fwriter.write(data);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
fwriter.flush();
|
||||
fwriter.close();
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
@echo off
|
||||
|
||||
for /f "delims=" %%t in ('winsw.exe status') do set str=%%t
|
||||
echo %str%
|
||||
|
||||
|
||||
|
||||
if %str%==Started (
|
||||
echo "restart....."
|
||||
winsw stop
|
||||
PING 127.0.0.1 -n 10 -w 30000 >NUL
|
||||
winsw start
|
||||
)
|
||||
|
||||
|
||||
|
||||
if %str%==Stopped (
|
||||
echo "start....."
|
||||
winsw start
|
||||
)
|
||||
|
||||
|
||||
if %str%==NonExistent (
|
||||
echo "deploy and start....."
|
||||
winsw install
|
||||
winsw start
|
||||
echo c
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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,13 @@
|
||||
@echo off
|
||||
|
||||
for /f "delims=" %%t in ('winsw.exe status') do set str=%%t
|
||||
echo %str%
|
||||
|
||||
|
||||
|
||||
if %str%==Started (
|
||||
winsw stop
|
||||
@echo wait program stop .....
|
||||
PING 127.0.0.1 -n 30 -w 10000 >NUL
|
||||
)
|
||||
|
@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
|
||||
set deployDir=%1\docus-report-manager
|
||||
if %deployDir%=="" set deployDir=d:\webroot\docus-report-manager
|
||||
|
||||
set curr_file=%cd%
|
||||
cd /d %deployDir%
|
||||
call stop.bat
|
||||
cd %curr_file%
|
||||
sc query docus-backup-sys |Find "RUNNING" && ping 127.0.0.1 -n 10 >nul
|
||||
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 install.bat
|
||||
|
@ -0,0 +1,8 @@
|
||||
<service>
|
||||
<id>docus-report-manager</id>
|
||||
<name>生产-嘉时-报告管理服务</name>
|
||||
<description>生产-嘉时-报告管理服务</description>
|
||||
<startmode>Automatic</startmode>
|
||||
<executable>%BASE%\start.bat</executable>
|
||||
<log mode="none"></log>
|
||||
</service>
|
@ -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,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.reportmanager.mapper.CollectTaskMapper">
|
||||
<update id="cancel">
|
||||
UPDATE `docus_archivefile`.`af_collect_task`
|
||||
SET `state` = '4'
|
||||
WHERE `id` in
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getTasks" resultType="com.docus.server.reportmanager.entity.AfCollectTask">
|
||||
SELECT
|
||||
id,
|
||||
patient_id as patientId
|
||||
FROM
|
||||
`docus_archivefile`.`af_collect_task`
|
||||
<where>
|
||||
<if test="task.sysflag !=null and task.sysflag != ''">
|
||||
and sysflag=#{task.sysflag}
|
||||
</if>
|
||||
<if test="task.patient_id !=null and task.patient_id != ''">
|
||||
and patient_id=#{task.patientId}
|
||||
</if>
|
||||
<if test="task.C1 !=null and task.C1 != ''">
|
||||
and C1=#{task.C1}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
<?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.reportmanager.mapper.ScanAssortMapper">
|
||||
|
||||
<update id="cancel">
|
||||
UPDATE `docus_archivefile`.`t_scan_assort`
|
||||
SET `is_del` = 1
|
||||
WHERE `id` in
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="getIdByPatientTask" resultType="java.lang.Long">
|
||||
select id
|
||||
from `docus_archivefile`.`t_scan_assort`
|
||||
where patient_id = #{patientId}
|
||||
and task_id = #{taskId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue