检查报告,上报合并文件标题

广东省中医_gdszy
wyb 2 years ago
parent 119e2bbfdd
commit 10a4f72937

@ -84,6 +84,11 @@ public class ReportDto {
*/
private String reportSn;
/**
*
*/
private boolean mergeFileTitle;
public ReportDto() {

@ -658,6 +658,7 @@ public class ReportJob {
reportDto.setSysFlag(updateBy);
reportDto.setFileSource("1");
reportDto.setFilestoragetype("1");
reportDto.setMergeFileTitle(true);
reportDtoList.add(reportDto);
}
}

@ -17,8 +17,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
@ -78,7 +77,7 @@ public class ReportServiceImpl implements ReportService {
}
String bufferDownUrl = bufferInfo.getDownUrl();
String serialnum = bufferInfo.getSerialnum();
// 设置地址或者文件信息
// 设置地址或者文件信息
if (isSaveOrUpdateDownloadUrl) {
bufferInfo.setFileUrl(reportDto);
} else {
@ -90,6 +89,7 @@ public class ReportServiceImpl implements ReportService {
if (canReport) {
afReportRecordMapper.cancelBlocking(bufferInfo.getId());
ReportDto dto = new ReportDto(bufferInfo);
dto.setMergeFileTitle(true);
report(dto);
}
} finally {
@ -106,6 +106,17 @@ public class ReportServiceImpl implements ReportService {
}
}
public static void main(String[] args) {
String fileTitleSeparator = "|";
String fileTitle = "a1";
String lastFileName = "a0|a2";
String[] fileTitles = lastFileName.split("\\|");
HashSet<String> fileTitleSet = new LinkedHashSet<>();
Collections.addAll(fileTitleSet, fileTitles);
fileTitleSet.add(fileTitle);
System.out.println(String.join("|", fileTitleSet));
}
private void threePartyPushReports(ReportDto reportDto) {
@ -114,7 +125,7 @@ public class ReportServiceImpl implements ReportService {
// 如果出现多条出错的情况,还是得保存收到的信息,人工干预处理
patientId = tBasicMapper.getPatientIdByInpatientNoAndAdminssTimes(reportDto.getInpatientNo(), reportDto.getAdmisstimes());
} catch (Exception ex) {
log.error("查询病案主键出错了,病案号:"+reportDto.getInpatientNo()+" ,住院次数:"+reportDto.getAdmisstimes(), ex);
log.error("查询病案主键出错了,病案号:" + reportDto.getInpatientNo() + " ,住院次数:" + reportDto.getAdmisstimes(), ex);
}
// 不验证数据,始终保存收到的信息
AfReportRecord afReportRecord = afReportRecordMapper.getRecordBySerialnumAndInpatientNoAndSysFlag(reportDto.getSerialnum(), reportDto.getInpatientNo(), reportDto.getAdmisstimes(), reportDto.getSysFlag());
@ -125,10 +136,21 @@ public class ReportServiceImpl implements ReportService {
afReportRecord.setPatientId(patientId);
afReportRecordMapper.saveRecord(afReportRecord);
} else {
// 如果要合并文件标题
String fileTitle = reportDto.getFileTitle();
if (reportDto.isMergeFileTitle()) {
String lastFileName = afReportRecord.getFileName();
String[] fileTitles = lastFileName.split("\\|");
HashSet<String> fileTitleSet = new LinkedHashSet<>();
Collections.addAll(fileTitleSet, fileTitles);
fileTitleSet.add(fileTitle);
fileTitle = String.join("|", fileTitleSet);
}
// 更新 主要更新 url
afReportRecord.setDownUrl(reportDto.getDownUrl());
afReportRecord.setDownType(reportDto.getDowntype());
afReportRecord.setFileName(reportDto.getFileTitle());
afReportRecord.setFileName(fileTitle);
afReportRecord.setPatientId(patientId);
afReportRecord.setZdAssortId(reportDto.getAssortId());
afReportRecordMapper.updateRecordByTaskId(afReportRecord);

@ -141,6 +141,7 @@ public class HIP1008InspectionReportAdditionHandler implements WebserviceReceive
reportDto.setSysFlag(updateBy);
reportDto.setFileSource("1");
reportDto.setFilestoragetype("1");
reportDto.setMergeFileTitle(true);
return reportDto;
}
@ -194,6 +195,7 @@ public class HIP1008InspectionReportAdditionHandler implements WebserviceReceive
reportDto.setSysFlag(sender);
reportDto.setFileSource("1");
reportDto.setFilestoragetype("1");
reportDto.setMergeFileTitle(true);
return reportDto;
}

@ -141,6 +141,7 @@ public class HIP1009InspectionReportUpdatesHandler implements WebserviceReceiveS
reportDto.setSysFlag(updateBy);
reportDto.setFileSource("1");
reportDto.setFilestoragetype("1");
reportDto.setMergeFileTitle(true);
return reportDto;
}
@ -196,6 +197,7 @@ public class HIP1009InspectionReportUpdatesHandler implements WebserviceReceiveS
reportDto.setSysFlag(sender);
reportDto.setFileSource("1");
reportDto.setFilestoragetype("1");
reportDto.setMergeFileTitle(true);
return reportDto;
}

Loading…
Cancel
Save