Browse Source

监控调阅 全异常情况下登记簿样式问题处理

jingyuanchao 1 year ago
parent
commit
c0f7835ab5

+ 7 - 3
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -637,15 +637,19 @@ public class PdfUtil {
         PdfUtil.createPDFCell(tableFont, table, "检查工作情况", Element.ALIGN_MIDDLE, 14, 1);
 
         List<CheckDataVo> normalDataList = data.getCheckDatas().stream().filter(d -> ObjectUtil.equal(Boolean.TRUE, d.getCheckStatus())).collect(Collectors.toList());
+        PdfUtil.createPDFCell(tableFont, table, "序号", Element.ALIGN_MIDDLE, 2, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查内容", Element.ALIGN_MIDDLE, 10, 1);
+        PdfUtil.createPDFCell(tableFont, table, "检查情况", Element.ALIGN_MIDDLE, 2, 1);
         if (normalDataList.size() > 0) {
-            PdfUtil.createPDFCell(tableFont, table, "序号", Element.ALIGN_MIDDLE, 2, 1);
-            PdfUtil.createPDFCell(tableFont, table, "检查内容", Element.ALIGN_MIDDLE, 10, 1);
-            PdfUtil.createPDFCell(tableFont, table, "检查情况", Element.ALIGN_MIDDLE, 2, 1);
             for (CheckDataVo checkDataVo : normalDataList) {
                 PdfUtil.createPDFCell(tableFont, table, String.valueOf(normalDataList.indexOf(checkDataVo) + 1), Element.ALIGN_MIDDLE, 2, 1);
                 PdfUtil.createPDFCell(tableFont, table, checkDataVo.getPointName(), Element.ALIGN_MIDDLE, 10, 1);
                 PdfUtil.createPDFCell(tableFont, table, "正常", Element.ALIGN_MIDDLE, 2, 1);
             }
+        }else {
+            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 2, 1);
+            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 10, 1);
+            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 2, 1);
         }