| | |
| | | throw new CoolException("目标库位不存在!!"); |
| | | } |
| | | |
| | | // List<LocItemWorking> workings = new ArrayList<>(); |
| | | // List<TaskItem> items = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | // items.forEach(taskItem -> { |
| | | // if (taskItem.getAnfme() > 0) { |
| | | // LocItemWorking itemWorking = new LocItemWorking(); |
| | | // BeanUtils.copyProperties(taskItem, itemWorking); |
| | | // itemWorking.setTaskId(task.getId()) |
| | | // .setLocId(loc1.getId()) |
| | | // .setLocCode(loc1.getCode()); |
| | | // workings.add(itemWorking); |
| | | // } |
| | | // }); |
| | | // |
| | | // if (!locItemWorkingService.saveBatch(workings)) { |
| | | // throw new CoolException("临时库存更新失败!!"); |
| | | // } |
| | | List<LocItemWorking> workings = new ArrayList<>(); |
| | | List<TaskItem> items = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | items.forEach(taskItem -> { |
| | | if (taskItem.getAnfme() > 0) { |
| | | LocItemWorking itemWorking = new LocItemWorking(); |
| | | BeanUtils.copyProperties(taskItem, itemWorking); |
| | | itemWorking.setTaskId(task.getId()) |
| | | .setLocId(loc1.getId()) |
| | | .setLocCode(loc1.getCode()); |
| | | workings.add(itemWorking); |
| | | } |
| | | }); |
| | | |
| | | if (!locItemWorkingService.saveBatch(workings)) { |
| | | throw new CoolException("临时库存更新失败!!"); |
| | | } |
| | | |
| | | loc1.setUseStatus(LocStsType.LOC_STS_TYPE_S.type); |
| | | |