自动化立体仓库 - WMS系统
#
zyx
2024-06-06 b2a895946c2e261eec55e6e86daf44fb21825818
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1378,15 +1378,34 @@
                throw new CoolException("请检查输入的库位码");
            }
            plaEntityWrapper.eq("loc_no",barcode);
            plaEntityWrapper.notLike("status","全部出库");
        }else {
            throw new CoolException("条码信息有误!");
        }
        plaEntityWrapper.eq(false,"status","全部出库");
        List<Pla> plaList = plaService.selectList(plaEntityWrapper);
        if (Cools.isEmpty(plaList)){
            throw new CoolException("未查询到库存物料信息");
        }
        return plaList;
    }
    public boolean checkMaximum(String locNo, int packageNum){
        Node node = nodeService.selectByUuid(locNo);
        Node nodeParent = nodeService.selectById(node.getParentId());
        if(Cools.isEmpty(nodeParent.getMajor())){
            return true;
        }
        //当前库存包数
        int count = plaService.selectCount(new EntityWrapper<Pla>().eq("loc_no", locNo)
                .notIn("status", "全部出库"));
        if(nodeParent.getMajor() < count + packageNum){
            return false;
        }
        return true;
    }
}