Commit da3c172a authored by 竹天卫's avatar 竹天卫

校核详情导出优化

parent 582a44ee
......@@ -5797,17 +5797,23 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
for (int i = infoHeader.size(); i < teamList.size() + infoHeader.size(); i++) {
XSSFCell tempCell = row0.createCell(i);
Team team = teamList.get(i - infoHeader.size());
List<SampleDistribution> sdList = groupByTeamId.get(team.getId());
List<SampleDistribution> sdList2 = new ArrayList<>();
String lastResult = "";
if (sdList != null && sdList.size() > 0) {
if (sdList.get(0).getCheckId() != null) {
SampleDistributionCheck disCheck = sampleDistributionCheckMapper.selectById(sdList.get(0).getCheckId());
sdList2 = sdList.stream().filter(arg -> (arg.getSampleId().equals(sample.getId()))).collect(Collectors.toList());
if(sdList2 != null && sdList2.size()>0){
if (sdList2.get(0).getCheckId() != null) {
SampleDistributionCheck disCheck = sampleDistributionCheckMapper.selectById(sdList2.get(0).getCheckId());
lastResult = disCheck.getLastResult();
} else {
lastResult = sdList.get(0).getDistributionResult();
lastResult = sdList2.get(0).getDistributionResult();
}
}
}
tempCell.setCellValue(sdList == null ? "" : lastResult);
tempCell.setCellValue(sdList2 == null ? "" : lastResult);
tempCell.setCellStyle(style);
}
......
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