From 98580a5427ded3048c1ce187e00b969889087c24 Mon Sep 17 00:00:00 2001 From: liwen Date: Wed, 17 Apr 2024 17:17:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A3=80=E4=BF=AE=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=B7=BB=E5=8A=A0=E7=A9=BA=E5=80=BC=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../access/service/impl/AccessPlanV4ServiceImpl.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java index f703994..9784937 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java @@ -59,10 +59,7 @@ import java.text.DecimalFormat; import java.time.Duration; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -518,7 +515,7 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{ header_row_cell_0.setCellValue(i + 1); // 设备名称 HSSFCell header_row_cell_1 = detail_row.getCell(1); - header_row_cell_1.setCellValue(task.getEmName()); + header_row_cell_1.setCellValue(Optional.ofNullable(task.getEmName()).orElse("")); // 计划开始时间 HSSFCell header_row_cell_2 = detail_row.getCell(2); header_row_cell_2.setCellValue(DateUtil.format(task.getPlanStartTime(),DateUtil.PATTERN_DATETIME)); @@ -527,10 +524,10 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service{ header_row_cell_3.setCellValue(DateUtil.format(task.getPlanEndTime(),DateUtil.PATTERN_DATETIME)); // 计划工时 HSSFCell header_row_cell_4 = detail_row.getCell(4); - header_row_cell_4.setCellValue(task.getPlanHours()); + header_row_cell_4.setCellValue(Optional.ofNullable(task.getPlanHours()).orElse(0)); // 检修负责人 HSSFCell header_row_cell_7 = detail_row.getCell(7); - header_row_cell_7.setCellValue(task.getHeadName()); + header_row_cell_7.setCellValue(Optional.ofNullable(task.getHeadName()).orElse("")); } // 检修项目 HSSFCell header_row_cell_5 = detail_row.getCell(5);