Forráskód Böngészése

履职pdf代码提交

jingyuanchao 1 éve
szülő
commit
5322d1be5c

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

@@ -230,18 +230,18 @@ public class PdfUtil {
             }
         }
 
-        //日常登记簿-布撤防数据
-        PdfUtil.createPDFCell(tableFont, table, "布撤防情况", Element.ALIGN_MIDDLE, 10, 1);
-
-        PdfUtil.createPDFCell(tableFont, table, "控制器", Element.ALIGN_MIDDLE, 4, 1);
-        PdfUtil.createPDFCell(tableFont, table, "状态", Element.ALIGN_MIDDLE, 3, 1);
-        PdfUtil.createPDFCell(tableFont, table, "时间", Element.ALIGN_MIDDLE, 3, 1);
         List<Map<String, List<Map<String, Object>>>> protectionList = (List<Map<String, List<Map<String, Object>>>>) data.get("protection");
-        if (ObjectUtil.isEmpty(protectionList)) {
-            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 4, 1);
-            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 3, 1);
-            PdfUtil.createPDFCell(tableFont, table, "/", Element.ALIGN_MIDDLE, 3, 1);
-        } else {
+
+        if (ObjectUtil.isNotEmpty(protectionList)) {
+
+            //日常登记簿-布撤防数据
+            PdfUtil.createPDFCell(tableFont, table, "布撤防情况", Element.ALIGN_MIDDLE, 10, 1);
+
+            PdfUtil.createPDFCell(tableFont, table, "控制器", Element.ALIGN_MIDDLE, 4, 1);
+            PdfUtil.createPDFCell(tableFont, table, "状态", Element.ALIGN_MIDDLE, 3, 1);
+            PdfUtil.createPDFCell(tableFont, table, "时间", Element.ALIGN_MIDDLE, 3, 1);
+
+
             for (Map<String, List<Map<String, Object>>> listMap : protectionList) {
                 for (Map.Entry<String, List<Map<String, Object>>> listEntry : listMap.entrySet()) {
                     IotAlarmSubsystem subsystem = JSON.parseObject(listEntry.getKey(), IotAlarmSubsystem.class);