Commit 5a838ef9 by ghxdhr

报告中显示样品名称

parent 8784e976
...@@ -959,6 +959,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe ...@@ -959,6 +959,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
mapReplace.put("#{sampleNum}", countByEntrustId(entrust.getId()) + ""); mapReplace.put("#{sampleNum}", countByEntrustId(entrust.getId()) + "");
List<EntrustSample> list = sampleList.stream().filter(s -> StringUtils.isNotEmpty(s.getSampleFrom())).collect(Collectors.toList()); List<EntrustSample> list = sampleList.stream().filter(s -> StringUtils.isNotEmpty(s.getSampleFrom())).collect(Collectors.toList());
mapReplace.put("#{sampleFrom}", list.size() > 0 ? list.get(0).getSampleFrom() : " - "); mapReplace.put("#{sampleFrom}", list.size() > 0 ? list.get(0).getSampleFrom() : " - ");
list = sampleList.stream().filter(s -> StringUtils.isNotEmpty(s.getName())).collect(Collectors.toList());
mapReplace.put("#{sampleName}", list.size() > 0 ? list.get(0).getName() : " - ");
HSSFWorkbookUtil.replaceModel(mapReplace, xssfWorkbook, 0); HSSFWorkbookUtil.replaceModel(mapReplace, xssfWorkbook, 0);
XSSFSheet sheetOne = xssfWorkbook.getSheetAt(0); XSSFSheet sheetOne = xssfWorkbook.getSheetAt(0);
String sheetName = sheetOne.getSheetName(); String sheetName = sheetOne.getSheetName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment