| | |
| | | /**获取组拖*/ |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>() |
| | | .in(WaitPakin::getId, pakins.getId()) |
| | | .eq(WaitPakin::getIoStatus, Short.parseShort(PakinIOStatus.PAKIN_IO_STATUS_DONE.val))); |
| | | .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)); |
| | | if (waitPakins.isEmpty()) { |
| | | throw new CoolException("请检查组托状态是否完成!!"); |
| | | } |
| | |
| | | /**获取组拖*/ |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>() |
| | | .in(WaitPakin::getId, pakins.getId()) |
| | | .eq(WaitPakin::getIoStatus, Short.parseShort(PakinIOStatus.PAKIN_IO_STATUS_DONE.val))); |
| | | .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)); |
| | | if (waitPakins.isEmpty()) { |
| | | throw new CoolException("请检查组托状态是否完成!!"); |
| | | } |
| | |
| | | List<Long> ids = waitPakin.getWaitPakins().stream().map(WaitPakin::getId).collect(Collectors.toList()); |
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>() |
| | | .in(WaitPakin::getId, ids) |
| | | .eq(WaitPakin::getIoStatus, Short.parseShort(PakinIOStatus.PAKIN_IO_STATUS_DONE.val))); |
| | | .eq(WaitPakin::getIoStatus, PakinIOStatus.PAKIN_IO_STATUS_DONE.val)); |
| | | if (waitPakins.isEmpty()) { |
| | | throw new CoolException("请检查组拖状态是否完成!!"); |
| | | } |
| | |
| | | throw new CoolException("更新组托状态失败!!"); |
| | | } |
| | | } |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getTaskType() < TaskStsType.UPDATED_IN.id ? task.getTargLoc() : task.getOrgLoc())); |
| | | if (null != loc |
| | | && (loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type) |
| | | || loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type))) { |
| | | |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getTaskType() < TaskStsType.UPDATED_IN.id ? task.getTargLoc() : task.getOrgLoc())); |
| | | if (null != loc && (loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type) || loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type))) { |
| | | loc.setUseStatus(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!locService.updateById(loc)) { |
| | | throw new CoolException("更新库位状态失败!!"); |
| | |
| | | ) { |
| | | basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, task.getTargLoc()) |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type) |
| | | ); |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type)); |
| | | } |
| | | if (null == basStation) { |
| | | throw new CoolException("站点状态错误!!"); |
| | |
| | | if (!basStationService.updateById(basStation)) { |
| | | throw new CoolException("更新站点状态失败!!"); |
| | | } |
| | | } |
| | | |
| | | if (!taskItemService.remove(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId()))) { |
| | | throw new CoolException("任务明细删除失败!!"); |
| | | } |
| | | } |
| | | if (!this.removeByIds(Arrays.asList(ids))) { |
| | |
| | | if (Objects.isNull(itemServiceOne)) { |
| | | throw new CoolException("数据错误:请查看请货区库存是否存在!!"); |
| | | } |
| | | Double workQty = itemServiceOne.getWorkQty() - pakinItem.getAnfme(); |
| | | Double qty = itemServiceOne.getQty() + pakinItem.getAnfme(); |
| | | Double workQty = Math.round((itemServiceOne.getWorkQty() - pakinItem.getAnfme()) * 10000) / 10000.0; |
| | | Double qty = Math.round((itemServiceOne.getQty() + pakinItem.getAnfme()) * 10000) / 10000.0; |
| | | itemServiceOne.setWorkQty(workQty).setQty(qty); |
| | | |
| | | if (!waitPakinService.update(new LambdaUpdateWrapper<WaitPakin>() |