| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void adjustLocDetl(LocDetlAdjustParam param, Long userId) { |
| | | LocMast locMast = locMastService.selectById(param.getLocNo()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | // 清除旧库存明细 |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | // 保存新库存明细 |
| | | for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) { |
| | | LocDetl locDetl = new LocDetl(); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | throw new CoolException("保存库存明细失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |