| | |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | throw new CoolException("未找到料箱码对应任务"); |
| | | } |
| | | if (!task.getTaskStatus().equals(TaskStsType.AWAIT.id)) { |
| | | return R.error("任务状态不是等待确认"); |
| | |
| | | } |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, params.getContainer())); |
| | | if (null == task) { |
| | | throw new CoolException("数据错误,未找到容器码对应盘点任务"); |
| | | throw new CoolException("数据错误,未找到料箱码对应盘点任务"); |
| | | } |
| | | for (CheckDiffItem ckDiffItem : params.getCheckDiffItems()) { |
| | | CheckDiffItem diffItem = new CheckDiffItem(); |
| | |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | throw new CoolException("未找到料箱码对应任务"); |
| | | } |
| | | if (!task.getTaskStatus().equals(TaskStsType.AWAIT.id)) { |
| | | return R.error("任务状态不是等待确认"); |
| | | } |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (Cools.isEmpty(taskItems)) { |
| | | throw new CoolException("未找到该容器码对应的任务明细"); |
| | | throw new CoolException("未找到该料箱码对应的任务明细"); |
| | | } |
| | | String sourceCode = taskItems.stream().findFirst().map(TaskItem::getSourceCode).orElse(null); |
| | | CheckDiff checkDiff = checkDiffService.getOne(new LambdaQueryWrapper<CheckDiff>().eq(CheckDiff::getOrderCode, sourceCode)); |
| | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/11/5 |
| | | * @description: 希日无单据临时盘点 |
| | | * @description: 无单据临时盘点 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | throw new CoolException("未找到料箱码对应任务"); |
| | | } |
| | | // 允许WAVE_SEED(199,等待确认/盘点中)和AWAIT(196,等待确认)两种状态 |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id) |
| | |
| | | } |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (Cools.isEmpty(taskItems)) { |
| | | throw new CoolException("未找到该容器码对应的任务明细"); |
| | | throw new CoolException("未找到该料箱码对应的任务明细"); |
| | | } |
| | | taskItems.forEach(taskItem -> { |
| | | if (!Objects.isNull(taskItem.getFieldsIndex())) { |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(map.get("barcode"))) { |
| | | throw new CoolException("托盘码不能为空!!"); |
| | | throw new CoolException("料箱码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(map.get("matnrs"))) { |
| | | throw new CoolException("新增物料不能为空!!"); |
| | |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | throw new CoolException("未找到料箱码对应任务"); |
| | | } |
| | | if (!task.getTaskStatus().equals(TaskStsType.AWAIT.id)) { |
| | | return R.error("任务状态不是等待确认"); |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(map.get("barcode"))) { |
| | | throw new CoolException("托盘码不能为空!!"); |
| | | throw new CoolException("料箱码不能为空!!"); |
| | | } |
| | | if (Objects.isNull(map.get("items"))) { |
| | | throw new CoolException("新增物料不能为空!!"); |
| | |
| | | lambdaQueryWrapper.eq(Task::getBarcode, barcode); |
| | | Task task = taskService.getOne(lambdaQueryWrapper); |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | throw new CoolException("未找到料箱码对应任务"); |
| | | } |
| | | // 允许WAVE_SEED(199,等待确认/盘点中)和AWAIT(196,等待确认)两种状态 |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id) |
| | |
| | | ReportParams params = new ReportParams(); |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (Objects.isNull(taskItems) || taskItems.isEmpty()) { |
| | | throw new CoolException("托盘明细为空!1"); |
| | | throw new CoolException("料箱明细为空!1"); |
| | | } |
| | | List<ReportDataParam> reportDataParams = new ArrayList<>(); |
| | | taskItems.forEach(taskItem -> { |