自动化立体仓库 - WMS系统
#
LSH
2023-03-27 b50a2e2df1c0fab844dc194ae58f01cf906e32b8
src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java
@@ -49,7 +49,7 @@
        if (ioType != 11) {
            // 入库
            if (ioType < 100) {
                List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo);
                List<String> groupOuterLoc = Utils.getGroupOuterLocIoPri(locNo);
                if (!Cools.isEmpty(groupOuterLoc)) {
                    for (String outerLoc : groupOuterLoc) {
                        WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(outerLoc);
@@ -71,17 +71,18 @@
                }
            // 出库
            } else {
                List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo);
                List<String> groupOuterLoc = Utils.getGroupInsideLoc(locNo);
                if (!Cools.isEmpty(groupOuterLoc)) {
                    for (String outerLoc : groupOuterLoc) {
                        WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(outerLoc);
                        if (wrkMast != null) {
                            defaultIoPri = wrkMast.getIoPri() - 2;
                            break;
//                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2;
                        }
                    }
                }
                List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo);
                List<String> groupInsideLoc = Utils.getGroupOuterLocIoPri(locNo);
                if (!Cools.isEmpty(groupInsideLoc)) {
                    for (String insideLoc : groupInsideLoc) {
                        WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(insideLoc);
@@ -96,21 +97,7 @@
        } else {
//            @Deprecated
        }
        int row = getRow(locNo);
        if (row<=4){
            return defaultIoPri == null ? 300.0D+row*2 : defaultIoPri+row*2;
        }else {
            return defaultIoPri == null ? 300.0D+row-2 : defaultIoPri-row*2;
        }
    }
    /**
     * 通过库位号获取 排
     */
    public static int getRow(String locNo) {
        if (!Cools.isEmpty(locNo)) {
            return Integer.parseInt(locNo.substring(0, 2));
        }
        throw new RuntimeException("库位解析异常");
        return defaultIoPri == null ? 300.0D : defaultIoPri;
    }
    @Override
@@ -129,4 +116,9 @@
        return this.baseMapper.selectOfPick(wrkNo, ioType);
    }
    @Override
    public List<WrkMast> selectSameMatnrs(String matnr) {
        return this.baseMapper.selectSameMatnrs(matnr);
    }
}