| | |
| | | // } |
| | | |
| | | |
| | | // 开始查找库位 ==============================>> |
| | | locMast = getLocNoRule(type,floor); |
| | | if (locMast != null) { |
| | | return locMast; |
| | | try{ |
| | | // 开始查找库位 ==============================>> |
| | | locMast = getLocNoRule(type,floor); |
| | | if (locMast != null) { |
| | | return locMast; |
| | | } |
| | | }catch (Exception e){ |
| | | throw new CoolException("楼层号:"+floor+";该楼层没有空库位===>"+e.getMessage()); |
| | | } |
| | | |
| | | //找不到库位,抛出异常 |
| | | throw new CoolException("该楼层没有空库位"); |
| | | throw new CoolException("楼层号:"+floor+";该楼层没有空库位"); |
| | | } |
| | | |
| | | /* |
| | |
| | | |
| | | //随机取一个货位 |
| | | private AgvLocMast getLocNoRule(int type,int floor){ |
| | | return agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>() |
| | | .eq("loc_sts","O") |
| | | .eq("floor",floor) |
| | | .eq("loc_type1",type)); |
| | | try{ |
| | | List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>() |
| | | .eq("loc_sts", "O") |
| | | .eq("floor", floor) |
| | | .eq("loc_type1", type)); |
| | | for (AgvLocMast agvLocMast : agvLocMasts){ |
| | | AgvLocMast agvLocMast1 = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvLocMast.getLocNo())); |
| | | if (agvLocMast1.getLocSts().equals("O")){ |
| | | return agvLocMast1; |
| | | } |
| | | } |
| | | throw new CoolException("搜索库位时,未找到可入库库位。"); |
| | | }catch (Exception e){ |
| | | throw new CoolException("搜索库位时,未找到可入库库位。"); |
| | | } |
| | | } |
| | | /** |
| | | * 检索库位号 |
| | |
| | | } |
| | | |
| | | //找不到库位,抛出异常 |
| | | throw new CoolException("该楼层没有空接驳位"); |
| | | throw new CoolException("楼层号:"+floor+";该楼层没有空接驳位"); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | //找不到库位,抛出异常 |
| | | throw new CoolException("该楼层没有空接驳位"); |
| | | throw new CoolException("楼层号:"+floor+";该楼层没有空接驳位"); |
| | | } |
| | | |
| | | //随机取一个货位 |