`1`
pjb
2025-07-16 364f6a4410c39a2881e11975c8c459857c8490e6
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WaitPakinServiceImpl.java
@@ -60,13 +60,16 @@
        }
        //可用数量
        Double count = orderDetl.getAnfme() - orderDetl.getWaitQty();
        if (waitPakin.getAnfme() > count) {
//        Double count = orderDetl.getAnfme() - orderDetl.getQty() - orderDetl.getWorkQty() - orderDetl.getWaitQty();
        Double count = Math.round((orderDetl.getAnfme() - orderDetl.getWorkQty() - orderDetl.getQty()) * 1000) / 1000.0;
        if (waitPakin.getAnfme().compareTo(count) > 0) {
            throw new CoolException("组托数量超过剩余可用数量");
        }
        //查询是否存在相同明细和托盘码的组托通知档
        WaitPakin waitPakin1 = this.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakin.getBarcode()).eq(WaitPakin::getDetlId, waitPakin.getDetlId()));
        WaitPakin waitPakin1 = this.getOne(new LambdaQueryWrapper<WaitPakin>()
                .eq(WaitPakin::getBarcode, waitPakin.getBarcode())
                .eq(WaitPakin::getDetlId, waitPakin.getDetlId()));
        if (waitPakin1 == null) {
            //不存在组托通知档,创建
            waitPakin.setMatnr(orderDetl.getMat$().getMatnr());