|
@ -54,19 +54,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,起点位置无货或其他信号不满足取货条件!move = " + standardConveyorLineDeviceDriver.getMove() + "action = " + standardConveyorLineDeviceDriver.getAction()); |
|
|
map.put("message", "请求失败,起点位置无货或其他信号不满足取货条件!move = " + standardConveyorLineDeviceDriver.getMove() + "action = " + standardConveyorLineDeviceDriver.getAction()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,起点位置无货!"); |
|
|
throw new BadRequestException("请求失败,起点位置无货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -77,10 +80,10 @@ public class AgvWaitUtil { |
|
|
int byAction = standardCoveyorControlDeviceDriver.getByAction(); |
|
|
int byAction = standardCoveyorControlDeviceDriver.getByAction(); |
|
|
if (byError == 0 && bySignal == 1 && byAction == 0) { |
|
|
if (byError == 0 && bySignal == 1 && byAction == 0) { |
|
|
standardCoveyorControlDeviceDriver.writing(1, "0"); |
|
|
standardCoveyorControlDeviceDriver.writing(1, "0"); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求取货前等待下发信号0成功", task_code, standardCoveyorControlDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "applyTake"); |
|
|
feedMap.put("feedbackStatus", "applyTake"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
|
|
|
|
|
|
String responseMessage = String.valueOf(feedback.get("responseMessage")); |
|
|
String responseMessage = String.valueOf(feedback.get("responseMessage")); |
|
|
if (responseCode == 0) { |
|
|
if (responseCode == 0) { |
|
|
feedMap.put("feedbackStatus", "taking"); |
|
|
feedMap.put("feedbackStatus", "taking"); |
|
@ -88,19 +91,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,起点位置无货或其他信号不满足取货条件!move = " + bySignal + ",action = " + byAction + ",error = " + byError); |
|
|
map.put("message", "请求失败,起点位置无货或其他信号不满足取货条件!move = " + bySignal + ",action = " + byAction + ",error = " + byError); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,起点位置无货!"); |
|
|
throw new BadRequestException("请求失败,起点位置无货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -121,6 +127,7 @@ public class AgvWaitUtil { |
|
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver(); |
|
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver(); |
|
|
if (standardConveyorLineDeviceDriver.getMove() == 0) { |
|
|
if (standardConveyorLineDeviceDriver.getMove() == 0) { |
|
|
standardConveyorLineDeviceDriver.writing(2); |
|
|
standardConveyorLineDeviceDriver.writing(2); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求取货完成等待下发信号2成功", task_code, standardConveyorLineDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "takeFinish"); |
|
|
feedMap.put("feedbackStatus", "takeFinish"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
@ -129,19 +136,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,取货完成后,起点位置仍有货!move=" + standardConveyorLineDeviceDriver.getMove()); |
|
|
map.put("message", "请求失败,取货完成后,起点位置仍有货!move=" + standardConveyorLineDeviceDriver.getMove()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,起点位置有货!"); |
|
|
throw new BadRequestException("请求失败,起点位置有货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -149,6 +159,7 @@ public class AgvWaitUtil { |
|
|
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver(); |
|
|
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver(); |
|
|
if (standardCoveyorControlDeviceDriver.getBySignal() == 0) { |
|
|
if (standardCoveyorControlDeviceDriver.getBySignal() == 0) { |
|
|
standardCoveyorControlDeviceDriver.writing(1, "2"); |
|
|
standardCoveyorControlDeviceDriver.writing(1, "2"); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求取货完成等待下发信号2成功", task_code, standardCoveyorControlDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "takeFinish"); |
|
|
feedMap.put("feedbackStatus", "takeFinish"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
@ -157,19 +168,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,取货完成后,起点位置仍有货!move=" + standardCoveyorControlDeviceDriver.getBySignal()); |
|
|
map.put("message", "请求失败,取货完成后,起点位置仍有货!move=" + standardCoveyorControlDeviceDriver.getBySignal()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,取货完成后起点位置有货!"); |
|
|
throw new BadRequestException("请求失败,取货完成后起点位置有货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -200,19 +214,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,终点位置有货或其他信号不满足放货条件!move = " + standardConveyorLineDeviceDriver.getMove() + "action = " + standardConveyorLineDeviceDriver.getAction()); |
|
|
map.put("message", "请求失败,终点位置有货或其他信号不满足放货条件!move = " + standardConveyorLineDeviceDriver.getMove() + "action = " + standardConveyorLineDeviceDriver.getAction()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
// logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,终点位置有货或不允许放货!"); |
|
|
throw new BadRequestException("请求失败,终点位置有货或不允许放货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -223,6 +240,7 @@ public class AgvWaitUtil { |
|
|
int byAction = standardCoveyorControlDeviceDriver.getByAction(); |
|
|
int byAction = standardCoveyorControlDeviceDriver.getByAction(); |
|
|
if (byError == 0 && bySignal == 0 && byAction == 0) { |
|
|
if (byError == 0 && bySignal == 0 && byAction == 0) { |
|
|
standardCoveyorControlDeviceDriver.writing(1, "0"); |
|
|
standardCoveyorControlDeviceDriver.writing(1, "0"); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求放货前等待下发信号0成功", task_code, standardCoveyorControlDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "applyPut"); |
|
|
feedMap.put("feedbackStatus", "applyPut"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
@ -234,19 +252,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败!"); |
|
|
throw new BadRequestException("请求失败!"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,终点位置有货或其他信号不满足放货条件!move = " + bySignal + ",action = " + byAction + ",error = " + byError); |
|
|
map.put("message", "请求失败,终点位置有货或其他信号不满足放货条件!move = " + bySignal + ",action = " + byAction + ",error = " + byError); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,终点位置有货!"); |
|
|
throw new BadRequestException("请求失败,终点位置有货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -268,6 +289,7 @@ public class AgvWaitUtil { |
|
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver(); |
|
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) device.getDeviceDriver(); |
|
|
if (standardConveyorLineDeviceDriver.getMove() == 1) { |
|
|
if (standardConveyorLineDeviceDriver.getMove() == 1) { |
|
|
standardConveyorLineDeviceDriver.writing(3); |
|
|
standardConveyorLineDeviceDriver.writing(3); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求放货完成等待下发信号3成功", task_code, standardConveyorLineDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "putFinish"); |
|
|
feedMap.put("feedbackStatus", "putFinish"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
@ -277,19 +299,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败"); |
|
|
throw new BadRequestException("请求失败"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,放货货完成后,终点位置仍无货!move=" + standardConveyorLineDeviceDriver.getMove()); |
|
|
map.put("message", "请求失败,放货货完成后,终点位置仍无货!move=" + standardConveyorLineDeviceDriver.getMove()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,放货货完成后,终点位置仍无货!"); |
|
|
throw new BadRequestException("请求失败,放货货完成后,终点位置仍无货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -297,6 +322,7 @@ public class AgvWaitUtil { |
|
|
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver(); |
|
|
standardCoveyorControlDeviceDriver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver(); |
|
|
if (standardCoveyorControlDeviceDriver.getBySignal() == 1) { |
|
|
if (standardCoveyorControlDeviceDriver.getBySignal() == 1) { |
|
|
standardCoveyorControlDeviceDriver.writing(1, "3"); |
|
|
standardCoveyorControlDeviceDriver.writing(1, "3"); |
|
|
|
|
|
log.info("任务号:{},设备号:{},在请求放货完成等待下发信号3成功", task_code, standardCoveyorControlDeviceDriver.getDevice_code()); |
|
|
feedMap.put("feedbackStatus", "putFinish"); |
|
|
feedMap.put("feedbackStatus", "putFinish"); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
|
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); |
|
@ -305,19 +331,22 @@ public class AgvWaitUtil { |
|
|
map.put("status", 200); |
|
|
map.put("status", 200); |
|
|
map.put("message", "请求成功"); |
|
|
map.put("message", "请求成功"); |
|
|
type = "info"; |
|
|
type = "info"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.info("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
} else { |
|
|
} else { |
|
|
map.put("status", responseCode); |
|
|
map.put("status", responseCode); |
|
|
map.put("message", responseMessage); |
|
|
map.put("message", responseMessage); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "feedbackTask", param.toString(), map.toString(), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "feedbackTask", type, param.toString(), String.valueOf(map), "400", "/restful/api/v3/feedbackTask", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败"); |
|
|
throw new BadRequestException("请求失败"); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
map.put("status", 400); |
|
|
map.put("status", 400); |
|
|
map.put("message", "请求失败,放货货完成后,终点位置仍无货!move=" + standardCoveyorControlDeviceDriver.getBySignal()); |
|
|
map.put("message", "请求失败,放货货完成后,终点位置仍无货!move=" + standardCoveyorControlDeviceDriver.getBySignal()); |
|
|
type = "erro"; |
|
|
type = "erro"; |
|
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
log.error("任务号:{},请求方法:{},请求参数:{},响应参数:{},响应状态:{},请求路径:{},载具号:{}", task_code, "waitpointRequest", param.toString(), map.toString(), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); |
|
|
|
|
|
//logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
|
|
throw new BadRequestException("请求失败,放货货完成后,终点位置仍无货!"); |
|
|
throw new BadRequestException("请求失败,放货货完成后,终点位置仍无货!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|