| | |
| | | return null; |
| | | } |
| | | |
| | | @Transactional |
| | | public StartupDto getLocNoNew(Integer staDescId,Integer sourceStaNo, LocTypeDto locTypeDto) { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts", 3).eq("crn_err", 0).eq("in_enable", "Y")); |
| | | if(basCrnps.size() == 0) { |
| | | log.error("入库请求库位失败:堆垛机报警/无可用/无可入"); |
| | | throw new CoolException("入库请求库位失败:堆垛机报警/无可用/无可入"); |
| | | } |
| | | |
| | | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>().eq("type_no", staDescId).eq("stn_no", sourceStaNo).eq("crn_no", 1)); |
| | | if (staDesc == null) { |
| | | log.error("入库请求库位失败:路径不存在" + staDescId +"," + sourceStaNo); |
| | | throw new CoolException("入库请求库位失败:路径不存在" + staDescId +"," + sourceStaNo); |
| | | } |
| | | |
| | | Short locType2 = locTypeDto.getLocType2(); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("loc_type2", locType2).orderBy("lev1").orderBy("bay1").orderBy("row1")); |
| | | if (locMast == null) { |
| | | log.error("入库请求库位失败:无库位" + locType2); |
| | | throw new CoolException("入库请求库位失败:无库位" + locType2); |
| | | } |
| | | |
| | | StartupDto startupDto = new StartupDto(); |
| | | startupDto.setWorkNo(getWorkNo(0)); |
| | | startupDto.setCrnNo(locMast.getCrnNo()); |
| | | startupDto.setSourceStaNo(staDesc.getCrnStn()); |
| | | startupDto.setStaNo(staDesc.getStnNo()); |
| | | startupDto.setLocNo(locMast.getLocNo()); |
| | | |
| | | return startupDto; |
| | | } |
| | | |
| | | /** |
| | | * 检索库位号 |
| | | * |