| | |
| | | public R getOutStockTaskItem(String barcode) { |
| | | LambdaQueryWrapper<Task> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | Task task = taskService.getOne(lambdaQueryWrapper.last("limit 1")); |
| | | if (null == task) { |
| | | return R.error("未查询到相关任务"); |
| | | } |
| | |
| | | public R saveOutTaskSts(String barcode) { |
| | | LambdaQueryWrapper<Task> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | Task task = taskService.getOne(lambdaQueryWrapper.last("limit 1")); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | } |
| | |
| | | if (Cools.isEmpty(barcode)) { |
| | | throw new CoolException("参数有误"); |
| | | } |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, barcode)); |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, barcode).last("limit 1")); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | } |
| | |
| | | if (null == containerWaveParam || containerWaveParam.getContainerWaveDtos().size() <= 0) { |
| | | return R.error("参数错误"); |
| | | } |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, containerWaveParam.getContainer())); |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, containerWaveParam.getContainer()).last("limit 1")); |
| | | if (null == task) { |
| | | return R.error("未找到托盘对应的任务"); |
| | | } |
| | |
| | | BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, containerWaveParam.getStaNo()) |
| | | .orderByDesc(BasStation::getId) |
| | | .last("LIMIT 1"), false); |
| | | .last("LIMIT 1")); |
| | | |
| | | if (Objects.isNull(basStation)) { |
| | | throw new CoolException(containerWaveParam.getStaNo() + "站点不存在!!"); |
| | |
| | | } |
| | | |
| | | BasContainer basContainer = basContainerService.getOne(new LambdaQueryWrapper<BasContainer>() |
| | | .in(BasContainer::getContainerType, containerWaveParam.getType(), false)); |
| | | .in(BasContainer::getContainerType, containerWaveParam.getType(), false).last("limit 1")); |
| | | if (Cools.isEmpty(basContainer)){ |
| | | throw new CoolException("未查询到相关容器规则"); |
| | | } |