|
|
|
|
@ -371,7 +371,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
|
// 5. 设置结束工位ID并处理不同回库类型
|
|
|
|
|
Long endWcId = returnToWarehouseDto.getEndWcId(); |
|
|
|
|
task.setWcId(endWcId); |
|
|
|
|
if (!returnToWarehouseDto.getStationRegion().isEmpty()) { |
|
|
|
|
if (returnToWarehouseDto.getStationRegion()!=null) { |
|
|
|
|
task.setStationRegion(returnToWarehouseDto.getStationRegion()); |
|
|
|
|
} |
|
|
|
|
if (endWcId == 0) { |
|
|
|
|
@ -870,8 +870,10 @@ public class IOrderBoxServiceImpl implements IOrderBoxService { |
|
|
|
|
// 异常处理:回滚任务
|
|
|
|
|
taskService.removeById(task); |
|
|
|
|
List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().eq(Station::getId, task.getStationId())); |
|
|
|
|
stationList.get(0).setStationStatus(STATUS_FREE); |
|
|
|
|
stationService.updateById(stationList.get(0)); |
|
|
|
|
if (stationList!=null&&stationList.size()!=0) { |
|
|
|
|
stationList.get(0).setStationStatus(STATUS_FREE); |
|
|
|
|
stationService.updateById(stationList.get(0)); |
|
|
|
|
} |
|
|
|
|
log.error("【AGV调度】任务{}调度异常,已回滚", task.getId(), e); |
|
|
|
|
return R.fail("AGV小车调用异常:" + e.getMessage()); |
|
|
|
|
} |
|
|
|
|
|