| | |
| | | private LocReviseService locReviseService; |
| | | |
| | | @Autowired |
| | | private ReviseLogService reviseLogService; |
| | | |
| | | @Autowired |
| | | private LocItemService locItemService; |
| | | |
| | | @Autowired |
| | |
| | | .setCreateBy(loginUserId) |
| | | .setUpdateBy(loginUserId) |
| | | .setReviseCode(locRevise.getCode()); |
| | | if (!reviseLogService.save(reviseLog)) { |
| | | if (!this.save(reviseLog)) { |
| | | throw new CoolException("调整单明细保存失败!!"); |
| | | } |
| | | |
| | |
| | | if (!revise.getExceStatus().equals(CommonExceStatus.COMMON_EXCE_STATUS_EXCE_ING.val)) { |
| | | throw new CoolException("单据状态未执行或已完成,无法执行完成操作!!"); |
| | | } |
| | | List<ReviseLog> logs = reviseLogService.list(new LambdaQueryWrapper<ReviseLog>().eq(ReviseLog::getReviseId, revise.getId())); |
| | | List<ReviseLog> logs = this.list(new LambdaQueryWrapper<ReviseLog>().eq(ReviseLog::getReviseId, revise.getId())); |
| | | if (logs.isEmpty()) { |
| | | throw new CoolException("库存日志不存在!!"); |
| | | } |
| | |
| | | throw new CoolException("库位不存在!!"); |
| | | } |
| | | List<LocItem> list = locItemService.list(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |
| | | if (!list.isEmpty()) { |
| | | if (list.isEmpty()) { |
| | | throw new CoolException("库位:" + loc.getCode() + ", 调整信息为空!!"); |
| | | } |
| | | locItemService.remove(new LambdaQueryWrapper<LocItem>().eq(LocItem::getLocId, loc.getId())); |