| | |
| | | if (Cools.isEmpty(ioType, locNo)) { |
| | | return 100.0D; |
| | | } |
| | | if (ioType != 11) { |
| | | // 入库 |
| | | if (ioType < 100) { |
| | | List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); |
| | | if (!Cools.isEmpty(groupOuterLoc)) { |
| | | for (String outerLoc : groupOuterLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(outerLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = wrkMast.getIoPri() - 2; |
| | | // defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; |
| | | } |
| | | } |
| | | } |
| | | List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); |
| | | if (!Cools.isEmpty(groupInsideLoc)) { |
| | | for (String insideLoc : groupInsideLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(insideLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = wrkMast.getIoPri() + 2; |
| | | // defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; |
| | | } |
| | | } |
| | | } |
| | | // 出库 |
| | | } else { |
| | | List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); |
| | | if (!Cools.isEmpty(groupOuterLoc)) { |
| | | for (String outerLoc : groupOuterLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(outerLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = wrkMast.getIoPri() - 2; |
| | | // defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; |
| | | } |
| | | } |
| | | } |
| | | List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); |
| | | if (!Cools.isEmpty(groupInsideLoc)) { |
| | | for (String insideLoc : groupInsideLoc) { |
| | | WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(insideLoc); |
| | | if (wrkMast != null) { |
| | | defaultIoPri = wrkMast.getIoPri() + 2; |
| | | // defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 移库 |
| | | } else { |
| | | // @Deprecated |
| | | int row = Utils.getRow(locNo); |
| | | if (row == 6) { |
| | | return 101D; |
| | | } |
| | | 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; |
| | | |
| | | if (row == 13) { |
| | | return 103D; |
| | | } |
| | | } |
| | | /** |
| | | * 通过库位号获取 排 |
| | | */ |
| | | public static int getRow(String locNo) { |
| | | if (!Cools.isEmpty(locNo)) { |
| | | return Integer.parseInt(locNo.substring(0, 2)); |
| | | if (row == 14) { |
| | | return 102D; |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | if (row == 15) { |
| | | return 101D; |
| | | } |
| | | |
| | | return defaultIoPri == null ? 100.0D : defaultIoPri; |
| | | } |
| | | |
| | | @Override |
| | |
| | | return this.baseMapper.selectOfPick(wrkNo, ioType); |
| | | } |
| | | |
| | | @Override |
| | | public List<WrkMast> selectSameMatnrs(String matnr) { |
| | | return this.baseMapper.selectSameMatnrs(matnr); |
| | | } |
| | | |
| | | @Override |
| | | public List<WrkMast> selectSameLevMatnrs(String matnr, Integer lev) { |
| | | return this.baseMapper.selectSameLevMatnrs(matnr, lev); |
| | | } |
| | | } |