|
@@ -410,15 +410,17 @@ public class TaskWorkNode {
|
|
|
// begin modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
log.setExeResult("0").setManual("0").setFeedback("设备资源不通过");
|
|
|
// 释放之前占用的资源
|
|
|
- String occupyResources = conMap.get("occupyResources")==null?"":(String)conMap.get("occupyResources");
|
|
|
- String[] occupyResourcesArray = occupyResources.split(",");
|
|
|
- for (String occupyResource : occupyResourcesArray){
|
|
|
- Storge storge = storgeService.getById(Long.valueOf(occupyResource));
|
|
|
- if("0".equals(storge.getLockStatus())){
|
|
|
- storge.setLockStatus("1");
|
|
|
- storgeService.updateById(storge);
|
|
|
- }
|
|
|
- }
|
|
|
+// String occupyResourcesKey = DictionaryType.OCCUPY_RESOURCE + taskNodeId;
|
|
|
+// String occupyResources = conMap.get(occupyResourcesKey)==null?"":(String)conMap.get(occupyResourcesKey);
|
|
|
+// String[] occupyResourcesArray = occupyResources.split(",");
|
|
|
+// for (String occupyResource : occupyResourcesArray){
|
|
|
+// Storge storge = storgeService.getById(Long.valueOf(occupyResource));
|
|
|
+// if("0".equals(storge.getLockStatus())){
|
|
|
+// storge.setLockStatus("1");
|
|
|
+// storgeService.updateById(storge);
|
|
|
+// }
|
|
|
+// }
|
|
|
+ taskNodeService.freeLock(taskNode.getCompleteBatchNo());
|
|
|
conMap.put("result",false);
|
|
|
// end modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
|
|
@@ -871,8 +873,8 @@ public class TaskWorkNode {
|
|
|
// begin modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
// TODO 后续可改成信号对接判断,先如果返回失败释放资源进去队列重新轮训
|
|
|
// 返回内容中记录当前任务占用资源
|
|
|
- String occupyResources = jqrStorge.getId() + "," + hcwStorge.getId() + "," + targetStorge.getId();
|
|
|
- dataMap.put("occupyResources",occupyResources);
|
|
|
+// String occupyResources = jqrStorge.getId() + "," + hcwStorge.getId() + "," + targetStorge.getId();
|
|
|
+// dataMap.put(DictionaryType.OCCUPY_RESOURCE + taskNode.getId() ,occupyResources);
|
|
|
// end modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
|
|
|
}else{
|
|
@@ -998,8 +1000,8 @@ public class TaskWorkNode {
|
|
|
// begin modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
// TODO 后续可改成信号对接判断,先如果返回失败释放资源进去队列重新轮训
|
|
|
// 返回内容中记录当前任务占用资源
|
|
|
- String occupyResources = jqrStorge.getId() + "," + targetStorge.getId();
|
|
|
- dataMap.put("occupyResources",occupyResources);
|
|
|
+// String occupyResources = jqrStorge.getId() + "," + targetStorge.getId();
|
|
|
+// dataMap.put(DictionaryType.OCCUPY_RESOURCE+taskNode.getId(),occupyResources);
|
|
|
// end modify by yejian on 20220520 for 解决资源抢占时机器人是空闲状态但是实际上面有料不能操作的时候请求指令接口返回失败后进入死循环问题
|
|
|
}else{
|
|
|
dataMap.put("result", false);
|