更新
This commit is contained in:
@@ -35,7 +35,7 @@ public class AgvWaitUtil {
|
||||
//取货前等待
|
||||
public Map<String, Object> waitInGet(String device_code, Map<String, Object> feedMap, JSONObject param) {
|
||||
String inst_code = param.getString("task_code");
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
Instruction instructionDto = instructionService.findByCodeFromCache(inst_code);
|
||||
String task_code = String.valueOf(feedMap.get("taskCode"));
|
||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
@@ -110,7 +110,7 @@ public class AgvWaitUtil {
|
||||
//取货完成等待
|
||||
public Map<String, Object> waitOutGet(String device_code, Map<String, Object> feedMap, JSONObject param) {
|
||||
String inst_code = param.getString("task_code");
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
Instruction instructionDto = instructionService.findByCodeFromCache(inst_code);
|
||||
String task_code = String.valueOf(feedMap.get("taskCode"));
|
||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
@@ -179,7 +179,7 @@ public class AgvWaitUtil {
|
||||
//放货前等待
|
||||
public Map<String, Object> waitInPut(String device_code, Map<String, Object> feedMap, JSONObject param) {
|
||||
String inst_code = param.getString("task_code");
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
Instruction instructionDto = instructionService.findByCodeFromCache(inst_code);
|
||||
String task_code = String.valueOf(feedMap.get("taskCode"));
|
||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
@@ -255,7 +255,7 @@ public class AgvWaitUtil {
|
||||
//放货完成等待
|
||||
public Map<String, Object> waitOutPut(String device_code, Map<String, Object> feedMap, JSONObject param) {
|
||||
String inst_code = param.getString("task_code");
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
Instruction instructionDto = instructionService.findByCodeFromCache(inst_code);
|
||||
String task_code = String.valueOf(feedMap.get("taskCode"));
|
||||
StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver;
|
||||
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
@@ -182,7 +183,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService {
|
||||
String url = wcsurl + methods_url;
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.header("Authorization", token).body(String.valueOf(whereJson))
|
||||
.header("Authorization", token).body(JSON.toJSONString(whereJson))
|
||||
.execute();
|
||||
logServer.log(taskCode, "taskFeedback", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, carId);
|
||||
JSONObject jo = JSONObject.fromObject(result.body());
|
||||
@@ -212,7 +213,8 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService {
|
||||
String url = wcsurl + methods_url;
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.header("Authorization", token).body(String.valueOf(whereJson))
|
||||
.header("Authorization", token)
|
||||
.body(JSON.toJSONString(whereJson))
|
||||
.execute();
|
||||
logServer.log(taskCode, "taskDeprecate", "success", whereJson.toString(), result.body(), String.valueOf(result.getStatus()), url, "");
|
||||
JSONObject jo = JSONObject.fromObject(result.body());
|
||||
@@ -247,7 +249,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService {
|
||||
}
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.header("Authorization", token).body(String.valueOf(whereJson))
|
||||
.header("Authorization", token).body(JSON.toJSONString(whereJson))
|
||||
.execute();
|
||||
JSONObject jo = JSONObject.fromObject(result.body());
|
||||
log.info("checkDeviceStatus-----输出参数{}", jo.toString());
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
public Map<String, Object> waitpointRequest(JSONObject param) {
|
||||
String inst_code = param.getString("task_code");
|
||||
String address = param.getString("address");
|
||||
Instruction instructionDto = instructionService.findByCode(inst_code);
|
||||
Instruction instructionDto = instructionService.findByCodeFromCache(inst_code);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (ObjectUtil.isEmpty(instructionDto)) {
|
||||
map.put("status", 400);
|
||||
@@ -43,7 +43,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
|
||||
Map<String, Object> feedMap = new HashMap();
|
||||
feedMap.put("taskCode", task_code);
|
||||
feedMap.put("taskType", instructionDto.getInstruction_type());
|
||||
feedMap.put("carId", instructionDto.getAgv_jobno());
|
||||
feedMap.put("carId", instructionDto.getCarno());
|
||||
String start_device_code = instructionDto.getStart_device_code();
|
||||
String next_device_code = instructionDto.getNext_device_code();
|
||||
if (address.contains("IN")) {
|
||||
|
||||
@@ -638,7 +638,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
Map<String, Object> feedMap = new HashMap();
|
||||
feedMap.put("taskCode", entity.getTask_code());
|
||||
feedMap.put("taskType", entity.getTask_type());
|
||||
feedMap.put("carId", instruction.getAgv_jobno());
|
||||
String carno = instruction.getCarno();
|
||||
if (StrUtil.isEmpty(carno)){
|
||||
carno = "null";
|
||||
}
|
||||
feedMap.put("feedbackStatus", "errorFinish");
|
||||
Map<String, Object> map = acsToWmsZDService.taskFeedback(feedMap);
|
||||
removeByCodeFromCache(entity.getTask_code());
|
||||
@@ -665,7 +668,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
Map<String, Object> feedMap = new HashMap();
|
||||
feedMap.put("taskCode", entity.getTask_code());
|
||||
feedMap.put("taskType", entity.getTask_type());
|
||||
feedMap.put("carId", instruction.getAgv_jobno());
|
||||
String carno = instruction.getCarno();
|
||||
if (StrUtil.isEmpty(carno)){
|
||||
carno = "null";
|
||||
}
|
||||
feedMap.put("carId", carno);
|
||||
feedMap.put("feedbackStatus", "exception");
|
||||
acsToWmsZDService.taskFeedback(feedMap);
|
||||
removeByCodeFromCache(entity.getTask_code());
|
||||
@@ -692,7 +699,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
Map<String, Object> feedMap = new HashMap();
|
||||
feedMap.put("taskCode", entity.getTask_code());
|
||||
feedMap.put("taskType", entity.getTask_type());
|
||||
feedMap.put("carId", instruction.getAgv_jobno());
|
||||
String carno = instruction.getCarno();
|
||||
if (StrUtil.isEmpty(carno)){
|
||||
carno = "null";
|
||||
}
|
||||
feedMap.put("carId", carno);
|
||||
feedMap.put("feedbackStatus", "deprecate");
|
||||
acsToWmsZDService.taskFeedback(feedMap);
|
||||
removeByCodeFromCache(entity.getTask_code());
|
||||
@@ -719,7 +730,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
Map<String, Object> feedMap = new HashMap();
|
||||
feedMap.put("taskCode", entity.getTask_code());
|
||||
feedMap.put("taskType", entity.getTask_type());
|
||||
feedMap.put("carId", instruction.getAgv_jobno());
|
||||
String carno = instruction.getCarno();
|
||||
if (StrUtil.isEmpty(carno)){
|
||||
carno = "null";
|
||||
}
|
||||
feedMap.put("carId", carno);
|
||||
feedMap.put("feedbackStatus", "NoTargetPutFinish");
|
||||
acsToWmsZDService.taskFeedback(feedMap);
|
||||
removeByCodeFromCache(entity.getTask_code());
|
||||
|
||||
@@ -135,4 +135,4 @@ file:
|
||||
avatarMaxSize: 5
|
||||
|
||||
agvToAcs:
|
||||
addr: http://172.22.50.184:8010
|
||||
addr: http://172.22.50.188:8010
|
||||
|
||||
Reference in New Issue
Block a user