| | |
| | | * @param whsType 类型 1:双深式货架 |
| | | * @param staDescId 路径工作类型 |
| | | * @param sourceStaNo 源站 |
| | | * @param matNos 商品编号集合 |
| | | * @param matNos 品号集合 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | |
| | | |
| | | int row = Integer.parseInt(loc.getLocNo().substring(0, 2)); |
| | | String shallowLocNo = ""; |
| | | if (row == 1 || row == 2) continue; |
| | | if (row == 1 || row == 2) { |
| | | continue; |
| | | } |
| | | LocMast trgerLoc = locMastService.selectById(zerofill(String.valueOf(2), 2) + loc.getLocNo().substring(2)); |
| | | if (!trgerLoc.getLocSts().equals("O")) { |
| | | continue; |
| | |
| | | |
| | | // 更新库位排号 |
| | | rowLastno.setCurrentRow(curRow); |
| | | rowLastnoService.updateById(rowLastno); |
| | | rowLastnoService.updateById(rowLastno); |
| | | |
| | | // 开始查找库位 ==============================>> |
| | | |
| | |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount) { |
| | | times = times + 1; |
| | | if(locTypeDto.getLocType1() == 1 && times == 3){ |
| | | locTypeDto.setLocType1((short) 2); |
| | | } |
| | | return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times); |
| | | } |
| | | |
| | |
| | | * @param whsType 类型 1:双深式货架 |
| | | * @param staDescId 路径工作类型 |
| | | * @param sourceStaNo 源站 |
| | | * @param matnr 商品编号集合 |
| | | * @param matnr 品号集合 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo, String matnr, String batch, String grade, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | if (Cools.isEmpty(matnr)) { //物料号 |
| | | if (Cools.isEmpty(matnr)) { //品号 |
| | | matnr = ""; |
| | | } |
| | | if (Cools.isEmpty(batch)) { //箱号 |
| | |
| | | return getLocNoRun(1, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times); |
| | | } |
| | | |
| | | // 轻货物找轻库位为空时,可以去找重库位仓 |
| | | //if (locTypeDto.getLocType1() == 1) { |
| | | // locTypeDto.setLocType1((short) 2); |
| | | // return getLocNoRun(1, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times); |
| | | //} |
| | | //// 轻货物找轻库位为空时,可以去找重库位仓 |
| | | // if (locTypeDto.getLocType1() == 1) { |
| | | // locTypeDto.setLocType1((short) 2); |
| | | // return getLocNoRun(1, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times); |
| | | // } |
| | | log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | throw new CoolException("没有空库位"); |
| | | } |