#
luxiaotao1123
2020-06-18 e4e8132629c4d8d9ea3ac585b3f22793be000fa5
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -469,13 +469,19 @@
            throw new CoolException("库位不存在");
        }
        for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
            if (Cools.isEmpty(adjust.getMatnr())) {
                throw new CoolException(BaseRes.PARAM);
            }
            LocDetl sqlParam = new LocDetl();
            sqlParam.setLocNo(locMast.getLocNo());
            sqlParam.setMatnr(adjust.getMatNo());
            sqlParam.setMatnr(adjust.getMatnr());
            LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam));
            // 保存新库存明细
            if (Cools.isEmpty(one)) {
                MatCode matCode = matCodeService.selectById(adjust.getMatNo());
                if (adjust.getCount() == 0){
                    continue;
                }
                MatCode matCode = matCodeService.selectById(adjust.getMatnr());
                LocDetl locDetl = new LocDetl();
                locDetl.setLocNo(locMast.getLocNo());
                locDetl.setMatnr(matCode.getMatNo());
@@ -512,7 +518,7 @@
                        sqlParam1.setModiUser(userId);
                        if (!locDetlService.update(sqlParam1, new EntityWrapper<LocDetl>()
                                .eq("loc_no", locMast.getLocNo())
                                .eq("matnr", adjust.getMatNo()))) {
                                .eq("matnr", adjust.getMatnr()))) {
                            throw new CoolException("修改库存明细失败");
                        }
                    }