Browse Source

opt:等待点任务申请的点位处理后再更新到任务指令表

master
zds 4 months ago
parent
commit
0235992088
  1. 22
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

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

@ -344,19 +344,33 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
next_height = resp.getJSONObject("parameters").getInteger("next_height"); next_height = resp.getJSONObject("parameters").getInteger("next_height");
start_point = resp.getJSONObject("parameters").getString("start_point"); start_point = resp.getJSONObject("parameters").getString("start_point");
next_point = resp.getJSONObject("parameters").getString("next_point"); next_point = resp.getJSONObject("parameters").getString("next_point");
String start_device_code = "";
String next_device_code = "";
if (StrUtil.isNotEmpty(start_point) && start_point.indexOf("-") > 0) {
String str[] = start_point.split("-");
start_device_code = str[0];
} else {
start_device_code = start_point;
}
if (StrUtil.isNotEmpty(next_point) && next_point.indexOf("-") > 0) {
String str[] = next_point.split("-");
next_device_code = str[0];
} else {
next_device_code = next_point;
}
task.setStart_height(String.valueOf(start_height)); task.setStart_height(String.valueOf(start_height));
task.setNext_height(String.valueOf(next_height)); task.setNext_height(String.valueOf(next_height));
task.setStart_point_code(start_point); task.setStart_point_code(start_point);
task.setStart_device_code(start_point); task.setStart_device_code(start_device_code);
task.setNext_point_code(next_point); task.setNext_point_code(next_point);
task.setNext_device_code(next_point); task.setNext_device_code(next_device_code);
int start_address = deviceService.queryAddressBydeviceCode(start_point); int start_address = deviceService.queryAddressBydeviceCode(start_point);
int next_address = deviceService.queryAddressBydeviceCode(next_point); int next_address = deviceService.queryAddressBydeviceCode(next_point);
taskService.update(task); taskService.update(task);
inst.setStart_point_code(start_point); inst.setStart_point_code(start_point);
inst.setStart_device_code(start_point); inst.setStart_device_code(start_device_code);
inst.setNext_point_code(next_point); inst.setNext_point_code(next_point);
inst.setNext_device_code(next_point); inst.setNext_device_code(next_device_code);
instructionService.update(inst); instructionService.update(inst);
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, start_height, next_height); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, start_height, next_height);
log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase); log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);

Loading…
Cancel
Save