| | |
| | | |
| | | switch (rowLastnoType.getType()) { |
| | | case 1: |
| | | StartupDto locNoRun = getLocNoRun(whsType, staDescId, sourceStaNo, matnr, batch, grade, 0, locTypeDto, 0); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O").eq("loc_type1", locTypeDto.getLocType1()).eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (locMasts != null && locMasts.size() < 8) { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | return locNoRun; |
| | | return getLocNoRun(whsType, staDescId, sourceStaNo, matnr, batch, grade, 0, locTypeDto, 0); |
| | | case 2: |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | break; |
| | |
| | | } |
| | | } |
| | | } |
| | | //查询当前库位类型空库位 小于5个则locmast = null |
| | | List<LocMast> locTypeLocMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("loc_sts", "O").eq("crn_no", crnNo).eq("loc_type1", locTypeDto.getLocType1()) |
| | | .eq("whs_type", rowLastnoType.getType().longValue()) |
| | | ); |
| | | if (null !=locTypeLocMasts && locTypeLocMasts.size()<=5){ |
| | | locMast = null; |
| | | } |
| | | |
| | | if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) { |
| | | locMast = null; |
| | |
| | | times = times + 1; |
| | | return getLocNoRun4(whsType, staDescId, sourceStaNo, matnr, batch, grade, moveCrnNo, locTypeDto, times, mixture); |
| | | } |
| | | // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | if (locTypeDto.getLocType1() < 2) { |
| | | int i = locTypeDto.getLocType1() + 1; |
| | | locTypeDto.setLocType1((short) i); |
| | | return getLocNoRun4(whsType, staDescId, sourceStaNo, matnr, batch, grade, moveCrnNo, locTypeDto, 0, mixture); |
| | | } |
| | | log.error("系统没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | throw new CoolException("没有空库位"); |
| | | } |