调整项目结构

segment2.0
linrf 2 years ago
parent b2c2c75c60
commit d19776f9f7

@ -1,79 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>docus-collector-server</artifactId>
<groupId>com.docus</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bl-sysem</artifactId>
<name>Archetype - bl-sysem</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.docus</groupId>
<artifactId>docus-sys</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.docus</groupId>
<artifactId>docus-medical-record</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<!-- <resources>-->
<!-- <resource>-->
<!-- <directory>src/main/java</directory>-->
<!-- <includes>-->
<!-- <include>**/*.xml</include>-->
<!-- </includes>-->
<!-- </resource>-->
<!-- <resource>-->
<!-- <directory>src/main/resources</directory>-->
<!-- </resource>-->
<!-- </resources>-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources/mapper</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<outputDirectory>../collect-sdry/target/collect-sdry/mybatis.mapper/bl-mapper</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<excludes>
<exclude>**/*.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -1,11 +0,0 @@
package com.docus.server.bl.common;
/**
* @author linrf
* @date 2023/6/9 11:19
*/
public class DSKeyConstants {
public static final String DS_KEY = "bl";
}

@ -1,13 +0,0 @@
package com.docus.server.bl.common.annotation;
import org.springframework.stereotype.Component;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface CacheLayer {
String value() default "";
}

@ -1,4 +0,0 @@
package com.docus.server.bl.infrastructure.cache;
public class DeptCacheLayer {
}

@ -1,4 +0,0 @@
package com.docus.server.bl.infrastructure.client;
public class DownLoadAPI {
}

@ -1,29 +0,0 @@
package com.docus.server.bl.infrastructure.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.docus.server.bl.common.DSKeyConstants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Mapper
@DS(DSKeyConstants.DS_KEY)
public interface BlDeptMapper {
List<Map<String, Object>> page(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
@Param("offset") int offset,
@Param("pageSize") int pageSize);
List<Map<String, Object>> BatchForJZH(@Param("jzhs") List<String> jzhs);
List<Map<String, Object>> BatchForJZHAndAdmissTimes(@Param("datas") List<Map<String, Object>> datas);
List<Map<String, Object>> BatchForZYHAndAdmissTimes(@Param("datas") List<Map<String, Object>> datas);
List<Map<String, Object>> BatchForEXAMTIME(@Param("datas") List<Map<String, Object>> datas);
}

@ -1,22 +0,0 @@
package com.docus.server.bl.infrastructure.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.docus.server.bl.common.DSKeyConstants;
import com.docus.server.record.common.pojo.dto.TBasicDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
@DS(DSKeyConstants.DS_KEY)
public interface BlTBasicMapper {
List<TBasicDTO> getTBasicListView(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
@Param("offset") int offset,
@Param("pageSize") int pageSize);
}

@ -1,22 +0,0 @@
package com.docus.server.bl.infrastructure.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.docus.server.bl.common.DSKeyConstants;
import com.docus.server.sys.common.pojo.dto.UserDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
@DS(DSKeyConstants.DS_KEY)
public interface BlUserMapper {
List<UserDTO> getUserListView(@Param("startDate") Date startDate,
@Param("endDate") Date endDate,
@Param("offset") int offset,
@Param("pageSize") int pageSize);
}

@ -1,6 +0,0 @@
package com.docus.server.bl.service;
import com.docus.server.client.api.IHospitalApi;
public interface IBlService extends IHospitalApi {
}

@ -1,44 +0,0 @@
package com.docus.server.bl.service.impl;
import com.docus.server.bl.common.DSKeyConstants;
import com.docus.server.bl.infrastructure.mapper.BlDeptMapper;
import com.docus.server.bl.service.IBlService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Component(DSKeyConstants.DS_KEY + "ServiceImpl")
@AllArgsConstructor
public class BlServiceImpl implements IBlService {
private final BlDeptMapper blDeptMapper;
@Override
public List<Map<String, Object>> page(Date startDate, Date endDate, int pageNum, int pageSize) {
return blDeptMapper.page(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
}
@Override
public List<Map<String, Object>> BatchForJZH(List<String> jzhs) {
return blDeptMapper.BatchForJZH(jzhs);
}
@Override
public List<Map<String, Object>> BatchForJZHAndAdmissTimes(List<Map<String, Object>> datas) {
return blDeptMapper.BatchForJZHAndAdmissTimes(datas);
}
@Override
public List<Map<String, Object>> BatchForZYHAndAdmissTimes(List<Map<String, Object>> datas) {
return blDeptMapper.BatchForZYHAndAdmissTimes(datas);
}
@Override
public List<Map<String, Object>> BatchForEXAMTIME(List<Map<String, Object>> datas) {
return blDeptMapper.BatchForEXAMTIME(datas);
}
}

@ -1,180 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.bl.infrastructure.mapper.BlDeptMapper">
<!--根据更新时间分页查询-->
<select id="page" resultType="java.util.Map">
SELECT DISTINCT
'6' AS SYS_CODE,
ZYH AS ZYH,
JZH AS FVISIT_ID,
FILE_NAME AS REPORT_NAME,
'' AS BGLX,
'1503577916225949698' AS ASSORTID,
EXAM_NO AS RP_EXAM_NO,
1 AS PATH_TYPE,
FILE_PATHFILE_PATH AS FILE_PATH,
0 AS ISDELETE,
0 AS state,
'' AS jch,
'' AS checktime,
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') AS MODIFYTIME
FROM
V_JSWZH_LISRECORD
WHERE
1 = 1
AND AFFIRM_TIME <![CDATA[ > ]]> #{startDate}
AND AFFIRM_TIME <![CDATA[ <= ]]> #{endDate}
ORDER BY
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') DESC
LIMIT #{offset}, #{pageSize}
</select>
<!--根据jzh取得所需采集的批量数据-->
<select id="BatchForJZH" resultType="java.util.Map">
SELECT
'6' AS SYS_CODE,
ZYH AS ZYH,
JZH AS FVISIT_ID,
FILE_NAME AS REPORT_NAME,
'' AS BGLX,
'1503577916225949698' AS ASSORTID,
EXAM_NO AS RP_EXAM_NO,
1 AS PATH_TYPE,
FILE_PATHFILE_PATH AS FILE_PATH,
0 AS ISDELETE,
0 AS state,
'' AS jch,
'' AS checktime,
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') AS MODIFYTIME
FROM
V_JSWZH_LISRECORD
WHERE
1 = 1
AND JZH IN
<foreach item="item" index="index" collection="jzhs" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!--记账号+住院次数-->
<select id="BatchForJZHAndAdmissTimes" resultType="java.util.Map">
SELECT
'6' AS SYS_CODE,
ZYH AS ZYH,
JZH AS FVISIT_ID,
FILE_NAME AS REPORT_NAME,
'' AS BGLX,
'1503577916225949698' AS ASSORTID,
EXAM_NO AS RP_EXAM_NO,
1 AS PATH_TYPE,
FILE_PATHFILE_PATH AS FILE_PATH,
0 AS ISDELETE,
0 AS state,
'' AS jch,
'' AS checktime,
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') AS MODIFYTIME
FROM
V_JSWZH_LISRECORD
WHERE
1 = 1
and (
<foreach item="item" index="index" collection="datas" open="(" separator="," close=")">
(JZH =#{item.FVISIT_ID} and ADMISS_TIMES=#{item.ADMISS_TIMES}) or
</foreach>
)
</select>
<select id="BatchForZYHAndAdmissTimes" resultType="java.util.Map">
SELECT
'6' AS SYS_CODE,
ZYH AS ZYH,
JZH AS FVISIT_ID,
FILE_NAME AS REPORT_NAME,
'' AS BGLX,
'1503577916225949698' AS ASSORTID,
EXAM_NO AS RP_EXAM_NO,
1 AS PATH_TYPE,
FILE_PATHFILE_PATH AS FILE_PATH,
0 AS ISDELETE,
0 AS state,
'' AS jch,
'' AS checktime,
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') AS MODIFYTIME
FROM
V_JSWZH_LISRECORD
WHERE
1 = 1
and (
<foreach item="item" index="index" collection="datas" open="(" separator="," close=")">
(ZYH =#{item.ZYH} and ADMISS_TIMES=#{item.ADMISS_TIMES}) or
</foreach>
)
</select>
<select id="BatchForEXAMTIME" resultType="java.util.Map">
SELECT
'6' AS SYS_CODE,
ZYH AS ZYH,
JZH AS FVISIT_ID,
FILE_NAME AS REPORT_NAME,
'' AS BGLX,
'1503577916225949698' AS ASSORTID,
EXAM_NO AS RP_EXAM_NO,
1 AS PATH_TYPE,
FILE_PATHFILE_PATH AS FILE_PATH,
0 AS ISDELETE,
0 AS state,
'' AS jch,
'' AS checktime,
date_format(AFFIRM_TIME, '%Y-%m-%d %H:%i:%s') AS MODIFYTIME
FROM
V_JSWZH_LISRECORD
WHERE
1 = 1
and (
<foreach item="item" index="index" collection="datas" open="(" separator="," close=")">
(ZYH =#{item.ZYH} and EXAM_TIME <![CDATA[ >= ]]> STR_TO_DATE(#{item.admiss_date})
<if test="item.dis_date != null">
and EXAM_TIME <![CDATA[ <= ]]> STR_TO_DATE(#{item.dis_date})
</if>
</foreach>
)
</select>
<!-- mysql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name FROM `his`.`his_dept`
WHERE update_time between #{startDate} and #{endDate}
order by update_time asc
LIMIT (#{pageNum} - 1) * #{pageSize} , #{pageSize}
</select>
-->
<!-- mssqsql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
select top pageSize `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name
from (select row_number()
over(order by sno asc) as rownumber,*
from student) temp_row
where rownumber>((pageNum-1)*pageSize);
</select>
-->
<!-- oracle
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT * FROM
(SELECT tt.*,ROWNUM AS RN FROM
(SELECT t.* FROM ${tableName} t
where 1=1
ORDER BY t.createTime DESC,t.id ) tt
WHERE tt.ROWNUM <= #{pageNum}*#{pageSize}
) rs
WHERE rs.RN > #{pageNum-1}*#{pageSize}
</select>
-->
</mapper>

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.bl.infrastructure.mapper.BlTBasicMapper">
<select id="getTBasicListView" resultType="com.docus.server.record.common.pojo.dto.TBasicDTO">
SELECT `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name FROM `his_basic`
WHERE update_time between #{startDate} and #{endDate}
order by update_time asc
LIMIT #{offset}, #{pageSize}
</select>
<!-- mysql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name FROM `his`.`his_dept`
WHERE update_time between #{startDate} and #{endDate}
order by update_time asc
LIMIT (#{pageNum} - 1) * #{pageSize} , #{pageSize}
</select>
-->
<!-- mssqsql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
select top pageSize `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name
from (select row_number()
over(order by sno asc) as rownumber,*
from student) temp_row
where rownumber>((pageNum-1)*pageSize);
</select>
-->
<!-- oracle
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT * FROM
(SELECT tt.*,ROWNUM AS RN FROM
(SELECT t.* FROM ${tableName} t
where 1=1
ORDER BY t.createTime DESC,t.id ) tt
WHERE tt.ROWNUM <= #{pageNum}*#{pageSize}
) rs
WHERE rs.RN > #{pageNum-1}*#{pageSize}
</select>
-->
</mapper>

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.bl.infrastructure.mapper.BlUserMapper">
<select id="getUserListView" resultType="com.docus.server.sys.common.pojo.dto.UserDTO">
SELECT `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name FROM `his_user`
WHERE update_time between #{startDate} and #{endDate}
order by update_time asc
LIMIT #{offset}, #{pageSize}
</select>
<!-- mysql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name FROM `his`.`his_dept`
WHERE update_time between #{startDate} and #{endDate}
order by update_time asc
LIMIT (#{pageNum} - 1) * #{pageSize} , #{pageSize}
</select>
-->
<!-- mssqsql
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
select top pageSize `update_time` as update_time ,`dept_code` as dept_code,`dept_name` as dept_name
from (select row_number()
over(order by sno asc) as rownumber,*
from student) temp_row
where rownumber>((pageNum-1)*pageSize);
</select>
-->
<!-- oracle
<select id="list" resultType="com.docus.server.sys.common.pojo.dto.DeptDTO">
SELECT * FROM
(SELECT tt.*,ROWNUM AS RN FROM
(SELECT t.* FROM ${tableName} t
where 1=1
ORDER BY t.createTime DESC,t.id ) tt
WHERE tt.ROWNUM <= #{pageNum}*#{pageSize}
) rs
WHERE rs.RN > #{pageNum-1}*#{pageSize}
</select>
-->
</mapper>

@ -2,12 +2,12 @@ package com.docus.server.collect.report;
import com.alibaba.fastjson.JSONObject;
import com.docus.core.util.Func;
import com.docus.core.util.ParamsUtils;
import com.docus.core.util.XmlUtil;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.web.utils.TableJsonRead;
import com.docus.server.common.util.ParamsUtils;
import org.springframework.stereotype.Component;
import org.w3c.dom.Node;

@ -1,13 +1,13 @@
package com.docus.server.collect.report.noview;
import com.docus.core.util.Func;
import com.docus.core.util.MapObjUtil;
import com.docus.core.util.json.JSON;
import com.docus.server.collect.AbstractJobCollector;
import com.docus.server.collect.web.common.dto.NoViewCollectionDto;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.enums.QueryWayEnum;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.common.util.MapObjUtil;
import org.springframework.stereotype.Component;
import java.util.ArrayList;

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.docus.core.util.Func;
import com.docus.core.util.MapObjUtil;
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
import com.docus.server.archivefile.service.IAfCollectSysDictionary;
import com.docus.server.collect.web.common.DocusProperties;
@ -18,7 +19,6 @@ import com.docus.server.collect.web.enums.RedisKeyEnum;
import com.docus.server.collect.web.utils.MqQueueUtils;
import com.docus.server.collect.web.utils.RedisMq;
import com.docus.server.common.message.MqMessage;
import com.docus.server.common.util.MapObjUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

@ -4,10 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.docus.core.util.SpringUtils;
import com.docus.infrastructure.redis.service.IdService;
import com.docus.server.api.IHospitalApi;
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
import com.docus.server.archivefile.service.IAfViewCollectionLogService;
import com.docus.server.client.api.IHospitalApi;
import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.BasicProperties;
import com.docus.server.collect.web.common.DocusProperties;
@ -22,7 +23,6 @@ import com.docus.server.collect.web.utils.MqQueueUtils;
import com.docus.server.collect.web.utils.RedisMq;
import com.docus.server.collect.web.utils.SpringRestTemplateUtils;
import com.docus.server.common.message.MqMessage;
import com.docus.server.common.util.SpringUtils;
import com.docus.server.record.service.ITBasicService;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

@ -2,7 +2,7 @@ package com.docus.server.collect.user.mq.test;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;

@ -13,92 +13,92 @@ spring:
#公司病案的文件服务数据库
master:
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: root
password: root
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#公司病案的系统服务数据库
system:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_system?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#公司病案的基础服务数据库
record:
url: jdbc:log4jdbc:mysql://db.docus.cn:3306/docus_medicalrecord?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
username: docus
password: docus702
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#医院的用户/科室/基础数据的数据库
his:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#病理数据
bl:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#电生理系统数据
ecg:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#电子病历系统数据
emr:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#护理文书系统数据
hl:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#手麻系统数据
issubmit:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#lis系统数据
lis:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/lis?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#Pacs系统数据视图
pacs:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#vte静脉血栓栓塞症
vte:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
#重症系统数据
zz:
url: jdbc:log4jdbc:mysql://127.0.0.1:3306/his?autoReconnect=true&allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: root@123456
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
type: com.alibaba.druid.pool.DruidDataSource
# rabbitmq:
@ -108,7 +108,7 @@ spring:
# password: guest
redis:
host: redis.docus.cn
# password: JSdocus@702
password: JSdocus@702
cloud:
nacos:
discovery:
@ -174,7 +174,7 @@ mybatis-plus:
field-strategy: NOT_EMPTY
db-type: MYSQL
mapper-locations: classpath*:/mapper/*Mapper.xml,file:mybatis.mapper/**/*Mapper.xml
type-enums-package: com.docus.server.collect.web.enums,com.docus.server.common.enums
type-enums-package: com.docus.server.enums
xxl:
job:

@ -6,7 +6,7 @@ import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.record.common.pojo.dto.TBasicDTO;

@ -3,14 +3,14 @@ package com.docus.server.collect.basic.http.test;
import com.docus.core.util.json.JSON;
import com.docus.log.executor.TrackRetrySpringExecutor;
import com.docus.log.handler.IJobHandler;
import com.docus.log.handler.MethodJobHandler;
import com.docus.log.handler.impl.MethodJobHandler;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.collect.web.service.ITaskOriginalMessageService;
import com.docus.server.enums.CollectTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

@ -6,7 +6,7 @@ import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IWsResult;
import com.docus.server.collect.basic.ws.IBasicServer;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.record.common.pojo.dto.TBasicDTO;

@ -6,7 +6,7 @@ import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.sys.common.pojo.dto.DeptDTO;
import com.docus.server.collect.web.process.VisitorProcessor;

@ -5,7 +5,7 @@ import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IWsResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.sys.common.pojo.dto.DeptDTO;
import com.docus.server.collect.web.process.VisitorProcessor;

@ -1,6 +1,5 @@
package com.docus.server.collect.report.view;
import com.docus.server.bl.common.DSKeyConstants;
import com.docus.server.bl.service.IBlService;
import com.docus.server.collect.ICollector;
import com.docus.server.collect.IJob;
@ -8,6 +7,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.constants.DSKeyConstants;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,7 +49,7 @@ public class BlViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.BL_DS_KEY);
}
@Override

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.ecg.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.ecg.service.IEcgService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,7 +49,7 @@ public class EcgViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.ECG_DS_KEY);
}
@Override

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.emr.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.emr.service.IEmrService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,7 +49,7 @@ public class EmrViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.EMR_DS_KEY);
}
@Override

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.hl.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.hl.service.IHlService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,8 +49,9 @@ public class HlViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.HL_DS_KEY);
}
@Override
public List<Map<String, Object>> execute(PeriodTime periodTime, TaskConfig taskConfig) {
//每家医院按照固定的格式写sql不同医院需要替换不同的sql即可。

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.issubmit.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.issubmit.service.IIssubmitService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,8 +49,9 @@ public class IssubmitViewCollectJob extends AbstractCollectJob<Map<String, Objec
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.ISSUBMIT_DS_KEY);
}
@Override
public List<Map<String, Object>> execute(PeriodTime periodTime, TaskConfig taskConfig) {
//每家医院按照固定的格式写sql不同医院需要替换不同的sql即可。

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.lis.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.lis.service.ILisService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,7 +49,7 @@ public class LisViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.LIS_DS_KEY);
}
@Override

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.pacs.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.pacs.service.IPacsService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,8 +49,9 @@ public class PacsViewCollectJob extends AbstractCollectJob<Map<String, Object>>
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.PACS_DS_KEY);
}
@Override
public List<Map<String, Object>> execute(PeriodTime periodTime, TaskConfig taskConfig) {
//每家医院按照固定的格式写sql不同医院需要替换不同的sql即可。

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.vte.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.vte.service.IVteService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,8 +49,9 @@ public class VteViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.VTE_DS_KEY);
}
@Override
public List<Map<String, Object>> execute(PeriodTime periodTime, TaskConfig taskConfig) {
//每家医院按照固定的格式写sql不同医院需要替换不同的sql即可。

@ -6,7 +6,7 @@ import com.docus.server.collect.IJobResult;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.job.AbstractCollectJob;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.zz.common.DSKeyConstants;
import com.docus.server.constants.DSKeyConstants;
import com.docus.server.zz.service.IZzService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;
@ -49,7 +49,7 @@ public class ZzViewCollectJob extends AbstractCollectJob<Map<String, Object>> {
@SuppressWarnings("unchecked")
@Override
public void doHandle(List<Map<String, Object>> results, String param) {
jobResult.handle(results, DSKeyConstants.DS_KEY);
jobResult.handle(results, DSKeyConstants.ZZ_DS_KEY);
}
@Override

@ -8,7 +8,7 @@ import com.docus.server.collect.IConverter;
import com.docus.server.collect.IWsResult;
import com.docus.server.collect.report.service.IReportService;
import com.docus.server.collect.report.ws.IReportServer;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@ -6,7 +6,7 @@ import com.docus.log.annotation.TrackGroup;
import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IHttpResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.sys.common.pojo.dto.UserDTO;

@ -6,7 +6,7 @@ import com.docus.log.context.TrackHelper;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IWsResult;
import com.docus.server.collect.user.ws.IUserServer;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.collect.web.process.VisitorProcessor;
import com.docus.server.collect.web.service.CollectService;
import com.docus.server.sys.common.pojo.dto.UserDTO;

@ -3,7 +3,7 @@ package com.docus.server.collect.web.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.docus.server.collect.web.utils.DateSpiltUtil;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.enums.StateEnum;
import lombok.Data;
import java.util.Date;

@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ -3,8 +3,8 @@ package com.docus.server.collect.web.convert;
import com.docus.core.util.DateUtil;
import com.docus.infrastructure.redis.service.IdService;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@ -8,7 +8,7 @@ import com.docus.server.collect.web.service.CollectService;
import com.docus.server.collect.web.service.ITaskConfigService;
import com.docus.server.collect.web.utils.PeriodTime;
import com.docus.server.common.config.UserProperties;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.enums.StateEnum;
import com.docus.server.record.service.ITBasicService;
import com.docus.server.sys.service.IPowerDeptService;
import com.docus.server.sys.service.IPowerThirdLoginService;

@ -3,7 +3,7 @@ package com.docus.server.collect.web.job;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import com.docus.server.collect.web.service.ITaskOriginalMessageService;
import com.docus.server.collect.web.service.TrackRetryService;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.enums.StateEnum;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@ -1,16 +1,16 @@
package com.docus.server.collect.web.process;
import com.docus.core.util.Func;
import com.docus.core.util.SpringUtils;
import com.docus.core.util.json.JSON;
import com.docus.infrastructure.core.db.enums.IIntegerEnum;
import com.docus.log.context.TrackContext;
import com.docus.log.processor.AbstractProcessor;
import com.docus.server.collect.IConverter;
import com.docus.server.collect.IResult;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.collect.web.service.ITaskOriginalMessageService;
import com.docus.server.common.enums.IIntegerEnum;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.common.util.SpringUtils;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.extern.slf4j.Slf4j;

@ -1,7 +1,7 @@
package com.docus.server.collect.web.service;
import com.docus.infrastructure.core.db.service.IBaseService;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.common.service.IBaseService;
import java.util.Date;

@ -1,9 +1,9 @@
package com.docus.server.collect.web.service;
import com.docus.infrastructure.core.db.service.IBaseService;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.common.service.IBaseService;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
public interface ITaskOriginalMessageService extends IBaseService<TaskOriginalMessage> {

@ -3,7 +3,7 @@ package com.docus.server.collect.web.service;
import com.docus.core.util.json.JSON;
import com.docus.log.executor.TrackRetrySpringExecutor;
import com.docus.log.handler.IJobHandler;
import com.docus.log.handler.MethodJobHandler;
import com.docus.log.handler.impl.MethodJobHandler;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;

@ -1,9 +1,9 @@
package com.docus.server.collect.web.service.impl;
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
import com.docus.server.collect.web.common.entity.TaskConfig;
import com.docus.server.collect.web.mapper.TaskConfigMapper;
import com.docus.server.collect.web.service.ITaskConfigService;
import com.docus.server.common.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@ -2,13 +2,13 @@ package com.docus.server.collect.web.service.impl;
import com.docus.core.util.DateUtil;
import com.docus.core.util.Func;
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
import com.docus.server.collect.web.common.entity.TaskOriginalMessage;
import com.docus.server.collect.web.convert.TaskOriginalMessageConverter;
import com.docus.server.collect.web.enums.CollectTypeEnum;
import com.docus.server.collect.web.mapper.TaskOriginalMessageMapper;
import com.docus.server.collect.web.service.ITaskOriginalMessageService;
import com.docus.server.common.enums.StateEnum;
import com.docus.server.common.service.impl.BaseServiceImpl;
import com.docus.server.enums.CollectTypeEnum;
import com.docus.server.enums.StateEnum;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@ -0,0 +1,4 @@
package com.docus.server.record.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.sys.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.bl.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.ecg.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.his.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.hl.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.issubmit.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.lis.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.pacs.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.vte.common;
public class A {
}

@ -0,0 +1,4 @@
package com.docus.server.zz.common;
public class A {
}

@ -1,16 +0,0 @@
package com.docus.server.common.db;
import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import java.util.UUID;
public class KeyGenerator implements IKeyGenerator {
public static String genId() {
return UUID.randomUUID().toString().replace("-", "").toUpperCase();
}
@Override
public String executeSql(String incrementerName) {
return genId();
}
}

@ -1,91 +0,0 @@
package com.docus.server.common.db.type.handler;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
import java.sql.*;
import java.time.LocalDateTime;
//用于兼容gbase localdatetime 转换
@MappedTypes(value = LocalDateTime.class)
public class LocalDateTimeTypeHandler extends BaseTypeHandler<LocalDateTime> {
//驱动是否原生支持
private Boolean isJdbcSupport;
private boolean getIsJdbcSupport(ResultSet rs, String columnName) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnName, LocalDateTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(CallableStatement cs, int columnIndex) {
if (isJdbcSupport == null) {
try {
cs.getObject(columnIndex, LocalDateTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(ResultSet rs, int columnIndex) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnIndex, LocalDateTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, LocalDateTime localDateTime, JdbcType jdbcType) throws SQLException {
if (isJdbcSupport != null && isJdbcSupport) {
ps.setObject(i, localDateTime);
} else {
ps.setObject(i, Timestamp.valueOf(localDateTime));
}
}
@Override
public LocalDateTime getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
if (getIsJdbcSupport(resultSet, columnName)) {
return resultSet.getObject(columnName, LocalDateTime.class);
} else {
Timestamp timestamp = resultSet.getTimestamp(columnName);
return timestamp == null ? null : timestamp.toLocalDateTime();
}
}
@Override
public LocalDateTime getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
if (getIsJdbcSupport(resultSet, columnIndex)) {
return resultSet.getObject(columnIndex, LocalDateTime.class);
} else {
Timestamp timestamp = resultSet.getTimestamp(columnIndex);
return timestamp == null ? null : timestamp.toLocalDateTime();
}
}
@Override
public LocalDateTime getNullableResult(CallableStatement callableStatement, int columnIndex) throws SQLException {
if (getIsJdbcSupport(callableStatement, columnIndex)) {
return callableStatement.getObject(columnIndex, LocalDateTime.class);
} else {
Timestamp timestamp = callableStatement.getTimestamp(columnIndex);
return timestamp == null ? null : timestamp.toLocalDateTime();
}
}
}

@ -1,91 +0,0 @@
package com.docus.server.common.db.type.handler;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
import java.sql.*;
import java.time.LocalDate;
//用于兼容gbase LocalDate 转换
@MappedTypes(value = LocalDate.class)
public class LocalDateTypeHandler extends BaseTypeHandler<LocalDate> {
//驱动是否原生支持
private Boolean isJdbcSupport;
private boolean getIsJdbcSupport(ResultSet rs, String columnName) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnName, LocalDate.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(CallableStatement cs, int columnIndex) {
if (isJdbcSupport == null) {
try {
cs.getObject(columnIndex, LocalDate.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(ResultSet rs, int columnIndex) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnIndex, LocalDate.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, LocalDate localDate, JdbcType jdbcType) throws SQLException {
if (isJdbcSupport != null && isJdbcSupport) {
ps.setObject(i, localDate);
} else {
ps.setObject(i, Date.valueOf(localDate));
}
}
@Override
public LocalDate getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
if (getIsJdbcSupport(resultSet, columnName)) {
return resultSet.getObject(columnName, LocalDate.class);
} else {
Date date = resultSet.getDate(columnName);
return date == null ? null : date.toLocalDate();
}
}
@Override
public LocalDate getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
if (getIsJdbcSupport(resultSet, columnIndex)) {
return resultSet.getObject(columnIndex, LocalDate.class);
} else {
Date date = resultSet.getDate(columnIndex);
return date == null ? null : date.toLocalDate();
}
}
@Override
public LocalDate getNullableResult(CallableStatement callableStatement, int columnIndex) throws SQLException {
if (getIsJdbcSupport(callableStatement, columnIndex)) {
return callableStatement.getObject(columnIndex, LocalDate.class);
} else {
Date date = callableStatement.getDate(columnIndex);
return date == null ? null : date.toLocalDate();
}
}
}

@ -1,91 +0,0 @@
package com.docus.server.common.db.type.handler;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
import java.sql.*;
import java.time.LocalTime;
//用于兼容gbase LocalTime 转换
@MappedTypes(value = LocalTime.class)
public class LocalTimeTypeHandler extends BaseTypeHandler<LocalTime> {
//驱动是否原生支持
private Boolean isJdbcSupport;
private boolean getIsJdbcSupport(ResultSet rs, String columnName) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnName, LocalTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(CallableStatement cs, int columnIndex) {
if (isJdbcSupport == null) {
try {
cs.getObject(columnIndex, LocalTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
private boolean getIsJdbcSupport(ResultSet rs, int columnIndex) {
if (isJdbcSupport == null) {
try {
rs.getObject(columnIndex, LocalTime.class);
isJdbcSupport = true;
} catch (Exception e) {
isJdbcSupport = false;
}
}
return isJdbcSupport;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, LocalTime LocalTime, JdbcType jdbcType) throws SQLException {
if (isJdbcSupport != null && isJdbcSupport) {
ps.setObject(i, LocalTime);
} else {
ps.setObject(i, Time.valueOf(LocalTime));
}
}
@Override
public LocalTime getNullableResult(ResultSet resultSet, String columnName) throws SQLException {
if (getIsJdbcSupport(resultSet, columnName)) {
return resultSet.getObject(columnName, LocalTime.class);
} else {
Time time = resultSet.getTime(columnName);
return time == null ? null : time.toLocalTime();
}
}
@Override
public LocalTime getNullableResult(ResultSet resultSet, int columnIndex) throws SQLException {
if (getIsJdbcSupport(resultSet, columnIndex)) {
return resultSet.getObject(columnIndex, LocalTime.class);
} else {
Time time = resultSet.getTime(columnIndex);
return time == null ? null : time.toLocalTime();
}
}
@Override
public LocalTime getNullableResult(CallableStatement callableStatement, int columnIndex) throws SQLException {
if (getIsJdbcSupport(callableStatement, columnIndex)) {
return callableStatement.getObject(columnIndex, LocalTime.class);
} else {
Time time = callableStatement.getTime(columnIndex);
return time == null ? null : time.toLocalTime();
}
}
}

@ -1,31 +0,0 @@
package com.docus.server.common.enums;
public class EnumItemView {
private Integer value;
private String display;
public EnumItemView() {
}
public EnumItemView(Integer value, String display) {
this.value = value;
this.display = display;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getDisplay() {
return display;
}
public void setDisplay(String display) {
this.display = display;
}
}

@ -1,49 +0,0 @@
package com.docus.server.common.enums;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.EnumTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
//mybatis枚举类型分发
public class EnumTypeHandlerDispatch<E extends Enum<E>> extends BaseTypeHandler<E> {
private BaseTypeHandler<E> typeHandler;
public EnumTypeHandlerDispatch(Class<E> type) {
if (type == null) {
throw new IllegalArgumentException("Type argument. cannot be nu11");
}
if (IIntegerEnum.class.isAssignableFrom(type)) {
//如果实现了IIntegerEnum,使用自定义的转换器
typeHandler = new IntegerEnumHandler(type);
} else {
//默认转换器
typeHandler = new EnumTypeHandler<>(type);
}
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, E parameter, JdbcType jdbcType) throws
SQLException {
typeHandler.setNonNullParameter(ps, i, parameter, jdbcType);
}
@Override
public E getNullableResult(ResultSet rs, String columnName) throws SQLException {
return typeHandler.getNullableResult(rs, columnName);
}
@Override
public E getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return typeHandler.getNullableResult(rs, columnIndex);
}
@Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return typeHandler.getNullableResult(cs, columnIndex);
}
}

@ -1,31 +0,0 @@
package com.docus.server.common.enums;
import com.baomidou.mybatisplus.annotation.IEnum;
import java.util.Objects;
public interface IIntegerEnum extends IEnum {
@Override
Integer getValue();
String getDisplay();
static <T extends IIntegerEnum> T fromValue(Class<T> enumType, Integer value) {
for (T object : enumType.getEnumConstants()) {
if (Objects.equals(value, object.getValue())) {
return object;
}
}
throw new IllegalArgumentException("No. enum value 。" + value + "of " + enumType.getCanonicalName());
}
static <T extends IIntegerEnum> T fromDisplay(Class<T> enumType, String display) {
for (T object : enumType.getEnumConstants()) {
if (Objects.equals(display, object.getDisplay())) {
return object;
}
}
throw new IllegalArgumentException("No. enum value 。" + display + "of " + enumType.getCanonicalName());
}
}

@ -1,48 +0,0 @@
package com.docus.server.common.enums;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
//mybatis枚举类型转换
public class IntegerEnumHandler<E extends IIntegerEnum> extends BaseTypeHandler<E> {
private final Class<E> type;
public IntegerEnumHandler(Class<E> type) {
if (type == null) {
throw new IllegalArgumentException("Type argument. cannot. be nu11");
}
this.type = type;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, E parameter, JdbcType jdbcType) throws SQLException {
if (jdbcType == null) {
ps.setInt(i, parameter.getValue());
} else {
ps.setObject(i, parameter.getValue(), jdbcType.TYPE_CODE); //1 / see r3589
}
}
@Override
public E getNullableResult(ResultSet rs, String columnName) throws SQLException {
String s = rs.getString(columnName);
return s == null ? null : IIntegerEnum.fromValue(type, Integer.parseInt(s));
}
@Override
public E getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
String s = rs.getString(columnIndex);
return s == null ? null : IIntegerEnum.fromValue(type, Integer.parseInt(s));
}
@Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
String s = cs.getString(columnIndex);
return s == null ? null : IIntegerEnum.fromValue(type, Integer.parseInt(s));
}
}

@ -1,46 +0,0 @@
package com.docus.server.common.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.docus.server.common.service.impl.Sort;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
public interface IBaseService<T> extends IService<T> {
T findById(Serializable id);
List<T> findByIds(Collection<Serializable> ids);
List<T> findBy(String propertyName, Object propertyValue);
List<T> findByList(String propertyName, Collection<?> propertyValue);
List<T> findActiveBy(String propertyName, Object propertyValue);
List<T> findBy(String propertyName, Object propertyValue, Sort sort);
List<T> findActiveBy(String propertyName, Object propertyValue, Sort sort);
T findOneBy(String propertyName, Object propertyValue);
T findOneByList(String propertyName, Collection<?> propertyValue);
T findActiveOneBy(String propertyName, Object propertyValue);
List<T> find(LambdaQueryWrapper<T> queryWrapper);
T findOne(LambdaQueryWrapper<T> queryWrapper);
List<T> findAll();
List<T> findAllActive();
List<T> findAll(Sort sort);
List<T> findAllActive(Sort sort);
int deleteByIdList(List<Serializable> idList);
}

@ -1,192 +0,0 @@
package com.docus.server.common.service.impl;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.docus.server.common.service.IBaseService;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.*;
public abstract class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements IBaseService<T> {
@Override
public T findById(Serializable id) {
if (id == null) {
throw new RuntimeException("param id is required");
}
return baseMapper.selectById(id);
}
@Override
public List<T> findByIds(Collection<Serializable> ids) {
if (ids == null || ids.size() == 0) {
return new ArrayList<>();
}
return baseMapper.selectBatchIds(ids);
}
/**
* , eq
*/
@Override
public List<T> findBy(String propertyName, Object propertyValue) {
String columnName = getColumnName(propertyName);
return baseMapper.selectList(new QueryWrapper<T>().eq(columnName, propertyValue));
}
/**
* , in
*/
@Override
public List<T> findByList(String propertyName, Collection<?> propertyValue) {
String columnName = getColumnName(propertyName);
return baseMapper.selectList(new QueryWrapper<T>().in(!Objects.isNull(propertyValue), columnName, propertyValue));
}
@Override
public List<T> findActiveBy(String propertyName, Object propertyValue) {
String columnName = getColumnName(propertyName);
QueryWrapper<T> queryWrapper = new QueryWrapper<T>().eq(columnName, propertyValue);
queryWrapper.ne("state", 1);
return baseMapper.selectList(queryWrapper);
}
//返回所有匹配的记录并排序
@Override
public List<T> findBy(String propertyName, Object propertyValue, Sort sort) {
String columnName = getColumnName(propertyName);
QueryWrapper<T> query = new QueryWrapper<T>().eq(columnName, propertyValue);
buildSort(sort, query);
return baseMapper.selectList(query);
}
/**
* Active
*/
@Override
public List<T> findActiveBy(String propertyName, Object propertyValue, Sort sort) {
String columnName = getColumnName(propertyName);
QueryWrapper<T> query = new QueryWrapper<T>().eq(columnName, propertyValue);
query.ne("state", 1);
buildSort(sort, query);
return baseMapper.selectList(query);
}
@Override
public T findOneBy(String propertyName, Object propertyValue) {
String columnName = getColumnName(propertyName);
List<T> list = baseMapper.selectList(new QueryWrapper<T>().eq(columnName, propertyValue));
return (list == null || list.size() == 0) ? null : list.get(0);
}
@Override
public T findOneByList(String propertyName, Collection<?> propertyValue) {
String columnName = getColumnName(propertyName);
List<T> list = baseMapper.selectList(new QueryWrapper<T>().eq(!Objects.isNull(propertyValue), columnName, propertyValue));
return (list == null || list.size() == 0) ? null : list.get(0);
}
//按字段查询返回第一条Active 记录
@Override
public T findActiveOneBy(String propertyName, Object propertyValue) {
String columnName = getColumnName(propertyName);
QueryWrapper<T> queryWrapper = new QueryWrapper<T>().eq(columnName, propertyValue);
queryWrapper.ne("state", 1);
List<T> list = baseMapper.selectList(queryWrapper);
return (list == null || list.size() == 0) ? null : list.get(0);
}
//* L ambda方式自由组合查询条件
@Override
public List<T> find(LambdaQueryWrapper<T> queryWrapper) {
return baseMapper.selectList(queryWrapper);
}
//L ambda方式自由组合查询条件返回第一条记录
@Override
public T findOne(LambdaQueryWrapper<T> queryWrapper) {
List<T> list = baseMapper.selectList(queryWrapper);
return (list == null || list.size() == 0) ? null : list.get(0);
}
//返回表所有记录
@Override
public List<T> findAll() {
return baseMapper.selectList(null);
}
//返回表所有Active的记录
@Override
public List<T> findAllActive() {
return baseMapper.selectList(Wrappers.<T>query().ne("state", 1));
}
//返回表所有记录并排序
@Override
public List<T> findAll(Sort sort) {
QueryWrapper<T> query = new QueryWrapper<T>();
buildSort(sort, query);
return baseMapper.selectList(query);
}
//返回表所有Active记录并排序
@Override
public List<T> findAllActive(Sort sort) {
QueryWrapper<T> query = new QueryWrapper<T>();
query.ne("state", 1);
buildSort(sort, query);
return baseMapper.selectList(query);
}
//组装排序语句
private void buildSort(Sort sort, QueryWrapper<T> query) {
if (sort != null) {
List<Sort.SortItem> sortList = sort.getSortList();
for (Sort.SortItem sortItem : sortList) {
if (sortItem.getDirection() == Sort.Direction.ASC) {
query.orderByAsc(getColumnName(sortItem.getProperty()));
} else {
query.orderByDesc(getColumnName(sortItem.getProperty()));
}
}
}
}
@Override
public int deleteByIdList(List<Serializable> idList) {
if (idList == null || idList.size() == 0) {
return 0;
}
return baseMapper.deleteBatchIds(idList);
}
//通过实体属性获取对应的数据库字段名
public String getColumnName(String propertyName) {
Map<String, Field> fieldMap = ReflectionKit.getFieldMap(getEntityClass());
if (fieldMap != null) {
Field field = fieldMap.get(propertyName);
if (field != null) {
TableField annotation = field.getAnnotation(TableField.class);
if (annotation != null) {
return annotation.value();
}
TableId idAnnotation = field.getAnnotation(TableId.class);
if (idAnnotation != null) {
return idAnnotation.value();
}
}
}
throw new RuntimeException("获取不到属性" + propertyName + "的列名");
}
}

@ -1,62 +0,0 @@
package com.docus.server.common.service.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
//排序定义
public class Sort {
private List<SortItem> sortByProperties = new ArrayList<>();
// 隐藏构造函数
private Sort() {
}
public static Sort byAsc(String property) {
return new Sort().thenByAsc(property);
}
public static Sort byDesc(String property) {
return new Sort().thenByDesc(property);
}
public Sort thenByAsc(String property) {
sortByProperties.add(new SortItem(property, Direction.ASC));
return this;
}
public Sort thenByDesc(String property) {
sortByProperties.add(new SortItem(property, Direction.DESC));
return this;
}
public List<SortItem> getSortList() {
//复制、只读
List<SortItem> copyList = new ArrayList<>(sortByProperties);
return Collections.unmodifiableList(copyList);
}
public class SortItem {
private String property;
private Direction direction;
private SortItem(String property, Direction direction) {
this.property = property;
this.direction = direction;
}
public String getProperty() {
return property;
}
public Direction getDirection() {
return direction;
}
}
public enum Direction {
ASC, DESC;
}
}

@ -1,167 +0,0 @@
package com.docus.server.common.util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Slf4j
public class MapObjUtil {
/**
* Map
*
* @param obj
* @return
*/
public static Map<String, Object> object2Map(Object obj) {
Map<String, Object> map = new HashMap<String, Object>();
if (obj == null) {
return map;
}
Class clazz = obj.getClass();
Field[] fields = clazz.getDeclaredFields();
try {
for (Field field : fields) {
field.setAccessible(true);
map.put(field.getName(), field.get(obj));
}
} catch (Exception e) {
log.error(e.getMessage());
}
return map;
}
/**
* Map
*
* @param map map
* @param clazz
* @return
*/
public static <T> T map2Object(Map<String, Object> map, Class<T> clazz) {
if (map == null) {
return null;
}
T obj = null;
try {
obj = clazz.newInstance();
Field[] fields = obj.getClass().getDeclaredFields();
for (Field field : fields) {
int mod = field.getModifiers();
if (Modifier.isStatic(mod) || Modifier.isFinal(mod)) {
continue;
}
field.setAccessible(true);
String filedTypeName = field.getType().getName();
String fieldName =field.getName().toLowerCase();
if (filedTypeName.equalsIgnoreCase("java.util.date")) {
if (map.containsKey(field.getName().toLowerCase())) {
String datetimestamp = String.valueOf(map.get(fieldName));
if (datetimestamp.equalsIgnoreCase("null")) {
field.set(obj, null);
} else {
field.set(obj, new Date(Long.parseLong(datetimestamp)));
}
}
}
else {
if (map.containsKey(field.getName().toLowerCase())&& (!String.valueOf(map.get(fieldName)).equals("null")) ) {
field.set(obj, map.get(fieldName));
}
}
}
} catch (Exception e) {
log.error(e.getMessage());
}
return obj;
}
/**
* Mapmap线
* @param map map
* @param beanClass
* @param <T>
* @return
*/
public static <T> T map2ObjectUnderlined(Map<String, Object> map, Class<T> beanClass) {
if (map == null) {
return null;
}
Map<String, Object> data=toReplaceKeyLow(map);
return map2Object(data,beanClass);
}
private static String underlineToCamel2(String param){
param = param.toLowerCase();//此处为全部转小写方便根据_判定后一位转驼峰
if (param==null||"".equals(param.trim())){
return "";
}
//使用正则表达式
StringBuilder sb=new StringBuilder(param);
Matcher mc= Pattern.compile("_").matcher(param);
int i=0;
while (mc.find()){
int position=mc.end()-(i++);
//String.valueOf(Character.toUpperCase(sb.charAt(position)));
sb.replace(position-1,position+1,sb.substring(position,position+1).toUpperCase());
}
return sb.toString();
}
/**
* mapmap key线
* @param map map
* @return
*/
private static Map<String, Object> toReplaceKeyLow(Map<String, Object> map) {
Map re_map = new HashMap();
if(re_map != null) {
// Iterator var2 = map.entrySet().iterator();
for (Map.Entry<String, Object> entry : map.entrySet()) {
re_map.put(underlineToCamel2(entry.getKey().trim()), entry.getValue());
}
// while(var2.hasNext()) {
// Entry<String, Object> entry = (Entry)var2.next();
// re_map.put(underlineToCamel2((String)entry.getKey()), map.get(entry.getKey()));
// }
map.clear();
}
return re_map;
}
/**
* Mapkey
* @param map
* @param excludeKeys
* @param <K>
* @param <V>
* @return
*/
public static <K, V> Map removeEntries(Map<K, V> map, K[] excludeKeys) {
Iterator<K> iterator = map.keySet().iterator();
while (iterator.hasNext()) {
K k = iterator.next();
// 如果k刚好在要排除的key的范围中
if (ArrayUtils.contains(excludeKeys, k)) {
iterator.remove();
map.remove(k);
}
}
return map;
}
}

@ -1,34 +0,0 @@
package com.docus.server.common.util;
import java.util.HashMap;
import java.util.Map;
public final class ParamsUtils {
public static Param addParam(String key, Object obj) {
return new Param(key, obj);
}
public Map<String, Object> param(String key, Object obj) {
return new Param(key, obj).param();
}
public static final class Param {
private Map<String, Object> params = new HashMap<String, Object>();
public Param(String key, Object value) {
addParam(key, value);
}
public Param addParam(String key, Object value) {
this.params.put(key, value);
return this;
}
public Map<String, Object> param() {
return this.params;
}
}
}

@ -1,147 +0,0 @@
package com.docus.server.common.util;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.SingletonBeanRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ReflectionUtils;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author linruifeng
*/
@Configuration
public class SpringUtils implements ApplicationContextAware {
/**
* Spring spring
*/
private static ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
SpringUtils.applicationContext = applicationContext;
}
/**
* bean
*
* @param name bean
* @return true
*/
public static boolean containsBean(String name) {
return applicationContext.containsBean(name);
}
/**
* spring bean
*
* @param name bean
* @return
*/
public static Object getBean(String name) throws BeansException {
return applicationContext.getBean(name);
}
/**
* bean()
*
* @param requiredType bean
* @return bean
*/
public static <T> T getBean(Class<T> requiredType) throws BeansException {
return applicationContext.getBean(requiredType);
}
/**
* bean
*
* @param type
* @return Map<bean, bean>
*/
public static <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException {
return applicationContext.getBeansOfType(type);
}
public static <T> T getBean(String beanName, Class<T> beanClass) {
return applicationContext.getBean(beanName, beanClass);
}
public static <T> T createBean(Class<T> beanClass) {
return applicationContext.getAutowireCapableBeanFactory().createBean(beanClass);
}
public static <T> List<T> getBeans(Class<T> beanClass) {
return new ArrayList<>(applicationContext.getBeansOfType(beanClass).values());
}
@SuppressWarnings("unchecked")
public static <T> T initializeBean(T bean) {
AutowireCapableBeanFactory beanFactory = applicationContext.getAutowireCapableBeanFactory();
beanFactory.autowireBean(bean);
return (T) beanFactory.initializeBean(bean, bean.getClass().getName());
}
public static void registerSingletonBean(String beanName, Class beanClass) {
GenericBeanDefinition definition = new GenericBeanDefinition();
definition.setBeanClass(beanClass);
definition.setScope(BeanDefinition.SCOPE_SINGLETON);
BeanDefinitionRegistry registry = (BeanDefinitionRegistry) applicationContext.getAutowireCapableBeanFactory();
registry.registerBeanDefinition(beanName, definition);
}
public static void registerSingletonBean(String beanName, Object bean) {
SingletonBeanRegistry registry = (SingletonBeanRegistry) applicationContext.getAutowireCapableBeanFactory();
registry.registerSingleton(beanName, bean);
}
public static Object invokeMethod(Class<?> requiredType, String methodName, Object[] params) {
Object service = getBean(requiredType);
Class<? extends Object>[] paramClass = null;
if (params != null) {
int paramsLength = params.length;
paramClass = new Class[paramsLength];
for (int i = 0; i < paramsLength; i++) {
paramClass[i] = params[i].getClass();
}
}
// 找到方法
Method method = ReflectionUtils.findMethod(service.getClass(), methodName, paramClass);
// 执行方法
return ReflectionUtils.invokeMethod(method, service, params);
}
/**
* beanspring bean
*
* @param serviceName
* @param methodName
* @param params
* @return
*/
public static Object invokeMethod(String serviceName, String methodName, Object[] params) {
Object service = getBean(serviceName);
Class<? extends Object>[] paramClass = null;
if (params != null) {
int paramsLength = params.length;
paramClass = new Class[paramsLength];
for (int i = 0; i < paramsLength; i++) {
paramClass[i] = params[i].getClass();
}
}
// 找到方法
Method method = ReflectionUtils.findMethod(service.getClass(), methodName, paramClass);
// 执行方法
return ReflectionUtils.invokeMethod(method, service, params);
}
}

@ -1,35 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>docus-collector-server</artifactId>
<groupId>com.docus</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>docus-archivefile</artifactId>
<name>Archetype - docus-archivefile</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.docus</groupId>
<artifactId>docus-api-common</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>

@ -1,40 +0,0 @@
package com.docus.server.record;
import com.docus.infrastructure.core.exception.IErrorCode;
public enum RecordExceptionEnum implements IErrorCode {
/**
*
*/
NOT_NULL("1001", "参数不能为空!"),
;
private String msgCode;
private String msg;
/**
* , WX
*/
private String moduleCode = "MR";
RecordExceptionEnum(String msgCode, String msg) {
this.msgCode = msgCode;
this.msg = msg;
}
@Override
public String getCode() {
return moduleCode + this.msgCode;
}
@Override
public String getMessage() {
return msg;
}
}

@ -1,5 +0,0 @@
package com.docus.server.record.controller;
public class Package {
}

@ -1,4 +0,0 @@
package com.docus.server.record.controller.param;
public class Package {
}

@ -1,4 +0,0 @@
package com.docus.server.record.controller.vo;
public class Package {
}

@ -1,9 +0,0 @@
package com.docus.server.archivefile.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface AfCollectSysDictionaryMapper extends BaseMapper<CollectsysDictionary> {
}

@ -1,31 +0,0 @@
package com.docus.server.archivefile.mapper;
import com.docus.server.archivefile.pojo.entity.AfCollectTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* mapper
*
* @author wyb
*/
@Mapper
public interface AfCollectTaskMapper {
/**
*
*
* @param afCollectTask
* @return
*/
int saveTask(@Param("task") AfCollectTask afCollectTask);
/**
*
*
* @param taskId
* @return
*/
AfCollectTask getTaskById(@Param("id") Long taskId);
}

@ -1,34 +0,0 @@
package com.docus.server.archivefile.mapper;
import com.docus.server.archivefile.pojo.entity.AfJobTime;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* job
* @author wyb
*/
@Mapper
public interface AfJobTimeMapper {
/**
*
* @param jobType
* @return
*/
AfJobTime getAfJobTimeByJobType(@Param("jobType") String jobType);
/**
* job
* @param afJobTime job
* @return
*/
int insert(@Param("afJobTime") AfJobTime afJobTime);
/**
* job
* @param afJobTime job
* @return
*/
int updateById(@Param("afJobTime") AfJobTime afJobTime);
}

@ -1,78 +0,0 @@
package com.docus.server.archivefile.mapper;
import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
*
* @author wyb
*/
@Mapper
public interface AfReportRecordMapper {
/**
*
*
* @param afReportRecord
* @return
*/
int saveRecord(@Param("reportRecord") AfReportRecord afReportRecord);
/**
*
*
* @param serialnum
* @param inpatientNo
* @param admisstimes
* @param sysFlag
* @return
*/
AfReportRecord getRecordBySerialnumAndInpatientNoAndSysFlag(@Param("serialnum") String serialnum, @Param("inpatientNo") String inpatientNo, @Param("admisstimes") Integer admisstimes, @Param("sysFlag") String sysFlag);
/**
*
*
* @param afReportRecord
* @return
*/
int updateRecordByTaskId(@Param("reportRecord") AfReportRecord afReportRecord);
/**
*
*
* @param taskId id
* @return
*/
int updateStateByTaskId(@Param("taskId") Long taskId);
AfReportRecord getReportRecordInfoByTaskId(@Param("taskId") Long taskId);
/**
* idpatientIdid
*
* @param taskIds id
* @return patientIdid
*/
List<Long> getHasPatientIdTaskIdsByTaskIds(@Param("taskIds") List<Long> taskIds);
/**
*
*
* @param page
* @param pageSize
* @return
*/
List<AfReportRecord> getStartStateReportRecord(@Param("page") int page, @Param("pageSize") int pageSize);
/**
* id
*
* @param patientId
* @param taskId id
* @return
*/
int updateReportRecordPatientId(@Param("patientId") String patientId, @Param("taskId") Long taskId);
}

@ -1,15 +0,0 @@
package com.docus.server.archivefile.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
import org.apache.ibatis.annotations.Mapper;
/**
* @author linrf
* @date 2023/6/13 17:05
*/
@Mapper
public interface AfViewCollectionLogMapper extends BaseMapper<AfViewCollectionLog> {
}

@ -1,13 +0,0 @@
package com.docus.server.record.common.pojo.dto;
public enum IdType {
/**
*
*/
JZH,
/**
*
*/
INPATIENT_NO
}

@ -1,30 +0,0 @@
package com.docus.server.record.common.pojo.dto;
import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.record.RecordExceptionEnum;
/**
*
*/
public class InpatientNo {
private String inpatientNo;
public InpatientNo(String inpatientNo) {
this.inpatientNo = inpatientNo;
this.vaid();
}
public void vaid() {
if (inpatientNo == null) {
throw new BaseException(RecordExceptionEnum.NOT_NULL, "inpatientNo不能为空");
}
}
public static InpatientNo of(String inpatientNo) {
return new InpatientNo(inpatientNo);
}
}

@ -1,75 +0,0 @@
package com.docus.server.archivefile.pojo.dto;
import lombok.Data;
import java.util.Map;
/**
*
*/
@Data
public class ReportDTO {
/**
*
*/
private String inpatientNo;
/**
* /
*/
private String jzh;
/**
*
*/
private Integer admisstimes;
/**
*
*/
private String sysFlag;
/**
*
*/
private String downUrl;
/**
*
*/
private String fileTitle;
/**
* /id
*/
private String serialnum;
/**
* id
*/
private String assortId;
/**
* ( 1:2)
*/
private String fileSource;
/**
* 1:2ftp3
*/
private String filestoragetype;
/**
* id ,
*/
private Long taskId;
/**
*
*/
private String patientId;
/**
* 1:url2:base643:url base644:5base64
*/
private Integer downtype = 1;
/**
*
*/
private Map<String, Object> params;
}

@ -1,30 +0,0 @@
package com.docus.server.archivefile.pojo.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class ReportDownDTO {
@ApiModelProperty(value = "采集器id")
private String collectorid;
@ApiModelProperty(value = "采集器ip")
private String ip;
@ApiModelProperty(value = "分类id")
private String assortid;
@ApiModelProperty(value = "患者信息")
private ReportDownPatientDTO patient;
@ApiModelProperty(value = "文件信息")
private List<ReportDownScanFileDTO> scanfiles;
@ApiModelProperty(value = "扫描用户代码")
private String scanusercode;
@ApiModelProperty(value = "扫描用户名称")
private String scanusername;
}

@ -1,34 +0,0 @@
package com.docus.server.archivefile.pojo.dto;
import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ReportDownPatientDTO {
@ApiModelProperty(value = "记帐号")
private String jzh;
@ApiModelProperty(value = "住院次数,记帐号重复则加这个参数无则Null")
private Integer admisstimes;
@ApiModelProperty(value = "病案主键如有传则使用无则使用jzh")
private String patientid;
@ApiModelProperty(value = "病案号")
private String inpatientno;
@ApiModelProperty(value = "物理存储位置,有则传")
private String storagelocation;
public ReportDownPatientDTO(AfReportRecord reportRecord) {
this.patientid = reportRecord.getPatientId();
this.jzh = reportRecord.getJzh();
this.admisstimes = reportRecord.getAdmissTimes();
this.inpatientno = reportRecord.getInpatientNo();
}
public ReportDownPatientDTO(ReportDTO reportDTO) {
this.patientid = reportDTO.getPatientId();
this.jzh = reportDTO.getJzh();
this.admisstimes = reportDTO.getAdmisstimes();
this.inpatientno = reportDTO.getInpatientNo();
}
}

@ -1,51 +0,0 @@
package com.docus.server.archivefile.pojo.dto;
import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ReportDownScanFileDTO {
@ApiModelProperty(value = "任务id(如无效任务id则不更新任务表数据)")
private Long taskid;
@ApiModelProperty(value = "文件标题")
private String filetitle;
@ApiModelProperty(value = "采集类型(文件来源 1:采集器2扫描生产软件)")
private int filesource;
@ApiModelProperty(value = "下载类型(1:服务器本地2ftp服务器3共享文件夹)")
private int filestoragetype;
@ApiModelProperty(value = "文件类型(1:url,2:base64,3:url base64,4:共享文件5本地文件base64)")
private int filetype = 1;
@ApiModelProperty(value = "下载地址")
private String downurl;
// @ApiModelProperty(value = "档案信息")
// private String recordid;
@ApiModelProperty(value = "采集流水号")
private String serialnum;
@ApiModelProperty(value = "排序日期")
private String sortdate;
@ApiModelProperty(value = "是否作废 0否 不作废1是 作废")
private int cancel = 0;
public ReportDownScanFileDTO(AfReportRecord reportRecord) {
this.taskid = reportRecord.getTaskId();
this.filetitle = reportRecord.getFileName();
this.filesource = 1;
this.filestoragetype = 1;
this.filetype = reportRecord.getDownType();
this.downurl = reportRecord.getDownUrl();
this.serialnum = reportRecord.getSerialnum();
}
public ReportDownScanFileDTO(ReportDTO reportDto) {
this.taskid = reportDto.getTaskId();
this.filetitle = reportDto.getFileTitle();
this.filesource = 1;
this.filestoragetype = 1;
this.filetype = reportDto.getDowntype();
this.downurl = reportDto.getDownUrl();
this.serialnum = reportDto.getSerialnum();
}
}

@ -1,72 +0,0 @@
package com.docus.server.archivefile.pojo.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
/**
* @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 {
// ---------------------- TBasicDTO info ----------------------
@ApiModelProperty(value = "记账号")
private String jzh;
@ApiModelProperty(value = "病案号")
private String inpatientNo;
@ApiModelProperty(value = "住院次数")
private String admissTimes;
@ApiModelProperty(value = "患者姓名")
private String name;
@ApiModelProperty(value = "住院日期")
private String admissDate;
@ApiModelProperty(value = "出院日期")
private String disDate;
@ApiModelProperty(value = "住院科室名称")
private String admissDeptName;
@ApiModelProperty(value = "出院科室名称")
private String disDeptName;
@ApiModelProperty(value = "主管医生")
private String attending;
@ApiModelProperty(value = "主管医生名称")
private String attendingName;
@ApiModelProperty(value = "责任护士")
private String dutyNurse;
@ApiModelProperty(value = "住院科室")
private String admissDept;
@ApiModelProperty(value = "年龄_岁")
private String age;
@ApiModelProperty(value = "性别")
private String sex;
@ApiModelProperty(value = "身份证")
private String idCard;
@ApiModelProperty(value = "出院科室")
private String disDept;
@ApiModelProperty(value = "性别名称")
private String sexName;
@ApiModelProperty(value = "床位号")
private String bedNum;
@ApiModelProperty(value = "是否死亡")
private String isDead;
@ApiModelProperty(value = "实际住院天数")
private String admissDays;
// ---------------------- xml info ----------------------
private String serialId;
private String receive;
private String send;
// ---------------------- sdry info ----------------------
private String wardCode;
private String wardName;
private String sdryIndex;
/**
*
*/
private Map<String, Object> params;
}

@ -1,79 +0,0 @@
package com.docus.server.archivefile.pojo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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
* @since 2021-05-07
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "AfCollectTask对象", description = "病案采集任务")
public class AfCollectTask implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id 主键")
@TableId(value = "id", type = IdType.INPUT)
private Long id;
@ApiModelProperty(value = "病案主键")
private String patientId;
@ApiModelProperty(value = "来源 1护理文书2 电子病历3 Pacs检查4心电图5手麻系统6 Lis检验7病案首页8长临医嘱")
private String sysflag;
@ApiModelProperty(value = "开始时间")
private Date startTime;
@ApiModelProperty(value = "结束时间")
private Date endTime;
@ApiModelProperty(value = "任务耗时(毫秒)")
private Long consumingTime;
@ApiModelProperty(value = "-1 等待采集0未开始1:正在采集2采集错误3采集完成")
private String state;
@ApiModelProperty(value = "同步时间")
private Date syncTime;
@ApiModelProperty(value = "最新重新采集时间")
private Date recollectTime;
@ApiModelProperty(value = "最新重新采集人")
private String recollectName;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "报告唯一单号")
private String C1;
@ApiModelProperty(value = "c2")
private String C2;
@ApiModelProperty(value = "记账号")
private String C3;
@ApiModelProperty(value = "c4")
private String C4;
@ApiModelProperty(value = "c6")
private String C6;
@ApiModelProperty(value = "c9")
private String C9;
}

@ -1,42 +0,0 @@
package com.docus.server.archivefile.pojo.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author
* @since 2021-05-08
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="AfJobTime对象", description="")
public class AfJobTime implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键id")
private Long id;
@ApiModelProperty(value = "最新刷新时间 格式 yyyy-MM-dd HH:mm:ss")
private String updateTime;
@ApiModelProperty(value = "调度类型。")
private String jobType;
public AfJobTime() {
}
public AfJobTime(Long id, String updateTime, String jobType) {
this.id = id;
this.updateTime = updateTime;
this.jobType = jobType;
}
}

@ -1,102 +0,0 @@
package com.docus.server.archivefile.pojo.entity;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
*/
@Data
public class AfReportRecord implements Serializable {
private static final long serialVersionUID = 1L;
/**
* af_collect_task id
*/
private Long taskId;
/**
*
*/
private String inpatientNo;
/**
*
*/
private String jzh;
/**
*
*/
private Integer admissTimes;
/**
* 使 |
*/
private String downUrl;
/**
* 1:url2:base643:url base644:5base64
*/
private Integer downType;
/**
* 0 1
*/
private Integer state;
/**
* id
*/
private String serialnum;
/**
*
*/
private String sysflag;
/**
* id
*/
private String zdAssortId;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private String fileName;
/**
*
*/
private String patientId;
public AfReportRecord() {
}
public AfReportRecord(ReportDTO reportDTO) {
this.jzh = reportDTO.getJzh();
this.admissTimes = reportDTO.getAdmisstimes();
this.inpatientNo = reportDTO.getInpatientNo();
this.downUrl = reportDTO.getDownUrl();
this.sysflag = reportDTO.getSysFlag();
this.zdAssortId = reportDTO.getAssortId();
this.serialnum = reportDTO.getSerialnum();
this.fileName = reportDTO.getFileTitle();
this.downType = reportDTO.getDowntype();
}
}

@ -1,51 +0,0 @@
package com.docus.server.archivefile.pojo.entity;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author zengdl
* @website https://el-admin.vip
* @description /
* @date 2022-03-28
**/
@Data
@TableName("af_view_collection_log")
public class AfViewCollectionLog implements Serializable {
@TableId("id")
@ApiModelProperty(value = "id")
private Long id;
@TableField("jzh")
@ApiModelProperty(value = "记帐号")
private String jzh;
@TableField("sys_code")
@ApiModelProperty(value = "采集器分类")
private String sysCode;
@TableField("file_id")
@ApiModelProperty(value = "文件id")
private String fileId;
@TableField("file_modify_time")
@ApiModelProperty(value = "文件最后修改时间")
private String fileModifyTime;
@TableField("create_time")
@ApiModelProperty(value = "创建时间")
private Date createTime;
public void copy(AfViewCollectionLog source) {
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
}
}

@ -1,33 +0,0 @@
package com.docus.server.archivefile.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author zengdl
* @website https://el-admin.vip
* @description /
* @date 2022-09-02
**/
@Data
@TableName("af_collectsys_dictionary")
public class CollectsysDictionary implements Serializable {
@TableId("id")
@ApiModelProperty(value = "id 雪花算法")
private Long id;
@TableField("sys_code")
@ApiModelProperty(value = "采集来源系统编号")
private String sysCode;
@TableField("sys_name")
@ApiModelProperty(value = "采集来源系统名称")
private String sysName;
}

@ -1,7 +0,0 @@
package com.docus.server.archivefile.service;
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
import com.docus.server.common.service.IBaseService;
public interface IAfCollectSysDictionary extends IBaseService<CollectsysDictionary> {
}

@ -1,11 +0,0 @@
package com.docus.server.archivefile.service;
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
import com.docus.server.common.service.IBaseService;
/**
* @author linrf
* @date 2023/6/13 17:05
*/
public interface IAfViewCollectionLogService extends IBaseService<AfViewCollectionLog> {
}

@ -1,12 +0,0 @@
package com.docus.server.archivefile.service.impl;
import com.docus.server.archivefile.mapper.AfCollectSysDictionaryMapper;
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
import com.docus.server.archivefile.service.IAfCollectSysDictionary;
import com.docus.server.common.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Service
public class AfCollectSysDictionaryImpl
extends BaseServiceImpl<AfCollectSysDictionaryMapper, CollectsysDictionary> implements IAfCollectSysDictionary {
}

@ -1,18 +0,0 @@
package com.docus.server.archivefile.service.impl;
import com.docus.server.archivefile.mapper.AfViewCollectionLogMapper;
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
import com.docus.server.archivefile.service.IAfViewCollectionLogService;
import com.docus.server.common.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author linrf
* @date 2023/6/13 17:06
*/
@Service
public class AfViewCollectionLogServiceImpl
extends BaseServiceImpl<AfViewCollectionLogMapper, AfViewCollectionLog> implements IAfViewCollectionLogService {
}

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.archivefile.mapper.AfCollectTaskMapper">
<insert id="saveTask">
INSERT INTO `docus_archivefile`.`af_collect_task`(`id`, `patient_id`, `sysflag`,
`state`, `C1`,`C2`, `C3`)
VALUES (#{task.id}, #{task.patientId}, #{task.sysflag}, '0', #{task.C1}, #{task.C2}, #{task.C3});
</insert>
<select id="getTaskById" resultType="com.docus.server.archivefile.pojo.entity.AfCollectTask">
select *
from `docus_archivefile`.`af_collect_task`
where `id` = #{id}
</select>
</mapper>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save