报告到下载平台

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

@ -1,7 +1,7 @@
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;

@ -1,6 +1,6 @@
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 org.springframework.context.ApplicationEvent;

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

@ -30,7 +30,10 @@ public class DeptServerImpl implements IDeptServer {
* @see VisitorProcessor
*/
@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) {
log.info("新增/修改科室数据:{}", message);
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.server.archivefile.mapper.AfCollectTaskMapper;
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.AfReportRecord;
import com.docus.server.collect.infrastructure.pojo.dto.ReportDTO;
import com.docus.server.record.mapper.TBasicMapper;
import com.docus.server.ws.IReportService;
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;
try {
// 如果出现多条出错的情况,还是得保存收到的信息,人工干预处理
patientId = tBasicMapper.getPatientIdByInpatientNoAndAdminssTimes(reportDto.getInpatientNo(), reportDto.getAdmisstimes());
patientId = tBasicMapper.getPatientIdByInpatientNoAndAdminssTimes(reportDTO.getInpatientNo(), reportDTO.getAdmisstimes());
} catch (Exception 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) {
long id = idService.getDateSeq();
afReportRecord = new AfReportRecord(reportDto);
afReportRecord = new AfReportRecord(reportDTO);
afReportRecord.setTaskId(id);
afReportRecord.setPatientId(patientId);
afReportRecordMapper.saveRecord(afReportRecord);
} else {
// 更新 主要更新 url
afReportRecord.setDownUrl(reportDto.getDownUrl());
afReportRecord.setDownType(reportDto.getDowntype());
afReportRecord.setFileName(reportDto.getFileTitle());
afReportRecord.setDownUrl(reportDTO.getDownUrl());
afReportRecord.setDownType(reportDTO.getDowntype());
afReportRecord.setFileName(reportDTO.getFileTitle());
afReportRecord.setPatientId(patientId);
afReportRecordMapper.updateRecordByTaskId(afReportRecord);
}
@ -86,7 +86,7 @@ public class ReportServiceImpl implements IReportService {
// 根据记录中的任务id查询是否需要新增任务
if (Func.isBlank(patientId)) {
log.warn("病案号:{},住院次数:{} 未找到病案基础数据,暂不进行下载任务!", reportDto.getInpatientNo(), reportDto.getAdmisstimes());
log.warn("病案号:{},住院次数:{} 未找到病案基础数据,暂不进行下载任务!", reportDTO.getInpatientNo(), reportDTO.getAdmisstimes());
return;
}
// 判断是否需要保存任务
@ -94,11 +94,11 @@ public class ReportServiceImpl implements IReportService {
if (afCollectTask == null) {
afCollectTask = new AfCollectTask();
afCollectTask.setId(afReportRecord.getTaskId());
afCollectTask.setC1(reportDto.getSerialnum());
afCollectTask.setC2(reportDto.getFileTitle());
afCollectTask.setC3(reportDto.getJzh());
afCollectTask.setC1(reportDTO.getSerialnum());
afCollectTask.setC2(reportDTO.getFileTitle());
afCollectTask.setC3(reportDTO.getJzh());
afCollectTask.setPatientId(patientId);
afCollectTask.setSysflag(reportDto.getSysFlag());
afCollectTask.setSysflag(reportDTO.getSysFlag());
afCollectTask.setState("0");
afCollectTask.setPatientId(patientId);
collectTaskMapper.saveTask(afCollectTask);

@ -30,8 +30,10 @@ public class UserServerImpl implements IUserServer {
* @see VisitorProcessor
*/
@Override
@TrackGroup(group = "WEBSERVICE_XML_USER",
beanNames = {"powerUserConverter", "wsUserResultImpl"}, processor = VisitorProcessor.class)
@TrackGroup(
group = "WEBSERVICE_XML_USER", desc = "接收用户信息",
beanNames = {"powerUserConverter", "wsUserResultImpl"},
processor = VisitorProcessor.class)
public String userModify(String message) {
log.debug("新增/修改用户数据:{}", message);
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;

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

@ -1,5 +1,6 @@
package com.docus.server.archivefile.pojo.entity;
import com.docus.server.archivefile.pojo.dto.ReportDTO;
import lombok.Data;
import java.io.Serializable;
@ -87,15 +88,15 @@ public class AfReportRecord implements Serializable {
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();
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();
}
}
}

Loading…
Cancel
Save