| | |
| | | if (Objects.isNull(loc)) { |
| | | throw new CoolException("库存不存在!!"); |
| | | } |
| | | // if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | // throw new CoolException("当前库位状态不处于S.入库预约,不可执行入库操作!"); |
| | | // } |
| | | if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) { |
| | | throw new CoolException("当前库位状态不处于S.入库预约,不可执行入库操作!"); |
| | | } |
| | | |
| | | loc.setUseStatus(LocStsType.LOC_STS_TYPE_F.type) |
| | | .setBarcode(task.getBarcode()) |
| | |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) { |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().in(TaskItem::getTaskId, Arrays.asList(ids))); |
| | | if (!taskItems.isEmpty()) { |
| | | |
| | | taskItems.forEach(taskItem -> { |
| | | if (!checkOrderItemService.update(new LambdaUpdateWrapper<WkOrderItem>() |
| | | .eq(WkOrderItem::getId, taskItem.getOrderItemId()) |
| | |
| | | } |
| | | }); |
| | | }); |
| | | List<Long> matnrIds = taskItems.stream().map(TaskItem::getMatnrId).collect(Collectors.toList()); |
| | | List<String> matnrIds = taskItems.stream().map(TaskItem::getFieldsIndex).collect(Collectors.toList()); |
| | | //删除与任务明细重复的库存信息,以任务明细为准 |
| | | List<LocItemWorking> itemWorkings = tempLocs.stream() |
| | | .filter(working -> !matnrIds.contains(working.getMatnrId())) |
| | | .filter(working -> !matnrIds.contains(working.getFieldsIndex())) |
| | | .collect(Collectors.toList()); |
| | | itemWorkings.forEach(working -> { |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |