| | |
| | | } |
| | | } |
| | | } |
| | | if(Cools.isEmpty(locMast)){ |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("lev1", 1) |
| | | .orderBy("bay1",false)); |
| | | for (LocMast locMast2 : locMasts) { |
| | | if (locMast2.getLocSts().equals("O") ) { |
| | | if (locMast == null){ |
| | | locMast = locMast2; |
| | | }else if (locMast2.getLocSts().equals("F")){ |
| | | locMast = null; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | | for (int i = 1; i<=4;i++){ |
| | | for (int i = 1; i<=2;i++){ |
| | | if (locMast != null){ |
| | | break; |
| | | } |
| | | if (i == 2){ |
| | | continue; |
| | | } |
| | | List<LocMast> locMastsF = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("lev1", i) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | }else { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("lev1", 2) |
| | | .orderBy("bay1",false)); |
| | | .eq("lev1", 3) |
| | | .orderBy("bay1",true)); |
| | | if (Cools.isEmpty(locMasts)){ |
| | | throw new CoolException("数据异常,请联系管理员===》库位未知"); |
| | | } |