فهرست منبع

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

wangliang 1 سال پیش
والد
کامیت
1f5eba0614

+ 1 - 1
sop-api/src/main/java/com/qmth/sop/server/api/TBDeviceDeliveryController.java

@@ -82,7 +82,7 @@ public class TBDeviceDeliveryController {
                 t.setStatus(tbDeviceDeliveryParam.getStatus());
                 t.updateInfo(sysUser.getId());
             }
-            tbDeviceDeliveryService.saveOrUpdateBatch(tbDeviceDeliveryList);
+            tbDeviceDeliveryService.updateBatchById(tbDeviceDeliveryList);
         }
         return ResultUtil.ok(true);
     }

+ 12 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -97,6 +97,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
     @Resource
     TBSopPlanDateLogService tbSopPlanDateLogService;
 
+    @Resource
+    TBDeviceDeliveryService tbDeviceDeliveryService;
+
     /**
      * 查询动态sop表名是否存在
      *
@@ -324,6 +327,15 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             }
             flowTaskResult.setFormProperty(flowFormWidgetResultList);
             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());