Przeglądaj źródła

检验员可以为空

xuzhancheng 5 dni temu
rodzic
commit
1d1ed120ef

+ 5 - 2
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/appointmentconfirmorder/AppointmentConfirmOrderServiceImpl.java

@@ -776,8 +776,9 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
         // 创建受理单人员列表
         List<BoilerAcceptOrderUserDO> acceptOrderList = new ArrayList<>();
 
-        // 遍历团队列表,构建受理单人员信息
-        submitVO.getTeamList().forEach(team -> {
+        // 遍历团队列表,构建受理单人员信息(允许为空)
+        if (CollUtil.isNotEmpty(submitVO.getTeamList())) {
+            submitVO.getTeamList().forEach(team -> {
             // 创建组长信息对象
             BoilerAcceptOrderUserDO leader = new BoilerAcceptOrderUserDO();
             // 设置订单ID
@@ -815,6 +816,8 @@ public class AppointmentConfirmOrderServiceImpl implements AppointmentConfirmOrd
 
         });
 
+        }
+
         // 人员设置处理
         // 将受理单人员列表转换为约检确认单人员列表
         List<BoilerAppointmentConfirmOrderUserDO> appointmentConfirmOrderUserDOList = BeanUtils.toBean(acceptOrderList, BoilerAppointmentConfirmOrderUserDO.class);

+ 5 - 2
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/appointmentconfirmorder/PipeAppointmentConfirmOrderServiceImpl.java

@@ -956,8 +956,9 @@ public class PipeAppointmentConfirmOrderServiceImpl implements PipeAppointmentCo
 //
 //        });
 
-        // 遍历团队列表,构建受理单人员信息
-        submitVO.getTeamList().forEach(team -> {
+        // 遍历团队列表,构建受理单人员信息(允许为空)
+        if (CollUtil.isNotEmpty(submitVO.getTeamList())) {
+            submitVO.getTeamList().forEach(team -> {
             // 创建组长信息对象
             PipeAcceptOrderUserDO leader = new PipeAcceptOrderUserDO();
             // 设置订单ID
@@ -995,6 +996,8 @@ public class PipeAppointmentConfirmOrderServiceImpl implements PipeAppointmentCo
 
         });
 
+        }
+
         // 人员设置处理
         // 将受理单人员列表转换为约检确认单人员列表
         List<PipeAppointmentConfirmOrderUserDO> appointmentConfirmOrderUserDOList = BeanUtils.toBean(acceptOrderList, PipeAppointmentConfirmOrderUserDO.class);