|  |  |  | 
|---|
|  |  |  | // 搜索单品(整个库位组) | 
|---|
|  |  |  | private LocMast getLocNoStepSingle(LocTypeDto locTypeDto,Integer sourceStaNo) { | 
|---|
|  |  |  | LocMast locMast = null; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | StaDesc staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>().eq("type_no", 1).eq("stn_no", sourceStaNo)); | 
|---|
|  |  |  | //单品 | 
|---|
|  |  |  | List<LocMast> locMasts = locMastService.selectAreaEmpty(locTypeDto.getLocType1(),staDesc.getCrnNo());//搜索货物 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (LocMast mast : locMasts) { | 
|---|
|  |  |  | List<String> groupLoc = Utils.getGroupLocNo(mast.getLocNo(), true); | 
|---|
|  |  |  | if (!locMastService.checkAllLocEmpty(groupLoc)) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | LocMast tmp = null; | 
|---|
|  |  |  | for (String loc : groupLoc) { | 
|---|
|  |  |  | LocMast locMast1 = locMastService.selectByLoc(loc); | 
|---|
|  |  |  | if (locMast1 == null) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!locMast1.getLocSts().equals("O")) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | tmp = locMast1; | 
|---|
|  |  |  | boolean groupLoc = Utils.isShallowLoc(slaveProperties,mast.getLocNo()); | 
|---|
|  |  |  | if (groupLoc) { | 
|---|
|  |  |  | String shallowLoc = Utils.getDeepLoc(slaveProperties, mast.getLocNo()); | 
|---|
|  |  |  | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() | 
|---|
|  |  |  | .eq("loc_no", shallowLoc).eq("loc_sts", "O")); | 
|---|
|  |  |  | if (!Cools.isEmpty(locMast2)) { | 
|---|
|  |  |  | tmp = locMast2; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | if (!Cools.isEmpty(mast)) { | 
|---|
|  |  |  | tmp = mast; | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //预留空库位 | 
|---|
|  |  |  | if (tmp != null && locMastService.checkEmptyCount(mast, 10)) { | 
|---|
|  |  |  | locMast = tmp; | 
|---|