| | |
| | | add(21);add(22);add(23);add(24);add(25);add(26);add(27);add(28);add(29);add(30); |
| | | }}; |
| | | |
| | | public static final List<String> HARD_LOC_NO = new ArrayList<String>() {{ |
| | | add("0200104");add("0200704");add("0201404");add("0202004"); |
| | | add("0600201");add("0600202");add("0600203");add("0600204"); |
| | | add("0600301");add("0600302");add("0600303");add("0600304"); |
| | | add("0600701");add("0600702"); |
| | | add("0601401");add("0601402"); |
| | | add("0602001");add("0602002"); |
| | | add("2000704");add("2001404");add("2002004"); |
| | | add("1600701");add("1601401");add("1602001"); |
| | | add("1600702");add("1601402");add("1602002"); |
| | | }}; |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | |
| | | * @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; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | if (!flag) { |
| | | List<LocMast> locMastsNew = locMastService.findInEmptyLocMastNew(locTypeDto.getLocType1(), HARD_LOC_NO, crnNo);//找一条新的空巷道 |
| | | for (LocMast locMast0 : locMastsNew) { |
| | | //检测当前库位内侧其他库位是否为D、F、X |
| | | // 浅库位符合尺寸检测 |
| | | if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) { |
| | | // 浅库位对应堆垛机必须可用且无异常 |
| | | if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) { |
| | | // 因库位移转、需预留空库位 |
| | | if (locMastService.checkEmptyCount(locMast0, 10)) { |
| | | locMast = locMast0; |
| | | flag = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (flag) { |
| | | break; |
| | | } |