更新
This commit is contained in:
@@ -277,19 +277,10 @@ public class AgvServiceImpl implements AgvService {
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new BadRequestException("未找到该设备【" + device_code + "】");
|
||||
}
|
||||
String inspect_in_stocck = device.getExtraValue().get("inspect_in_stocck").toString();
|
||||
if (i == 0) {
|
||||
if (!StrUtil.equals(inspect_in_stocck,"true")){
|
||||
ja.add(destination(device_code, "Load", "1", "1"));
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_PICK", "1", "1"));
|
||||
}
|
||||
ja.add(destination(device_code, "Load", "1", "1"));
|
||||
} else if (i == pathlist.size() - 1) {
|
||||
if (!StrUtil.equals(inspect_in_stocck,"true")){
|
||||
ja.add(destination(device_code, "Unload", "1", "1"));
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_DUMP", "1", "1"));
|
||||
}
|
||||
} else {
|
||||
ja.add(destination(device_code, "OP_DUMP", "1", "4"));
|
||||
}
|
||||
@@ -348,10 +339,26 @@ public class AgvServiceImpl implements AgvService {
|
||||
//orderjo.put("intendedVehicle", "");
|
||||
//设置任务最终时间
|
||||
orderjo.put("deadline", getNextDay(1));
|
||||
Object start_inspect_in_stocck = startdevice.getExtraValue().get("inspect_in_stocck");
|
||||
if (ObjectUtil.isEmpty(start_inspect_in_stocck)){
|
||||
start_inspect_in_stocck = "false";
|
||||
}
|
||||
//拼接起点子任务动作,待完善,动作码需要从数据库取值
|
||||
ja.add(destination(startAddress, "Load", "1", "1"));
|
||||
//拼接终点子任务动作,待完善,动作码需要从数据库取值
|
||||
ja.add(destination(nextAddress, "Unload", "1", "1"));
|
||||
if (start_inspect_in_stocck.toString().equals("true")){
|
||||
ja.add(destination(startAddress, "OP_PICK", "1", "1"));
|
||||
}else {
|
||||
ja.add(destination(startAddress, "Load", "1", "1"));
|
||||
}
|
||||
Object next_inspect_in_stocck = nextdevice.getExtraValue().get("inspect_in_stocck");
|
||||
if (ObjectUtil.isEmpty(next_inspect_in_stocck)){
|
||||
next_inspect_in_stocck = "false";
|
||||
}
|
||||
if (next_inspect_in_stocck.toString().equals("true")){
|
||||
ja.add(destination(nextAddress, "OP_DUMP", "1", "1"));
|
||||
}else {
|
||||
//拼接终点子任务动作,待完善,动作码需要从数据库取值
|
||||
ja.add(destination(nextAddress, "Unload", "1", "1"));
|
||||
}
|
||||
|
||||
orderjo.put("destinations", ja);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user