自动化立体仓库 - WMS系统
#
18516761980
2023-03-04 cc3f826987484580f7275f5bb18d35c0c3e1ed78
src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java
@@ -44,7 +44,7 @@
    public synchronized Double getIoPri(Integer ioType, String locNo) {
        Double defaultIoPri = null;
        if (Cools.isEmpty(ioType, locNo)) {
            return 15.0D;
            return 100.0D;
        }
        if (ioType != 11) {
            // 入库
@@ -54,7 +54,8 @@
                    for (String outerLoc : groupOuterLoc) {
                        WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(outerLoc);
                        if (wrkMast != null) {
                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2;
                            defaultIoPri = wrkMast.getIoPri() - 2;
//                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2;
                        }
                    }
                }
@@ -63,7 +64,8 @@
                    for (String insideLoc : groupInsideLoc) {
                        WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(insideLoc);
                        if (wrkMast != null) {
                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2;
                            defaultIoPri = wrkMast.getIoPri() + 2;
//                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2;
                        }
                    }
                }
@@ -74,7 +76,8 @@
                    for (String outerLoc : groupOuterLoc) {
                        WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(outerLoc);
                        if (wrkMast != null) {
                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2;
                            defaultIoPri = wrkMast.getIoPri() - 2;
//                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2;
                        }
                    }
                }
@@ -83,7 +86,8 @@
                    for (String insideLoc : groupInsideLoc) {
                        WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(insideLoc);
                        if (wrkMast != null) {
                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2;
                            defaultIoPri = wrkMast.getIoPri() + 2;
//                            defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2;
                        }
                    }
                }
@@ -92,7 +96,21 @@
        } else {
//            @Deprecated
        }
        return defaultIoPri == null ? 15.0D : defaultIoPri;
        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("库位解析异常");
    }
    @Override