Procházet zdrojové kódy

对接修改sop新增

车车 před 4 měsíci
rodič
revize
5c0e16ee3c

+ 3 - 3
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/service/sop/SopServiceImpl.java

@@ -57,17 +57,17 @@ public class SopServiceImpl extends ServiceImpl<SopMapper, SopDO> implements Sop
         sopGroupDO.setGroupName("默认分组");
         sopGroupService.save(sopGroupDO);
         // 新增人员信息
-        if (!vo.getSopUserList().isEmpty()) {
+        if (vo.getSopUserList() != null && !vo.getSopUserList().isEmpty()) {
             vo.getSopUserList().forEach(o -> o.setSopId(sop.getId()));
             sopUserService.createSopUser(vo.getSopUserList());
         }
         // 新增隔离点信息
-        if (!vo.getSopPointsList().isEmpty()) {
+        if (vo.getSopPointsList() != null && !vo.getSopPointsList().isEmpty()) {
             vo.getSopPointsList().forEach(o -> o.setSopId(sop.getId()));
             sopPointsService.createSopPoints(vo.getSopPointsList());
         }
         // 新增流程步骤信息
-        if (!vo.getSopStepList().isEmpty()) {
+        if (vo.getSopStepList() != null && !vo.getSopStepList().isEmpty()) {
             vo.getSopStepList().forEach(o -> o.setSopId(sop.getId()));
             sopWorkflowStepService.createSopWorkflowStep(vo.getSopStepList());
         }