|
|
|
@ -172,20 +172,25 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
return RcsResponseVo.error("未找到对应任务"); |
|
|
|
return RcsResponseVo.error("未找到对应任务"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String taskType = businDataTask.getTaskType(); |
|
|
|
|
|
|
|
switch (method) { |
|
|
|
switch (method) { |
|
|
|
case "start": |
|
|
|
case "start": |
|
|
|
|
|
|
|
businDataTask.setTaskStarttime(new Date()); |
|
|
|
|
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); |
|
|
|
|
|
|
|
break; |
|
|
|
case "outbin": |
|
|
|
case "outbin": |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "end": |
|
|
|
case "end": |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.finished.getValue()); |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.finished.getValue()); |
|
|
|
businDataTask.setDestination(slotName); |
|
|
|
businDataTask.setDestination(slotName); |
|
|
|
|
|
|
|
businDataTask.setTaskEntime(new Date()); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
return RcsResponseVo.error("任务状态未知!"); |
|
|
|
return RcsResponseVo.error("任务状态未知!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
businDataTask.setAgvTaskStatus(method); |
|
|
|
businDataTask.setUpdateTime(new Date()); |
|
|
|
businDataTask.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
businDataTask.setAgvNo(bo.getSingleRobotCode()); |
|
|
|
boolean isUpdated = iBusinDataTaskService.updateById(businDataTask); |
|
|
|
boolean isUpdated = iBusinDataTaskService.updateById(businDataTask); |
|
|
|
if (!isUpdated) { |
|
|
|
if (!isUpdated) { |
|
|
|
log.error("任务状态更新失败,任务号:{}", robotTaskCode); |
|
|
|
log.error("任务状态更新失败,任务号:{}", robotTaskCode); |
|
|
|
@ -194,6 +199,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B |
|
|
|
log.info("任务状态更新成功,任务号:{}", robotTaskCode); |
|
|
|
log.info("任务状态更新成功,任务号:{}", robotTaskCode); |
|
|
|
UploadWCSTaskStatusDto uploadWCSTaskStatusDto = new UploadWCSTaskStatusDto(); |
|
|
|
UploadWCSTaskStatusDto uploadWCSTaskStatusDto = new UploadWCSTaskStatusDto(); |
|
|
|
WcsCreateTaskHeader header = new WcsCreateTaskHeader(); |
|
|
|
WcsCreateTaskHeader header = new WcsCreateTaskHeader(); |
|
|
|
|
|
|
|
String taskType = businDataTask.getTaskType(); |
|
|
|
switch (taskType) { |
|
|
|
switch (taskType) { |
|
|
|
case "1": |
|
|
|
case "1": |
|
|
|
header.setBusinessType("stockOutReturn"); |
|
|
|
header.setBusinessType("stockOutReturn"); |
|
|
|
|