Browse Source

1.wcs取消任务接口同时取消指令

2.0x03逻辑回滚
master
pangshenghao 1 year ago
parent
commit
a8a243f30c
  1. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 18
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

10
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -173,8 +173,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
return; return;
} }
// Object reqWms = device.getExtraValue().get("reqWms"); Object reqWms = device.getExtraValue().get("reqWms");
// if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) { if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) {
JSONArray req = new JSONArray(); JSONArray req = new JSONArray();
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("vehicle_code", inst.getVehicle_code()); map.put("vehicle_code", inst.getVehicle_code());
@ -194,9 +194,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else { } else {
log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code());
} }
// } else { } else {
// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
// } }
//取货完毕 //取货完毕
//(需要WCS反馈) //(需要WCS反馈)
} else if (phase == 0x05) { } else if (phase == 0x05) {

18
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -84,16 +84,18 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
} }
TaskDto taskDto = taskService.findByCodeFromCache(task_code); TaskDto taskDto = taskService.findByCodeFromCache(task_code);
String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue(); String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue();
if (StrUtil.equals(cancelTaskCheck, "1")) {
taskService.cancelNoSendWms(taskDto.getTask_id()); // if (StrUtil.equals(cancelTaskCheck, "1")) {
} else if (StrUtil.equals(cancelTaskCheck, "0")) { // taskService.cancelNoSendWms(taskDto.getTask_id());
// } else if (StrUtil.equals(cancelTaskCheck, "0")) {
Instruction inst = instructionService.findByTaskcode(task_code); Instruction inst = instructionService.findByTaskcode(task_code);
if (inst == null) { if (inst != null) {
taskService.cancelNoSendWms(taskDto.getTask_id()); instructionService.cancelNOSendAgv(inst.getInstruction_id());
} else {
throw new RuntimeException("指令正在执行中,操作失败!");
}
} }
taskService.cancelNoSendWms(taskDto.getTask_id());
// } else {
// throw new RuntimeException("指令正在执行中,操作失败!");
// }
} }

Loading…
Cancel
Save