自动化立体仓库 - WMS系统
#
LSH
2023-06-07 3e82c6026e76eeba916208cbe9e4a1411c04982e
#
1个文件已修改
38 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -112,6 +112,7 @@
        int start;
        int end;
        Integer matType = null;//物料类型
        Integer crnNo  = 0;
        //根据入库站,决定搜索指定堆垛机
        ArrayList<Integer> crnNos = new ArrayList<>();
        //根据入库站,找到库位组最内侧排
@@ -131,6 +132,7 @@
                rows.add(7);
                rows.add(8);
                rows.add(14);
                crnNo = 1;
                break;
            case 203://203入库站
                whsType = 2;
@@ -146,6 +148,7 @@
                rows.add(14);
                rows.add(15);
                rows.add(21);
                crnNo = 3;
                break;
            default:
                throw new CoolException("检索库位失败,请联系管理员");
@@ -164,6 +167,24 @@
        if (locMast != null) {
            //找到库位,返回dto
            sign=true;
        }
        //3号可以入库前必须打开控制
        if (!Cools.isEmpty(matNos) && crnNo==3) {
            for (String matNo : matNos) {
                Mat mat = matService.selectByMatnr(matNo);
                if (matType == null) {
                    matType = mat.getMatType();
                }
                if (!matType.equals(mat.getMatType())) {
                    throw new CoolException("混放物料类型不一致");
                }
            }
            if (matNos.size() > 1 && matType == 1) {
                //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库
                throw new CoolException("物料类型和实际种类不一致");
            }
        }
        if (!sign && matType != null) {
@@ -223,23 +244,6 @@
        }
        if (sign){
            //3号可以入库前必须打开控制
            if (!Cools.isEmpty(matNos) && locMast.getCrnNo()==3) {
                for (String matNo : matNos) {
                    Mat mat = matService.selectByMatnr(matNo);
                    if (matType == null) {
                        matType = mat.getMatType();
                    }
                    if (!matType.equals(mat.getMatType())) {
                        throw new CoolException("混放物料类型不一致");
                    }
                }
                if (matNos.size() > 1 && matType == 1) {
                    //物料为单品类型,且物料种类超过1(实际为高频混放),则禁止入库
                    throw new CoolException("物料类型和实际种类不一致");
                }
            }
            return getLocNoFinalStep(staDescId, sourceStaNo, locMast);//返回dto
        }
        //----------------2023.06.02兼容代码end---------------------