自动化立体仓库 - WMS系统
zyx
2023-11-17 6e24a8fe9a57687842413933ce891bebb5693649
Merge branch 'tzskasrs' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs
1个文件已修改
39 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -86,6 +86,45 @@
            throw new CoolException(param.getBarcode() + "数据正在进行入库");
        }
        //判断托盘是否已经在库
        if (locDetlService.selectCount(new EntityWrapper<LocDetl>()
                .eq("zpallet", param.getBarcode())) > 0) {
            throw new CoolException(param.getBarcode() + "数据已经在库");
        }
        //判断是否存在料箱码 => 存在料箱码则要求提交上来的物料list必须全部都有料箱码
        boolean hasContainerCode = false;
        int containerCodeCount = 0;//料箱码数量
        for (CombParam.CombMat combMat : param.getCombMats()) {
            if (combMat.getContainerCode() != null) {
                hasContainerCode = true;
                containerCodeCount++;
                continue;
            }
        }
        //判断料箱是否已经出现在入库通知档、库存中
        if (hasContainerCode) {
            if (containerCodeCount != param.getCombMats().size()) {
                throw new CoolException(param.getBarcode() + "托盘有" + (param.getCombMats().size()-containerCodeCount) + "个未扫描的料箱");
            }
            for (CombParam.CombMat combMat : param.getCombMats()) {
                //判断料箱是否正在入库
                if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                        eq("supp_code", combMat.getContainerCode()).eq("io_status", "N")) > 0) {
                    throw new CoolException(combMat.getContainerCode() + "料箱正在进行入库");
                }
                //判断料箱是否已经在库
                if (locDetlService.selectCount(new EntityWrapper<LocDetl>()
                        .eq("supp_code", combMat.getContainerCode())) > 0) {
                    throw new CoolException(combMat.getContainerCode() + "料箱已经在库");
                }
            }
        }
        // todo: 不下线重新入库
        WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode());
        if (wrkMast != null && wrkMast.getWrkSts() == 18) {