自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-11 77ce9b966a4965bf1d5bdcb1dbd8e76dd45a8c53
src/main/java/com/zy/common/service/CommonService.java
@@ -87,9 +87,9 @@
            int sRow = rowLastno.getsRow();
            int eRow = rowLastno.geteRow();
            int crn_qty = rowLastno.getCrnQty();
            int rowCount = eRow - sRow + 1;
            // 获取目标站所在货架排号
            Shelves shelves = new Shelves(8, crn_qty);
            Shelves shelves = new Shelves(rowCount, crn_qty);
            curRow = shelves.start(curRow);
            if (curRow < 0) {
                throw new CoolException("检索库位失败,请联系管理员");
@@ -120,13 +120,19 @@
            BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn());
            int inQty = staNo.getInQty();
            if (staNo.getInEnable().equals("Y") && staNo.getAutoing().equals("Y") && inQty<2) {
                // 查找库位 todo
                LocMast locMast = locMastService.queryFreeLocMast(curRow, 1);
                // 查找库位
                LocMast locMast = locMastService.queryFreeLocMast(curRow);
                if (Cools.isEmpty(locMast)) {
                    throw new CoolException("没有空库位");
                }
                locNo = locMast.getLocNo();
                // 更新库位排号
                rowLastno.setCurrentRow(curRow);
                rowLastnoService.updateById(rowLastno);
            } else {
                throw new CoolException("目标站不可用");
            }
            rowLastno.setCurrentRow(curRow);
            rowLastnoService.updateById(rowLastno);
        }
        return locNo;
    }