自动化立体仓库 - WMS系统
#
zyx
2024-06-06 b2a895946c2e261eec55e6e86daf44fb21825818
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1268,6 +1268,7 @@
        manPakOut.setCount(manPakOut.getCount() + anfme);
        if (manPakOut.getAnfme().equals(manPakOut.getCount())){
            manPakOut.setStatus(1);
            manPakOut.setUpdateTime(new Date());
            manPakOutService.updateById(manPakOut);
        }
@@ -1356,6 +1357,7 @@
        manPakOut.setMaktx(plaNew.getBrand());
        manPakOut.setBatch(plaNew.getBatch());
        manPakOut.setBarcode(plaNew.getPackageNo() + "");
        manPakOut.setUpdateTime(new Date());
        manPakOutService.updateById(manPakOut);
@@ -1376,16 +1378,34 @@
                throw new CoolException("请检查输入的库位码");
            }
            plaEntityWrapper.eq("loc_no",barcode);
            plaEntityWrapper.notLike("status","全部出库");
        }else {
            throw new CoolException("条码信息有误!");
        }
        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;
    }
}