| | |
| | | } |
| | | |
| | | /** |
| | | * 通过库位号获取 列 |
| | | */ |
| | | public static int getBay(String locNo) { |
| | | if (!Cools.isEmpty(locNo)) { |
| | | return Integer.parseInt(locNo.substring(2, 5)); |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | /** |
| | | * 通过库位号获取 层 |
| | | */ |
| | | public static int getLev(String locNo) { |
| | | if (!Cools.isEmpty(locNo)) { |
| | | return Integer.parseInt(locNo.substring(5, 7)); |
| | | } |
| | | throw new RuntimeException("库位解析异常"); |
| | | } |
| | | |
| | | /** |
| | | * 通过排列层获取库位号 |
| | | * |
| | | * @return |
| | | */ |
| | | public static String getLocByRBL(int row, int bay, int lev) { |
| | | StringBuffer sb = new StringBuffer(); |
| | | if (row < 10) { |
| | | sb.append("0"); |
| | | } |
| | | sb.append(row); |
| | | if (bay < 10) { |
| | | sb.append("00"); |
| | | } else if (bay < 100) { |
| | | sb.append("0"); |
| | | } |
| | | sb.append(bay); |
| | | if (lev < 10) { |
| | | sb.append("0"); |
| | | } |
| | | sb.append(lev); |
| | | return sb.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 当检索到双深库位的浅库位时,如果深库位无货,则放入对应的深库位 |
| | | */ |
| | | public static void toDeepIfEmptyByShallow(String shallowLoc) { |