zhuang 8 mesiacov pred
rodič
commit
38efb5cf54

+ 8 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxProjectManageServiceImpl.java

@@ -565,7 +565,10 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
                 if (ev.getData().stream().noneMatch(data -> data.getMachineno().equals(no))) {
                     ev.getData().add(new ZhcxProjectRectifyMachineVo(no));
                 }
-                String format = DateUtil.format(ev.getReqdate(), "yyyy.MM.dd");
+//                String format = DateUtil.format(ev.getReqdate(), "yyyy.MM.dd");
+                String format = ev.getReqdate() != null
+                        ? DateUtil.format(ev.getReqdate(), "yyyy.MM.dd")
+                        : "";
                 ev.setReqDateFmt(format);
             });
             ev.getData().sort(Comparator.comparingInt(a -> machineNoList.indexOf(a.getMachineno())));
@@ -2192,7 +2195,10 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
         style.setTextWrapped(true);
         cells.get(rowIndex, 3).setStyle(style);
         cells.get(rowIndex, colIndex).putValue(row.getMainstatus());
-        cells.get(rowIndex, (colIndex+1)).putValue(row.getReqdate());
+        String formattedDate = row.getReqdate() != null
+                ? DateUtil.format(row.getReqdate(), "yyyy.MM.dd")
+                : "";
+        cells.get(rowIndex, (colIndex+1)).putValue(formattedDate);
         cells.get(rowIndex, (colIndex+2)).putValue(row.getRectifydate());
         cells.get(rowIndex, (colIndex+3)).putValue(row.getRequser());
         cells.get(rowIndex, (colIndex+4)).putValue(row.getRemark1());