| | |
| | | //搜索满托盘库位 |
| | | public LocMast searchMaxPallet(FindLocNoAttributeVo findLocNoAttributeVo, LocTypeDto locTypeDto){ |
| | | LocMast targetLocMast = null; |
| | | //查询相同物料 |
| | | List<String> locNos = locDetlService.getSameDetlList(findLocNoAttributeVo.getMatnr()); |
| | | for (String locNo : locNos) { |
| | | //获取通道组 |
| | |
| | | //相近物料匹配失败,搜索可用空库位组 |
| | | |
| | | //获取设备楼层 |
| | | List<Integer> levList = basCrnpService.getLevList(); |
| | | Collections.shuffle(levList); |
| | | // List<Integer> levList = basCrnpService.getLevList(); |
| | | // Collections.shuffle(levList); |
| | | |
| | | List<Integer> locLevList = locMastService.getLevList(); |
| | | levList.addAll(locLevList); |
| | | // levList.addAll(locLevList); |
| | | |
| | | for (Integer lev : levList) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("lev1", lev).orderBy("bay1", true)); |
| | | for (Integer lev : locLevList) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O") |
| | | .eq("lev1", lev) |
| | | .eq("loc_type1",locTypeDto.getLocType1()) |
| | | .orderBy("bay1", true) |
| | | .orderBy("row1",true)); |
| | | for (LocMast locMast : locMasts) { |
| | | String locNo = locMast.getLocNo(); |
| | | //获取通道组 |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (deepLoc.getLocSts().equals("F")){ |
| | | if (deepLoc.getLocSts().equals("D")){ |
| | | continue; |
| | | }else if (deepLoc.getLocSts().equals("O")){ |
| | | targetLocMast = deepLoc; |
| | |
| | | |
| | | if (targetLocMast == null){ |
| | | //获取设备楼层 |
| | | List<Integer> levList = basCrnpService.getLevList(); |
| | | Collections.shuffle(levList); |
| | | // List<Integer> levList = basCrnpService.getLevList(); |
| | | // Collections.shuffle(levList); |
| | | |
| | | List<Integer> locLevList = locMastService.getLevList(); |
| | | levList.addAll(locLevList); |
| | | // levList.addAll(locLevList); |
| | | |
| | | for (Integer lev : levList) { |
| | | for (Integer lev : locLevList) { |
| | | //相近物料匹配失败,搜索可用空库位组 |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("lev1", lev).orderBy("bay1", true)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("lev1", lev).orderBy("bay1", true).orderBy("row1",true)); |
| | | for (LocMast locMast : locMasts) { |
| | | String locNo = locMast.getLocNo(); |
| | | //获取通道组 |