소스 검색

履职pdf代码提交

jingyuanchao 1 년 전
부모
커밋
5322d1be5c
1개의 변경된 파일11개의 추가작업 그리고 11개의 파일을 삭제
  1. 11 11
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

+ 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);