Browse Source

sop加入现场环境测试,设备出货管理更改为已签收

wangliang 1 year ago
parent
commit
fbd26a7e6d

+ 11 - 9
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -327,15 +327,6 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             }
             }
             flowTaskResult.setFormProperty(flowFormWidgetResultList);
             flowTaskResult.setFormProperty(flowFormWidgetResultList);
             flowApproveParam.setFormProperties(JacksonUtil.parseJson(flowTaskResult));
             flowApproveParam.setFormProperties(JacksonUtil.parseJson(flowTaskResult));
-        } else if (flowTaskResult.getSetup().intValue() == 4) {//现场环境测试,修改设备发货管理里的设备改为已签收
-            List<TBDeviceDelivery> tbDeviceDeliveryList = tbDeviceDeliveryService.list(new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getSopNo, tbSopInfo.getSopNo()));
-            if (!CollectionUtils.isEmpty(tbDeviceDeliveryList)) {
-                for (TBDeviceDelivery t : tbDeviceDeliveryList) {
-                    t.setStatus(DeviceDeliveryStatusEnum.RECEIVE);
-                    t.updateInfo(sysUser.getId());
-                }
-                tbDeviceDeliveryService.updateBatchById(tbDeviceDeliveryList);
-            }
         }
         }
 
 
         CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
         CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
@@ -352,6 +343,17 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         tbSopInfo.updateInfo(sysUser.getId());
         tbSopInfo.updateInfo(sysUser.getId());
         tbSopInfoService.updateById(tbSopInfo);
         tbSopInfoService.updateById(tbSopInfo);
 
 
+        if (tfFlowApprove.getSetup().intValue() == 6) {//现场环境测试下一步"扫描准备",修改设备发货管理里的设备改为已签收
+            List<TBDeviceDelivery> tbDeviceDeliveryList = tbDeviceDeliveryService.list(new QueryWrapper<TBDeviceDelivery>().lambda().eq(TBDeviceDelivery::getSopNo, tbSopInfo.getSopNo()));
+            if (!CollectionUtils.isEmpty(tbDeviceDeliveryList)) {
+                for (TBDeviceDelivery t : tbDeviceDeliveryList) {
+                    t.setStatus(DeviceDeliveryStatusEnum.RECEIVE);
+                    t.updateInfo(sysUser.getId());
+                }
+                tbDeviceDeliveryService.updateBatchById(tbDeviceDeliveryList);
+            }
+        }
+
         //如果下一步审批是大区经理内审并且区域协调人和大区经理为同一人时,后台自动审批
         //如果下一步审批是大区经理内审并且区域协调人和大区经理为同一人时,后台自动审批
         tbSopInfoService.sopSystemApprove(tfCustomFlow, tfCustomFlowEntity, tfFlowApprove, tbSopInfoDetail, flowApproveParam.getCrmNo());
         tbSopInfoService.sopSystemApprove(tfCustomFlow, tfCustomFlowEntity, tfFlowApprove, tbSopInfoDetail, flowApproveParam.getCrmNo());
         return true;
         return true;