| | |
| | | } |
| | | } |
| | | |
| | | //清空源库位数据 |
| | | //检查目标库位,库存明细是否添加成功 |
| | | List<LocDetl> checkLocDetls = locDetlService.selectByLocNo(dto.getLocNo()); |
| | | if (checkLocDetls.isEmpty()) { |
| | | throw new CoolException("库存明细迁移失败"); |
| | | } |
| | | |
| | | // //清空源库位数据 |
| | | LocMast locMast1 = locMastService.selectByLoc(wrkMast.getSourceLocNo()); |
| | | if (locMast1.getLocSts().equals("P")) { |
| | | locMast1.setLocSts("O"); // 清空库位 |
| | | locMast1.setModiTime(new Date()); |
| | | if (!locMastService.updateById(locMast1)) { |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException("源库位状态异常"); |
| | | } |
| | | // if (locMast1.getLocSts().equals("P")) { |
| | | // locMast1.setLocSts("O"); // 清空库位 |
| | | // locMast1.setModiTime(new Date()); |
| | | // if (!locMastService.updateById(locMast1)) { |
| | | // throw new CoolException("改变库位状态失败"); |
| | | // } |
| | | // } else { |
| | | // throw new CoolException("源库位状态异常"); |
| | | // } |
| | | |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |