空指针

This commit is contained in:
高嵩
2022-10-27 14:23:10 +08:00
parent bf2b51820d
commit 0b13133720
@@ -314,6 +314,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
row.createCell(1).setCellValue(itemLeft.getItemsNum()); row.createCell(1).setCellValue(itemLeft.getItemsNum());
row.createCell(2).setCellValue(itemLeft.getItemsName()); row.createCell(2).setCellValue(itemLeft.getItemsName());
String text = itemLeft.getItemsText(); String text = itemLeft.getItemsText();
if (StringUtils.isNotEmpty(text)){
log.info("-------------- 开始开始拆分左侧图片、文字、表格 :" + text + "-----------------"); log.info("-------------- 开始开始拆分左侧图片、文字、表格 :" + text + "-----------------");
String rowDataAndPath = getSplitContent(request, text); String rowDataAndPath = getSplitContent(request, text);
log.info("-------------- 左侧图片、文字、表格 拆分成功 :"+ rowDataAndPath +"-----------------"); log.info("-------------- 左侧图片、文字、表格 拆分成功 :"+ rowDataAndPath +"-----------------");
@@ -347,6 +348,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} }
} }
} }
}
String itemIdRight = itemComment.getItemsIdRight(); String itemIdRight = itemComment.getItemsIdRight();
if (!StringUtils.isEmpty(itemIdRight)) { if (!StringUtils.isEmpty(itemIdRight)) {
SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight); SarFileCompareItem itemRight = sfcItemMap.get(itemIdRight);
@@ -354,6 +356,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
row.createCell(5).setCellValue(itemRight.getItemsNum()); row.createCell(5).setCellValue(itemRight.getItemsNum());
row.createCell(6).setCellValue(itemRight.getItemsName()); row.createCell(6).setCellValue(itemRight.getItemsName());
String text = itemRight.getItemsText(); String text = itemRight.getItemsText();
if (StringUtils.isNotEmpty(text)) {
log.info("-------------- 开始开始拆分右侧图片、文字、表格 :"+ text +" -----------------"); log.info("-------------- 开始开始拆分右侧图片、文字、表格 :"+ text +" -----------------");
String rowDataAndPath = getSplitContent(request, text); String rowDataAndPath = getSplitContent(request, text);
log.info("-------------- 右侧图片、文字、表格 拆分成功 :"+ rowDataAndPath +" -----------------"); log.info("-------------- 右侧图片、文字、表格 拆分成功 :"+ rowDataAndPath +" -----------------");
@@ -385,6 +388,7 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
} }
} }
} }
}
row.createCell(8).setCellValue(itemComment.getComment()); row.createCell(8).setCellValue(itemComment.getComment());
row.setRowStyle(cellStyle); row.setRowStyle(cellStyle);
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {