自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-18 55ae06700679184e017d9868000870ecf4e6c4aa
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -460,7 +460,21 @@
    }
    @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("保存库存明细失败");
            }
        }
    }