wangliang 1 year ago
parent
commit
a4e18d6d9f

+ 8 - 5
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -1137,8 +1137,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                     type = f.getFormId().contains(SystemConstant.DEVICE_OUT_TIME) ?
                             InOutTypeEnum.OUT :
                             InOutTypeEnum.IN;
-                } else if (f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) || f.getFormId()
-                        .contains(SystemConstant.DEVICE_IN_TABLE)) {
+                } else if ((f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) || f.getFormId()
+                        .contains(SystemConstant.DEVICE_IN_TABLE)) && Objects.nonNull(f.getValue()) && !f.getValue()
+                        .contains("null")) {
                     if (Objects.isNull(type)) {
                         type = f.getFormId().contains(SystemConstant.DEVICE_OUT_TABLE) ?
                                 InOutTypeEnum.OUT :
@@ -1152,9 +1153,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                     }
                 }
             }
-            tbDeviceInOutService.deviceInOutSubmit(
-                    new DeviceInOutSubmitParam(crmProjectResult.getServiceUnitId(), tfCustomFlowEntity.getCrmNo(),
-                            tfCustomFlowEntity.getCode(), deviceInOutTime, type, true, deviceInOutFormList));
+            if (!CollectionUtils.isEmpty(deviceInOutFormList)) {
+                tbDeviceInOutService.deviceInOutSubmit(
+                        new DeviceInOutSubmitParam(crmProjectResult.getServiceUnitId(), tfCustomFlowEntity.getCrmNo(),
+                                tfCustomFlowEntity.getCode(), deviceInOutTime, type, true, deviceInOutFormList));
+            }
         }
     }