自动化立体仓库 - WMS系统
#
whycq
2024-08-13 441496e2cfa40be3de9b204fd34f0e8de7d5af72
#
2个文件已修改
38 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -40,7 +40,7 @@
        if (locMast == null) {
            return false;
        }
        return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo()) > 1;
        return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo()) > 0;
    }
    @Override
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);
        // 开始查找库位 ==============================>>