| | |
| | | private LocMastService locMastService; |
| | | |
| | | @Override |
| | | public LocRule find(String matnr) { |
| | | public List<LocRule> find(String matnr) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | |
| | | |
| | | //找混载库位规则 |
| | | @Override |
| | | public LocRule findMixed() { |
| | | public List<LocRule> findMixed() { |
| | | return this.baseMapper.selectByMixed(1);//搜索混载库位规则 |
| | | } |
| | | |
| | | //将库位规则转换为库位组 |
| | | //将库位规则转换为库位组(能查出来的都是空库位) |
| | | @Override |
| | | public List<LocMast> locRuleToLocNos(LocRule locRule) { |
| | | ArrayList<String> locNos = new ArrayList<>(); |
| | | //将所有符合混载规则的库位号进行存储 |
| | | Integer rowBeg = locRule.getRowBeg(); |
| | | Integer rowEnd = locRule.getRowEnd(); |
| | | return locMastService.queryFreeLocMast2(null, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | } |
| | | |
| | | Integer bayBeg = locRule.getBayBeg(); |
| | | Integer bayEnd = locRule.getBayEnd(); |
| | | @Override |
| | | public int updateKeepGoByMatnr(String matnr, Integer keepGo) { |
| | | return this.baseMapper.updateKeepGoByMatnr(matnr, keepGo); |
| | | } |
| | | |
| | | Integer levBeg = locRule.getLevBeg(); |
| | | Integer levEnd = locRule.getLevEnd(); |
| | | |
| | | for (int i = rowBeg; i <= rowEnd; i++) { |
| | | for (int j = bayBeg; j <= bayEnd; j++) { |
| | | for (int k = levBeg; k <= levEnd; k++) { |
| | | String locNo = Utils.getLocNo(i, j, k); |
| | | locNos.add(locNo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return locMastService.selectEmptyByLocNos(locNos); |
| | | @Override |
| | | public int updateKeepGoByMixed(Integer keepGo) { |
| | | return this.baseMapper.updateKeepGoByMixed(keepGo); |
| | | } |
| | | } |