|
@ -168,10 +168,9 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
|
|
|
|
|
|
Instruction inst = instructionService.findByCodeFromCache(jobno); |
|
|
Instruction inst = instructionService.findByCodeFromCache(jobno); |
|
|
TaskDto task = taskService.findByCode(inst.getTask_code()); |
|
|
TaskDto task = taskService.findByCode(inst.getTask_code()); |
|
|
|
|
|
|
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
Device addressdevice = appService.findDeviceByCode(address); |
|
|
Device addressdevice = appService.findDeviceByCode(address); |
|
|
|
|
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); |
|
|
|
|
|
|
|
|
LubeiConveyorDeviceDriver lubeiConveyorDeviceDriver; |
|
|
LubeiConveyorDeviceDriver lubeiConveyorDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; |
|
@ -182,18 +181,36 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
if(lubeiConveyorDeviceDriver.getMove()==1 && lubeiConveyorDeviceDriver.getAction()==1){ |
|
|
if(lubeiConveyorDeviceDriver.getMove()==1 && lubeiConveyorDeviceDriver.getAction()==1){ |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","applyTake"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "applyTake"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
if(StrUtil.equals(task.getTask_type(),"定点任务")){ |
|
|
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
|
|
|
jo.put("carId", processingVehicle); |
|
|
|
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
|
|
|
jo.put("feedbackStatus", "applyTake"); |
|
|
|
|
|
log.info("请求参数:{}", jo); |
|
|
|
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
|
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
|
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
|
|
|
if (responseCode == 0) { |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
log.info("设备{} 请求取货,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
|
log.info("设备{} 请求取货,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
@ -203,7 +220,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
JSONObject jo = new JSONObject(); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("taskType ",task.getTask_type()); |
|
|
jo.put("feedbackStatus","applyTake"); |
|
|
jo.put("feedbackStatus","applyTake"); |
|
|
log.info("请求参数:{}",jo); |
|
|
log.info("请求参数:{}",jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
@ -215,18 +232,20 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","applyTake"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "applyTake"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -235,25 +254,47 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
if(lubeiConveyorDeviceDriver.getMove()==0){ |
|
|
if(lubeiConveyorDeviceDriver.getMove()==0){ |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","takeFinish"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "takeFinish"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
log.info("请求ZDwcs成功,取货完成 请求结果{}",responseCode); |
|
|
if (responseCode == 0) { |
|
|
} |
|
|
log.info("请求ZDwcs成功,取货完成 请求结果{}", responseCode); |
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
} |
|
|
if(lubeiConveyorDeviceDriver.getTo_command() == 2){ |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
|
|
|
if (lubeiConveyorDeviceDriver.getTo_command() == 2) { |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
if(StrUtil.equals(task.getTask_type(),"定点任务")){ |
|
|
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
|
|
|
jo.put("carId", processingVehicle); |
|
|
|
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
|
|
|
jo.put("feedbackStatus", "takeFinish"); |
|
|
|
|
|
log.info("请求参数:{}", jo); |
|
|
|
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
|
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
|
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
|
|
|
if (responseCode == 0) { |
|
|
|
|
|
log.info("请求ZDwcs成功,取货完成 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
|
|
|
if (lubeiConveyorDeviceDriver.getTo_command() == 2) { |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(2); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
|
} |
|
|
} |
|
@ -262,7 +303,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
JSONObject jo = new JSONObject(); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("taskType ",task.getTask_type()); |
|
|
jo.put("feedbackStatus","takeFinish"); |
|
|
jo.put("feedbackStatus","takeFinish"); |
|
|
log.info("请求参数:{}",jo); |
|
|
log.info("请求参数:{}",jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
@ -274,18 +315,20 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","takeFinish"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "takeFinish"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,取货完成 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -297,18 +340,36 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
if(lubeiConveyorDeviceDriver.getMove()==0 && lubeiConveyorDeviceDriver.getAction()==1){ |
|
|
if(lubeiConveyorDeviceDriver.getMove()==0 && lubeiConveyorDeviceDriver.getAction()==1){ |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","applyPut"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "applyPut"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,开始放货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,开始放货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
if(StrUtil.equals(task.getTask_type(),"定点任务")){ |
|
|
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
|
|
|
jo.put("carId", processingVehicle); |
|
|
|
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
|
|
|
jo.put("feedbackStatus", "applyPut"); |
|
|
|
|
|
log.info("请求参数:{}", jo); |
|
|
|
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
|
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
|
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
|
|
|
if (responseCode == 0) { |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,开始放货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
log.info("设备{} 请求放货,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
|
log.info("设备{} 请求放货,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
@ -318,7 +379,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
JSONObject jo = new JSONObject(); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("taskType ",task.getTask_type()); |
|
|
jo.put("feedbackStatus","applyPut"); |
|
|
jo.put("feedbackStatus","applyPut"); |
|
|
log.info("请求参数:{}",jo); |
|
|
log.info("请求参数:{}",jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
@ -330,18 +391,20 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","applyPut"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "applyPut"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,开始放货 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -349,23 +412,46 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof LubeiConveyorDeviceDriver) { |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
lubeiConveyorDeviceDriver = (LubeiConveyorDeviceDriver) addressdevice.getDeviceDriver(); |
|
|
if(lubeiConveyorDeviceDriver.getMove()==1){ |
|
|
if(lubeiConveyorDeviceDriver.getMove()==1){ |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","putFinish"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "putFinish"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
log.info("请求ZDwcs成功,放货完成 请求结果{}",responseCode); |
|
|
if (responseCode == 0) { |
|
|
} |
|
|
log.info("请求ZDwcs成功,放货完成 请求结果{}", responseCode); |
|
|
lubeiConveyorDeviceDriver.writing(3); |
|
|
} |
|
|
if(lubeiConveyorDeviceDriver.getTo_command() == 3){ |
|
|
lubeiConveyorDeviceDriver.writing(4); |
|
|
is_feedback = true; |
|
|
if (lubeiConveyorDeviceDriver.getTo_command() == 4) { |
|
|
} else { |
|
|
is_feedback = true; |
|
|
lubeiConveyorDeviceDriver.writing(3); |
|
|
} else { |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(4); |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
if(StrUtil.equals(task.getTask_type(),"定点任务")){ |
|
|
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
|
|
|
jo.put("carId", processingVehicle); |
|
|
|
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
|
|
|
jo.put("feedbackStatus", "putFinish"); |
|
|
|
|
|
log.info("请求参数:{}", jo); |
|
|
|
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
|
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
|
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
|
|
|
if (responseCode == 0) { |
|
|
|
|
|
log.info("请求ZDwcs成功,放货完成 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(4); |
|
|
|
|
|
if (lubeiConveyorDeviceDriver.getTo_command() == 4) { |
|
|
|
|
|
is_feedback = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
lubeiConveyorDeviceDriver.writing(4); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
|
log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); |
|
@ -375,7 +461,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
JSONObject jo = new JSONObject(); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("taskType ",task.getTask_type()); |
|
|
jo.put("feedbackStatus","putFinish"); |
|
|
jo.put("feedbackStatus","putFinish"); |
|
|
log.info("请求参数:{}",jo); |
|
|
log.info("请求参数:{}",jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
@ -387,18 +473,20 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
if (addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver) { |
|
|
JSONObject jo = new JSONObject(); |
|
|
if (!StrUtil.startWith(task.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { |
|
|
jo.put("taskCode",task.getTask_code()); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("carId",processingVehicle); |
|
|
jo.put("taskCode", task.getTask_code()); |
|
|
jo.put("taskType ",type); |
|
|
jo.put("carId", processingVehicle); |
|
|
jo.put("feedbackStatus","putFinish"); |
|
|
jo.put("taskType ", task.getTask_type()); |
|
|
log.info("请求参数:{}",jo); |
|
|
jo.put("feedbackStatus", "putFinish"); |
|
|
HttpResponse result= acsToWmsZDService.taskFeedback(jo); |
|
|
log.info("请求参数:{}", jo); |
|
|
JSONObject response=JSONObject.parseObject(result.body()); |
|
|
HttpResponse result = acsToWmsZDService.taskFeedback(jo); |
|
|
int responseCode= response.getInteger("responseCode"); |
|
|
JSONObject response = JSONObject.parseObject(result.body()); |
|
|
if(responseCode == 0) { |
|
|
int responseCode = response.getInteger("responseCode"); |
|
|
is_feedback = true; |
|
|
if (responseCode == 0) { |
|
|
log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); |
|
|
is_feedback = true; |
|
|
|
|
|
log.info("请求ZDwcs成功,放货完成 请求结果{}", responseCode); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -416,8 +504,8 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
System.out.println("back agv:" + requestjo); |
|
|
System.out.println("back agv:" + requestjo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL); |
|
|
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT); |
|
|
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); |
|
|
|
|
|
|
|
|
agvurl = agvurl + ":" + agvport + "/rmds/v1/transportOrders/" + jobno + "/interact"; |
|
|
agvurl = agvurl + ":" + agvport + "/rmds/v1/transportOrders/" + jobno + "/interact"; |
|
|
|
|
|
|
|
@ -426,6 +514,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { |
|
|
.body(String.valueOf(requestjo)) |
|
|
.body(String.valueOf(requestjo)) |
|
|
.timeout(20000)//超时,毫秒
|
|
|
.timeout(20000)//超时,毫秒
|
|
|
.execute(); |
|
|
.execute(); |
|
|
|
|
|
log.info("请求地址agvurl{},请求结果{}",agvurl,result.body()); |
|
|
} |
|
|
} |
|
|
return requestjo.toString(); |
|
|
return requestjo.toString(); |
|
|
|
|
|
|
|
|