自动化立体仓库 - WMS系统
#
whycq
2025-01-08 d3cb0e841e6585aa84a45f18bb30965db8d1a6aa
src/main/java/com/zy/common/service/CommonService.java
@@ -123,20 +123,40 @@
        if (null == locMast) {
            Shelves shelves = new Shelves(rowCount, crn_qty);
            int divides = (int) Arith.divides(1, curRow - 1, 2);
            curRow = (int) Arith.remainder(curRow, 2);
            //curRow = (int) Arith.remainder(curRow, 2);
            if (curRow == 0) {
                curRow = 2;
                curRow = 6;
            } else if (curRow == 7) {
                curRow = 1;
            }
            for (int i = 0; i < shelves.group; i ++) {
                curRow = shelves.start(curRow);
                //curRow = shelves.start(curRow);
                if (curRow < 0) {
                    throw new CoolException("检索库位失败,请联系管理员");
                }
                Integer crnNo1 = shelves.get(curRow);
                crnNo1 = crnNo1 + divides*1;
                //Integer crnNo1 = shelves.get(curRow);
                Integer crnNo1 = 0;
                switch (curRow) {
                    case 1:
                    case 2:
                        crnNo1 = 1;
                        break;
                    case 3:
                    case 4:
                        crnNo1 = 2;
                        break;
                    case 5:
                    case 6:
                        crnNo1 = 3;
                        break;
                }
                //crnNo1 = crnNo1 + divides*1;
                if (basCrnpService.checkSiteError(crnNo1, true)) {
                    crnNo = crnNo1;
                    curRow = curRow + divides*2;
                    //curRow = curRow + divides*2;
                    // 更新库位排号
                    rowLastno.setCurrentRow(curRow + 1);
                    rowLastnoService.updateById(rowLastno);
                    break;
                }
            }
@@ -161,8 +181,8 @@
        }
        // 更新库位排号
        rowLastno.setCurrentRow(curRow);
        rowLastnoService.updateById(rowLastno);
        //rowLastno.setCurrentRow(curRow);
        //rowLastnoService.updateById(rowLastno);
        // 开始查找库位 ==============================>>
@@ -209,8 +229,8 @@
            }
            // 轻货物找轻库位为空时,可以去找重库位仓
            if (locTypeDto.getLocType1() == 1) {
                locTypeDto.setLocType1((short) 2);
            if (locTypeDto.getLocType1() == 2) {
                locTypeDto.setLocType1((short) 1);
                return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times);
            }
            log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times);