调整项目结构
parent
d19776f9f7
commit
84a7e4060b
@ -0,0 +1,35 @@
|
||||
<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>common-docus</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>
|
@ -0,0 +1,5 @@
|
||||
package com.docus.server.record.controller;
|
||||
|
||||
public class Package {
|
||||
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.record.controller.param;
|
||||
|
||||
public class Package {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.record.controller.vo;
|
||||
|
||||
public class Package {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
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> {
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
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);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
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> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.docus.server.record.common.pojo.dto;
|
||||
|
||||
public enum IdType {
|
||||
/**
|
||||
* 记账号
|
||||
*/
|
||||
JZH,
|
||||
|
||||
/**
|
||||
* 病案号
|
||||
*/
|
||||
INPATIENT_NO
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
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;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
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));
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
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;
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.docus.server.archivefile.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
|
||||
|
||||
public interface IAfCollectSysDictionary extends IBaseService<CollectsysDictionary> {
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.docus.server.archivefile.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
|
||||
|
||||
/**
|
||||
* @author linrf
|
||||
* @date 2023/6/13 17:05
|
||||
*/
|
||||
public interface IAfViewCollectionLogService extends IBaseService<AfViewCollectionLog> {
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.docus.server.archivefile.service.impl;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.server.archivefile.mapper.AfCollectSysDictionaryMapper;
|
||||
import com.docus.server.archivefile.pojo.entity.CollectsysDictionary;
|
||||
import com.docus.server.archivefile.service.IAfCollectSysDictionary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AfCollectSysDictionaryImpl extends BaseServiceImpl<AfCollectSysDictionaryMapper, CollectsysDictionary> implements IAfCollectSysDictionary {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.docus.server.archivefile.service.impl;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.server.archivefile.mapper.AfViewCollectionLogMapper;
|
||||
import com.docus.server.archivefile.pojo.entity.AfViewCollectionLog;
|
||||
import com.docus.server.archivefile.service.IAfViewCollectionLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author linrf
|
||||
* @date 2023/6/13 17:06
|
||||
*/
|
||||
@Service
|
||||
public class AfViewCollectionLogServiceImpl extends BaseServiceImpl<AfViewCollectionLogMapper, AfViewCollectionLog> implements IAfViewCollectionLogService {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<?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>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.archivefile.mapper.AfJobTimeMapper">
|
||||
<insert id="insert">
|
||||
INSERT INTO `docus_archivefile`.`af_job_time`(`id`, `update_time`, `job_type`)
|
||||
VALUES (#{afJobTime.id}, #{afJobTime.updateTime}, #{afJobTime.jobType});
|
||||
</insert>
|
||||
<update id="updateById">
|
||||
|
||||
UPDATE `docus_archivefile`.`af_job_time`
|
||||
SET `update_time` = #{afJobTime.updateTime},
|
||||
WHERE `id` = #{afJobTime.id};
|
||||
</update>
|
||||
|
||||
<select id="getAfJobTimeByJobType" resultType="com.docus.server.archivefile.pojo.entity.AfJobTime">
|
||||
select id, DATE_FORMAT(update_time,'%Y-%m-%d %H:%i:%s') as updateTime,job_type as jobType
|
||||
from `docus_archivefile`.`af_job_time`
|
||||
where job_type= #{jobType}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,68 @@
|
||||
<?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.AfReportRecordMapper">
|
||||
|
||||
<insert id="saveRecord">
|
||||
INSERT INTO `docus_archivefile`.`af_report_record`(`task_id`, `inpatient_no`, `jzh`, `admiss_times`, `down_url`,
|
||||
`down_type`, `state`, `serialnum`, `sysflag`, `zd_assort_id`,
|
||||
`create_time`, `update_time`, `file_name`, `patient_id`)
|
||||
VALUES (#{reportRecord.taskId}, #{reportRecord.inpatientNo}, #{reportRecord.jzh}, #{reportRecord.admissTimes},
|
||||
#{reportRecord.downUrl}, #{reportRecord.downType}, 0, #{reportRecord.serialnum},
|
||||
#{reportRecord.sysflag}, #{reportRecord.zdAssortId}, now(), now(), #{reportRecord.fileName},
|
||||
#{reportRecord.patientId});
|
||||
</insert>
|
||||
<update id="updateRecordByTaskId">
|
||||
update `docus_archivefile`.`af_report_record`
|
||||
set `down_url`=#{reportRecord.downUrl},
|
||||
`down_type`=#{reportRecord.downType},
|
||||
`state`=0,
|
||||
`file_name`=#{reportRecord.fileName},
|
||||
`patient_id`=#{reportRecord.patientId},
|
||||
`update_time`=now()
|
||||
where `task_id` = #{reportRecord.taskId}
|
||||
</update>
|
||||
<update id="updateStateByTaskId">
|
||||
update `docus_archivefile`.`af_report_record`
|
||||
set `state`= 1,
|
||||
`update_time`=now()
|
||||
where `task_id` = #{taskId}
|
||||
</update>
|
||||
<update id="updateReportRecordPatientId">
|
||||
update `docus_archivefile`.`af_report_record`
|
||||
set `patient_id`= #{patientId}
|
||||
where `task_id` = #{taskId}
|
||||
</update>
|
||||
<select id="getRecordBySerialnumAndInpatientNoAndSysFlag"
|
||||
resultType="com.docus.server.archivefile.pojo.entity.AfReportRecord">
|
||||
select *
|
||||
from `docus_archivefile`.`af_report_record`
|
||||
where `inpatient_no` = #{inpatientNo}
|
||||
and `serialnum` = #{serialnum}
|
||||
and `sysflag` = #{sysFlag}
|
||||
and admiss_times = #{admisstimes}
|
||||
</select>
|
||||
<select id="getReportRecordInfoByTaskId" resultType="com.docus.server.archivefile.pojo.entity.AfReportRecord">
|
||||
select *
|
||||
from `docus_archivefile`.`af_report_record`
|
||||
where `task_id` = #{taskId}
|
||||
</select>
|
||||
<select id="getHasPatientIdTaskIdsByTaskIds" resultType="java.lang.Long">
|
||||
SELECT `task_id`
|
||||
FROM `docus_archivefile`.`af_report_record`
|
||||
WHERE `patient_id` IS NOT NULL
|
||||
AND `patient_id` != ''
|
||||
AND `task_id` IN
|
||||
<foreach collection="taskIds" separator="," open="(" close=")" item="taskId">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getStartStateReportRecord" resultType="com.docus.server.archivefile.pojo.entity.AfReportRecord">
|
||||
SELECT `task_id`, `inpatient_no`, `admiss_times`, `patient_id`
|
||||
FROM `docus_archivefile`.`af_report_record`
|
||||
WHERE `state` = 0
|
||||
LIMIT ${(page-1)*pageSize}
|
||||
, ${pageSize}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,37 @@
|
||||
<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>common-docus</artifactId>
|
||||
<groupId>com.docus</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>docus-medical-record</artifactId>
|
||||
<name>Archetype - docus-medical-record</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>
|
@ -0,0 +1,13 @@
|
||||
package com.docus.server.record.common.pojo.dto;
|
||||
|
||||
public enum IdType {
|
||||
/**
|
||||
* 记账号
|
||||
*/
|
||||
JZH,
|
||||
|
||||
/**
|
||||
* 病案号
|
||||
*/
|
||||
INPATIENT_NO
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.docus.server.record.common.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;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.docus.server.record.common.pojo.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @BelongsProject: docus-webservice-sdry
|
||||
* @BelongsPackage: com.docus.server.collection.entity
|
||||
* @Author: chierhao
|
||||
* @CreateTime: 2023-03-07 15:29
|
||||
* @Description: TODO
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "tBasicExtend对象", description = "病案基本信息扩展")
|
||||
public class TBasicExtend implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "病案主键")
|
||||
private String patientId;
|
||||
|
||||
@ApiModelProperty(value = "病区编号")
|
||||
private String wardCode;
|
||||
|
||||
@ApiModelProperty(value = "病区名称")
|
||||
private String wardName;
|
||||
|
||||
@ApiModelProperty(value = "第三方索引")
|
||||
private String sdryIndex;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.docus.server.record.controller;
|
||||
|
||||
public class Package {
|
||||
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.record.controller.param;
|
||||
|
||||
public class Package {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.record.controller.vo;
|
||||
|
||||
public class Package {
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.docus.server.record.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import com.docus.server.record.common.pojo.entity.TBasic;
|
||||
import com.docus.server.record.common.pojo.entity.TBasicExtend;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 病案基本信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-14
|
||||
*/
|
||||
@Mapper
|
||||
@DS(DSKeyConstants.RECORD_DS_KEY)
|
||||
public interface TBasicMapper extends BaseMapper<TBasic> {
|
||||
/**
|
||||
* 根据住院号和住院次数查询业务系统中病案主键
|
||||
*
|
||||
* @param inpatientNo 住院号
|
||||
* @param admissTimes 住院次数
|
||||
* @return 病案主键
|
||||
*/
|
||||
String getPatientIdByInpatientNoAndAdminssTimes(@Param("inpatientNo") String inpatientNo,
|
||||
@Param("adminssTimes") Integer admissTimes);
|
||||
|
||||
Integer selectOne(@Param("jzh") String jzh);
|
||||
|
||||
String getPatientId(@Param("jzh") String jzh);
|
||||
|
||||
Integer insertTBasic(@Param("tBasic") TBasic tBasic);
|
||||
|
||||
Integer insertExtend(@Param("tBasicExtend") TBasicExtend tBasicExtend);
|
||||
|
||||
Integer updateTBasic(@Param("tBasic") TBasic tBasic);
|
||||
|
||||
Integer updateExtend(@Param("tBasicExtend") TBasicExtend tBasicExtend);
|
||||
|
||||
List<TBasic> selectBasicListByAdmissDate(@Param("admissStartDate") String admissStartDate,
|
||||
@Param("admissEndDate") String admissEndDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("size") int size);
|
||||
|
||||
/**
|
||||
* 查询归档关联顺德人医报告的交叉索引
|
||||
*
|
||||
* @param patientId 归档系统病案主键
|
||||
* @return 归档关联顺德人医报告的交叉索引
|
||||
*/
|
||||
String getSdRyIndexByPatientId(@Param("patientId") String patientId);
|
||||
|
||||
List<TBasic> selectBasicListByCreateOrUpdateTime(@Param("startDate") String queryBasicStartDate,
|
||||
@Param("endDate") String queryBasicEndDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("size") int size);
|
||||
|
||||
List<TBasic> selectBasicListByPatientIds(@Param("patientIds") List<String> patientIds);
|
||||
|
||||
List<Map<String, Object>> getBasicForZYHs(@Param("zyhs") List<String> zyhs);
|
||||
|
||||
/**
|
||||
* 查询基础出院数据增量数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getBasicOutData(@Param("param") Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 查询基础创建数据增量数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getBasicData(@Param("param") Map<String, Object> param);
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.docus.server.record.service;
|
||||
|
||||
import com.docus.server.record.common.pojo.entity.MedicalRecord;
|
||||
|
||||
public interface IMedicalRecordService {
|
||||
void receive(MedicalRecord medicalRecord);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.docus.server.record.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.record.common.pojo.dto.TBasicDTO;
|
||||
import com.docus.server.record.common.pojo.entity.TBasic;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ITBasicService extends IBaseService<TBasic> {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param dto
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertTBasic(TBasicDTO dto);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param dto
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateTBasic(TBasicDTO dto);
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*
|
||||
* @param basicDTOList
|
||||
*/
|
||||
void batchSaveBasics(List<TBasicDTO> basicDTOList);
|
||||
|
||||
/**
|
||||
* 根据记账号查询数据
|
||||
*
|
||||
* @param jzh
|
||||
* @return
|
||||
*/
|
||||
Integer findByJzh(String jzh);
|
||||
|
||||
/**
|
||||
* 根据住院查询住院信息
|
||||
*
|
||||
* @param zyhs
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getBasicForZYHs(List<String> zyhs);
|
||||
|
||||
/**
|
||||
* 查询基础出院数据增量数据
|
||||
*/
|
||||
List<Map<String, Object>> getBasicOutData(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 查询基础创建数据增量数据
|
||||
*/
|
||||
List<Map<String, Object>> getBasicData(Map<String, Object> param);
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.docus.server.record.service.impl;
|
||||
|
||||
import com.docus.server.record.common.pojo.dto.IdType;
|
||||
import com.docus.server.record.common.pojo.entity.MedicalRecord;
|
||||
import com.docus.server.record.service.IMedicalRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MedicalRecordServiceImpl implements IMedicalRecordService {
|
||||
|
||||
@Override
|
||||
public void receive(MedicalRecord medicalRecord) {
|
||||
//判断幂等,不要重复提交。 //判断业务是否正确,
|
||||
if (isExist(medicalRecord)) {
|
||||
return;
|
||||
}
|
||||
//保存数据内容到数据库。
|
||||
this.saveMedicalRecord(medicalRecord);
|
||||
|
||||
//发起下载任务
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void createDownloadTask(MedicalRecord medicalRecord) {
|
||||
//创建下载任务,改造文件服务,
|
||||
//确保下载任务成功。
|
||||
|
||||
//完成任务,保存对应信息到病案系统。
|
||||
}
|
||||
|
||||
|
||||
public void saveFileInfo() {
|
||||
|
||||
}
|
||||
|
||||
public void saveMedicalRecord(MedicalRecord medicalRecord) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Boolean isExist(MedicalRecord medicalRecord) {
|
||||
if (medicalRecord.getIdType() == IdType.JZH) {
|
||||
//根据记账号查询
|
||||
return true;
|
||||
|
||||
} else {
|
||||
//根据住院号+住院次数
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,242 @@
|
||||
package com.docus.server.record.service.impl;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.docus.core.util.DateUtil;
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.record.common.pojo.dto.TBasicDTO;
|
||||
import com.docus.server.record.common.pojo.entity.TBasic;
|
||||
import com.docus.server.record.common.pojo.entity.TBasicExtend;
|
||||
import com.docus.server.record.mapper.TBasicMapper;
|
||||
import com.docus.server.record.service.ITBasicService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class TBasicServiceImpl extends BaseServiceImpl<TBasicMapper, TBasic> implements ITBasicService {
|
||||
|
||||
@Resource
|
||||
private TBasicMapper tBasicMapper;
|
||||
|
||||
@Resource
|
||||
private IdService idService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertTBasic(TBasicDTO tBasicDTO) {
|
||||
//判断jzh是否重复
|
||||
// Integer num = tBasicMapper.selectOne(tBasicDTO.getJzh());
|
||||
// if (num > 0) {
|
||||
// updateTBasic(tBasicDTO);
|
||||
// return;
|
||||
// }
|
||||
Long patientId = idService.getDateSeq();
|
||||
|
||||
//数据类型转化,格式处理
|
||||
Date admissDate = null;
|
||||
if (Func.isNotEmpty(tBasicDTO.getAdmissDate())) {
|
||||
admissDate = Func.parseDate(tBasicDTO.getAdmissDate(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
}
|
||||
Date disDate = null;
|
||||
if (Func.isNotEmpty(tBasicDTO.getDisDate())) {
|
||||
disDate = Func.parseDate(tBasicDTO.getDisDate(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
}
|
||||
String admissTimesStr = tBasicDTO.getAdmissTimes();
|
||||
Integer admissTimes = null;
|
||||
if (NumberUtil.isInteger(admissTimesStr)) {
|
||||
admissTimes = Integer.parseInt(admissTimesStr);
|
||||
}
|
||||
String ageStr = tBasicDTO.getAge();
|
||||
if (Func.isNotEmpty(ageStr)) {
|
||||
ageStr = ageStr.substring(0, ageStr.length() - 1);
|
||||
}
|
||||
Integer age = null;
|
||||
if (NumberUtil.isInteger(ageStr)) {
|
||||
age = Integer.parseInt(ageStr);
|
||||
}
|
||||
String sexName = tBasicDTO.getSexName();
|
||||
if (sexName.length() > 1) {
|
||||
sexName = sexName.substring(0, 1);
|
||||
}
|
||||
String admissDaysStr = tBasicDTO.getAdmissDays();
|
||||
Integer admissDays = null;
|
||||
if (NumberUtil.isInteger(admissDaysStr)) {
|
||||
admissDays = Integer.parseInt(admissDaysStr);
|
||||
}
|
||||
String isDeadStr = tBasicDTO.getIsDead();
|
||||
Integer isDead = 0;
|
||||
if ("死亡".equals(isDeadStr)) {
|
||||
isDead = 1;
|
||||
}
|
||||
|
||||
//组装数据
|
||||
TBasic tBasic = new TBasic();
|
||||
tBasic.setPatientId(patientId.toString());
|
||||
tBasic.setJzh(tBasicDTO.getJzh());
|
||||
tBasic.setInpatientNo(tBasicDTO.getInpatientNo());
|
||||
tBasic.setAdmissTimes(admissTimes);
|
||||
tBasic.setName(tBasicDTO.getName());
|
||||
tBasic.setAdmissDate(admissDate);
|
||||
tBasic.setDisDate(disDate);
|
||||
tBasic.setAdmissDeptName(tBasicDTO.getAdmissDeptName());
|
||||
tBasic.setDisDeptName(tBasicDTO.getDisDeptName());
|
||||
tBasic.setAttendingName(tBasicDTO.getAttendingName());
|
||||
tBasic.setAttending(tBasicDTO.getAttending());
|
||||
tBasic.setDutyNurse(tBasicDTO.getDutyNurse());
|
||||
tBasic.setAdmissDept(tBasicDTO.getAdmissDept());
|
||||
tBasic.setCreateTime(DateUtil.now());
|
||||
tBasic.setAge(age);
|
||||
tBasic.setSex(tBasicDTO.getSex());
|
||||
tBasic.setIdCard(tBasicDTO.getIdCard());
|
||||
tBasic.setDisDept(tBasicDTO.getDisDept());
|
||||
tBasic.setSexName(sexName);
|
||||
tBasic.setBedNum(tBasicDTO.getBedNum());
|
||||
tBasic.setAdmissDays(admissDays);
|
||||
tBasic.setIsDead(isDead);
|
||||
|
||||
TBasicExtend tBasicExtend = new TBasicExtend();
|
||||
tBasicExtend.setPatientId(patientId.toString());
|
||||
tBasicExtend.setWardCode(tBasicDTO.getWardCode());
|
||||
tBasicExtend.setWardName(tBasicDTO.getWardName());
|
||||
tBasicExtend.setSdryIndex(tBasicDTO.getSdryIndex());
|
||||
|
||||
//持久化
|
||||
tBasicMapper.insertTBasic(tBasic);
|
||||
tBasicMapper.insertExtend(tBasicExtend);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateTBasic(TBasicDTO tBasicDTO) {
|
||||
//判断jzh是否存在
|
||||
String patientId = tBasicMapper.getPatientId(tBasicDTO.getJzh());
|
||||
if (Func.isEmpty(patientId)) {
|
||||
insertTBasic(tBasicDTO);
|
||||
return;
|
||||
}
|
||||
|
||||
//数据类型转化,格式处理
|
||||
Date admissDate = null;
|
||||
if (Func.isNotEmpty(tBasicDTO.getAdmissDate())) {
|
||||
admissDate = Func.parseDate(tBasicDTO.getAdmissDate(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
}
|
||||
Date disDate = null;
|
||||
if (Func.isNotEmpty(tBasicDTO.getDisDate())) {
|
||||
disDate = Func.parseDate(tBasicDTO.getDisDate(), DateUtil.PATTERN_DATETIME_MINI);
|
||||
}
|
||||
String admissTimesStr = tBasicDTO.getAdmissTimes();
|
||||
Integer admissTimes = null;
|
||||
if (NumberUtil.isInteger(admissTimesStr)) {
|
||||
admissTimes = Integer.parseInt(admissTimesStr);
|
||||
}
|
||||
String ageStr = tBasicDTO.getAge();
|
||||
if (Func.isNotEmpty(ageStr)) {
|
||||
ageStr = ageStr.substring(0, ageStr.length() - 1);
|
||||
}
|
||||
Integer age = null;
|
||||
if (NumberUtil.isInteger(ageStr)) {
|
||||
age = Integer.parseInt(ageStr);
|
||||
}
|
||||
String sexName = tBasicDTO.getSexName();
|
||||
if (sexName.length() > 1) {
|
||||
sexName = sexName.substring(0, 1);
|
||||
}
|
||||
String admissDaysStr = tBasicDTO.getAdmissDays();
|
||||
Integer admissDays = null;
|
||||
if (NumberUtil.isInteger(admissDaysStr)) {
|
||||
admissDays = Integer.parseInt(admissDaysStr);
|
||||
}
|
||||
String isDeadStr = tBasicDTO.getIsDead();
|
||||
Integer isDead = 0;
|
||||
if ("死亡".equals(isDeadStr)) {
|
||||
isDead = 1;
|
||||
}
|
||||
|
||||
//组装数据
|
||||
TBasic tBasic = new TBasic();
|
||||
|
||||
tBasic.setJzh(tBasicDTO.getJzh());
|
||||
tBasic.setPatientId(patientId);
|
||||
tBasic.setInpatientNo(tBasicDTO.getInpatientNo());
|
||||
tBasic.setAdmissTimes(admissTimes);
|
||||
tBasic.setName(tBasicDTO.getName());
|
||||
tBasic.setAdmissDate(admissDate);
|
||||
tBasic.setDisDate(disDate);
|
||||
tBasic.setAdmissDeptName(tBasicDTO.getAdmissDeptName());
|
||||
tBasic.setDisDeptName(tBasicDTO.getDisDeptName());
|
||||
tBasic.setAttendingName(tBasicDTO.getAttendingName());
|
||||
tBasic.setAge(age);
|
||||
tBasic.setSex(tBasicDTO.getSex());
|
||||
tBasic.setIdCard(tBasicDTO.getIdCard());
|
||||
tBasic.setDisDept(tBasicDTO.getDisDept());
|
||||
tBasic.setSexName(sexName);
|
||||
tBasic.setBedNum(tBasicDTO.getBedNum());
|
||||
tBasic.setAdmissDays(admissDays);
|
||||
tBasic.setIsDead(isDead);
|
||||
tBasic.setAttending(tBasicDTO.getAttending());
|
||||
tBasic.setDutyNurse(tBasicDTO.getDutyNurse());
|
||||
tBasic.setAdmissDept(tBasicDTO.getAdmissDept());
|
||||
tBasic.setCreateTime(DateUtil.now());
|
||||
|
||||
TBasicExtend tBasicExtend = new TBasicExtend();
|
||||
tBasicExtend.setPatientId(patientId);
|
||||
tBasicExtend.setWardCode(tBasicDTO.getWardCode());
|
||||
tBasicExtend.setWardName(tBasicDTO.getWardName());
|
||||
tBasicExtend.setSdryIndex(tBasicDTO.getSdryIndex());
|
||||
|
||||
//持久化
|
||||
tBasicMapper.updateTBasic(tBasic);
|
||||
tBasicMapper.updateExtend(tBasicExtend);
|
||||
}
|
||||
|
||||
private void convert() {
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void batchSaveBasics(List<TBasicDTO> basicDTOList) {
|
||||
basicDTOList.forEach(this::updateTBasic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer findByJzh(String jzh) {
|
||||
//判断jzh是否重复
|
||||
return tBasicMapper.selectOne(jzh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据住院查询住院信息
|
||||
*
|
||||
* @param zyhs
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getBasicForZYHs(List<String> zyhs) {
|
||||
return tBasicMapper.getBasicForZYHs(zyhs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询基础出院数据增量数据
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getBasicOutData(Map<String, Object> param) {
|
||||
return tBasicMapper.getBasicOutData(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询基础创建数据增量数据
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getBasicData(Map<String, Object> param) {
|
||||
return tBasicMapper.getBasicData(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,242 @@
|
||||
<?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.record.mapper.TBasicMapper">
|
||||
|
||||
<select id="getPatientIdByInpatientNoAndAdminssTimes" resultType="java.lang.String">
|
||||
select `patient_id`
|
||||
from `docus_medicalrecord`.`t_basic`
|
||||
where `inpatient_no` = #{inpatientNo}
|
||||
and `admiss_times` = #{adminssTimes}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertTBasic">
|
||||
INSERT INTO `docus_medicalrecord`.`t_basic`
|
||||
(`admiss_days`,`is_dead`,`sex_name`,`bed_num`,`age`,`sex`,`id_card`,`dis_dept`,`patient_id`, `admiss_times`, `inpatient_no`,`name`, `admiss_date`, `admiss_dept_name`, `dis_date`, `dis_dept_name`,`attending_name`,`jzh`,`create_time`)
|
||||
VALUES
|
||||
(#{tBasic.admissDays},#{tBasic.isDead},#{tBasic.sexName},#{tBasic.bedNum},#{tBasic.age},#{tBasic.sex},#{tBasic.idCard},
|
||||
#{tBasic.disDept},#{tBasic.patientId},#{tBasic.admissTimes},#{tBasic.inpatientNo},
|
||||
#{tBasic.name},#{tBasic.admissDate},#{tBasic.admissDeptName},#{tBasic.disDate},#{tBasic.disDeptName},
|
||||
#{tBasic.attendingName},#{tBasic.jzh},now())
|
||||
</insert>
|
||||
<insert id="insertExtend">
|
||||
INSERT INTO `docus_medicalrecord`.`t_basic_extend`
|
||||
(`patient_id`,`ward_code`,`ward_name`,`sdry_index`)
|
||||
VALUES
|
||||
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex})
|
||||
</insert>
|
||||
|
||||
<update id="updateTBasic">
|
||||
UPDATE `docus_medicalrecord`.`t_basic`
|
||||
<set>
|
||||
<if test="tBasic.admissDays !=null ">
|
||||
`admiss_days`=#{tBasic.admissDays},
|
||||
</if>
|
||||
<if test="tBasic.isDead !=null ">
|
||||
`is_dead`=#{tBasic.isDead},
|
||||
</if>
|
||||
<if test="tBasic.sexName !=null ">
|
||||
`sex_name`=#{tBasic.sexName},
|
||||
</if>
|
||||
<if test="tBasic.bedNum !=null ">
|
||||
`bed_num`=#{tBasic.bedNum},
|
||||
</if>
|
||||
<if test="tBasic.age !=null ">
|
||||
`age`=#{tBasic.age},
|
||||
</if>
|
||||
<if test="tBasic.sex !=null ">
|
||||
`sex`=#{tBasic.sex},
|
||||
</if>
|
||||
<if test="tBasic.idCard !=null ">
|
||||
`id_card`=#{tBasic.idCard},
|
||||
</if>
|
||||
<if test="tBasic.disDept !=null ">
|
||||
`dis_dept`=#{tBasic.disDept},
|
||||
</if>
|
||||
<if test="tBasic.admissTimes !=null ">
|
||||
`admiss_times`=#{tBasic.admissTimes},
|
||||
</if>
|
||||
<if test="tBasic.inpatientNo !=null ">
|
||||
`inpatient_no`=#{tBasic.inpatientNo},
|
||||
</if>
|
||||
<if test="tBasic.name !=null ">
|
||||
`name`=#{tBasic.name},
|
||||
</if>
|
||||
<if test="tBasic.admissDate !=null ">
|
||||
`admiss_date`=#{tBasic.admissDate},
|
||||
</if>
|
||||
<if test="tBasic.admissDeptName !=null ">
|
||||
`admiss_dept_name`=#{tBasic.admissDeptName},
|
||||
</if>
|
||||
<if test="tBasic.disDate !=null ">
|
||||
`dis_date`=#{tBasic.disDate},
|
||||
</if>
|
||||
<if test="tBasic.disDeptName !=null ">
|
||||
`dis_dept_name`=#{tBasic.disDeptName},
|
||||
</if>
|
||||
<if test="tBasic.attendingName !=null ">
|
||||
`attending_name`=#{tBasic.attendingName},
|
||||
</if>
|
||||
`update_time`=now()
|
||||
</set>
|
||||
WHERE `patient_id`=#{tBasic.patientId,jdbcType=VARCHAR};
|
||||
</update>
|
||||
|
||||
<update id="updateExtend">
|
||||
INSERT INTO `docus_medicalrecord`.`t_basic_extend`
|
||||
(`patient_id`,`ward_code`,`ward_name`,`sdry_index`)
|
||||
VALUES
|
||||
(#{tBasicExtend.patientId},#{tBasicExtend.wardCode},#{tBasicExtend.wardName},#{tBasicExtend.sdryIndex})
|
||||
on DUPLICATE KEY UPDATE
|
||||
`ward_code`=#{tBasicExtend.wardCode},
|
||||
`ward_name`=#{tBasicExtend.wardName},
|
||||
`sdry_index`=#{tBasicExtend.sdryIndex}
|
||||
</update>
|
||||
|
||||
<select id="selectOne" resultType="java.lang.Integer">
|
||||
select count(patient_id) from `docus_medicalrecord`.`t_basic` where jzh=#{jzh}
|
||||
</select>
|
||||
|
||||
<select id="getPatientId" resultType="java.lang.String">
|
||||
select patient_id from `docus_medicalrecord`.`t_basic` where jzh=#{jzh}
|
||||
</select>
|
||||
<select id="selectBasicListByAdmissDate" resultType="com.docus.server.record.common.pojo.entity.TBasic">
|
||||
select *
|
||||
from `docus_medicalrecord`.`t_basic`
|
||||
where admiss_date between #{admissStartDate} AND #{admissEndDate}
|
||||
limit #{offset}
|
||||
, #{size}
|
||||
</select>
|
||||
<select id="getSdRyIndexByPatientId" resultType="java.lang.String">
|
||||
select sdry_index
|
||||
from `docus_medicalrecord`.`t_basic_extend`
|
||||
where patient_id=#{patientId}
|
||||
</select>
|
||||
<select id="selectBasicListByCreateOrUpdateTime" resultType="com.docus.server.record.common.pojo.entity.TBasic">
|
||||
select `patient_id`,
|
||||
`admiss_times`,
|
||||
`inpatient_no`,
|
||||
`admiss_id`,
|
||||
`ph`,
|
||||
`sex`,
|
||||
`age`,
|
||||
`id_card`,
|
||||
`admiss_date`,
|
||||
`dis_date`,
|
||||
`admiss_days`,
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
`file_source`,
|
||||
`jzh`
|
||||
from `docus_medicalrecord`.`t_basic`
|
||||
where (`create_time` between #{startDate} AND #{endDate}
|
||||
or `update_time` between #{startDate} AND #{endDate})
|
||||
and `dis_date` > '1801-02-03 00:00:00'
|
||||
limit #{offset}
|
||||
, #{size}
|
||||
</select>
|
||||
<select id="selectBasicListByPatientIds" resultType="com.docus.server.record.common.pojo.entity.TBasic">
|
||||
select `patient_id`,
|
||||
`admiss_times`,
|
||||
`inpatient_no`,
|
||||
`admiss_id`,
|
||||
`ph`,
|
||||
`sex`,
|
||||
`age`,
|
||||
`id_card`,
|
||||
`admiss_date`,
|
||||
`dis_date`,
|
||||
`admiss_days`,
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
`file_source`,
|
||||
`jzh`
|
||||
from `docus_medicalrecord`.`t_basic`
|
||||
where patient_id in
|
||||
<foreach collection="patientIds" item="patientId" open="(" close=")" separator=",">
|
||||
#{patientId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getBasicForZYHs" resultType="map">
|
||||
SELECT
|
||||
patient_id,
|
||||
inpatient_no,
|
||||
DATE_FORMAT( admiss_date, '%Y-%m-%d %H:%i:%s' ) admiss_date,
|
||||
DATE_FORMAT( dis_date, '%Y-%m-%d %H:%i:%s' ) dis_date,
|
||||
jzh
|
||||
FROM
|
||||
docus_medicalrecord.t_basic
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="zyhs!= null and zyhs.size()>0">
|
||||
AND inpatient_no IN
|
||||
<foreach collection="zyhs" item="zyh" open="(" close=")" separator=",">
|
||||
#{zyh}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--查询基础出院数据增量数据-->
|
||||
<select id="getBasicOutData" resultType="java.util.Map">
|
||||
SELECT
|
||||
patient_id patientid,
|
||||
jzh,
|
||||
inpatient_no inpatientno,
|
||||
admiss_times admisstimes,
|
||||
NAME,
|
||||
date_format(create_time, '%Y-%m-%d %H:%i:%s') createtime,
|
||||
date_format(admiss_date, '%Y-%m-%d %H:%i:%s') admissdate,
|
||||
date_format(dis_date, '%Y-%m-%d %H:%i:%s') disdate,
|
||||
dis_dept_name disdeptname
|
||||
FROM
|
||||
docus_medicalrecord.t_basic
|
||||
WHERE
|
||||
1 = 1
|
||||
AND jzh IS NOT NULL
|
||||
AND dis_date IS NOT NULL
|
||||
AND dis_date != '1801-02-03 00:00:00'
|
||||
AND is_cancel = 0
|
||||
<if test="param.startTime != null">
|
||||
AND dis_date <![CDATA[ >= ]]> #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND dis_date <![CDATA[ <= ]]> #{param.endTime}
|
||||
</if>
|
||||
<if test="param.where != null">
|
||||
AND #{param.where}
|
||||
</if>
|
||||
LIMIT #{param.offset}, #{param.pageSize}
|
||||
</select>
|
||||
<!--查询基础创建数据增量数据-->
|
||||
<select id="getBasicData" resultType="java.util.Map">
|
||||
SELECT
|
||||
patient_id patientid,
|
||||
jzh,
|
||||
inpatient_no inpatientno,
|
||||
admiss_times admisstimes,
|
||||
NAME,
|
||||
date_format( create_time, '%Y-%m-%d %H:%i:%s' ) createtime,
|
||||
date_format( admiss_date, '%Y-%m-%d %H:%i:%s' ) admissdate,
|
||||
date_format( dis_date, '%Y-%m-%d %H:%i:%s' ) disdate,
|
||||
dis_dept_name disdeptname
|
||||
FROM
|
||||
docus_medicalrecord.t_basic
|
||||
WHERE
|
||||
1 = 1
|
||||
AND jzh IS NOT NULL
|
||||
AND is_cancel =0
|
||||
|
||||
<if test="param.startTime != null">
|
||||
AND dis_date <![CDATA[ >= ]]> #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null">
|
||||
AND dis_date <![CDATA[ <= ]]> #{param.endTime}
|
||||
</if>
|
||||
<if test="param.where != null">
|
||||
AND #{param.where}
|
||||
</if>
|
||||
LIMIT #{param.offset}, #{param.pageSize}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,34 @@
|
||||
<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>common-docus</artifactId>
|
||||
<groupId>com.docus</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>docus-sys</artifactId>
|
||||
<name>Archetype - docus-sys</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.docus</groupId>
|
||||
<artifactId>docus-api-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,38 @@
|
||||
package com.docus.server.sys.common.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wen yongbin
|
||||
* @date 2023年2月26日00:21:00
|
||||
*/
|
||||
@Data
|
||||
public class DeptModifyParam {
|
||||
|
||||
/**
|
||||
* 科室主键id
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 科室代码
|
||||
*/
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人名称
|
||||
*/
|
||||
private String authorName;
|
||||
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
private String authorId;
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.docus.server.sys.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 科室
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "PowerDept对象", description = "科室")
|
||||
public class PowerDept implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "科室id")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "科室代码")
|
||||
@TableField("dept_code")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "科室名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "字典id")
|
||||
private Integer dictId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
private Integer effective;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String creater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateDate;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updater;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "临床科室排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "0:非临床科室,1:临床科室")
|
||||
private Integer type;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.docus.server.sys.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 jiashi
|
||||
* @since 2021-04-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "PowerThirdLogin对象", description = "第三方登陆")
|
||||
public class PowerThirdLogin implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id", type = IdType.ID_WORKER_STR)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "power_user表id")
|
||||
private String powerUserId;
|
||||
|
||||
@ApiModelProperty(value = "用户")
|
||||
@TableField("user")
|
||||
private String user;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String pwd;
|
||||
|
||||
@ApiModelProperty(value = "来源")
|
||||
private Integer source;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.docus.server.sys.common.pojo.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "PowerUser对象", description = "用户表")
|
||||
public class PowerUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "登陆名")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户密码")
|
||||
private String userPwd;
|
||||
|
||||
@ApiModelProperty(value = "性别 0 男 1 女")
|
||||
private Integer userSex;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer userAge;
|
||||
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String userTel;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(value = "微信信息")
|
||||
private String wxBank;
|
||||
|
||||
@ApiModelProperty(value = "职位")
|
||||
private String userPosition;
|
||||
|
||||
@ApiModelProperty(value = "角色")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
private Integer effective;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String creater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateDate;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updater;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "登录标志 默认为0为未登录 1登录")
|
||||
private Integer loginFlag;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "所属科室代码 多个以,分隔")
|
||||
@TableField(exist = false)
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "权限科室 拥有对科室查阅权限")
|
||||
private String powerDept;
|
||||
|
||||
@ApiModelProperty(value = "权限 拥有对主管医生查阅权限")
|
||||
private String powerAttending;
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.docus.server.sys.controller;
|
||||
|
||||
import com.docus.infrastructure.util.easyexcel.ExcelUtil;
|
||||
import com.docus.infrastructure.web.api.CommonResult;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class TestController {
|
||||
|
||||
|
||||
@RequestMapping("upload")
|
||||
public void upload(MultipartFile multipartFile){
|
||||
List<Object> objects = ExcelUtil.readExcel(multipartFile, null);
|
||||
System.out.println(objects);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("test")
|
||||
public CommonResult test(){
|
||||
|
||||
return CommonResult.success("");
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.docus.server.sys.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import com.docus.server.sys.common.pojo.dto.DeptModifyParam;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerDept;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 科室表 baseMapper
|
||||
* </p>
|
||||
*
|
||||
* @author wen yongbin
|
||||
* @since 2023年2月25日22:28:58
|
||||
*/
|
||||
@Mapper
|
||||
@DS(DSKeyConstants.SYSTEM_DS_KEY)
|
||||
public interface PowerDeptMapper extends BaseMapper<PowerDept> {
|
||||
|
||||
/**
|
||||
* 根据科室编码查询科室信息
|
||||
*
|
||||
* @param deptCode 科室编码
|
||||
* @return 科室信息
|
||||
*/
|
||||
PowerDept getDeptByDeptCode(@Param("deptCode") String deptCode);
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param deptModifyParam 科室操作参数
|
||||
* @return 数据库更新信息
|
||||
*/
|
||||
int updateDept(@Param("dept") DeptModifyParam deptModifyParam);
|
||||
|
||||
/**
|
||||
* 添加新科室
|
||||
*
|
||||
* @param deptModifyParam 科室操作参数
|
||||
* @return 数据库添加信息
|
||||
*/
|
||||
int addDept(@Param("dept") DeptModifyParam deptModifyParam);
|
||||
|
||||
/**
|
||||
* 根据科室编码删除科室信息
|
||||
*
|
||||
* @param deptCode 科室编码
|
||||
* @return 数据库删除信息
|
||||
*/
|
||||
int delDeptByDeptCode(@Param("deptCode") String deptCode);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.server.sys.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerThirdLogin;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 第三方登陆 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-26
|
||||
*/
|
||||
@DS(DSKeyConstants.SYSTEM_DS_KEY)
|
||||
@Mapper
|
||||
public interface PowerThirdLoginMapper extends BaseMapper<PowerThirdLogin> {
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.docus.server.sys.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import com.docus.server.sys.common.pojo.dto.UserModifyParam;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 baseMapper
|
||||
* </p>
|
||||
*
|
||||
* @author wen yongbin
|
||||
* @since 2023年2月25日22:28:58
|
||||
*/
|
||||
@Mapper
|
||||
@DS(DSKeyConstants.SYSTEM_DS_KEY)
|
||||
public interface PowerUserMapper extends BaseMapper<PowerUser> {
|
||||
|
||||
/**
|
||||
* 根据用户工号查询用户信息
|
||||
*
|
||||
* @param userName 用户工号
|
||||
* @return 用户信息
|
||||
*/
|
||||
PowerUser getUserByUserName(@Param("userName") String userName);
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param userModifyParam 用户操作参数
|
||||
* @return 数据库更新信息
|
||||
*/
|
||||
int updateUser(@Param("user") UserModifyParam userModifyParam);
|
||||
|
||||
/**
|
||||
* 添加新用户
|
||||
*
|
||||
* @param userModifyParam 用户操作参数
|
||||
* @return 数据库添加信息
|
||||
*/
|
||||
int addUser(@Param("user") UserModifyParam userModifyParam);
|
||||
|
||||
/**
|
||||
* 根据用户工号删除用户信息
|
||||
*
|
||||
* @param userName 用户工号
|
||||
* @return 数据库删除信息
|
||||
*/
|
||||
int delUserByUserName(@Param("userName") String userName);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.docus.server.sys.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.sys.common.pojo.dto.DeptDTO;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerDept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IPowerDeptService extends IBaseService<PowerDept> {
|
||||
|
||||
/**
|
||||
* 科室注册
|
||||
*
|
||||
* @param deptDto 用户注册参数
|
||||
* @return 处理结果
|
||||
*/
|
||||
boolean insertOrUpdatePowerDept(DeptDTO deptDto);
|
||||
|
||||
/**
|
||||
* 根据科室编号删除科室
|
||||
*
|
||||
* @param deptCode 科室编码
|
||||
* @return 删除结果
|
||||
*/
|
||||
boolean delDeptByDeptCode(String deptCode);
|
||||
|
||||
/**
|
||||
* 批量新增或修改
|
||||
*
|
||||
* @param deptDTOList
|
||||
*/
|
||||
void batchInsertOrUpdatePowerDept(List<DeptDTO> deptDTOList);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.docus.server.sys.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerThirdLogin;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 第三方登陆 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-26
|
||||
*/
|
||||
public interface IPowerThirdLoginService extends IBaseService<PowerThirdLogin> {
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.docus.server.sys.service;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.IBaseService;
|
||||
import com.docus.server.sys.common.pojo.dto.UserDTO;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户服务
|
||||
*/
|
||||
public interface IPowerUserService extends IBaseService<PowerUser> {
|
||||
/**
|
||||
* 用户注册
|
||||
*
|
||||
* @param userDTO 用户注册参数
|
||||
* @return 处理结果
|
||||
*/
|
||||
boolean insertOrUpdatePowerUser(UserDTO userDTO);
|
||||
|
||||
/**
|
||||
* 根据用户工号删除用户
|
||||
*
|
||||
* @param userName 用户工号
|
||||
* @return 删除结果
|
||||
*/
|
||||
boolean delUserByUserName(String userName);
|
||||
|
||||
/**
|
||||
* 批量保存
|
||||
*
|
||||
* @param users
|
||||
*/
|
||||
void batchInsertOrUpdatePowerUser(List<UserDTO> users);
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.docus.server.sys.service.impl;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.sys.common.pojo.dto.DeptDTO;
|
||||
import com.docus.server.sys.common.pojo.dto.DeptModifyParam;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerDept;
|
||||
import com.docus.server.sys.mapper.PowerDeptMapper;
|
||||
import com.docus.server.sys.service.IPowerDeptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 科室服务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class PowerDeptServiceImpl extends BaseServiceImpl<PowerDeptMapper, PowerDept> implements IPowerDeptService {
|
||||
@Resource
|
||||
private IdService idService;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void batchInsertOrUpdatePowerDept(List<DeptDTO> deptDTOList) {
|
||||
deptDTOList.forEach(this::insertOrUpdatePowerDept);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean insertOrUpdatePowerDept(DeptDTO deptDTO) {
|
||||
PowerDept powerDept = baseMapper.getDeptByDeptCode(deptDTO.getDeptCode());
|
||||
DeptModifyParam deptModifyParam = deptDTO.transDeptAddParam();
|
||||
if (Func.isEmpty(powerDept)) {
|
||||
long deptId = idService.getDateSeq();
|
||||
deptModifyParam.setDeptId(deptId);
|
||||
baseMapper.addDept(deptModifyParam);
|
||||
return true;
|
||||
}
|
||||
deptModifyParam.setDeptId(powerDept.getDeptId());
|
||||
baseMapper.updateDept(deptModifyParam);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean delDeptByDeptCode(String deptCode) {
|
||||
PowerDept powerDept = baseMapper.getDeptByDeptCode(deptCode);
|
||||
if (Func.isEmpty(powerDept)) {
|
||||
return true;
|
||||
}
|
||||
baseMapper.delDeptByDeptCode(deptCode);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.sys.service.impl;
|
||||
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerThirdLogin;
|
||||
import com.docus.server.sys.mapper.PowerThirdLoginMapper;
|
||||
import com.docus.server.sys.service.IPowerThirdLoginService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 第三方登陆 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author jiashi
|
||||
* @since 2021-04-26
|
||||
*/
|
||||
@Service
|
||||
public class PowerThirdLoginServiceImpl extends BaseServiceImpl<PowerThirdLoginMapper, PowerThirdLogin> implements IPowerThirdLoginService {
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.docus.server.sys.service.impl;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.core.db.service.impl.BaseServiceImpl;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.common.config.UserProperties;
|
||||
import com.docus.server.sys.common.pojo.dto.UserDTO;
|
||||
import com.docus.server.sys.common.pojo.dto.UserModifyParam;
|
||||
import com.docus.server.sys.common.pojo.entity.PowerUser;
|
||||
import com.docus.server.sys.mapper.PowerUserMapper;
|
||||
import com.docus.server.sys.service.IPowerUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户服务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class PowerUserServiceImpl extends BaseServiceImpl<PowerUserMapper, PowerUser> implements IPowerUserService {
|
||||
@Resource
|
||||
private IdService idService;
|
||||
@Resource
|
||||
private UserProperties userProperties;
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void batchInsertOrUpdatePowerUser(List<UserDTO> userDTOList) {
|
||||
userDTOList.forEach(this::insertOrUpdatePowerUser);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean insertOrUpdatePowerUser(UserDTO userDTO) {
|
||||
PowerUser powerUser = baseMapper.getUserByUserName(userDTO.getUserName());
|
||||
UserModifyParam userModifyParam = userDTO.transUserAddParam();
|
||||
if (Func.isEmpty(powerUser)) {
|
||||
long userId = idService.getDateSeq();
|
||||
userModifyParam.setUserId(userId);
|
||||
userModifyParam.setUserPwd(userProperties.getPassword());
|
||||
baseMapper.addUser(userModifyParam);
|
||||
return true;
|
||||
}
|
||||
userModifyParam.setUserId(powerUser.getUserId());
|
||||
baseMapper.updateUser(userModifyParam);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean delUserByUserName(String userName) {
|
||||
PowerUser powerUser = baseMapper.getUserByUserName(userName);
|
||||
if (Func.isEmpty(powerUser)) {
|
||||
return true;
|
||||
}
|
||||
baseMapper.delUserByUserName(userName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.sys.mapper.PowerDeptMapper">
|
||||
<insert id="addDept">
|
||||
INSERT INTO `docus_system`.`power_dept`(`dept_id`,
|
||||
`dept_code`,
|
||||
`dept_name`,
|
||||
`create_date`,
|
||||
`creater`,
|
||||
`update_date`,
|
||||
`updater`)
|
||||
VALUES (#{dept.deptId},#{dept.deptCode},#{dept.deptName},now(),#{dept.authorName},now(),#{dept.authorName})
|
||||
</insert>
|
||||
<update id="updateDept">
|
||||
update `docus_system`.`power_dept` set
|
||||
`dept_name`=#{dept.deptName},
|
||||
`updater`=#{dept.authorName},
|
||||
`update_date`=now()
|
||||
where `dept_code`=#{dept.deptCode}
|
||||
</update>
|
||||
<delete id="delDeptByDeptCode">
|
||||
delete from `docus_system`.`power_dept` where `dept_code` = #{deptCode}
|
||||
</delete>
|
||||
|
||||
<select id="getDeptByDeptCode" resultType="com.docus.server.sys.common.pojo.entity.PowerDept">
|
||||
SELECT `dept_id`,`dept_code`,`dept_name` FROM `docus_system`.`power_dept`
|
||||
WHERE `dept_code` = #{deptCode} LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.docus.server.sys.mapper.PowerUserMapper">
|
||||
<insert id="addUser">
|
||||
INSERT INTO `docus_system`.`power_user`(`user_id`,
|
||||
`user_name`,
|
||||
`name`,
|
||||
`user_pwd`,
|
||||
`user_position`,
|
||||
`role_id`,
|
||||
`dept_id`,
|
||||
`create_date`,
|
||||
`creater`,
|
||||
`update_date`,
|
||||
`updater`)
|
||||
VALUES (#{user.userId},#{user.userName},#{user.name},#{user.userPwd},#{user.position},#{user.roleId}
|
||||
,#{user.deptId},now(),#{user.authorName},now(),#{user.authorName})
|
||||
</insert>
|
||||
<update id="updateUser">
|
||||
update `docus_system`.`power_user` set
|
||||
`updater`=#{user.authorName},
|
||||
`dept_id`=#{user.deptId},
|
||||
`user_position`=#{user.position},
|
||||
`name`=#{user.name},
|
||||
`update_date`=now()
|
||||
where `user_id`=#{user.userId}
|
||||
</update>
|
||||
<delete id="delUserByUserName">
|
||||
delete from `docus_system`.`power_user` where `user_name` = #{userName}
|
||||
</delete>
|
||||
|
||||
<select id="getUserByUserName" resultType="com.docus.server.sys.common.pojo.entity.PowerUser">
|
||||
SELECT `user_id`,`user_name`,`user_pwd` FROM `docus_system`.`power_user`
|
||||
WHERE `user_name` = #{userName} LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,18 @@
|
||||
<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>common-docus</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>docus-sys</module>
|
||||
<module>docus-medical-record</module>
|
||||
<module>docus-archivefile</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
@ -0,0 +1,54 @@
|
||||
<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>common-sysem</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>
|
||||
|
||||
<build>
|
||||
<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>
|
@ -0,0 +1,13 @@
|
||||
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 "";
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.bl.infrastructure.cache;
|
||||
|
||||
public class DeptCacheLayer {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.bl.infrastructure.client;
|
||||
|
||||
public class DownLoadAPI {
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.docus.server.bl.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.BL_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);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.bl.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.BL_DS_KEY)
|
||||
public interface BlTBasicMapper {
|
||||
|
||||
List<TBasicDTO> getTBasicListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.bl.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.BL_DS_KEY)
|
||||
public interface BlUserMapper {
|
||||
|
||||
List<UserDTO> getUserListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.docus.server.bl.service;
|
||||
|
||||
import com.docus.server.api.IHospitalApi;
|
||||
|
||||
public interface IBlService extends IHospitalApi {
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.docus.server.bl.service.impl;
|
||||
|
||||
import com.docus.server.bl.infrastructure.mapper.BlDeptMapper;
|
||||
import com.docus.server.bl.service.IBlService;
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component(DSKeyConstants.BL_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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,180 @@
|
||||
<?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>
|
@ -0,0 +1,49 @@
|
||||
<?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>
|
@ -0,0 +1,49 @@
|
||||
<?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>
|
@ -0,0 +1,53 @@
|
||||
<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>common-sysem</artifactId>
|
||||
<groupId>com.docus</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ecg-sysem</artifactId>
|
||||
<name>Archetype - ecg-sysem</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<build>
|
||||
<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/ecg-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>
|
@ -0,0 +1,13 @@
|
||||
package com.docus.server.ecg.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 "";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.docus.server.ecg.infrastructure.cache;
|
||||
|
||||
|
||||
public class DeptCacheLayer {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.ecg.infrastructure.client;
|
||||
|
||||
public class DownLoadAPI {
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.docus.server.ecg.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.ECG_DS_KEY)
|
||||
public interface EcgDeptMapper {
|
||||
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.ecg.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.ECG_DS_KEY)
|
||||
public interface EcgTBasicMapper {
|
||||
|
||||
List<TBasicDTO> getTBasicListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.ecg.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.ECG_DS_KEY)
|
||||
public interface EcgUserMapper {
|
||||
|
||||
List<UserDTO> getUserListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.docus.server.ecg.service;
|
||||
|
||||
import com.docus.server.api.IHospitalApi;
|
||||
|
||||
public interface IEcgService extends IHospitalApi {
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.docus.server.ecg.service.impl;
|
||||
|
||||
import com.docus.server.constants.DSKeyConstants;
|
||||
import com.docus.server.ecg.infrastructure.mapper.EcgDeptMapper;
|
||||
import com.docus.server.ecg.service.IEcgService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component(DSKeyConstants.ECG_DS_KEY + "ServiceImpl")
|
||||
@AllArgsConstructor
|
||||
public class EcgServiceImpl implements IEcgService {
|
||||
|
||||
private final EcgDeptMapper ecgDeptMapper;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> page(Date startDate, Date endDate, int pageNum, int pageSize) {
|
||||
return ecgDeptMapper.page(startDate, endDate, (pageNum - 1) * pageSize, pageSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> BatchForJZH(List<String> jzhs) {
|
||||
return ecgDeptMapper.BatchForJZH(jzhs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> BatchForJZHAndAdmissTimes(List<Map<String, Object>> datas) {
|
||||
return ecgDeptMapper.BatchForJZHAndAdmissTimes(datas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> BatchForZYHAndAdmissTimes(List<Map<String, Object>> datas) {
|
||||
return ecgDeptMapper.BatchForZYHAndAdmissTimes(datas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> BatchForEXAMTIME(List<Map<String, Object>> datas) {
|
||||
return ecgDeptMapper.BatchForEXAMTIME(datas);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
<?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.ecg.infrastructure.mapper.EcgDeptMapper">
|
||||
|
||||
<!--根据更新时间分页查询-->
|
||||
<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="getDeptListView" 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="getDeptListView" 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="getDeptListView" 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>
|
@ -0,0 +1,49 @@
|
||||
<?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.ecg.infrastructure.mapper.EcgTBasicMapper">
|
||||
|
||||
<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="getDeptListView" 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="getDeptListView" 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="getDeptListView" 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>
|
@ -0,0 +1,49 @@
|
||||
<?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.ecg.infrastructure.mapper.EcgUserMapper">
|
||||
|
||||
<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="getDeptListView" 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="getDeptListView" 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="getDeptListView" 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>
|
@ -0,0 +1,53 @@
|
||||
<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>common-sysem</artifactId>
|
||||
<groupId>com.docus</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>emr-sysem</artifactId>
|
||||
<name>Archetype - emr-sysem</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<build>
|
||||
<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/emr-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>
|
@ -0,0 +1,10 @@
|
||||
package com.docus.server.emr.common;
|
||||
|
||||
/**
|
||||
* @author linrf
|
||||
* @date 2023/6/9 11:19
|
||||
*/
|
||||
public class DSKey {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.docus.server.emr.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 "";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.docus.server.emr.infrastructure.cache;
|
||||
|
||||
|
||||
public class DeptCacheLayer {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.docus.server.emr.infrastructure.client;
|
||||
|
||||
public class DownLoadAPI {
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.docus.server.emr.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.EMR_DS_KEY)
|
||||
public interface EmrDeptMapper {
|
||||
|
||||
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);
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.emr.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.EMR_DS_KEY)
|
||||
public interface EmrTBasicMapper {
|
||||
|
||||
List<TBasicDTO> getTBasicListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.docus.server.emr.infrastructure.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.docus.server.constants.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.EMR_DS_KEY)
|
||||
public interface EmrUserMapper {
|
||||
|
||||
List<UserDTO> getUserListView(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("offset") int offset,
|
||||
@Param("pageSize") int pageSize);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.docus.server.emr.service;
|
||||
|
||||
import com.docus.server.api.IHospitalApi;
|
||||
|
||||
public interface IEmrService extends IHospitalApi {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue