| | |
| | | List<LocMast> locMasts = new ArrayList<>(); |
| | | List<LocMast> locMastsLow2 = new ArrayList<>(); |
| | | List<LocMast> locMastsLow3 = new ArrayList<>(); |
| | | |
| | | LocMast locMastLow = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", "0100101")); |
| | | LocMast locMastMid = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", "0100108")); |
| | | LocMast locMastHigh = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", "0100111")); |
| | | LocMast locMastHighest = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", "0100113")); |
| | | if (locMastService.checkEmptyCount(locMastLow)){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("loc_type1",1)); |
| | | }else { |
| | | if (locMastService.checkEmptyCount(locMastMid)){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("loc_type1",2)); |
| | | |
| | | }else { |
| | | if (locMastService.checkEmptyCount(locMastHigh)){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("loc_type1",5)); |
| | | }else { |
| | | if (locMastService.checkEmptyCount(locMastHighest)){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts","O").eq("loc_type1",6)); |
| | | }else { |
| | | throw new CoolException("无空库位可用"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // locMastsLow2 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",2).eq("loc_sts","O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | // locMastsLow3 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",3).eq("loc_sts","O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | // if (locMastsLow2.size() <= 5 && locMastsLow3.size() <= 5){ |
| | |
| | | |
| | | |
| | | |
| | | locMastsLow2 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", 2) |
| | | .eq("loc_sts", "O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | locMastsLow3 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", 3) |
| | | .eq("loc_sts", "O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | if (locMastsLow2.size() <= 5 && locMastsLow3.size() <= 5){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow) |
| | | .eq("loc_sts", "O").ge("lev1",8)); |
| | | if (Cools.isEmpty(locMasts)){ |
| | | if (nearRow == 2){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow + 1) |
| | | .eq("loc_sts", "O").ge("lev1",8)); |
| | | }else if (nearRow == 3){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow - 1) |
| | | .eq("loc_sts", "O").ge("lev1",8)); |
| | | |
| | | } |
| | | } |
| | | }else { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow) |
| | | .eq("loc_sts", "O")); |
| | | if (Cools.isEmpty(locMasts)){ |
| | | if (nearRow == 2){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow + 1) |
| | | .eq("loc_sts", "O")); |
| | | }else if (nearRow == 3){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow - 1) |
| | | .eq("loc_sts", "O")); |
| | | |
| | | } |
| | | } |
| | | } |
| | | // locMastsLow2 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", 2) |
| | | // .eq("loc_sts", "O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | // locMastsLow3 = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", 3) |
| | | // .eq("loc_sts", "O").eq("loc_type1",locTypeDto.getLocType1())); |
| | | // if (locMastsLow2.size() <= 5 && locMastsLow3.size() <= 5){ |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow) |
| | | // .eq("loc_sts", "O").ge("lev1",8)); |
| | | // if (Cools.isEmpty(locMasts)){ |
| | | // if (nearRow == 2){ |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow + 1) |
| | | // .eq("loc_sts", "O").ge("lev1",8)); |
| | | // }else if (nearRow == 3){ |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow - 1) |
| | | // .eq("loc_sts", "O").ge("lev1",8)); |
| | | // |
| | | // } |
| | | // } |
| | | // }else { |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow) |
| | | // .eq("loc_sts", "O")); |
| | | // if (Cools.isEmpty(locMasts)){ |
| | | // if (nearRow == 2){ |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow + 1) |
| | | // .eq("loc_sts", "O")); |
| | | // }else if (nearRow == 3){ |
| | | // locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow - 1) |
| | | // .eq("loc_sts", "O")); |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | // |
| | | // } |
| | | // } |
| | | if (locMasts.size() <= 5){ |
| | | throw new CoolException("无空库位可用"); |
| | | } |
| | | // if (locMasts.size() <= 5){ |
| | | // throw new CoolException("无空库位可用"); |
| | | // } |
| | | List<LocMast> locMastList = new ArrayList<>(); |
| | | locMasts.sort(new Comparator<LocMast>() { |
| | | @Override |