Browse Source

手动模式

laoyao 3 years ago
parent
commit
aaa63bdcae

+ 14 - 11
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/AGVNodeServiceImpl.java

@@ -91,17 +91,20 @@ public class AGVNodeServiceImpl implements NodeOperationService {
         Long startId = resourceAutoCode.getStartId();
         Storge startStore = storgeService.getById(startId);
 
-
-        //3、把起始终点库位存放到map,用于接口
-        map.put("fromStorge", startStore);
-        map.put("toStorge", targetStore);
-        //这个节点没有需要验证的内容,都在前一个节点验证并且锁定了
-        map.put("result", true);
-        //出入库类型-原料出入库
-        map.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CRK);
-
-
-
+        jbwarr = new String[] {targetStore.getNo()};
+        List<ProductionresourcePosition> jbwList = productionresourcePositionService.getFreeProductionresourcePositionByNos(jbwarr);
+
+        if (CollectionUtil.isNotEmpty(jbwList)) {
+            //3、把起始终点库位存放到map,用于接口
+            map.put("fromStorge", startStore);
+            map.put("toStorge", targetStore);
+            //这个节点没有需要验证的内容,都在前一个节点验证并且锁定了
+            map.put("result", true);
+
+            storgeService.lockStorge(targetStore, taskNode.getId());
+            //出入库类型-原料出入库
+            map.put(DemoLineConstant.DEMOLINE_STOCK_TYPE, DemoLineConstant.DEMOLINE_STOCK_TYPE_METERIAL_CRK);
+        }
 
 //        if (BizConstant.MQ_TASK_NODE_TYPE_COMMON.equals(bizType)) {
 //            if (DemoLineConstant.DEMOLINE_OP01_02.equals(taskNode.getNodeNo())) {