luxiaotao1123
2020-08-28 881f28d05eb1800920556054504cdc65937d7eac
#v2.0
1个文件已修改
37 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -89,12 +89,19 @@
     * @return locNo 检索到的库位号
     */
    public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos) {
        if (sourceStaNo == 3) {
            whsType = 1;
        } else if (sourceStaNo == 7) {
            whsType = 2;
        } else {
            throw new CoolException("无效入库站");
        }
        StartupDto startupDto = new StartupDto();
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        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();
@@ -136,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);