opt:等待点任务申请的点位处理后再更新到任务指令表
This commit is contained in:
@@ -344,19 +344,33 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
next_height = resp.getJSONObject("parameters").getInteger("next_height");
|
||||
start_point = resp.getJSONObject("parameters").getString("start_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.setNext_height(String.valueOf(next_height));
|
||||
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_device_code(next_point);
|
||||
task.setNext_device_code(next_device_code);
|
||||
int start_address = deviceService.queryAddressBydeviceCode(start_point);
|
||||
int next_address = deviceService.queryAddressBydeviceCode(next_point);
|
||||
taskService.update(task);
|
||||
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_device_code(next_point);
|
||||
inst.setNext_device_code(next_device_code);
|
||||
instructionService.update(inst);
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, start_height, next_height);
|
||||
log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);
|
||||
|
||||
Reference in New Issue
Block a user