上报库导出明细,带历史Log-处理空指针。

This commit is contained in:
wangzhijiang
2022-12-12 20:58:52 +08:00
parent d80860f28e
commit ebce07b8a4
@@ -675,7 +675,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
} }
// 导出参数明细历史 // 导出参数明细历史
if(CollectionUtils.isNotEmpty(allParamsInfoList)){
this.exportParamsReportDetailLog(paramsReportDetailVO.getCut(), workbook, sheetHistoryName, allParamsInfoList,cellStyle1,cellStyle); this.exportParamsReportDetailLog(paramsReportDetailVO.getCut(), workbook, sheetHistoryName, allParamsInfoList,cellStyle1,cellStyle);
}
//下载关联文件内容 //下载关联文件内容
if (allRelevFileList != null && !allRelevFileList.isEmpty()) { if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList()); allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
@@ -770,8 +772,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
sheetHistory.setColumnWidth(i, 20 * 256); sheetHistory.setColumnWidth(i, 20 * 256);
} }
} }
if (CollectionUtils.isNotEmpty(allParamsInfoList)) {
// 查询历史log信息 // 查询历史log信息
List<String> detailIdList = allParamsInfoList.stream().map(e -> e.get("id").toString()).distinct().collect(Collectors.toList()); List<String> detailIdList = allParamsInfoList.stream().map(e -> e.get("id").toString()).distinct().collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(detailIdList)){
QueryWrapper<ParamsReportDetailLogEO> detailLogQueryWrap = new QueryWrapper<>(); QueryWrapper<ParamsReportDetailLogEO> detailLogQueryWrap = new QueryWrapper<>();
detailLogQueryWrap.lambda().in(ParamsReportDetailLogEO::getParamsReportDetailId,detailIdList); detailLogQueryWrap.lambda().in(ParamsReportDetailLogEO::getParamsReportDetailId,detailIdList);
detailLogQueryWrap.orderByDesc("params_report_detail_id"); detailLogQueryWrap.orderByDesc("params_report_detail_id");
@@ -808,6 +814,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
} }
} }
} }
}
}
@Override @Override
public List<Map<String, String>> getConfigLabelList(ParamsReportDetailVO paramsReportDetailVO) { public List<Map<String, String>> getConfigLabelList(ParamsReportDetailVO paramsReportDetailVO) {