| | |
| | | return workNo; |
| | | } |
| | | |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, int times) { |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) { |
| | | LocTypeDto oldLocType = locTypeDto.clone(); |
| | | return getLocNo(whsType, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times); |
| | | return getLocNo(whsType, staDescId, sourceStaNo, matNos, locTypeDto, oldLocType, times); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param matNos 物料号集合 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) { |
| | | public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) { |
| | | StartupDto startupDto = new StartupDto(); |
| | | if (sourceStaNo == 100) { // 轻货信号 |
| | | whsType = 1; // 1 - 11 左 |
| | | } else if (sourceStaNo == 200) { // 重货信号 |
| | | whsType = 2; // 12 - 21 右 |
| | | } |
| | | whsType = 1; |
| | | // 生成工作号 |
| | | int workNo = getWorkNo(0); |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | |
| | | } |
| | | |
| | | // 靠近摆放规则 --- 空托 |
| | | if (emptyMk) { |
| | | if (staDescId == 10) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | if (locMasts.size() > 0) { |
| | | for (LocMast loc : locMasts) { |
| | |
| | | int t = 0; |
| | | boolean execute = true; |
| | | int crnNo1; |
| | | // 1 - 11排 |
| | | if (whsType == 1) { |
| | | while (execute && t < 4) { |
| | | t++; |
| | | switch (curRow) { |
| | | case 3: |
| | | curRow = 11; |
| | | crnNo1 = 2; |
| | | break; |
| | | case 11: |
| | | curRow = 4; |
| | | crnNo1 = 1; |
| | | break; |
| | | case 4: |
| | | curRow = 12; |
| | | crnNo1 = 2; |
| | | break; |
| | | default: |
| | | curRow = 3; |
| | | crnNo1 = 1; |
| | | break; |
| | | } |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | | execute = false; |
| | | } |
| | | while (execute && t < 4) { |
| | | t++; |
| | | switch (curRow) { |
| | | case 3: |
| | | curRow = 11; |
| | | crnNo1 = 2; |
| | | break; |
| | | case 11: |
| | | curRow = 4; |
| | | crnNo1 = 1; |
| | | break; |
| | | case 4: |
| | | curRow = 12; |
| | | crnNo1 = 2; |
| | | break; |
| | | default: |
| | | curRow = 3; |
| | | crnNo1 = 1; |
| | | break; |
| | | } |
| | | // 12 - 21排 |
| | | } else { |
| | | while (execute && t < 4) { |
| | | t++; |
| | | switch (curRow) { |
| | | case 11: |
| | | curRow = 18; |
| | | crnNo1 = 3; |
| | | break; |
| | | case 18: |
| | | curRow = 12; |
| | | crnNo1 = 2; |
| | | break; |
| | | case 12: |
| | | curRow = 19; |
| | | crnNo1 = 3; |
| | | break; |
| | | default: |
| | | curRow = 11; |
| | | crnNo1 = 2; |
| | | break; |
| | | } |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | | execute = false; |
| | | } |
| | | if (basCrnpService.checkSiteError(crnNo1, true)) { |
| | | crnNo = crnNo1; |
| | | execute = false; |
| | | } |
| | | } |
| | | } |
| | |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount) { |
| | | times = times + 1; |
| | | return getLocNo(whsType, staDescId, sourceStaNo, emptyMk, matNos, locTypeDto, oldLocType, times); |
| | | return getLocNo(whsType, staDescId, sourceStaNo, matNos, locTypeDto, oldLocType, times); |
| | | } |
| | | // // 货物检索低库位仓失败,兼容高库位仓后继续执行 |
| | | // if (locTypeDto.getLocType1() == 1) { |