姚云青 3 年 前
コミット
3b3a9f6c1a

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

@@ -463,7 +463,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));
+                dataMap.put("result", logical(robotList,targetStorge)!=null);
             }
         }else if ("放".equals(functionName)) {
             Object targetStorge = msgUtil.redis_get(DemoCacheKey.YUNJIAN_CAMP + "_" + DemoLineConstant.YUNJIAN_TARGET_STORE + taskNode.getId());
@@ -521,6 +521,9 @@ public class RobotNodeServiceImpl implements NodeOperationService {
      * @return
      */
     public boolean checkRobot(){
+        if(CollectionUtil.isEmpty(robotList)){
+            return false;
+        }
         if(BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))){
             return CollectionUtil.isNotEmpty(robotList) && robotList.size() == 1;
         }else if(BizConstant.ROBOT_TYPE_CACHE.equals(zoneService.getRobotTypebyZone(zoneName))){//手抓必须空闲。