自动化立体仓库 - WMS系统
#
luxiaotao1123
2021-11-19 720f154250c5a9aff4ac3cf6a28e001ad038d7e9
src/main/java/com/zy/common/service/CommonService.java
@@ -105,12 +105,12 @@
    public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) {
        StartupDto startupDto = new StartupDto();
        // 生成工作号
        if (sourceStaNo == 103) {
            whsType = 1;
        } else if (sourceStaNo == 203) {
            whsType = 2;
        }
        int workNo = getWorkNo(0);
//        if (locTypeDto.getLocType3() == 1) { // 轻货信号
//            whsType = 2;    // 5 - 12 轻仓
//        } else if (locTypeDto.getLocType3() == 2) { // 重货信号
//            whsType = 1;    // 1 - 4 重仓
//        }
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        if (Cools.isEmpty(rowLastno)) {
            throw new CoolException("数据异常,请联系管理员");
@@ -180,7 +180,6 @@
        // 如果没有相近物料,则按规则轮询货架
        if (null == locMast) {
            Shelves shelves = new Shelves(rowCount, crn_qty);
            // 重库位 1 - 4排
            if (whsType == 1) {
                for (int i = 0; i < shelves.group; i ++) {
                    curRow = shelves.start(curRow);
@@ -190,25 +189,20 @@
                    Integer crnNo1 = shelves.getCrnNo(curRow);
                    if (basCrnpService.checkSiteError(crnNo1, true)) {
                        crnNo = crnNo1;
                        if (curRow == 3 || curRow == 4) {
                            curRow = 3;
                        }
                        break;
                    }
                }
//                // 轻库位 5 - 12排
//            } else {
//                curRow = curRow - 4;
//                for (int i = 0; i < shelves.group; i ++) {
//                    curRow = shelves.start(curRow);
//                    if (curRow < 0) {
//                        throw new CoolException("检索库位失败,请联系管理员");
//                    }
//                    Integer crnNo1 = shelves.getCrnNo(curRow);
//                    if (basCrnpService.checkSiteError(crnNo1 + 1, true)) {
//                        // 偏移量补偿
//                        curRow = curRow + 4;
//                        crnNo = crnNo1 + 1;
//                        break;
//                    }
//                }
            } else if (whsType == 2) {
                if (curRow == sRow) {
                    curRow = eRow;
                } else {
                    curRow = sRow;
                }
                crnNo = whsType;
                basCrnpService.checkSiteStatus(crnNo, true);
            }
        }
@@ -461,4 +455,4 @@
        }
    }
}
}