| | |
| | | throw new CoolException("库位信息更新失败!!"); |
| | | } |
| | | |
| | | |
| | | |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (taskItems.isEmpty()) { |
| | | throw new CoolException("任务明细不存在!!"); |
| | | } |
| | | |
| | | List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | list.forEach(item -> { |
| | | item.setOrderId(taskItems.get(0).getSourceId()); |
| | | item.setType(taskItems.get(0).getOrderType()); |
| | | item.setOrderItemId(taskItems.get(0).getSource()); |
| | | item.setPlatOrderCode(taskItems.get(0).getSourceCode()); |
| | | }); |
| | | |
| | | locItemService.updateBatchById(list); |
| | | |
| | | TaskItem taskItem = taskItems.stream().findFirst().get(); |
| | | //保存入出库流水 |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Task pickOrCheckTask(Long id, String oType) throws Exception { |
| | | public synchronized Task pickOrCheckTask(Long id, String oType) throws Exception { |
| | | Task task = this.getById(id); |
| | | if (Objects.isNull(task)) { |
| | | throw new CoolException("当前任务不存在!!"); |
| | |
| | | .setIoType(type) |
| | | .setLocType1(Integer.parseInt(loc.getType())); |
| | | //获取新库位 |
| | | InTaskMsgDto locInfo = wcsService.getLocNo(param); |
| | | InTaskMsgDto locInfo = null; |
| | | try{ |
| | | locInfo = wcsService.getLocNo(param); |
| | | } catch (Exception e) { |
| | | throw new CoolException("获取库位失败!!"+e.getMessage()); |
| | | } |
| | | |
| | | if (Objects.isNull(locInfo)) { |
| | | throw new CoolException("获取库位失败!!"); |