diff --git a/common-docus/docus-archivefile/pom.xml b/common-docus/docus-archivefile/pom.xml
new file mode 100644
index 0000000..9c86310
--- /dev/null
+++ b/common-docus/docus-archivefile/pom.xml
@@ -0,0 +1,35 @@
+
+
+ common-docus
+ com.docus
+ 1.0-SNAPSHOT
+
+ 4.0.0
+ docus-archivefile
+ Archetype - docus-archivefile
+ http://maven.apache.org
+
+
+
+ com.docus
+ docus-api-common
+ 1.0-SNAPSHOT
+ compile
+
+
+
+
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+ src/main/resources
+
+
+
+
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/RecordExceptionEnum.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/RecordExceptionEnum.java
new file mode 100644
index 0000000..2b98c78
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/RecordExceptionEnum.java
@@ -0,0 +1,40 @@
+package com.docus.server.record;
+
+import com.docus.infrastructure.core.exception.IErrorCode;
+
+public enum RecordExceptionEnum implements IErrorCode {
+
+ /**
+ * 备份实例不存在
+ */
+ NOT_NULL("1001", "参数不能为空!"),
+ ;
+
+
+ private String msgCode;
+ private String msg;
+
+
+ /**
+ * 模块业务码,例如微信是 WX,每个模块独立标识
+ */
+ private String moduleCode = "MR";
+
+
+ RecordExceptionEnum(String msgCode, String msg) {
+ this.msgCode = msgCode;
+ this.msg = msg;
+ }
+
+
+ @Override
+ public String getCode() {
+ return moduleCode + this.msgCode;
+ }
+
+ @Override
+ public String getMessage() {
+ return msg;
+ }
+
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/Package.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/Package.java
new file mode 100644
index 0000000..65a1b37
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/Package.java
@@ -0,0 +1,5 @@
+package com.docus.server.record.controller;
+
+public class Package {
+
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/param/Package.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/param/Package.java
new file mode 100644
index 0000000..aceed35
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/param/Package.java
@@ -0,0 +1,4 @@
+package com.docus.server.record.controller.param;
+
+public class Package {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/vo/Package.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/vo/Package.java
new file mode 100644
index 0000000..0b5b3fd
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/controller/vo/Package.java
@@ -0,0 +1,4 @@
+package com.docus.server.record.controller.vo;
+
+public class Package {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectSysDictionaryMapper.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectSysDictionaryMapper.java
new file mode 100644
index 0000000..7d1f1f6
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectSysDictionaryMapper.java
@@ -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 {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectTaskMapper.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectTaskMapper.java
new file mode 100644
index 0000000..5cd744f
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfCollectTaskMapper.java
@@ -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);
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfJobTimeMapper.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfJobTimeMapper.java
new file mode 100644
index 0000000..eb418e1
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfJobTimeMapper.java
@@ -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);
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfReportRecordMapper.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfReportRecordMapper.java
new file mode 100644
index 0000000..2b1b3a3
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfReportRecordMapper.java
@@ -0,0 +1,78 @@
+package com.docus.server.archivefile.mapper;
+
+import com.docus.server.archivefile.pojo.entity.AfReportRecord;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 上报记录保存表
+ *
+ * @author wyb
+ */
+@Mapper
+public interface AfReportRecordMapper {
+ /**
+ * 保存报告推送记录
+ *
+ * @param afReportRecord 报告推送记录
+ * @return 数据库操作结果
+ */
+ int saveRecord(@Param("reportRecord") AfReportRecord afReportRecord);
+
+ /**
+ * 根据文件唯一号 住院号 住院次数 系统标识 得到唯一推送记录
+ *
+ * @param serialnum 报告唯一号
+ * @param inpatientNo 住院号
+ * @param admisstimes 住院次数
+ * @param sysFlag 系统标识
+ * @return 报告推送记录
+ */
+ AfReportRecord getRecordBySerialnumAndInpatientNoAndSysFlag(@Param("serialnum") String serialnum, @Param("inpatientNo") String inpatientNo, @Param("admisstimes") Integer admisstimes, @Param("sysFlag") String sysFlag);
+
+ /**
+ * 更新报告推送 主要更新 下载地址,下载类型,文件名称
+ *
+ * @param afReportRecord 报告推送记录
+ * @return 数据库操作结果
+ */
+ int updateRecordByTaskId(@Param("reportRecord") AfReportRecord afReportRecord);
+
+ /**
+ * 更新记录的状态
+ *
+ * @param taskId 任务id
+ * @return 数据库操作结果
+ */
+ int updateStateByTaskId(@Param("taskId") Long taskId);
+
+ AfReportRecord getReportRecordInfoByTaskId(@Param("taskId") Long taskId);
+
+ /**
+ * 根据任务id查询有patientId数据的任务id
+ *
+ * @param taskIds 任务id集合
+ * @return 数据有patientId的任务id集合
+ */
+ List getHasPatientIdTaskIdsByTaskIds(@Param("taskIds") List taskIds);
+
+ /**
+ * 获取未开始的报告记录
+ *
+ * @param page 分页页码
+ * @param pageSize 一页条数
+ * @return 未开始的报告记录
+ */
+ List getStartStateReportRecord(@Param("page") int page, @Param("pageSize") int pageSize);
+
+ /**
+ * 根据任务id更新病案主键
+ *
+ * @param patientId 病案主键
+ * @param taskId 任务id
+ * @return 数据库操作结果
+ */
+ int updateReportRecordPatientId(@Param("patientId") String patientId, @Param("taskId") Long taskId);
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfViewCollectionLogMapper.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfViewCollectionLogMapper.java
new file mode 100644
index 0000000..47f74b7
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/mapper/AfViewCollectionLogMapper.java
@@ -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 {
+
+
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/IdType.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/IdType.java
new file mode 100644
index 0000000..df082a0
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/IdType.java
@@ -0,0 +1,13 @@
+package com.docus.server.record.common.pojo.dto;
+
+public enum IdType {
+ /**
+ * 记账号
+ */
+ JZH,
+
+ /**
+ * 病案号
+ */
+ INPATIENT_NO
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/InpatientNo.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/InpatientNo.java
new file mode 100644
index 0000000..448258b
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/InpatientNo.java
@@ -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);
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDTO.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDTO.java
new file mode 100644
index 0000000..f819cb6
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDTO.java
@@ -0,0 +1,75 @@
+package com.docus.server.archivefile.pojo.dto;
+
+import lombok.Data;
+
+import java.util.Map;
+
+/**
+ * 报告推送信息
+ */
+@Data
+public class ReportDTO {
+ /**
+ * 住院号
+ */
+ private String inpatientNo;
+ /**
+ * 记账号/住院流水号
+ */
+ private String jzh;
+ /**
+ * 住院次数
+ */
+ private Integer admisstimes;
+ /**
+ * 采集来源系统
+ */
+ private String sysFlag;
+ /**
+ * 下载地址
+ */
+ private String downUrl;
+ /**
+ * 文件名
+ */
+ private String fileTitle;
+ /**
+ * 采集流水号/文件唯一id
+ */
+ private String serialnum;
+
+ /**
+ * 文件分类id
+ */
+ private String assortId;
+
+ /**
+ * 采集类型(文件来源 1:采集器;2:扫描生产软件)
+ */
+ private String fileSource;
+
+ /**
+ * 文件保存位置类型 1:服务器本地;2:ftp服务器;3:共享文件夹
+ */
+ private String filestoragetype;
+
+ /**
+ * 下载对应任务id ,接收处理
+ */
+ private Long taskId;
+
+ /**
+ * 业务病案主键
+ */
+ private String patientId;
+
+ /**
+ * 下载路径类型 1:url,2:base64,3:url base64,4:共享文件,5:本地文件base64
+ */
+ private Integer downtype = 1;
+
+ /**
+ * 拓展参数
+ */
+ private Map params;
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownDTO.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownDTO.java
new file mode 100644
index 0000000..d56634c
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownDTO.java
@@ -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 scanfiles;
+
+ @ApiModelProperty(value = "扫描用户代码")
+ private String scanusercode;
+ @ApiModelProperty(value = "扫描用户名称")
+ private String scanusername;
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownPatientDTO.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownPatientDTO.java
new file mode 100644
index 0000000..de67e18
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownPatientDTO.java
@@ -0,0 +1,34 @@
+package com.docus.server.archivefile.pojo.dto;
+
+import com.docus.server.archivefile.pojo.entity.AfReportRecord;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ReportDownPatientDTO {
+ @ApiModelProperty(value = "记帐号")
+ private String jzh;
+ @ApiModelProperty(value = "住院次数,记帐号重复则加这个参数,无则Null")
+ private Integer admisstimes;
+ @ApiModelProperty(value = "病案主键,如有传则使用,无则使用jzh")
+ private String patientid;
+ @ApiModelProperty(value = "病案号")
+ private String inpatientno;
+
+ @ApiModelProperty(value = "物理存储位置,有则传")
+ private String storagelocation;
+
+ public ReportDownPatientDTO(AfReportRecord reportRecord) {
+ this.patientid = reportRecord.getPatientId();
+ this.jzh = reportRecord.getJzh();
+ this.admisstimes = reportRecord.getAdmissTimes();
+ this.inpatientno = reportRecord.getInpatientNo();
+ }
+
+ public ReportDownPatientDTO(ReportDTO reportDTO) {
+ this.patientid = reportDTO.getPatientId();
+ this.jzh = reportDTO.getJzh();
+ this.admisstimes = reportDTO.getAdmisstimes();
+ this.inpatientno = reportDTO.getInpatientNo();
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownScanFileDTO.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownScanFileDTO.java
new file mode 100644
index 0000000..57806e3
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/dto/ReportDownScanFileDTO.java
@@ -0,0 +1,51 @@
+package com.docus.server.archivefile.pojo.dto;
+
+import com.docus.server.archivefile.pojo.entity.AfReportRecord;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ReportDownScanFileDTO {
+ @ApiModelProperty(value = "任务id(如无效任务id,则不更新任务表数据)")
+ private Long taskid;
+ @ApiModelProperty(value = "文件标题")
+ private String filetitle;
+ @ApiModelProperty(value = "采集类型(文件来源 1:采集器;2:扫描生产软件)")
+ private int filesource;
+ @ApiModelProperty(value = "下载类型(1:服务器本地;2:ftp服务器;3:共享文件夹)")
+ private int filestoragetype;
+ @ApiModelProperty(value = "文件类型(1:url,2:base64,3:url base64,4:共享文件,5:本地文件base64)")
+ private int filetype = 1;
+ @ApiModelProperty(value = "下载地址")
+ private String downurl;
+ // @ApiModelProperty(value = "档案信息")
+// private String recordid;
+ @ApiModelProperty(value = "采集流水号")
+ private String serialnum;
+
+ @ApiModelProperty(value = "排序日期")
+ private String sortdate;
+
+ @ApiModelProperty(value = "是否作废 : 0:否 不作废,1:是 作废")
+ private int cancel = 0;
+
+ public ReportDownScanFileDTO(AfReportRecord reportRecord) {
+ this.taskid = reportRecord.getTaskId();
+ this.filetitle = reportRecord.getFileName();
+ this.filesource = 1;
+ this.filestoragetype = 1;
+ this.filetype = reportRecord.getDownType();
+ this.downurl = reportRecord.getDownUrl();
+ this.serialnum = reportRecord.getSerialnum();
+ }
+
+ public ReportDownScanFileDTO(ReportDTO reportDto) {
+ this.taskid = reportDto.getTaskId();
+ this.filetitle = reportDto.getFileTitle();
+ this.filesource = 1;
+ this.filestoragetype = 1;
+ this.filetype = reportDto.getDowntype();
+ this.downurl = reportDto.getDownUrl();
+ this.serialnum = reportDto.getSerialnum();
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfCollectTask.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfCollectTask.java
new file mode 100644
index 0000000..410604b
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfCollectTask.java
@@ -0,0 +1,79 @@
+package com.docus.server.archivefile.pojo.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *
+ * 病案采集任务
+ *
+ *
+ * @author 曾文和
+ * @since 2021-05-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "AfCollectTask对象", description = "病案采集任务")
+public class AfCollectTask implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "id 主键")
+ @TableId(value = "id", type = IdType.INPUT)
+ private Long id;
+
+ @ApiModelProperty(value = "病案主键")
+ private String patientId;
+
+ @ApiModelProperty(value = "来源 1护理文书,2 电子病历,3 Pacs检查,4心电图,5手麻系统,6 Lis检验,7病案首页,8长临医嘱")
+ private String sysflag;
+
+ @ApiModelProperty(value = "开始时间")
+ private Date startTime;
+
+ @ApiModelProperty(value = "结束时间")
+ private Date endTime;
+
+ @ApiModelProperty(value = "任务耗时(毫秒)")
+ private Long consumingTime;
+
+ @ApiModelProperty(value = "-1 等待采集,0:未开始,1:正在采集,2:采集错误,3采集完成")
+ private String state;
+
+ @ApiModelProperty(value = "同步时间")
+ private Date syncTime;
+
+ @ApiModelProperty(value = "最新重新采集时间")
+ private Date recollectTime;
+
+ @ApiModelProperty(value = "最新重新采集人")
+ private String recollectName;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "报告唯一单号")
+ private String C1;
+
+ @ApiModelProperty(value = "c2")
+ private String C2;
+
+ @ApiModelProperty(value = "记账号")
+ private String C3;
+
+ @ApiModelProperty(value = "c4")
+ private String C4;
+
+ @ApiModelProperty(value = "c6")
+ private String C6;
+
+ @ApiModelProperty(value = "c9")
+ private String C9;
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfJobTime.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfJobTime.java
new file mode 100644
index 0000000..bac4d5d
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfJobTime.java
@@ -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;
+
+/**
+ *
+ *
+ *
+ *
+ * @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;
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfReportRecord.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfReportRecord.java
new file mode 100644
index 0000000..14143fd
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfReportRecord.java
@@ -0,0 +1,102 @@
+package com.docus.server.archivefile.pojo.entity;
+
+import com.docus.server.archivefile.pojo.dto.ReportDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 上报记录保存表
+ */
+@Data
+public class AfReportRecord implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * af_collect_task 主键id
+ */
+ private Long taskId;
+
+ /**
+ * 住院号
+ */
+ private String inpatientNo;
+
+ /**
+ * 住院流水号,记账号
+ */
+ private String jzh;
+
+ /**
+ * 住院次数
+ */
+ private Integer admissTimes;
+
+ /**
+ * 下载地址,多个使用 | 分隔
+ */
+ private String downUrl;
+
+ /**
+ * 下载路径类型 1:url,2:base64,3:url base64,4:共享文件,5:本地文件base64
+ */
+ private Integer downType;
+
+ /**
+ * 状态 0 未开始,可用于补偿,1 已发送下载
+ */
+ private Integer state;
+
+ /**
+ * 报告唯一id
+ */
+ private String serialnum;
+
+ /**
+ * 报告来源 采集器标识
+ */
+ private String sysflag;
+
+ /**
+ * 报告所属文件分段id
+ */
+ private String zdAssortId;
+
+ /**
+ * 记录创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 记录更新时间
+ */
+ private Date updateTime;
+
+ /**
+ * 报告名称
+ */
+ private String fileName;
+
+ /**
+ * 病案主键
+ */
+ private String patientId;
+
+
+ public AfReportRecord() {
+ }
+
+ public AfReportRecord(ReportDTO reportDTO) {
+ this.jzh = reportDTO.getJzh();
+ this.admissTimes = reportDTO.getAdmisstimes();
+ this.inpatientNo = reportDTO.getInpatientNo();
+ this.downUrl = reportDTO.getDownUrl();
+ this.sysflag = reportDTO.getSysFlag();
+ this.zdAssortId = reportDTO.getAssortId();
+ this.serialnum = reportDTO.getSerialnum();
+ this.fileName = reportDTO.getFileTitle();
+ this.downType = reportDTO.getDowntype();
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfViewCollectionLog.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfViewCollectionLog.java
new file mode 100644
index 0000000..8d33878
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/AfViewCollectionLog.java
@@ -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));
+ }
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/CollectsysDictionary.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/CollectsysDictionary.java
new file mode 100644
index 0000000..2c1ac13
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/pojo/entity/CollectsysDictionary.java
@@ -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;
+
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfCollectSysDictionary.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfCollectSysDictionary.java
new file mode 100644
index 0000000..6af725b
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfCollectSysDictionary.java
@@ -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 {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfViewCollectionLogService.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfViewCollectionLogService.java
new file mode 100644
index 0000000..f09acde
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/IAfViewCollectionLogService.java
@@ -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 {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfCollectSysDictionaryImpl.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfCollectSysDictionaryImpl.java
new file mode 100644
index 0000000..820ef21
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfCollectSysDictionaryImpl.java
@@ -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 implements IAfCollectSysDictionary {
+}
diff --git a/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfViewCollectionLogServiceImpl.java b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfViewCollectionLogServiceImpl.java
new file mode 100644
index 0000000..6de2418
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/java/com/docus/server/archivefile/service/impl/AfViewCollectionLogServiceImpl.java
@@ -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 implements IAfViewCollectionLogService {
+
+
+}
diff --git a/common-docus/docus-archivefile/src/main/resources/mapper/AfCollectTaskMapper.xml b/common-docus/docus-archivefile/src/main/resources/mapper/AfCollectTaskMapper.xml
new file mode 100644
index 0000000..7356aa5
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/resources/mapper/AfCollectTaskMapper.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ 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});
+
+
+
+
diff --git a/common-docus/docus-archivefile/src/main/resources/mapper/AfJobTimeMapper.xml b/common-docus/docus-archivefile/src/main/resources/mapper/AfJobTimeMapper.xml
new file mode 100644
index 0000000..44b99fc
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/resources/mapper/AfJobTimeMapper.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ INSERT INTO `docus_archivefile`.`af_job_time`(`id`, `update_time`, `job_type`)
+ VALUES (#{afJobTime.id}, #{afJobTime.updateTime}, #{afJobTime.jobType});
+
+
+
+ UPDATE `docus_archivefile`.`af_job_time`
+ SET `update_time` = #{afJobTime.updateTime},
+ WHERE `id` = #{afJobTime.id};
+
+
+
+
diff --git a/common-docus/docus-archivefile/src/main/resources/mapper/AfReportRecordMapper.xml b/common-docus/docus-archivefile/src/main/resources/mapper/AfReportRecordMapper.xml
new file mode 100644
index 0000000..da2483d
--- /dev/null
+++ b/common-docus/docus-archivefile/src/main/resources/mapper/AfReportRecordMapper.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ 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});
+
+
+ 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 `docus_archivefile`.`af_report_record`
+ set `state`= 1,
+ `update_time`=now()
+ where `task_id` = #{taskId}
+
+
+ update `docus_archivefile`.`af_report_record`
+ set `patient_id`= #{patientId}
+ where `task_id` = #{taskId}
+
+
+
+
+
+
diff --git a/common-docus/docus-medical-record/pom.xml b/common-docus/docus-medical-record/pom.xml
new file mode 100644
index 0000000..2a96dd1
--- /dev/null
+++ b/common-docus/docus-medical-record/pom.xml
@@ -0,0 +1,37 @@
+
+
+ common-docus
+ com.docus
+ 1.0-SNAPSHOT
+
+ 4.0.0
+ docus-medical-record
+ Archetype - docus-medical-record
+ http://maven.apache.org
+
+
+
+ com.docus
+ docus-api-common
+ 1.0-SNAPSHOT
+ compile
+
+
+
+
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+ src/main/resources
+
+
+
+
+
+
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/RecordExceptionEnum.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/RecordExceptionEnum.java
new file mode 100644
index 0000000..2b98c78
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/RecordExceptionEnum.java
@@ -0,0 +1,40 @@
+package com.docus.server.record;
+
+import com.docus.infrastructure.core.exception.IErrorCode;
+
+public enum RecordExceptionEnum implements IErrorCode {
+
+ /**
+ * 备份实例不存在
+ */
+ NOT_NULL("1001", "参数不能为空!"),
+ ;
+
+
+ private String msgCode;
+ private String msg;
+
+
+ /**
+ * 模块业务码,例如微信是 WX,每个模块独立标识
+ */
+ private String moduleCode = "MR";
+
+
+ RecordExceptionEnum(String msgCode, String msg) {
+ this.msgCode = msgCode;
+ this.msg = msg;
+ }
+
+
+ @Override
+ public String getCode() {
+ return moduleCode + this.msgCode;
+ }
+
+ @Override
+ public String getMessage() {
+ return msg;
+ }
+
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/IdType.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/IdType.java
new file mode 100644
index 0000000..df082a0
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/IdType.java
@@ -0,0 +1,13 @@
+package com.docus.server.record.common.pojo.dto;
+
+public enum IdType {
+ /**
+ * 记账号
+ */
+ JZH,
+
+ /**
+ * 病案号
+ */
+ INPATIENT_NO
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/InpatientNo.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/InpatientNo.java
new file mode 100644
index 0000000..448258b
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/InpatientNo.java
@@ -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);
+ }
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/TBasicDTO.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/TBasicDTO.java
new file mode 100644
index 0000000..80103a0
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/dto/TBasicDTO.java
@@ -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 params;
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecord.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecord.java
new file mode 100644
index 0000000..5f0a98f
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecord.java
@@ -0,0 +1,117 @@
+package com.docus.server.record.common.pojo.entity;
+
+import com.docus.core.util.Func;
+import com.docus.infrastructure.core.exception.BaseException;
+import com.docus.server.record.RecordExceptionEnum;
+import com.docus.server.record.common.pojo.dto.IdType;
+import com.docus.server.record.common.pojo.dto.InpatientNo;
+import lombok.Getter;
+
+import java.util.Map;
+
+@Getter
+public class MedicalRecord {
+ /**
+ * 住院号
+ */
+ private InpatientNo inpatientNo;
+ /**
+ * 记账号/住院流水号
+ */
+ private String jzh;
+ /**
+ * 住院次数
+ */
+ private Integer admisstimes;
+ /**
+ * 采集来源系统
+ */
+ private String sysFlag;
+ /**
+ * 下载地址
+ */
+ private String downUrl;
+ /**
+ * 文件名
+ */
+ private String fileTitle;
+
+ /**
+ * 采集流水号/文件唯一id
+ */
+ private String serialnum;
+
+ /**
+ * 文件分类id
+ */
+ private String assortId;
+
+ /**
+ * 采集类型(文件来源 1:采集器;2:扫描生产软件)
+ */
+ private String fileSource;
+
+ /**
+ * 业务病案主键
+ */
+ private String patientId;
+
+ private String sourceInfo;
+
+
+ /**
+ * 1. 记账号,2. 住院号与次数
+ */
+ private IdType idType;
+
+
+ /**
+ * 拓展参数
+ */
+ private Map params;
+
+
+ public MedicalRecord(InpatientNo inpatientNo, String jzh, Integer admisstimes,
+ String sysFlag, String downUrl, String fileTitle, String serialnum,
+ String assortId, String fileSource,
+ String patientId, String sourceInfo, IdType idType, Map params) {
+ this.inpatientNo = inpatientNo;
+ this.jzh = jzh;
+ this.admisstimes = admisstimes;
+ this.sysFlag = sysFlag;
+ this.downUrl = downUrl;
+ this.fileTitle = fileTitle;
+ this.serialnum = serialnum;
+ this.assortId = assortId;
+ this.fileSource = fileSource;
+ this.patientId = patientId;
+ this.sourceInfo = sourceInfo;
+ this.idType = idType;
+ this.params = params;
+
+ //需要强校验每个字段是否符合规则,并且限制值范围。
+
+ vaid();
+
+ }
+
+
+ public void vaid() {
+ if (idType == IdType.JZH) {
+ //根据记账号查询,需要判断 是否存在。
+ if (Func.isEmpty(jzh)) {
+ throw new BaseException(RecordExceptionEnum.NOT_NULL, "jzh不能为空");
+ }
+ } else {
+ //根据住院号+住院次数
+ //根据记账号查询,需要判断 是否存在。
+ if (Func.isEmpty(admisstimes) && Func.isEmpty(inpatientNo)) {
+ throw new BaseException(RecordExceptionEnum.NOT_NULL, "jzh不能为空");
+ }
+
+ }
+
+
+ }
+
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecordEntity.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecordEntity.java
new file mode 100644
index 0000000..aba1631
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/MedicalRecordEntity.java
@@ -0,0 +1,64 @@
+package com.docus.server.record.common.pojo.entity;
+
+public class MedicalRecordEntity {
+
+
+ private Long id;
+
+ /**
+ * 住院号
+ */
+ private String inpatientNo;
+ /**
+ * 记账号/住院流水号
+ */
+ private String jzh;
+ /**
+ * 住院次数
+ */
+ private Integer admisstimes;
+ /**
+ * 采集来源系统
+ */
+ private String sysFlag;
+ /**
+ * 下载地址
+ */
+ private String downUrl;
+ /**
+ * 文件名
+ */
+ private String fileTitle;
+
+ /**
+ * 采集流水号/文件唯一id
+ */
+ private String serialnum;
+
+ /**
+ * 文件分类id
+ */
+ private String assortId;
+
+ /**
+ * 采集类型(文件来源 1:采集器;2:扫描生产软件)
+ */
+ private String fileSource;
+
+ /**
+ * 业务病案主键
+ */
+ private String patientId;
+
+
+ /**
+ * 1. 未完成,2. 已完成
+ */
+ private String state;
+
+ /**
+ * 任务id
+ */
+ private String taskId;
+
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasic.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasic.java
new file mode 100644
index 0000000..b3e86a7
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasic.java
@@ -0,0 +1,161 @@
+package com.docus.server.record.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;
+
+/**
+ *
+ * 病案基本信息
+ *
+ *
+ * @author jiashi
+ * @since 2021-04-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "TBasic对象", description = "病案基本信息")
+public class TBasic implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "病案主键")
+ private String patientId;
+
+ @ApiModelProperty(value = "住院次数")
+ private Integer admissTimes;
+
+ @ApiModelProperty(value = "病案号")
+ @TableField("inpatientNo")
+ private String inpatientNo;
+
+ @ApiModelProperty(value = "住院ID号")
+ private String admissId;
+
+ @ApiModelProperty(value = "患者姓名")
+ private String name;
+
+ @ApiModelProperty(value = "盘号")
+ private String ph;
+
+ @ApiModelProperty(value = "性别")
+ private String sex;
+
+ @ApiModelProperty(value = "年龄_岁")
+ private Integer age;
+
+ @ApiModelProperty(value = "年龄_月")
+ private Integer ageMonth;
+
+ @ApiModelProperty(value = "年龄_天")
+ private Integer ageDay;
+
+ @ApiModelProperty(value = "身份证")
+ private String idCard;
+
+ @ApiModelProperty(value = "手机号码")
+ private String telphone;
+
+ @ApiModelProperty(value = "住院日期")
+ private Date admissDate;
+
+ @ApiModelProperty(value = "住院科室")
+ private String admissDept;
+
+ @ApiModelProperty(value = "住院科室名称")
+ private String admissDeptName;
+
+ @ApiModelProperty(value = "出院日期")
+ private Date disDate;
+
+ @ApiModelProperty(value = "出院科室")
+ private String disDept;
+
+ @ApiModelProperty(value = "出院科室名称")
+ private String disDeptName;
+
+ @ApiModelProperty(value = "实际住院天数")
+ private Integer admissDays;
+
+ @ApiModelProperty(value = "主管医生")
+ private String attending;
+
+ @ApiModelProperty(value = "主管医生名称")
+ private String attendingName;
+
+ @ApiModelProperty(value = "主要诊断编码")
+ private String mainDiagCode;
+
+ @ApiModelProperty(value = "主要诊断名称")
+ private String mainDiagName;
+
+ @ApiModelProperty(value = "主要手术编码")
+ private String mainOperateCode;
+
+ @ApiModelProperty(value = "主要手术名称")
+ private String mainOperateName;
+
+ @ApiModelProperty(value = "是否死亡")
+ private Integer isDead;
+
+ @ApiModelProperty(value = "是否作废(0:否,1:是)")
+ private Integer isCancel;
+
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+
+ @ApiModelProperty(value = "是否归档 1:已归档,0:未归档")
+ private Integer isArchive;
+
+ @ApiModelProperty(value = "归档时间")
+ private Date archiveTime;
+
+ @ApiModelProperty(value = "文件来源 1:af_archive_detail,2:t_scan_assort")
+ private Integer fileSource;
+
+ @ApiModelProperty(value = "完整性描述")
+ private String integrityDesc;
+
+ private String bColumn1;
+
+ private String bColumn2;
+
+ private String bColumn3;
+
+ private String bColumn4;
+
+ private String bColumn5;
+
+ private Integer bColumn6;
+
+ private Integer bColumn7;
+
+ private Integer bColumn8;
+
+ private Integer bColumn9;
+
+ private Integer bColumn10;
+
+ @ApiModelProperty(value = "姓名缩写(内部构成)")
+ private String nameSpell;
+
+ @ApiModelProperty(value = "性别名称")
+ private String sexName;
+
+ @ApiModelProperty(value = "记账号")
+ private String jzh;
+
+ @ApiModelProperty(value = "床位号")
+ private String bedNum;
+
+ @ApiModelProperty(value = "责任护士")
+ private String dutyNurse;
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasicExtend.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasicExtend.java
new file mode 100644
index 0000000..d93ef50
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/common/pojo/entity/TBasicExtend.java
@@ -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;
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/Package.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/Package.java
new file mode 100644
index 0000000..65a1b37
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/Package.java
@@ -0,0 +1,5 @@
+package com.docus.server.record.controller;
+
+public class Package {
+
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/param/Package.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/param/Package.java
new file mode 100644
index 0000000..aceed35
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/param/Package.java
@@ -0,0 +1,4 @@
+package com.docus.server.record.controller.param;
+
+public class Package {
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/vo/Package.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/vo/Package.java
new file mode 100644
index 0000000..0b5b3fd
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/controller/vo/Package.java
@@ -0,0 +1,4 @@
+package com.docus.server.record.controller.vo;
+
+public class Package {
+}
diff --git a/common-docus/docus-medical-record/src/main/java/com/docus/server/record/mapper/TBasicMapper.java b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/mapper/TBasicMapper.java
new file mode 100644
index 0000000..a111bec
--- /dev/null
+++ b/common-docus/docus-medical-record/src/main/java/com/docus/server/record/mapper/TBasicMapper.java
@@ -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;
+
+/**
+ *
+ * 病案基本信息 Mapper 接口
+ *
+ *
+ * @author jiashi
+ * @since 2021-04-14
+ */
+@Mapper
+@DS(DSKeyConstants.RECORD_DS_KEY)
+public interface TBasicMapper extends BaseMapper {
+ /**
+ * 根据住院号和住院次数查询业务系统中病案主键
+ *
+ * @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 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 selectBasicListByCreateOrUpdateTime(@Param("startDate") String queryBasicStartDate,
+ @Param("endDate") String queryBasicEndDate,
+ @Param("offset") int offset,
+ @Param("size") int size);
+
+ List selectBasicListByPatientIds(@Param("patientIds") List patientIds);
+
+ List