Explorar el Código

添加是否为空判断

liyuhui_ex hace 1 semana
padre
commit
37be71d5f5

+ 3 - 3
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderInspectionServiceImpl.java

@@ -339,7 +339,7 @@ public class BoilerTaskOrderInspectionServiceImpl implements BoilerTaskOrderInsp
                 boilerOpinionReportedExcelVo.setSendTime(item.getSendTime());
                 boilerOpinionReportedExcelVo.setSignTime(item.getSignTime());
                 boilerOpinionReportedExcelVo.setRectificationTime(item.getRectificationTime());
-                boilerOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers().get(0).getNickname());
+                boilerOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers()==null?"" :item.getCheckUsers().get(0).getNickname());
                 boilerOpinionReportedExcelVo.setRectificationStatusName(rectificationStatusMap.get(item.getRectificationStatus()));
                 if (item.getRectificationStatus() == 0){
                     boilerOpinionReportedExcelVo.setConfirmationTimeStr(item.getConfirmationTimeStr());
@@ -357,9 +357,9 @@ public class BoilerTaskOrderInspectionServiceImpl implements BoilerTaskOrderInsp
                                 .map(DictDataRespDTO::getLabel)
                                 .findFirst()
                                 .orElse(""));
-                boilerOpinionReportedExcelVo.setCheckDate(item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
+                boilerOpinionReportedExcelVo.setCheckDate(item.getCheckDate()==null||item.getCheckDate().getYear()==0?"":item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
                 boilerOpinionReportedExcelVo.setDeptName(item.getDeptName());
-                boilerOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList().get(0).getNickname());
+                boilerOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList()==null? "":item.getHandlerUserList().get(0).getNickname());
                 list.add(boilerOpinionReportedExcelVo);
             }
         }

+ 1 - 1
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/boilertaskorder/BoilerTaskOrderServiceImpl.java

@@ -6572,7 +6572,7 @@ public class BoilerTaskOrderServiceImpl extends ServiceImpl<BoilerTaskOrderMappe
             } else {
                 item.setIsCloseReportedStr("是");
             }
-            if(!item.getReporterUserList().isEmpty()){
+            if(item.getReporterUserList()!=null){
                 item.setHandleUserNickName(item.getReporterUserList().get(0).getNickname());
             }
         });

+ 3 - 3
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderInspectionServiceImpl.java

@@ -349,7 +349,7 @@ public class PipeTaskOrderInspectionServiceImpl implements PipeTaskOrderInspecti
                 pipeOpinionReportedExcelVo.setSendTime(item.getSendTime());
                 pipeOpinionReportedExcelVo.setSignTime(item.getSignTime());
                 pipeOpinionReportedExcelVo.setRectificationTime(item.getRectificationTime());
-                pipeOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers().get(0).getNickname());
+                pipeOpinionReportedExcelVo.setCheckUserName(item.getCheckUsers()==null?"":item.getCheckUsers().get(0).getNickname());
                 pipeOpinionReportedExcelVo.setRectificationStatusName(rectificationStatusMap.get(item.getRectificationStatus()));
                 if (item.getRectificationStatus() == 0){
                     pipeOpinionReportedExcelVo.setConfirmationTimeStr(item.getConfirmationTimeStr());
@@ -367,9 +367,9 @@ public class PipeTaskOrderInspectionServiceImpl implements PipeTaskOrderInspecti
                         .map(DictDataRespDTO::getLabel)
                         .findFirst()
                         .orElse(""));
-                pipeOpinionReportedExcelVo.setCheckDate(item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
+                pipeOpinionReportedExcelVo.setCheckDate(item.getCheckDate()==null||item.getCheckDate().getYear()==0?"":item.getCheckDate().getYear()+"-"+item.getCheckDate().getMonthValue()+"-"+item.getCheckDate().getDayOfMonth());
                 pipeOpinionReportedExcelVo.setDeptName(item.getDeptName());
-                pipeOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList().get(0).getNickname());
+                pipeOpinionReportedExcelVo.setHandleUserNickname(item.getHandlerUserList()==null?"":item.getHandlerUserList().get(0).getNickname());
                 list.add(pipeOpinionReportedExcelVo);
             }
         }

+ 1 - 1
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/pipetaskorder/PipeTaskOrderServiceImpl.java

@@ -5832,7 +5832,7 @@ public class PipeTaskOrderServiceImpl extends ServiceImpl<PipeTaskOrderMapper, P
             } else {
                 item.setIsCloseReportedStr("是");
             }
-            if(!item.getReporterUserList().isEmpty()){
+            if(item.getReporterUserList()!=null){
                 item.setHandleUserNickName(item.getReporterUserList().get(0).getNickname());
             }
         });