自动化立体仓库 - WMS系统
#1
dubin
2026-01-12 4e46937e6311840fd3a146e77bca36908f2d914e
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -73,8 +73,6 @@
    @Autowired
    private ManLocDetlMapper manLocDetlMapper;
    @Autowired
    private MatBarcodeService matBarcodeService;
    @Autowired
    private AdjDetlService adjDetlService;
@@ -132,23 +130,6 @@
                if (Cools.isEmpty(mat)) {
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
                }
                //校验当前物料与托盘绑定信息是否正确
                MatBarcode matBarcode = new MatBarcode();
                MatBarcode mb = matBarcodeService.selectbyMatnr(detlDto.getMatnr());
                if (mb != null){
                    if (!mb.getZpallet().equals(param.getBarcode())){
                        throw new CoolException(detlDto.getMatnr() + "该物料与其他托盘绑定,请先解绑");
                    }
                }else {
                    matBarcode.setZpallet(param.getBarcode());//托盘码
                    matBarcode.setMatnr(mat.getMatnr());//物料号
                    matBarcode.setMaktx(mat.getMaktx());//物料名称
                    matBarcode.setSpecs(mat.getSpecs());//规格
                    matBarcode.setModel(mat.getModel());//型号
                    if (!matBarcodeService.insert(matBarcode)) {
                        throw new CoolException("物料与托盘绑定失败");
                    }
                }
                WaitPakin waitPakin = new WaitPakin();
                waitPakin.sync(mat);
                waitPakin.setProType(detlDto.getProType());
@@ -193,23 +174,6 @@
                Mat mat = matService.selectByMatnr(orderDetl.getMatnr());
                if (Cools.isEmpty(mat)) {
                    throw new CoolException(orderDetl.getMatnr() + "商品档案不存在");
                }
                //校验当前物料与托盘绑定信息是否正确
                MatBarcode matBarcode = new MatBarcode();
                MatBarcode mb = matBarcodeService.selectbyMatnr(orderDetl.getMatnr());
                if (mb != null){
                    if (!mb.getZpallet().equals(param.getBarcode())){
                        throw new CoolException(orderDetl.getMatnr() + "该物料与其他托盘绑定,请先解绑");
                    }
                }else {
                    matBarcode.setZpallet(param.getBarcode());//托盘码
                    matBarcode.setMatnr(mat.getMatnr());//物料号
                    matBarcode.setMaktx(mat.getMaktx());//物料名称
                    matBarcode.setSpecs(mat.getSpecs());//规格
                    matBarcode.setModel(mat.getModel());//型号
                    if (!matBarcodeService.insert(matBarcode)) {
                        throw new CoolException("物料与托盘绑定失败");
                    }
                }
                WaitPakin waitPakin = new WaitPakin();
                waitPakin.sync(mat);
@@ -735,9 +699,6 @@
    @Override
    public void combToWms(WaitPakin waitPakin) {
        if (waitPakin.getBarcode().length() != 8) {
            throw new CoolException("条码长度不是8位===>>" + waitPakin.getBarcode());
        }
        int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", waitPakin.getBarcode()));
        int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", waitPakin.getBarcode()));
        WrkMast wrkMast = wrkMastService.selectByBarcode(waitPakin.getBarcode());