|
@ -132,7 +132,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
inst.setCarno(String.valueOf(carno)); |
|
|
inst.setCarno(String.valueOf(carno)); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data); |
|
|
|
|
|
// JSONArray req = new JSONArray();
|
|
|
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
|
|
map.put("uuid", IdUtil.simpleUUID()); |
|
|
|
|
|
map.put("taskNo", inst.getTask_code()); |
|
|
|
|
|
map.put("businessType", "PENDING"); |
|
|
|
|
|
map.put("containerNo",inst.getVehicle_code()); |
|
|
|
|
|
map.put("deviceNo",inst.getCarno()); |
|
|
|
|
|
// req.add(map);
|
|
|
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(map); |
|
|
//到达取货点
|
|
|
//到达取货点
|
|
|
//(需要WCS反馈)
|
|
|
//(需要WCS反馈)
|
|
|
} else if (phase == 0x03) { |
|
|
} else if (phase == 0x03) { |
|
@ -208,16 +216,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) { |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0") |
|
|
|
|
|
||StrUtil.startWith(inst.getTask_code(), "-")) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
} else { |
|
|
} else { |
|
|
JSONArray req = new JSONArray(); |
|
|
// JSONArray req = new JSONArray();
|
|
|
JSONObject map = new JSONObject(); |
|
|
JSONObject map = new JSONObject(); |
|
|
map.put("uuid", IdUtil.simpleUUID()); |
|
|
map.put("uuid", IdUtil.simpleUUID()); |
|
|
map.put("taskNo", inst.getTask_id()); |
|
|
map.put("taskNo", inst.getTask_code()); |
|
|
map.put("businessType", "LEAVE_FROM_POINT"); |
|
|
map.put("businessType", "LEAVE_FROM_POINT"); |
|
|
req.add(map); |
|
|
map.put("containerNo",inst.getVehicle_code()); |
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
map.put("deviceNo",inst.getCarno()); |
|
|
|
|
|
// req.add(map);
|
|
|
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(map); |
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
if (resp.getInteger("code") == 200) { |
|
|
if (resp.getInteger("code") == 200) { |
|
@ -301,16 +312,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic |
|
|
log.info("未找到编号{}对应的指令", ikey); |
|
|
log.info("未找到编号{}对应的指令", ikey); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0")) { |
|
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "0") |
|
|
|
|
|
||StrUtil.startWith(inst.getTask_code(), "-")) { |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); |
|
|
} else { |
|
|
} else { |
|
|
JSONArray req = new JSONArray(); |
|
|
// JSONArray req = new JSONArray();
|
|
|
JSONObject map = new JSONObject(); |
|
|
JSONObject map = new JSONObject(); |
|
|
map.put("uuid", IdUtil.simpleUUID()); |
|
|
map.put("uuid", IdUtil.simpleUUID()); |
|
|
map.put("taskNo", inst.getTask_id()); |
|
|
map.put("taskNo", inst.getTask_code()); |
|
|
map.put("businessType", "ARRIVE_TO_POINT"); |
|
|
map.put("businessType", "ARRIVE_TO_POINT"); |
|
|
req.add(map); |
|
|
map.put("containerNo",inst.getVehicle_code()); |
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); |
|
|
map.put("deviceNo",inst.getCarno()); |
|
|
|
|
|
// req.add(map);
|
|
|
|
|
|
HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(map); |
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { |
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
JSONObject resp = JSONObject.parseObject(httpResponse.body()); |
|
|
if (resp.getInteger("code") == 200) { |
|
|
if (resp.getInteger("code") == 200) { |
|
|