|  |  | 
 |  |  |  | 
 |  |  |         // 1.按规则查找库位 | 
 |  |  |         if (Cools.isEmpty(locMast) && crnNo != 0) { | 
 |  |  |             List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true)); | 
 |  |  |             List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() | 
 |  |  |                     .eq("row1", nearRow) | 
 |  |  |                     .eq("loc_sts", "O") | 
 |  |  |                     .orderBy("lev1",true).orderBy("bay1",true)); | 
 |  |  |  | 
 |  |  |             for (LocMast locMast1 : locMasts) { | 
 |  |  |                 if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { | 
 |  |  |                     continue; | 
 |  |  | 
 |  |  |                     break; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             if (Cools.isEmpty(locMast)){ | 
 |  |  |                 for (LocMast locMast1 : locMasts) { | 
 |  |  |                     if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { | 
 |  |  |                         continue; | 
 |  |  |                     } | 
 |  |  |                     String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); | 
 |  |  |                     LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() | 
 |  |  |                             .eq("loc_no", shallowLoc).eq("loc_sts", "O")); | 
 |  |  |                     if (!Cools.isEmpty(locMast2)) { | 
 |  |  |                         locMast = locMast2; | 
 |  |  |                         break; | 
 |  |  |                     } else { | 
 |  |  |                         locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() | 
 |  |  |                                 .eq("loc_no", shallowLoc).eq("loc_sts", "F")); | 
 |  |  |                         if (!Cools.isEmpty(locMast2)) { | 
 |  |  |                             locMast = locMast1; | 
 |  |  |                             break; | 
 |  |  |                         } else { | 
 |  |  |                             locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() | 
 |  |  |                                     .eq("loc_no", shallowLoc).eq("loc_sts", "D")); | 
 |  |  |                             if (!Cools.isEmpty(locMast2)) { | 
 |  |  |                                 locMast = locMast1; | 
 |  |  |                                 break; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) { |