Merge remote-tracking branch 'origin/master'

master
陈江保 7 days ago
commit 87e6b788af
  1. 9
      dlp-drugtesting-biz/src/main/java/digital/laboratory/platform/inspection/service/impl/InspectRecordServiceImpl.java

@ -117,9 +117,11 @@ public class InspectRecordServiceImpl implements InspectRecordService {
data.put("instrumentName", CollectionUtils.isEmpty(instruments) data.put("instrumentName", CollectionUtils.isEmpty(instruments)
? "未找到仪器设备数据!" ? "未找到仪器设备数据!"
: instruments.stream().map(TestRecordInstrument::getInstrumentName) : instruments.stream()
.map(i -> "\u3000\u3000" + i.getInstrumentName()) // 使用 Unicode 全角空格
.collect(Collectors.joining("\n"))); .collect(Collectors.joining("\n")));
// 获取样品数据 // 获取样品数据
List<TestRecordSampleData> dataList = testRecordSampleDataService.list( List<TestRecordSampleData> dataList = testRecordSampleDataService.list(
Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testRecord.getId())); Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testRecord.getId()));
@ -199,6 +201,10 @@ public class InspectRecordServiceImpl implements InspectRecordService {
TestRecordSampleData item = analyte.get(i); TestRecordSampleData item = analyte.get(i);
TestRecordSampleDataVO vo = new TestRecordSampleDataVO(); TestRecordSampleDataVO vo = new TestRecordSampleDataVO();
BeanUtils.copyProperties(item, vo); BeanUtils.copyProperties(item, vo);
vo.setPTargetRtTime(vo.getTargetRtTime().toString());
vo.setPRtTimeError(vo.getRtTimeError().toString());
vo.setPRtTimeWithinError(vo.getRtTimeWithinError().toString());
vo.setPIsDetected(item.getIsDetected() == 1 ? "是" : "否");
List<TestRecordSampleDataExpand> expandList = dataExpandMap.get(item.getId()); List<TestRecordSampleDataExpand> expandList = dataExpandMap.get(item.getId());
if (expandList != null) { if (expandList != null) {
@ -248,6 +254,7 @@ public class InspectRecordServiceImpl implements InspectRecordService {
} else { } else {
templatePath = "/template" + "/贵阳生物样本尿液检验记录模板.docx"; templatePath = "/template" + "/贵阳生物样本尿液检验记录模板.docx";
} }
System.out.println(data);
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy(); LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
Configure config = Configure.builder(). Configure config = Configure.builder().
bind("dataDtos", policy).build(); bind("dataDtos", policy).build();

Loading…
Cancel
Save