更新
This commit is contained in:
0
hd/logPath_IS_UNDEFINED/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/AGV请求离开/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/AGV请求离开/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/NDC/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/NDC/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-08-22.0.log
Normal file
2080
hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-08-22.0.log
Normal file
2080
hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-08-22.0.log
Normal file
File diff suppressed because it is too large
Load Diff
0
hd/logPath_IS_UNDEFINED/扫码记录/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/扫码记录/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/自动创建指令/2022-08-22.0.log
Normal file
0
hd/logPath_IS_UNDEFINED/自动创建指令/2022-08-22.0.log
Normal file
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.acs.agv.server.impl;
|
package org.nl.acs.agv.server.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
@@ -1573,9 +1574,11 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
public JSONArray createBlocksData(Instruction inst) {
|
public JSONArray createBlocksData(Instruction inst) {
|
||||||
JSONArray ja = new JSONArray();
|
JSONArray ja = new JSONArray();
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("blockId", IdUtil.simpleUUID());
|
||||||
|
jo.put("location",inst.getStart_point_code() + "IN");
|
||||||
jo.put("operation","script");
|
jo.put("operation","script");
|
||||||
jo.put("id",inst.getStart_point_code() + "IN");
|
jo.put("id",inst.getStart_point_code() + "IN");
|
||||||
jo.put("script_name","interact.py");
|
jo.put("script_name","userpy/interact.py");
|
||||||
JSONObject script_args = new JSONObject();
|
JSONObject script_args = new JSONObject();
|
||||||
script_args.put("addr",addr);
|
script_args.put("addr",addr);
|
||||||
JSONObject data = new JSONObject();
|
JSONObject data = new JSONObject();
|
||||||
@@ -1589,15 +1592,17 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
ja.add(jo);
|
ja.add(jo);
|
||||||
|
|
||||||
JSONObject jo1 = new JSONObject();
|
JSONObject jo1 = new JSONObject();
|
||||||
jo1.put("blockId",String.valueOf(ja.size()+1));
|
jo1.put("blockId", IdUtil.simpleUUID());
|
||||||
jo1.put("location",inst.getStart_point_code());
|
jo1.put("location",inst.getStart_point_code());
|
||||||
jo1.put("operation","Jackload");
|
jo1.put("operation","Jackload");
|
||||||
ja.add(jo1);
|
ja.add(jo1);
|
||||||
|
|
||||||
JSONObject jo2 = new JSONObject();
|
JSONObject jo2 = new JSONObject();
|
||||||
|
jo2.put("blockId", IdUtil.simpleUUID());
|
||||||
|
jo2.put("location",inst.getStart_point_code() + "OUT");
|
||||||
jo2.put("operation","script");
|
jo2.put("operation","script");
|
||||||
jo2.put("id",inst.getStart_point_code() + "OUT");
|
jo2.put("id",inst.getStart_point_code() + "OUT");
|
||||||
jo2.put("script_name","interact.py");
|
jo2.put("script_name","userpy/interact.py");
|
||||||
JSONObject script_args2 = new JSONObject();
|
JSONObject script_args2 = new JSONObject();
|
||||||
script_args2.put("addr",addr);
|
script_args2.put("addr",addr);
|
||||||
JSONObject data2 = new JSONObject();
|
JSONObject data2 = new JSONObject();
|
||||||
@@ -1611,9 +1616,11 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
ja.add(jo2);
|
ja.add(jo2);
|
||||||
|
|
||||||
JSONObject jo3 = new JSONObject();
|
JSONObject jo3 = new JSONObject();
|
||||||
|
jo3.put("blockId", IdUtil.simpleUUID());
|
||||||
|
jo3.put("location",inst.getNext_point_code() + "IN");
|
||||||
jo3.put("operation","script");
|
jo3.put("operation","script");
|
||||||
jo3.put("id",inst.getNext_point_code() + "IN");
|
jo3.put("id",inst.getNext_point_code() + "IN");
|
||||||
jo3.put("script_name","interact.py");
|
jo3.put("script_name","userpy/interact.py");
|
||||||
JSONObject script_args3 = new JSONObject();
|
JSONObject script_args3 = new JSONObject();
|
||||||
script_args3.put("addr",addr);
|
script_args3.put("addr",addr);
|
||||||
JSONObject data3 = new JSONObject();
|
JSONObject data3 = new JSONObject();
|
||||||
@@ -1626,20 +1633,22 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
jo3.put("script_args",script_args3);
|
jo3.put("script_args",script_args3);
|
||||||
ja.add(jo3);
|
ja.add(jo3);
|
||||||
JSONObject jo4 = new JSONObject();
|
JSONObject jo4 = new JSONObject();
|
||||||
jo4.put("blockId",String.valueOf(ja.size()+1));
|
jo4.put("blockId",IdUtil.simpleUUID());
|
||||||
jo4.put("location",inst.getNext_point_code());
|
jo4.put("location",inst.getNext_point_code());
|
||||||
jo4.put("operation","JackUnload");
|
jo4.put("operation","JackUnload");
|
||||||
ja.add(jo4);
|
ja.add(jo4);
|
||||||
JSONObject jo5 = new JSONObject();
|
JSONObject jo5 = new JSONObject();
|
||||||
|
jo5.put("blockId", IdUtil.simpleUUID());
|
||||||
|
jo5.put("location",inst.getNext_point_code() + "OUT");
|
||||||
jo5.put("operation","script");
|
jo5.put("operation","script");
|
||||||
jo5.put("id",inst.getStart_point_code() + "OUT");
|
jo5.put("id",inst.getNext_point_code() + "OUT");
|
||||||
jo5.put("script_name","interact.py");
|
jo5.put("script_name","userpy/interact.py");
|
||||||
JSONObject script_args5 = new JSONObject();
|
JSONObject script_args5 = new JSONObject();
|
||||||
script_args5.put("addr",addr);
|
script_args5.put("addr",addr);
|
||||||
JSONObject data5 = new JSONObject();
|
JSONObject data5 = new JSONObject();
|
||||||
JSONObject reach5 = new JSONObject();
|
JSONObject reach5 = new JSONObject();
|
||||||
reach5.put("task_code",inst.getInstruction_code());
|
reach5.put("task_code",inst.getInstruction_code());
|
||||||
reach5.put("address",inst.getStart_point_code() + "OUT");
|
reach5.put("address",inst.getNext_point_code() + "OUT");
|
||||||
data5.put("reach",reach5);
|
data5.put("reach",reach5);
|
||||||
script_args5.put("data",data5);
|
script_args5.put("data",data5);
|
||||||
script_args5.put("protocol","HTTP");
|
script_args5.put("protocol","HTTP");
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ public class AbstractOpcDeviceDriver<T> extends AbstractDeviceDriver implements
|
|||||||
}
|
}
|
||||||
//sonDriverClass.getMethod(methodName).invoke(sonDriver);
|
//sonDriverClass.getMethod(methodName).invoke(sonDriver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//赋值last_属性
|
//赋值last_属性
|
||||||
Field[] declaredFields = sonDriverClass.getDeclaredFields();
|
Field[] declaredFields = sonDriverClass.getDeclaredFields();
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ import org.nl.acs.ext.wms.service.WmsToAcsService;
|
|||||||
import org.nl.annotation.Log;
|
import org.nl.annotation.Log;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -27,6 +24,7 @@ import java.util.Map;
|
|||||||
@Api(tags = "wms接口")
|
@Api(tags = "wms接口")
|
||||||
@RequestMapping("api/agv")
|
@RequestMapping("api/agv")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@CrossOrigin
|
||||||
public class AgvToAcsController {
|
public class AgvToAcsController {
|
||||||
private final AgvToAcsService agvToAcsService;
|
private final AgvToAcsService agvToAcsService;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.nl.acs.device_driver.standard_conveyor_line.StandardConveyorLineDeviceDriver;
|
import org.nl.acs.device_driver.standard_conveyor_line.StandardConveyorLineDeviceDriver;
|
||||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
|
||||||
import org.nl.acs.ext.wms.service.AgvToAcsService;
|
import org.nl.acs.ext.wms.service.AgvToAcsService;
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.instruction.service.dto.Instruction;
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
@@ -13,6 +12,7 @@ import org.nl.acs.log.service.LogServer;
|
|||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
|
import org.nl.exception.BadRequestException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -39,17 +39,18 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
String address = param.getString("address");
|
String address = param.getString("address");
|
||||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||||
String task_code = instructionDto.getTask_code();
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
Map<String, Object> feedMap = new HashMap();
|
|
||||||
feedMap.put("taskCode", task_code);
|
|
||||||
feedMap.put("taskType", instructionDto.getInstruction_type());
|
|
||||||
if (ObjectUtil.isEmpty(instructionDto)) {
|
if (ObjectUtil.isEmpty(instructionDto)) {
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", "请求失败,指令为空!");
|
map.put("message", "请求失败,指令为空!");
|
||||||
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
logServer.log("", "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", "");
|
||||||
return map;
|
// return map;
|
||||||
|
throw new BadRequestException("请求失败,指令为空!");
|
||||||
}
|
}
|
||||||
|
String task_code = instructionDto.getTask_code();
|
||||||
|
Map<String, Object> feedMap = new HashMap();
|
||||||
|
feedMap.put("taskCode", task_code);
|
||||||
|
feedMap.put("taskType", instructionDto.getInstruction_type());
|
||||||
String type = "";
|
String type = "";
|
||||||
String start_device_code = instructionDto.getStart_device_code();
|
String start_device_code = instructionDto.getStart_device_code();
|
||||||
String next_device_code = instructionDto.getNext_device_code();
|
String next_device_code = instructionDto.getNext_device_code();
|
||||||
@@ -60,28 +61,30 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) deviceNow.getDeviceDriver();
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) deviceNow.getDeviceDriver();
|
||||||
if (start_device_code.equals(deviceCodeNow)) {
|
if (start_device_code.equals(deviceCodeNow)) {
|
||||||
if (standardConveyorLineDeviceDriver.getMove() == 1) {
|
if (standardConveyorLineDeviceDriver.getMove() == 1) {
|
||||||
// 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) feedback.get("responseCode"));
|
int responseCode = Integer.parseInt((String) feedback.get("responseCode"));
|
||||||
//String responseMessage = (String) feedback.get("responseMessage");
|
String responseMessage = (String) feedback.get("responseMessage");
|
||||||
//if (responseCode == 0) {
|
if (responseCode == 0) {
|
||||||
// feedback.put("feedbackStatus","“taking");
|
feedback.put("feedbackStatus", "“taking");
|
||||||
// acsToWmsZDService.taskFeedback(feedMap);
|
acsToWmsZDService.taskFeedback(feedMap);
|
||||||
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());
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
//} else {
|
} else {
|
||||||
// map.put("status", 400);
|
map.put("status", 400);
|
||||||
// map.put("message", "操作失败");
|
map.put("message", "操作失败");
|
||||||
// type = "erro";
|
type = "erro";
|
||||||
// logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", "请求失败,起点位置无货!");
|
map.put("message", "请求失败,起点位置无货!");
|
||||||
type = "erro";
|
type = "erro";
|
||||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败,起点位置无货!");
|
||||||
}
|
}
|
||||||
} else if (deviceCodeNow.equals(next_device_code)) {
|
} else if (deviceCodeNow.equals(next_device_code)) {
|
||||||
if (standardConveyorLineDeviceDriver.getMove() != 0) {
|
if (standardConveyorLineDeviceDriver.getMove() != 0) {
|
||||||
@@ -89,26 +92,26 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
map.put("message", "请求失败,终点位置有货!");
|
map.put("message", "请求失败,终点位置有货!");
|
||||||
type = "erro";
|
type = "erro";
|
||||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败,终点位置有货!");
|
||||||
} else {
|
} else {
|
||||||
//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) feedback.get("responseCode")) ;
|
int responseCode = Integer.parseInt((String) feedback.get("responseCode"));
|
||||||
// String responseMessage = (String) feedback.get("responseMessage");
|
String responseMessage = (String) feedback.get("responseMessage");
|
||||||
// if (responseCode == 0) {
|
if (responseCode == 0) {
|
||||||
//feedback.put("feedbackStatus","puting");
|
feedback.put("feedbackStatus", "puting");
|
||||||
//acsToWmsZDService.taskFeedback(feedMap);
|
acsToWmsZDService.taskFeedback(feedMap);
|
||||||
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());
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
// } else {
|
} else {
|
||||||
//logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
||||||
// map.put("status", 400);
|
map.put("status", 400);
|
||||||
// map.put("message", "操作失败");
|
map.put("message", "操作失败");
|
||||||
// type = "erro";
|
type = "erro";
|
||||||
// }
|
throw new BadRequestException("请求失败!");
|
||||||
//}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,27 +124,29 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) deviceNow.getDeviceDriver();
|
standardConveyorLineDeviceDriver = (StandardConveyorLineDeviceDriver) deviceNow.getDeviceDriver();
|
||||||
if (start_device_code.equals(deviceCodeNow)) {
|
if (start_device_code.equals(deviceCodeNow)) {
|
||||||
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
||||||
//standardConveyorLineDeviceDriver.writing(1,2);
|
standardConveyorLineDeviceDriver.writing(1, 2);
|
||||||
//feedMap.put("feedbackStatus", "takeFinish");
|
feedMap.put("feedbackStatus", "takeFinish");
|
||||||
// Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||||
//int responseCode = (int) feedback.get("responseCode");
|
int responseCode = (int) feedback.get("responseCode");
|
||||||
// String responseMessage = (String) feedback.get("responseMessage");
|
String responseMessage = (String) feedback.get("responseMessage");
|
||||||
// if (responseCode == 0) {
|
if (responseCode == 0) {
|
||||||
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());
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
// } else {
|
} else {
|
||||||
// logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", "");
|
map.put("status", 400);
|
||||||
// map.put("status", 400);
|
map.put("message", "操作失败");
|
||||||
// map.put("message", "操作失败");
|
type = "erro";
|
||||||
// type = "erro";
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), feedback.toString(), responseCode + "", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
// }
|
throw new BadRequestException("请求失败!");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", "请求失败,起点位置有货!");
|
map.put("message", "请求失败,起点位置有货!");
|
||||||
type = "erro";
|
type = "erro";
|
||||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败,起点位置有货!");
|
||||||
}
|
}
|
||||||
} else if (next_device_code.equals(deviceCodeNow)) {
|
} else if (next_device_code.equals(deviceCodeNow)) {
|
||||||
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
if (standardConveyorLineDeviceDriver.getMove() == 0) {
|
||||||
@@ -149,23 +154,25 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
map.put("message", "请求失败,终点位置无货!");
|
map.put("message", "请求失败,终点位置无货!");
|
||||||
type = "erro";
|
type = "erro";
|
||||||
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败,终点位置无货!");
|
||||||
} else {
|
} else {
|
||||||
// standardConveyorLineDeviceDriver.writing(1,2);
|
standardConveyorLineDeviceDriver.writing(1, 2);
|
||||||
// feedMap.put("feedbackStatus", "putFinish");
|
feedMap.put("feedbackStatus", "putFinish");
|
||||||
// Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
|
||||||
// int responseCode = (int) feedback.get("responseCode");
|
int responseCode = (int) feedback.get("responseCode");
|
||||||
// String responseMessage = (String) feedback.get("responseMessage");
|
String responseMessage = (String) feedback.get("responseMessage");
|
||||||
// if (responseCode == 0) {
|
if (responseCode == 0) {
|
||||||
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());
|
logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "200", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
// } else{
|
} else {
|
||||||
// map.put("status", 400);
|
map.put("status", 400);
|
||||||
// map.put("message", "操作失败");
|
map.put("message", "操作失败");
|
||||||
// type = "erro";
|
type = "erro";
|
||||||
// logServer.log(task_code, "waitpointRequest", type, param.toString(), String.valueOf(map), "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("请求失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,6 +181,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
|||||||
map.put("status", 400);
|
map.put("status", 400);
|
||||||
map.put("message", "请求失败,IN OUT 站点错误!");
|
map.put("message", "请求失败,IN OUT 站点错误!");
|
||||||
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
|
||||||
return map;
|
throw new BadRequestException("请求失败,终点位置无货!");
|
||||||
|
//return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,6 @@ file:
|
|||||||
avatarMaxSize: 5
|
avatarMaxSize: 5
|
||||||
|
|
||||||
agvToAcs:
|
agvToAcs:
|
||||||
addr: http://127.0.0.1:8010/api/agv/waitpointRequest
|
addr: http://127.0.0.1:8010
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user