| | |
| | | * @param matNos 物料号集合 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto) { |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, Integer matTypeIn) { |
| | | int start; |
| | | int end; |
| | | Integer matType = null;//物料类型 |
| | |
| | | ArrayList<Integer> rows = new ArrayList<>(); |
| | | switch (sourceStaNo) { |
| | | case 103://103入库站 |
| | | case 113://103入库站 |
| | | whsType = 1; |
| | | start = 1; |
| | | end = 14; |
| | |
| | | crnNo = 1; |
| | | break; |
| | | case 203://203入库站 |
| | | case 213://203入库站 |
| | | whsType = 2; |
| | | start = 8; |
| | | end = 21; |
| | |
| | | } |
| | | if (!matType.equals(mat.getMatType())) { |
| | | throw new CoolException("混放物料类型不一致"); |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(matTypeIn)) { |
| | | if (!matTypeIn.equals(0)) { |
| | | matType = matTypeIn; |
| | | } |
| | | } |
| | | |
| | |
| | | List<String> groupLoc = Utils.getGroupLoc(wrkMast.getLocNo()); |
| | | //随机可用堆垛机号 |
| | | Integer randomCrnNo = Utils.getRandomCrnNo(crnNos, locTypeDto.getLocType1()); |
| | | Collections.shuffle(crnNos); |
| | | for (Integer crnNo : crnNos) { |
| | | List<LocMast> locMasts = locMastService.findEmptyLocMastByLocNos(locTypeDto.getLocType1(), groupLoc, crnNo); |
| | | for (LocMast locMast0 : locMasts) { |
| | |
| | | Boolean flag = false; |
| | | Integer randomCrnNo = Utils.getRandomCrnNo(crnNos, locTypeDto.getLocType1()); |
| | | Collections.shuffle(crnNos); |
| | | System.out.println(crnNos); |
| | | for (Integer crnNo : crnNos) { |
| | | List<LocMast> locMasts = locMastService.findInEmptyLocMast(locTypeDto.getLocType1(), rows, crnNo);//找一条新的空巷道 |
| | | for (LocMast locMast0 : locMasts) { |