Browse Source

更新

master
gengby 2 years ago
parent
commit
161399d435
  1. 4
      acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
  2. 23
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  3. 2
      acs/nladmin-system/src/main/resources/config/application.yml

4
acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java

@ -163,10 +163,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (!ObjectUtil.isEmpty(inst)) { if (!ObjectUtil.isEmpty(inst)) {
instructionService.finish(inst.getInstruction_id()); instructionService.finish(inst.getInstruction_id());
} else { } else {
log.warn("指令号:{},未反馈wms任务完成,因为agv上报指令号查询指令为空!"); log.warn("指令号:{},未反馈wms任务完成,因为agv上报指令号查询指令为空!",inst.getInstruction_code());
} }
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},已反馈agv任务完成!"); log.info("指令号:{},已反馈agv任务完成!",inst.getInstruction_code());
} }
//请求删除任务 //请求删除任务
//(需要WCS反馈) //(需要WCS反馈)

23
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -3,6 +3,7 @@ package org.nl.acs.device_driver.basedriver.agv.ndcone;
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.HttpResponse; import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.Data; import lombok.Data;
@ -186,8 +187,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
req.add(map); req.add(map);
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req);
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
String respBody = httpResponse.body();
if (respBody.length() <= 3) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code());
} else {
log.warn("指令号:{},acs请求wms取货申请失败,wms反馈失败,未反馈agv允许取货,原因:{}", inst.getInstruction_code(), respBody);
}
} else { } else {
log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code());
} }
@ -244,8 +250,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
req.add(map); req.add(map);
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req);
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
String respBody = httpResponse.body();
if (respBody.length() <= 3) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs反馈wms取货完成成功,wms允许agv取货完成,已反馈agv取货完成", inst.getInstruction_code()); log.info("指令号:{},acs反馈wms取货完成成功,wms允许agv取货完成,已反馈agv取货完成", inst.getInstruction_code());
} else {
log.warn("指令号:{},acs反馈wms取货完成失败,wms反馈失败,未反馈agv允许取货,原因:{}", inst.getInstruction_code(), respBody);
}
} else { } else {
log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code()); log.warn("指令号:{},acs反馈wms取货完成失败,连接被拒绝,未反馈agv取货完成", inst.getInstruction_code());
} }
@ -298,8 +309,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
req.add(map); req.add(map);
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req);
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
String respBody = httpResponse.body();
if (respBody.length() <= 3) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code());
} else {
log.warn("指令号:{},acs反馈wms放货申请失败,wms不允许放货,未反馈agv允许放货,原因:{}", inst.getInstruction_code(), respBody);
}
} else { } else {
log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code());
} }
@ -352,10 +368,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
req.add(map); req.add(map);
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req);
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
String respBody = httpResponse.body();
if (respBody.length() <= 3) {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
log.info("指令号:{},acs请求wms放货完成成功", inst.getInstruction_code()); log.info("指令号:{},acs请求wms放货完成成功", inst.getInstruction_code());
} else { } else {
log.warn("指令号:{},acs请求wms放货完成失败", inst.getInstruction_code()); log.warn("指令号:{},acs反馈wms放货完成失败,wms反馈失败,未反馈agv允许放货,原因:{}", inst.getInstruction_code(), respBody);
}
} else {
log.warn("指令号:{},acs请求wms放货完成失败,原因:{}", inst.getInstruction_code(), JSON.toJSONString(httpResponse));
} }
} else { } else {
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);

2
acs/nladmin-system/src/main/resources/config/application.yml

@ -2,7 +2,7 @@ spring:
freemarker: freemarker:
check-template-location: false check-template-location: false
profiles: profiles:
active: dev active: prod
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
data: data:

Loading…
Cancel
Save