| | |
| | | } |
| | | |
| | | if (signRule1) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type2",locTypeDto.getLocType2())); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | |
| | | |
| | | // 靠近摆放规则 --- 空托 //互通版 |
| | | if (staDescId == 10) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("loc_type2",locTypeDto.getLocType2())); |
| | | if (locMasts.size() > 0) { |
| | | for (LocMast loc : locMasts) { |
| | | if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type2",locTypeDto.getLocType2())); |
| | | List<LocMast> locMastList = new ArrayList<>(); |
| | | locMasts.sort(new Comparator<LocMast>() { |
| | | @Override |
| | | public int compare(LocMast o1, LocMast o2) { |
| | | int b1 = o1.getBay1(); |
| | | int b2 = o2.getBay1(); |
| | | if (o1.getBay1() >= 15) { |
| | | b1 = Math.abs(15 - o1.getBay1()); |
| | | } |
| | | if (o2.getBay1() >= 15) { |
| | | b2 = Math.abs(15 - o2.getBay1()); |
| | | } |
| | | return b2 - b1; |
| | | } |
| | | }); |
| | | // locMasts.sort(new Comparator<LocMast>() { |
| | | // @Override |
| | | // public int compare(LocMast o1, LocMast o2) { |
| | | // int b1 = o1.getBay1(); |
| | | // int b2 = o2.getBay1(); |
| | | // if (o1.getBay1() >= 15) { |
| | | // b1 = Math.abs(15 - o1.getBay1()); |
| | | // } |
| | | // if (o2.getBay1() >= 15) { |
| | | // b2 = Math.abs(15 - o2.getBay1()); |
| | | // } |
| | | // return b2 - b1; |
| | | // } |
| | | // }); |
| | | |
| | | 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; |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("loc_type2",locTypeDto.getLocType2())); |
| | | if (Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |