#
Junjie
2024-08-16 d4f47a3c09e994f896dc358df93656751a812e49
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java
@@ -53,6 +53,17 @@
            throw new CoolException("托盘正在入库中");
        }
        OrderDetl orderDetl = orderDetlService.getById(waitPakin.getDetlId());
        if (orderDetl == null) {
            throw new CoolException("订单明细不存在");
        }
        //可用数量
        Double count = orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty() - orderDetl.getWaitQty();
        if (waitPakin.getAnfme() > count) {
            throw new CoolException("组托数量超过剩余可用数量");
        }
        //查询是否存在相同明细和托盘码的组托通知档
        WaitPakin waitPakin1 = this.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakin.getBarcode()).eq(WaitPakin::getDetlId, waitPakin.getDetlId()));
        if (waitPakin1 == null) {
@@ -67,11 +78,6 @@
            if (!this.updateById(waitPakin1)) {
                throw new CoolException("添加失败");
            }
        }
        OrderDetl orderDetl = orderDetlService.getById(waitPakin.getDetlId());
        if (orderDetl == null) {
            throw new CoolException("订单明细不存在");
        }
        //获取订单