Commit bbf88bca by ghxdhr

报告添加样品来源

parent 503c2040
...@@ -948,6 +948,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe ...@@ -948,6 +948,8 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
Map<String, String> mapReplace = new HashMap<>(); Map<String, String> mapReplace = new HashMap<>();
mapReplace.put("#{nowDate}", DateUtils.toYearMonthDay(new Date())); mapReplace.put("#{nowDate}", DateUtils.toYearMonthDay(new Date()));
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());
mapReplace.put("#{sampleFrom}",list.size() > 0 ? list.get(0).getSampleFrom() : " - " );
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