物流改写

liweidong
绫Umbrella 2 weeks ago
parent 60297e01e2
commit d9eed7cb2a
  1. 16
      blade-service/blade-desk/src/main/java/org/springblade/desk/logistics/service/impl/IOrderBoxServiceImpl.java

@ -310,9 +310,11 @@ public class IOrderBoxServiceImpl implements IOrderBoxService {
if (updateResult) { if (updateResult) {
log.info("【站点状态接收】站点编码{}已置为空闲", stationCode); log.info("【站点状态接收】站点编码{}已置为空闲", stationCode);
List<Task> taskList = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getStationId, targetStation.getId()).orderByDesc(Task::getUpdateTime)); List<Task> taskList = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getStationId, targetStation.getId()).orderByDesc(Task::getUpdateTime));
BoxBindingDto boxBindingDto = new BoxBindingDto(); if (taskList != null && !taskList.isEmpty()) {
boxBindingDto.setBoxBarcode(taskList.get(0).getBoxBarcode()); BoxBindingDto boxBindingDto = new BoxBindingDto();
orderBindService.boxUnbind(boxBindingDto); boxBindingDto.setBoxBarcode(taskList.get(0).getBoxBarcode());
orderBindService.boxUnbind(boxBindingDto);
}
return R.success(); return R.success();
} else { } else {
log.error("【站点状态接收】站点编码{}状态更新失败", stationCode); log.error("【站点状态接收】站点编码{}状态更新失败", stationCode);
@ -880,8 +882,10 @@ public class IOrderBoxServiceImpl implements IOrderBoxService {
// 调度失败:回滚任务 // 调度失败:回滚任务
taskService.removeById(task); taskService.removeById(task);
List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().eq(Station::getId, task.getStationId())); List<Station> stationList = stationService.list(new LambdaQueryWrapper<Station>().eq(Station::getId, task.getStationId()));
stationList.get(0).setStationStatus(STATUS_FREE); if (stationList != null && !stationList.isEmpty()) {
stationService.updateById(stationList.get(0)); stationList.get(0).setStationStatus(STATUS_FREE);
stationService.updateById(stationList.get(0));
}
log.error("【AGV调度】任务{}调度失败,已回滚", task.getId()); log.error("【AGV调度】任务{}调度失败,已回滚", task.getId());
return R.fail("AGV小车调用异常"); return R.fail("AGV小车调用异常");
} }
@ -1077,7 +1081,7 @@ public class IOrderBoxServiceImpl implements IOrderBoxService {
new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, wcId) new LambdaQueryWrapper<StationCenter>().eq(StationCenter::getWcId, wcId)
); );
if (stationCenterList != null || stationCenterList.size() > 0) { if (stationCenterList != null && stationCenterList.size() > 0) {
// StationCenter stationCenter = stationCenterList.get(0); // StationCenter stationCenter = stationCenterList.get(0);
// Station station = stationService.getById(stationCenter.getStationId()); // Station station = stationService.getById(stationCenter.getStationId());
List<Long> stationIdList = stationCenterList.stream().map(s -> s.getStationId()).toList(); List<Long> stationIdList = stationCenterList.stream().map(s -> s.getStationId()).toList();

Loading…
Cancel
Save