|
|
|
@ -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;
|
|
|
|
@ -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) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -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);
|
|
|
|
|