|
@ -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) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
String respBody = httpResponse.body(); |
|
|
log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); |
|
|
if (respBody.length() <= 3) { |
|
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
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) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
String respBody = httpResponse.body(); |
|
|
log.info("指令号:{},acs反馈wms取货完成成功,wms允许agv取货完成,已反馈agv取货完成", inst.getInstruction_code()); |
|
|
if (respBody.length() <= 3) { |
|
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
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) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
String respBody = httpResponse.body(); |
|
|
log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); |
|
|
if (respBody.length() <= 3) { |
|
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
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) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
String respBody = httpResponse.body(); |
|
|
log.info("指令号:{},acs请求wms放货完成成功", inst.getInstruction_code()); |
|
|
if (respBody.length() <= 3) { |
|
|
|
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
|
|
|
log.info("指令号:{},acs请求wms放货完成成功", inst.getInstruction_code()); |
|
|
|
|
|
} else { |
|
|
|
|
|
log.warn("指令号:{},acs反馈wms放货完成失败,wms反馈失败,未反馈agv允许放货,原因:{}", inst.getInstruction_code(), respBody); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
log.warn("指令号:{},acs请求wms放货完成失败", inst.getInstruction_code()); |
|
|
log.warn("指令号:{},acs请求wms放货完成失败,原因:{}", inst.getInstruction_code(), JSON.toJSONString(httpResponse)); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|