浏览代码

临时测试

姚云青 3 年之前
父节点
当前提交
a5e76a01e5

+ 8 - 4
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java

@@ -370,8 +370,10 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     Storge targetStorge = returnMap.get("store")==null?null:(Storge)returnMap.get("store");
                     String targetxbk = returnMap.get("targetxbk")==null?null:(String)returnMap.get("targetxbk");
 
+
+                    ProductionresourcePosition po = logical(robotList,targetStorge);
                     //机器人手抓没被锁定,并且有空闲未知
-                    if (logical(robotList,targetStorge)!=null) {
+                    if (po!=null) {
                         jqrStorge = storgeService.getById(jqrMap.get(DemoLineConstant.DEMOLINE_RJQR_ZS).get(0).getStorgeId());
                         jqrStorge.setCompleteBatchNo(task.getCompleteBatchNo());
                         storgeService.lockStorge(jqrStorge, nextTaskNode.getId());
@@ -401,7 +403,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                         dataMap.put("Data", startStore);
                         dataMap.put("method", "MoveRobotPosition");
                     }
-                    dataMap.put("result", logical(robotList,targetStorge));
+                    dataMap.put("result", po);
                 } else if (count == 1) {
                     jqrStorge = (Storge) msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + YunjianConstant.YUNJIAN_JXS + taskNode.getId());
                     dataMap.put("method", "GetServoStacker");
@@ -434,7 +436,9 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                 String targetxbk = returnMap.get("targetxbk")==null?null:(String)returnMap.get("targetxbk");
 
                 dataMap.put("method", "GetServoStacker");
-                if (logical(robotList,targetStorge)!=null) {//机器人只有一只手
+                ProductionresourcePosition po = logical(robotList,targetStorge);
+
+                if (po!=null) {//机器人只有一只手
                     jqrStorge = storgeService.getById(robotList.get(0).getStorgeId());
 
                     dataMap.put("fromStorge", startStore);
@@ -463,7 +467,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     msgUtil.redis_set(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_XBK_FLAG + nextTaskNode.getId(), targetxbk, 1, TimeUnit.DAYS);
                     dataMap.put("result", true);
                 }
-                dataMap.put("result", logical(robotList,targetStorge)!=null);
+                dataMap.put("result", po!=null);
             }
         }else if ("放".equals(functionName)) {
             Object targetStorge = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId());

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/util/MsgUtil.java

@@ -57,14 +57,14 @@ public class MsgUtil implements ApplicationContextAware {
 
     public void pushTask(TTask task) {
         //查出所有的线边库数据
-        StockInfoService stockInfoService = (StockInfoService)getBean("StockInfoService");
+        StockInfoService stockInfoService = (StockInfoService)getBean("StockInfoServiceImpl");
         Map<String, Map<String, List<Map>>> stockMap = stockInfoService.demoLineAllStock();
         Map<String, Object> pushMap = new HashMap<>();
         pushMap.put("type", WebSocketServer.PUSH_TYPE_STORGE);
         pushMap.put("data", stockMap);
         this.pushTask(task, pushMap);
 
-        ZZoneService zoneService = (ZZoneService)getBean("ZZoneService");
+        ZZoneService zoneService = (ZZoneService)getBean("ZZoneServiceImpl");
         Map resourceMap = zoneService.demoLineAllResource();
         pushMap.clear();
         pushMap.put("type", WebSocketServer.PUSH_TYPE_RESOURCE);