luxiaotao1123
2020-08-28 66d031eb7381ad8dd04d71a2730e4c22464a015a
src/main/java/com/zy/common/service/CommonService.java
@@ -101,7 +101,7 @@
        if (Cools.isEmpty(rowLastno)) {
            throw new CoolException("数据异常,请联系管理员");
        }
        if (rowLastno.getWhsType() == 1){
        if (whsType == 1 || whsType == 2){
            int curRow = rowLastno.getCurrentRow();
            int sRow = rowLastno.getsRow();
            int eRow = rowLastno.geteRow();
@@ -143,18 +143,24 @@
            // 如果没有相近物料,则按规则轮询货架
            if (null == locMast) {
                // 获取目标站所在货架排号
                Shelves shelves = new Shelves(rowCount, crn_qty);
                curRow = shelves.start(curRow);
                if (curRow < 0) {
                    throw new CoolException("检索库位失败,请联系管理员");
                // 获取目标站所在货架排号 todo:luxiaotao
                if (curRow == sRow) {
                    curRow = eRow;
                } else {
                    curRow = sRow;
                }
                for (List<Integer> node : shelves.nodes){
                    if (node.contains(curRow)) {
                        crnNo = shelves.nodes.indexOf(node) + 1;
                        break;
                    }
                }
                crnNo = whsType;
//                Shelves shelves = new Shelves(rowCount, crn_qty);
//                curRow = shelves.start(curRow);
//                if (curRow < 0) {
//                    throw new CoolException("检索库位失败,请联系管理员");
//                }
//                for (List<Integer> node : shelves.nodes){
//                    if (node.contains(curRow)) {
//                        crnNo = shelves.nodes.indexOf(node) + 1;
//                        break;
//                    }
//                }
            }
            basCrnpService.checkSiteStatus(crnNo);