master
linjj 1 year ago
parent e0cccbe372
commit ca2f007277

@ -1,6 +1,7 @@
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.dao.TPrintinfoMapper;
import com.emr.entity.*;
@ -28,14 +29,15 @@ import java.util.List;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@ -44,6 +46,7 @@ import java.io.IOException;
import java.io.StringReader;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author zwh
@ -51,6 +54,7 @@ import java.util.*;
@Controller
@RequestMapping("font/")
public class FontController {
private final static Logger logger = LoggerFactory.getLogger(FontController.class);
@Value("${pdfWater}")
private String pdfWater;
// @Value("${RoomDetailsUrl}")
@ -808,8 +812,6 @@ public class FontController {
/**
* @description: /
* @params:
* @return:
* @author linjj
* @date: 2023/12/7 15:07
*/
@ -837,21 +839,151 @@ public class FontController {
return Msg.pushFail("失败");
}
//获取任务接口
@RequestMapping(value = "getTask")
@ResponseBody
public CommonResult GetTask(String collectid) {
return pushInfoService.GetTask(collectid);
}
//补偿接口
@RequestMapping(value = "repairTask")
@ResponseBody
public Msg repairTask(String masterId){
if (StringUtils.isBlank(masterId)){
public Msg repairTask(String masterId) {
if (StringUtils.isBlank(masterId)) {
return Msg.pushFail("masterId不能为空");
}
if (pushInfoService.repairTask(masterId)){
return Msg.fail("成功");
return pushInfoService.repairTask(masterId);
}
//补偿接口单个采集器
@RequestMapping(value = "repairTaskByCollectId")
@ResponseBody
public Msg repairTask(String masterId,String collectId) {
if (StringUtils.isBlank(masterId)) {
return Msg.pushFail("masterId不能为空");
}
return Msg.pushFail("失败");
if (StringUtils.isBlank(collectId)) {
return Msg.pushFail("collectId不能为空");
}
return pushInfoService.repairTaskByCollectId(masterId,collectId);
}
/**
* @description:
* @author linjj
* @date: 2024/3/1 10:14
*/
@PostMapping(value = "fileUpload")
@ResponseBody
public Msg fileUpload(@RequestPart("files") MultipartFile[] files, UploadBatchFileParam uploadBatchFileParam) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = dateFormat.format(new Date());
//成功流水号id
List<String> serialNumberIds = new ArrayList<>();
//失败流水号id
List<String> failIds = new ArrayList<>();
if (Objects.isNull(uploadBatchFileParam) || Objects.isNull(uploadBatchFileParam.getUploadFileParams())) {
logger.info(format + "文件上传参数为空!");
return Msg.pushFail("文件上传参数为空!");
}
List<FileUpload> fileUpload = JSONArray.parseArray(uploadBatchFileParam.getUploadFileParams(), FileUpload.class);
for (FileUpload dto : fileUpload) {
if (StringUtils.isBlank(dto.getMasterid())) {
logger.info(format + "病案主键不能为空!");
return Msg.pushFail("病案主键不能为空");
}
if (StringUtils.isBlank(dto.getAssortid())) {
logger.info(format + "文件分段id不能为空");
return Msg.pushFail("文件分段id不能为空");
}
if (StringUtils.isBlank(dto.getSource())) {
logger.info(format + "文件来源不能为空!");
return Msg.pushFail("文件来源不能为空");
}
if (StringUtils.isBlank(dto.getSubassort())) {
logger.info(format + "文件MD5码不能为空不能为空");
return Msg.pushFail("文件MD5码不能为空不能为空");
}
if (StringUtils.isBlank(dto.getTitle())) {
logger.info(format + "保存数据库文件名不能为空!");
return Msg.pushFail("保存数据库文件名不能为空");
}
if (StringUtils.isBlank(dto.getFileName())) {
logger.info(format + "真实文件名不能为空!");
return Msg.pushFail("真实文件名不能为空");
}
if (StringUtils.isBlank(dto.getSerialNumber())) {
logger.info(format + "真实文件名不能为空!");
return Msg.pushFail("真实文件名不能为空");
}
}
if (fileUpload.size() != files.length) {
logger.info(format + "文件上传参数为空!");
return Msg.pushFail("文件上传数量与参数不一致");
}
// 参数不含上传的,不匹配
List<String> originalFileNames = fileUpload.stream().map(item -> String.valueOf(item.getFileName())).collect(Collectors.toList());
for (MultipartFile file : files) {
if (!originalFileNames.contains(file.getOriginalFilename())) {
logger.info(format + "文件上传参数为空!");
return Msg.pushFail("原文件名不匹配!");
}
}
for (MultipartFile file : files) {
for (FileUpload uploadFileParam : fileUpload) {
if (uploadFileParam.getFileName().equals(file.getOriginalFilename())) {
if (pushInfoService.fileUpload(file, uploadFileParam)) {
serialNumberIds.add(uploadFileParam.getSerialNumber());
} else {
failIds.add(uploadFileParam.getSerialNumber());
}
}
}
}
logger.info(format +"本次传输成功"+serialNumberIds.size()+"份!失败:"+failIds.size()+"!失败流水号id为:"+failIds);
return Msg.pushSuccess("本次传输成功");
}
/**
* @description:
* @author linjj
* @date: 2024/3/8 11:08
*/
@PostMapping(value = "updateTask")
@ResponseBody
public Msg updateTask(updateTaskDto dto) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = dateFormat.format(new Date());
logger.info(format+"本次传输参数为:"+dto);
if (StringUtils.isBlank(dto.getMid())){
logger.info(format + "Mid不能为空");
logger.info(dto.getMid());
return Msg.pushFail("Mid名不能为空");
}
if (StringUtils.isBlank(dto.getSTime())){
logger.info(format + "开始时间不能为空!");
return Msg.pushFail("开始时间不能为空");
}
if (StringUtils.isBlank(dto.getETime())){
logger.info(format + "结束时间不能为空!");
return Msg.pushFail("结束时间不能为空");
}
if (StringUtils.isBlank(String.valueOf(dto.getStatusFlag()))){
logger.info(format + "任务状态不能为空!");
return Msg.pushFail("任务状态不能为空");
}
if (StringUtils.isBlank(dto.getSycObj())){
logger.info(format + "SycObj患者信息不能为空");
return Msg.pushFail("SycObj患者信息不能为空");
}
if (StringUtils.isBlank(String.valueOf(dto.getSysFlag()))){
logger.info(format + "任务分类不能为空!");
return Msg.pushFail("任务分类不能为空");
}
if (pushInfoService.updateArchiveOtherExt(dto)){
logger.info(dto.getMid()+"维护任务表成功");
return Msg.pushSuccess("维护任务表成功");
}
return Msg.pushFail("维护任务表失败");
}
}

@ -1,8 +1,6 @@
package com.emr.dao;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.entity.*;
import com.emr.vo.ArchiveOtherExtVo;
import org.apache.ibatis.annotations.Param;
@ -15,6 +13,8 @@ public interface ArchiveOtherExtMapper {
int insertSelective(ArchiveOtherExt record);
int addSelective(ArchiveOtherExtDto record);
ArchiveOtherExt selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(ArchiveOtherExt record);
@ -86,4 +86,8 @@ public interface ArchiveOtherExtMapper {
*/
List<ArchiveOtherExtVo> callBackStatisticsDetail(@Param("time") String time,@Param("startDateTo")String startDateTo,
@Param("endDateTo")String endDateTo);
List<ArchiveOtherExtVo> getOtherExtNumByMidAndSysFlag(@Param("mid")String mid,@Param("sysFlag")int sysFlag);
int updateByMid(updateTaskDto dto);
}

@ -62,4 +62,7 @@ public interface Archive_DetailMapper {
List<Archive_Detail> selectIsScanByDate(@Param("startDateTo") String startDateTo,@Param("endDateTo")String endDateTo);
List<Archive_Detail> selectRepeatRecordFileForMasterIds(@Param("masterIds")String masterIds);
List<Archive_Detail> getArchiveDetailBySerialNumber(String serialNumber);
}

@ -0,0 +1,85 @@
package com.emr.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName ArchiveOtherExtDto
* @Description
* @Author linjj
* @Date 2024/3/1 9:02
* @Version 1.0
*/
@Data
public class ArchiveOtherExtDto implements Serializable {
private Long id;
private String syctime;
private String sycobj;
private Long otherid;
private Integer sysflag;
private String sysupdatetime;
private String jzh;
private String zyh;
private Date stime;
private Date etime;
private Integer statusflag;
private String presult;
private String mid;
private String did;
private String c1;
private String c2;
private String c3;
private String c4;
private String c5;
private String c6;
private String c7;
private String c8;
private String c9;
private String c10;
private BigDecimal n1;
private BigDecimal n2;
private BigDecimal n3;
private Date t1;
private Date t2;
private Date t3;
private Date t4;
private Date t5;
private Date t6;
private static final long serialVersionUID = 1L;
}

@ -21,6 +21,16 @@ public class Archive_Detail {
private String sys;
private String serialNumber;
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public String getId() {
return id;
}

@ -0,0 +1,31 @@
package com.emr.entity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.web.multipart.MultipartFile;
/**
* @ClassName FileUploadVo
* @Description
* @Author linjj
* @Date 2024/3/1 11:07
* @Version 1.0
*/
@Data
public class FileUpload {
@NotBlank(message = "病案主键不能为空")
private String masterid;
@NotBlank(message = "分段id不能为空")
private String assortid;
@NotBlank(message = "文件来源不能为空")
private String source;
@NotBlank(message = "文件MD5码不能为空")
private String subassort;
@NotBlank(message = "保存数据库文件名不能为空")
private String title;
@NotBlank(message = "真实文件名不能为空")
private String fileName;
@NotBlank(message = "唯一流水号不能为空")
private String SerialNumber;
}

@ -0,0 +1,38 @@
package com.emr.entity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
/**
* @ClassName FileUpload
* @Description
* @Author linjj
* @Date 2024/3/1 10:15
* @Version 1.0
*/
@Data
public class FileUploadDto {
private String id;
private String pdfPath;
private String masterid;
private String uploaddatetime;
private String assortid;
private String source;
private String subassort;
private String title;
private String flag;
private String sys;
private String serialNumber;
}

@ -0,0 +1,13 @@
package com.emr.entity;
import lombok.Data;
/**
* @author wyb
*/
@Data
public class UploadBatchFileParam {
private String uploadFileParams;
}

@ -0,0 +1,31 @@
package com.emr.entity;
import lombok.Data;
/**
* @ClassName updateTaskDto
* @Description
* @Author linjj
* @Date 2024/3/8 11:10
* @Version 1.0
*/
@Data
public class updateTaskDto {
private String mid;
private String sycObj;
private String sTime;
private String eTime;
private int statusFlag;
private String pResult;
private int sysFlag;
}

@ -1,7 +1,11 @@
package com.emr.service;
import com.emr.entity.FileUpload;
import com.emr.entity.updateTaskDto;
import com.emr.util.CommonResult;
import com.emr.util.Msg;
import com.emr.vo.PushInfoVo;
import org.springframework.web.multipart.MultipartFile;
/**
* @InterfaceName pushInfoService
@ -19,5 +23,11 @@ public interface PushInfoService {
CommonResult GetTask(String collectid);
Boolean repairTask(String masterId);
Msg repairTask(String masterId);
Msg repairTaskByCollectId(String masterId,String collectId);
Boolean fileUpload(MultipartFile file, FileUpload dto);
Boolean updateArchiveOtherExt(updateTaskDto dto);
}

@ -2,24 +2,32 @@ package com.emr.service.ipml;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.PushInfoMapper;
import com.emr.entity.Archive_Master;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.*;
import com.emr.service.PushInfoService;
import com.emr.util.CommonResult;
import com.emr.util.Msg;
import com.emr.util.RedisMq;
import com.emr.vo.ArchiveOtherExtVo;
import com.emr.vo.PrintParam;
import com.emr.vo.PushInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* @ClassName pushInfoServiceImpl
@ -29,6 +37,7 @@ import java.util.List;
* @Version 1.0
*/
@Service
@Slf4j
public class PushInfoServiceImpl implements PushInfoService {
@Autowired
@ -36,13 +45,22 @@ public class PushInfoServiceImpl implements PushInfoService {
@Autowired
private PushInfoMapper pushInfoMapper;
@Autowired
private ArchiveOtherExtMapper archiveOtherExtMapper;
private String redisKey = "docus:task:topic_collect_%s_queue:%s";
@Autowired(required = false)
private RedisMq redisMq;
@Value("${doctorFlag}")
private String doctorFlag;
@Value("${pacsSavePath}")
private String pacsSavePath;
@Value("${detailPath}")
private String detailPath;
@Autowired
private Archive_DetailMapper archiveDetailMapper;
private final static Logger logger = LoggerFactory.getLogger(PushInfoServiceImpl.class);
@Value("${nurseFlag}")
private String nurseFlag;
@ -63,6 +81,7 @@ public class PushInfoServiceImpl implements PushInfoService {
printParam.setDeptName(list.get(0).getDeptName());
printParam.setDischargeDateTime(list.get(0).getDischargeDateTime());
printParam.setName(list.get(0).getName());
printParam.setAdmissionDateTime(list.get(0).getAdmissionDateTime());
//判断类型为电子病历或护理记录接1.电子病历2.护理记录
if (pushInfoVo.getDataType() == 1) {
int i = archiveMasterMapper.updateCmtDoctorByInpNoAndVisitId(pushInfoVo.getInpNo(), pushInfoVo.getVisitId(), pushInfoVo.getSubmitTime(), pushInfoVo.getSubmitCode());
@ -77,6 +96,25 @@ public class PushInfoServiceImpl implements PushInfoService {
//存放队列消息
GenerateQueue(printParam, 5, doctorId);
}
//pacs记录存到任务表中并且判断是否存在存在则不变动
List<ArchiveOtherExtVo> otherList = archiveOtherExtMapper.getOtherExtNumByMidAndSysFlag(list.get(0).getId(), 3);
//判断是否为空
if (CollectionUtils.isEmpty(otherList)) {
Date date = new Date();
ArchiveOtherExtDto archiveOtherExt = new ArchiveOtherExtDto();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSSS");
Long id = Long.valueOf(sdf.format(System.currentTimeMillis()));
SimpleDateFormat SycTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
archiveOtherExt.setId(id);
archiveOtherExt.setSyctime(SycTime.format(date));
archiveOtherExt.setSysflag(3);
archiveOtherExt.setSysupdatetime(SycTime.format(date));
archiveOtherExt.setJzh(list.get(0).getPatientId());
archiveOtherExt.setZyh(list.get(0).getInpNo());
archiveOtherExt.setStatusflag(0);
archiveOtherExt.setMid(list.get(0).getId());
archiveOtherExtMapper.addSelective(archiveOtherExt);
}
}
if (pushInfoVo.getDataType() == 2) {
int i = archiveMasterMapper.updateCmtNurseByInpNoAndVisitId(pushInfoVo.getInpNo(), pushInfoVo.getVisitId(), pushInfoVo.getSubmitTime(), pushInfoVo.getSubmitCode());
@ -92,6 +130,7 @@ public class PushInfoServiceImpl implements PushInfoService {
GenerateQueue(printParam, 5, nurseId);
}
}
logger.info(list.get(0).getId() + "电子病历、护理、pacs已加到队列中");
return exist;
}
@ -114,12 +153,16 @@ public class PushInfoServiceImpl implements PushInfoService {
}
@Override
public Boolean repairTask(String masterId) {
public Msg repairTask(String masterId) {
boolean exist = false;
//补偿所有采集器id集合
List<String> idList = Arrays.asList(collectIdList.split(","));
//获取患者基础信息
List<Archive_Master> list = archiveMasterMapper.getArchiveMasterByMasterId(masterId);
if(list.size()==0){
logger.info("没有当前病历:"+masterId);
return Msg.fail("没有当前病历");
}
PrintParam printParam = new PrintParam();
printParam.setMasterId(list.get(0).getId());
printParam.setInpNo(list.get(0).getInpNo());
@ -127,12 +170,133 @@ public class PushInfoServiceImpl implements PushInfoService {
printParam.setDeptName(list.get(0).getDeptName());
printParam.setDischargeDateTime(list.get(0).getDischargeDateTime());
printParam.setName(list.get(0).getName());
printParam.setAdmissionDateTime(list.get(0).getAdmissionDateTime());
//存放队列消息
for (String id : idList) {
GenerateQueue(printParam, 10, id);
exist = true;
}
return exist;
if (exist){
logger.info("补偿成功:"+masterId);
return Msg.pushSuccess("补偿成功:"+masterId);
}
logger.info("补偿失败:"+masterId);
return Msg.pushFail("补偿失败:"+masterId);
}
@Override
public Msg repairTaskByCollectId(String masterId, String collectId) {
//获取患者基础信息
List<Archive_Master> list = archiveMasterMapper.getArchiveMasterByMasterId(masterId);
if (list.size()==0){
logger.info("没有当前患者信息");
return Msg.pushFail("没有当前患者信息");
}
//如果是pacs任务需要查询是否有任务
if (collectId=="3"){
List<ArchiveOtherExtVo> otherList = archiveOtherExtMapper.getOtherExtNumByMidAndSysFlag(list.get(0).getId(), 3);
if (otherList.size()==0){
logger.info("pacs没有加到任务表中提交后在补偿");
return Msg.pushFail("pacs没有加到任务表中提交后在补偿");
}
}
PrintParam printParam = new PrintParam();
printParam.setMasterId(list.get(0).getId());
printParam.setInpNo(list.get(0).getInpNo());
printParam.setVisitId(list.get(0).getVisitId());
printParam.setDeptName(list.get(0).getDeptName());
printParam.setDischargeDateTime(list.get(0).getDischargeDateTime());
printParam.setName(list.get(0).getName());
printParam.setAdmissionDateTime(list.get(0).getAdmissionDateTime());
//存放队列消息
if (StringUtils.isNotBlank(collectId)) {
GenerateQueue(printParam, 10, collectId);
return Msg.pushSuccess("补偿成功");
}
return Msg.pushFail("补偿失败");
}
@Override
public Boolean fileUpload(MultipartFile file, FileUpload dto) {
//使用yyyyMMddHHmmssSSS格式作为文件名
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String newDate = format.format(date);
//文件更新时间
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//文件保存目录
String filePathdir = pacsSavePath + "\\" + dto.getMasterid();
File filePath = new File(filePathdir);
//判断文件夹是否存在不存在创建文件夹
if (!filePath.exists()) {
filePath.mkdirs();
}
String saveFilePath = filePathdir + "/" + newDate + ".pdf";
//文件地址
String saveDetailPath = detailPath + File.separatorChar + dto.getMasterid() + File.separatorChar + newDate + ".pdf";
try {
file.transferTo(new File(saveFilePath));
} catch (IOException e) {
logger.info("保存文件失败流水号:" + dto.getSerialNumber());
throw new RuntimeException(e);
}
//判断文件表是否存在流水号存则更新
List<Archive_Detail> archiveDetailList = archiveDetailMapper.getArchiveDetailBySerialNumber(dto.getSerialNumber());
if (archiveDetailList.size() != 0) {
for (Archive_Detail archiveDetail : archiveDetailList) {
int i = archiveDetailMapper.deleteByPrimaryKey(archiveDetail.getId());
if (i == 1) {
File file1 = new File(archiveDetail.getPdfPath());
try {
file1.delete(); // 删除照片
} catch (Exception e) {
e.printStackTrace();
}
}
}
//保存文件表
Archive_Detail archiveDetail = new Archive_Detail();
archiveDetail.setId(newDate);
archiveDetail.setPdfPath(saveDetailPath);
archiveDetail.setMasterid(dto.getMasterid());
archiveDetail.setUploaddatetime(dateFormat.format(new Date()));
archiveDetail.setAssortid(dto.getAssortid());
archiveDetail.setSource(dto.getSource());
archiveDetail.setSubassort(dto.getSubassort());
archiveDetail.setTitle(dto.getTitle());
archiveDetail.setSerialNumber(dto.getSerialNumber());
archiveDetail.setFlag("0");
if (archiveDetailMapper.insertSel(archiveDetail) == 1) {
return true;
}
} else {
//保存文件表
Archive_Detail archiveDetail = new Archive_Detail();
archiveDetail.setId(newDate);
archiveDetail.setPdfPath(saveDetailPath);
archiveDetail.setMasterid(dto.getMasterid());
archiveDetail.setUploaddatetime(dateFormat.format(new Date()));
archiveDetail.setAssortid(dto.getAssortid());
archiveDetail.setSource(dto.getSource());
archiveDetail.setSubassort(dto.getSubassort());
archiveDetail.setTitle(dto.getTitle());
archiveDetail.setSerialNumber(dto.getSerialNumber());
archiveDetail.setFlag("0");
if (archiveDetailMapper.insertSel(archiveDetail) == 1) {
return true;
}
}
return false;
}
@Override
public Boolean updateArchiveOtherExt(updateTaskDto dto) {
if (archiveOtherExtMapper.updateByMid(dto)==1){
return true;
}
return false;
}

@ -19,4 +19,6 @@ public class PrintParam {
private String deptName;
private String dischargeDateTime;
private String admissionDateTime;
}

@ -55,12 +55,16 @@ overDateSet = 2021-05-01
#\u5404\u5BA1\u6838\u89D2\u8272\u7528\u6237id 1\uFF1A\u533B\u751F\uFF1B2\uFF1A\u62A4\u58EB\uFF1B3\uFF1A\u75C5\u6848\u5BA4\u4EBA\u5458\uFF1B5\uFF1A\u533B\u751F\u8D28\u63A7\u5458\uFF1B6\uFF1A\u79D1\u4E3B\u4EFB\uFF1B7\uFF1A\u62A4\u58EB\u957F\uFF1B8\uFF1A\u62A4\u58EB\u8D28\u63A7\u5458
#电子病历采集器标识,2023-12-18医院护理记录接口没上先改为提交电子病历同时默认提交护理记录
doctorFlag= 2,15,8,1
doctorFlag= 2,15,8,1,3
#护理记录采集器标识
nurseFlag= 1
#补偿采集器标识
collectIdList= 1,2,15,8
collectIdList= 1,2,15,8,3
#定时需要补偿的采集器id
scheduledFlag=1,2,15,8
#定时补偿任务时间
quartzTime=0 38 14 ? * *
#pacs文件保存地址
pacsSavePath=D:\\pacs\\
#文件数据库保存地址以上一致,数据库保存\\地址无法打开
detailPath=D:\\pacs\

@ -16,6 +16,7 @@
<property name="filterChainDefinitions">
<value>
/toLogin=anon <!--表示都可以访问-->
/*/**=anon
/error=authc
/test=anon
/font/**=anon

@ -283,6 +283,211 @@
</if>
</trim>
</insert>
<insert id="addSelective" parameterType="com.emr.entity.ArchiveOtherExtDto">
insert into archive_other_ext
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="syctime != null" >
SycTime,
</if>
<if test="sycobj != null" >
SycObj,
</if>
<if test="otherid != null" >
otherID,
</if>
<if test="sysflag != null" >
sysFlag,
</if>
<if test="sysupdatetime != null" >
sysUpdateTime,
</if>
<if test="jzh != null" >
jzh,
</if>
<if test="zyh != null" >
zyh,
</if>
<if test="stime != null" >
stime,
</if>
<if test="etime != null" >
eTime,
</if>
<if test="statusflag != null" >
statusFlag,
</if>
<if test="presult != null" >
pResult,
</if>
<if test="mid != null" >
MID,
</if>
<if test="did != null" >
DID,
</if>
<if test="c1 != null" >
C1,
</if>
<if test="c2 != null" >
C2,
</if>
<if test="c3 != null" >
C3,
</if>
<if test="c4 != null" >
C4,
</if>
<if test="c5 != null" >
C5,
</if>
<if test="c6 != null" >
C6,
</if>
<if test="c7 != null" >
C7,
</if>
<if test="c8 != null" >
C8,
</if>
<if test="c9 != null" >
C9,
</if>
<if test="c10 != null" >
C10,
</if>
<if test="n1 != null" >
N1,
</if>
<if test="n2 != null" >
N2,
</if>
<if test="n3 != null" >
N3,
</if>
<if test="t1 != null" >
T1,
</if>
<if test="t2 != null" >
T2,
</if>
<if test="t3 != null" >
T3,
</if>
<if test="t4 != null" >
T4,
</if>
<if test="t5 != null" >
T5,
</if>
<if test="t6 != null" >
T6,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="syctime != null" >
#{syctime,jdbcType=TIMESTAMP},
</if>
<if test="sycobj != null" >
#{sycobj,jdbcType=NVARCHAR},
</if>
<if test="otherid != null" >
#{otherid,jdbcType=BIGINT},
</if>
<if test="sysflag != null" >
#{sysflag,jdbcType=INTEGER},
</if>
<if test="sysupdatetime != null" >
#{sysupdatetime,jdbcType=TIMESTAMP},
</if>
<if test="jzh != null" >
#{jzh,jdbcType=NVARCHAR},
</if>
<if test="zyh != null" >
#{zyh,jdbcType=NVARCHAR},
</if>
<if test="stime != null" >
#{stime,jdbcType=TIMESTAMP},
</if>
<if test="etime != null" >
#{etime,jdbcType=TIMESTAMP},
</if>
<if test="statusflag != null" >
#{statusflag,jdbcType=INTEGER},
</if>
<if test="presult != null" >
#{presult,jdbcType=NVARCHAR},
</if>
<if test="mid != null" >
#{mid,jdbcType=NVARCHAR},
</if>
<if test="did != null" >
#{did,jdbcType=NVARCHAR},
</if>
<if test="c1 != null" >
#{c1,jdbcType=NVARCHAR},
</if>
<if test="c2 != null" >
#{c2,jdbcType=NVARCHAR},
</if>
<if test="c3 != null" >
#{c3,jdbcType=NVARCHAR},
</if>
<if test="c4 != null" >
#{c4,jdbcType=NVARCHAR},
</if>
<if test="c5 != null" >
#{c5,jdbcType=NVARCHAR},
</if>
<if test="c6 != null" >
#{c6,jdbcType=NVARCHAR},
</if>
<if test="c7 != null" >
#{c7,jdbcType=NVARCHAR},
</if>
<if test="c8 != null" >
#{c8,jdbcType=NVARCHAR},
</if>
<if test="c9 != null" >
#{c9,jdbcType=NVARCHAR},
</if>
<if test="c10 != null" >
#{c10,jdbcType=NVARCHAR},
</if>
<if test="n1 != null" >
#{n1,jdbcType=DECIMAL},
</if>
<if test="n2 != null" >
#{n2,jdbcType=DECIMAL},
</if>
<if test="n3 != null" >
#{n3,jdbcType=DECIMAL},
</if>
<if test="t1 != null" >
#{t1,jdbcType=TIMESTAMP},
</if>
<if test="t2 != null" >
#{t2,jdbcType=TIMESTAMP},
</if>
<if test="t3 != null" >
#{t3,jdbcType=TIMESTAMP},
</if>
<if test="t4 != null" >
#{t4,jdbcType=TIMESTAMP},
</if>
<if test="t5 != null" >
#{t5,jdbcType=TIMESTAMP},
</if>
<if test="t6 != null" >
#{t6,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveOtherExt" >
update archive_other_ext
<set >
@ -684,6 +889,27 @@
</if>
</where>
</update>
<update id="updateByMid">
update archive_other_ext
<set >
<if test="sycObj != null" >
SycObj = #{sycObj},
</if>
<if test="sTime != null" >
stime = #{sTime},
</if>
<if test="eTime != null" >
eTime = #{eTime},
</if>
<if test="statusFlag != null" >
statusFlag = #{statusFlag},
</if>
<if test="pResult != null" >
pResult = #{pResult},
</if>
</set>
where MID = #{mid} and sysFlag=#{sysFlag}
</update>
<!--根据时间查询his召回详情-->
<select id="callBackStatisticsDetail" resultMap="BaseResultMap">
@ -858,8 +1084,11 @@
</where>
order by case when archive_other_ext.sysFlag=1 then 1 else 2 end,statusFlagSort
</select>
<select id="getOtherExtNumByMidAndSysFlag" resultType="com.emr.vo.ArchiveOtherExtVo">
select * from archive_other_ext where MID=#{mid} and sysFlag=#{sysFlag}
</select>
<!--出院日期范围的功能查询语句-->
<!--出院日期范围的功能查询语句-->
<sql id="disDateRangeWhereSql">
<choose>
<when test="startDateTo != null and startDateTo != '' and endDateTo != null and endDateTo != ''">
@ -874,4 +1103,8 @@
</when>
</choose>
</sql>
</mapper>

@ -274,9 +274,7 @@
<insert id="insertSel" parameterType="com.emr.entity.Archive_Detail">
insert into archive_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<!--<if test="id != null and id!=''">-->
id,
<!--</if>-->
<if test="pdfPath != null">
PDF_PATH,
</if>
@ -304,6 +302,9 @@
<if test="sys != null">
Sys,
</if>
<if test="serialNumber != null">
SerialNumber,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<!--<if test="id != null and id!=''">-->
@ -336,6 +337,9 @@
<if test="sys != null">
#{sys,jdbcType=NVARCHAR},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=NVARCHAR},
</if>
</trim>
</insert>
<update id="updateCloById" parameterType="com.emr.entity.Archive_Detail">
@ -548,4 +552,7 @@
group by MasterID,Title
having(COUNT(Title) > 1)
</select>
<select id="getArchiveDetailBySerialNumber" resultType="com.emr.entity.Archive_Detail">
select * from archive_detail where SerialNumber=#{serialNumber}
</select>
</mapper>
Loading…
Cancel
Save