报告到下载平台

segment2.0
beeajax 2 years ago
parent 0709e8c6f8
commit 2b28c9c41a

@ -1,7 +1,7 @@
package com.docus.server.ws; package com.docus.server.ws;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO; import com.docus.server.archivefile.pojo.dto.ReportDTO;
import java.util.List; import java.util.List;

@ -1,6 +1,6 @@
package com.docus.server.ws.event; package com.docus.server.ws.event;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO; import com.docus.server.archivefile.pojo.dto.ReportDTO;
import lombok.Getter; import lombok.Getter;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;

@ -27,11 +27,13 @@ public class BasicServiceImpl implements IBasicService {
private ITBasicService tBasicService; private ITBasicService tBasicService;
@Override @Override
@TrackGroup(group = "WEBSERVICE_XML_BASIC", @TrackGroup(
beanNames = {"tBasicConverter", "wsBasicResultImpl"}, processor = VisitorProcessor.class) group = "WEBSERVICE_XML_BASIC", desc = "新增基础数据",
beanNames = {"tBasicConverter", "wsBasicResultImpl"},
processor = VisitorProcessor.class)
public String setTBasic(String message) { public String setTBasic(String message) {
log.info("新增基础数据:{}", message); log.info("新增基础数据:{}", message);
tBasicService.insertTBasic(getTBasicDTO()); tBasicService.insertTBasic(getValue());
return null; return null;
} }
@ -43,14 +45,16 @@ public class BasicServiceImpl implements IBasicService {
* @see VisitorProcessor * @see VisitorProcessor
*/ */
@Override @Override
@TrackGroup(group = "WEBSERVICE_XML_BASIC", @TrackGroup(
beanNames = {"tBasicConverter", "wsBasicResultImpl"}, processor = VisitorProcessor.class) group = "WEBSERVICE_XML_BASIC", desc = "更新基础数据",
beanNames = {"tBasicConverter", "wsBasicResultImpl"},
processor = VisitorProcessor.class)
public String updateTBasic(String message) { public String updateTBasic(String message) {
tBasicService.updateTBasic(getTBasicDTO()); tBasicService.updateTBasic(getValue());
return null; return null;
} }
public TBasicDTO getTBasicDTO() { public TBasicDTO getValue() {
return JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), TBasicDTO.class); return JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), TBasicDTO.class);
} }
} }

@ -30,7 +30,10 @@ public class DeptServerImpl implements IDeptServer {
* @see VisitorProcessor * @see VisitorProcessor
*/ */
@Override @Override
@TrackGroup(group = "WEBSERVICE_XML_DEPT", beanNames = {"powerDeptConverter", "wsDeptResultImpl"}, processor = VisitorProcessor.class) @TrackGroup(
group = "WEBSERVICE_XML_DEPT", desc = "接收科室信息",
beanNames = {"powerDeptConverter", "wsDeptResultImpl"},
processor = VisitorProcessor.class)
public String deptModify(String message) { public String deptModify(String message) {
log.info("新增/修改科室数据:{}", message); log.info("新增/修改科室数据:{}", message);
collectService.insertOrUpdateDept(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), DeptDTO.class)); collectService.insertOrUpdateDept(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), DeptDTO.class));

@ -4,9 +4,9 @@ import com.docus.core.util.Func;
import com.docus.infrastructure.redis.service.IdService; import com.docus.infrastructure.redis.service.IdService;
import com.docus.server.archivefile.mapper.AfCollectTaskMapper; import com.docus.server.archivefile.mapper.AfCollectTaskMapper;
import com.docus.server.archivefile.mapper.AfReportRecordMapper; import com.docus.server.archivefile.mapper.AfReportRecordMapper;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import com.docus.server.archivefile.pojo.entity.AfCollectTask; import com.docus.server.archivefile.pojo.entity.AfCollectTask;
import com.docus.server.archivefile.pojo.entity.AfReportRecord; import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO;
import com.docus.server.record.mapper.TBasicMapper; import com.docus.server.record.mapper.TBasicMapper;
import com.docus.server.ws.IReportService; import com.docus.server.ws.IReportService;
import com.docus.server.ws.event.TaskConsumptionReportDownEvent; import com.docus.server.ws.event.TaskConsumptionReportDownEvent;
@ -58,27 +58,27 @@ public class ReportServiceImpl implements IReportService {
} }
} }
private void threePartyPushReports(ReportDTO reportDto) { private void threePartyPushReports(ReportDTO reportDTO) {
String patientId = null; String patientId = null;
try { try {
// 如果出现多条出错的情况,还是得保存收到的信息,人工干预处理 // 如果出现多条出错的情况,还是得保存收到的信息,人工干预处理
patientId = tBasicMapper.getPatientIdByInpatientNoAndAdminssTimes(reportDto.getInpatientNo(), reportDto.getAdmisstimes()); patientId = tBasicMapper.getPatientIdByInpatientNoAndAdminssTimes(reportDTO.getInpatientNo(), reportDTO.getAdmisstimes());
} catch (Exception ex) { } catch (Exception ex) {
log.error("查询病案主键出错了", ex); log.error("查询病案主键出错了", ex);
} }
// 不验证数据,始终保存收到的信息 // 不验证数据,始终保存收到的信息
AfReportRecord afReportRecord = afReportRecordMapper.getRecordBySerialnumAndInpatientNoAndSysFlag(reportDto.getSerialnum(), reportDto.getInpatientNo(), reportDto.getAdmisstimes(), reportDto.getSysFlag()); AfReportRecord afReportRecord = afReportRecordMapper.getRecordBySerialnumAndInpatientNoAndSysFlag(reportDTO.getSerialnum(), reportDTO.getInpatientNo(), reportDTO.getAdmisstimes(), reportDTO.getSysFlag());
if (afReportRecord == null) { if (afReportRecord == null) {
long id = idService.getDateSeq(); long id = idService.getDateSeq();
afReportRecord = new AfReportRecord(reportDto); afReportRecord = new AfReportRecord(reportDTO);
afReportRecord.setTaskId(id); afReportRecord.setTaskId(id);
afReportRecord.setPatientId(patientId); afReportRecord.setPatientId(patientId);
afReportRecordMapper.saveRecord(afReportRecord); afReportRecordMapper.saveRecord(afReportRecord);
} else { } else {
// 更新 主要更新 url // 更新 主要更新 url
afReportRecord.setDownUrl(reportDto.getDownUrl()); afReportRecord.setDownUrl(reportDTO.getDownUrl());
afReportRecord.setDownType(reportDto.getDowntype()); afReportRecord.setDownType(reportDTO.getDowntype());
afReportRecord.setFileName(reportDto.getFileTitle()); afReportRecord.setFileName(reportDTO.getFileTitle());
afReportRecord.setPatientId(patientId); afReportRecord.setPatientId(patientId);
afReportRecordMapper.updateRecordByTaskId(afReportRecord); afReportRecordMapper.updateRecordByTaskId(afReportRecord);
} }
@ -86,7 +86,7 @@ public class ReportServiceImpl implements IReportService {
// 根据记录中的任务id查询是否需要新增任务 // 根据记录中的任务id查询是否需要新增任务
if (Func.isBlank(patientId)) { if (Func.isBlank(patientId)) {
log.warn("病案号:{},住院次数:{} 未找到病案基础数据,暂不进行下载任务!", reportDto.getInpatientNo(), reportDto.getAdmisstimes()); log.warn("病案号:{},住院次数:{} 未找到病案基础数据,暂不进行下载任务!", reportDTO.getInpatientNo(), reportDTO.getAdmisstimes());
return; return;
} }
// 判断是否需要保存任务 // 判断是否需要保存任务
@ -94,11 +94,11 @@ public class ReportServiceImpl implements IReportService {
if (afCollectTask == null) { if (afCollectTask == null) {
afCollectTask = new AfCollectTask(); afCollectTask = new AfCollectTask();
afCollectTask.setId(afReportRecord.getTaskId()); afCollectTask.setId(afReportRecord.getTaskId());
afCollectTask.setC1(reportDto.getSerialnum()); afCollectTask.setC1(reportDTO.getSerialnum());
afCollectTask.setC2(reportDto.getFileTitle()); afCollectTask.setC2(reportDTO.getFileTitle());
afCollectTask.setC3(reportDto.getJzh()); afCollectTask.setC3(reportDTO.getJzh());
afCollectTask.setPatientId(patientId); afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDto.getSysFlag()); afCollectTask.setSysflag(reportDTO.getSysFlag());
afCollectTask.setState("0"); afCollectTask.setState("0");
afCollectTask.setPatientId(patientId); afCollectTask.setPatientId(patientId);
collectTaskMapper.saveTask(afCollectTask); collectTaskMapper.saveTask(afCollectTask);

@ -30,8 +30,10 @@ public class UserServerImpl implements IUserServer {
* @see VisitorProcessor * @see VisitorProcessor
*/ */
@Override @Override
@TrackGroup(group = "WEBSERVICE_XML_USER", @TrackGroup(
beanNames = {"powerUserConverter", "wsUserResultImpl"}, processor = VisitorProcessor.class) group = "WEBSERVICE_XML_USER", desc = "接收用户信息",
beanNames = {"powerUserConverter", "wsUserResultImpl"},
processor = VisitorProcessor.class)
public String userModify(String message) { public String userModify(String message) {
log.debug("新增/修改用户数据:{}", message); log.debug("新增/修改用户数据:{}", message);
collectService.insertOrUpdateUser(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), UserDTO.class)); collectService.insertOrUpdateUser(JSON.fromJSON((String) TrackHelper.getValue("jsonStr"), UserDTO.class));

@ -1,4 +1,4 @@
package com.docus.server.collect.infrastructure.pojo.dto; package com.docus.server.archivefile.pojo.dto;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package com.docus.server.collect.infrastructure.pojo.dto; package com.docus.server.archivefile.pojo.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -27,4 +27,4 @@ public class ReportDownDTO {
private String scanusercode; private String scanusercode;
@ApiModelProperty(value = "扫描用户名称") @ApiModelProperty(value = "扫描用户名称")
private String scanusername; private String scanusername;
} }

@ -1,4 +1,4 @@
package com.docus.server.collect.infrastructure.pojo.dto; package com.docus.server.archivefile.pojo.dto;
import com.docus.server.archivefile.pojo.entity.AfReportRecord; import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -1,4 +1,4 @@
package com.docus.server.collect.infrastructure.pojo.dto; package com.docus.server.archivefile.pojo.dto;
import com.docus.server.archivefile.pojo.entity.AfReportRecord; import com.docus.server.archivefile.pojo.entity.AfReportRecord;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -1,5 +1,6 @@
package com.docus.server.archivefile.pojo.entity; package com.docus.server.archivefile.pojo.entity;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -87,15 +88,15 @@ public class AfReportRecord implements Serializable {
public AfReportRecord() { public AfReportRecord() {
} }
public AfReportRecord(ReportDto reportDto) { public AfReportRecord(ReportDTO reportDTO) {
this.jzh = reportDto.getJzh(); this.jzh = reportDTO.getJzh();
this.admissTimes = reportDto.getAdmisstimes(); this.admissTimes = reportDTO.getAdmisstimes();
this.inpatientNo = reportDto.getInpatientNo(); this.inpatientNo = reportDTO.getInpatientNo();
this.downUrl = reportDto.getDownUrl(); this.downUrl = reportDTO.getDownUrl();
this.sysflag = reportDto.getSysFlag(); this.sysflag = reportDTO.getSysFlag();
this.zdAssortId = reportDto.getAssortId(); this.zdAssortId = reportDTO.getAssortId();
this.serialnum = reportDto.getSerialnum(); this.serialnum = reportDTO.getSerialnum();
this.fileName = reportDto.getFileTitle(); this.fileName = reportDTO.getFileTitle();
this.downType = reportDto.getDowntype(); this.downType = reportDTO.getDowntype();
} }
} }

Loading…
Cancel
Save