| | |
| | | import com.zy.common.properties.SlaveProperties; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通过库位号获取 列 |
| | | */ |
| | | 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) { |
| | |
| | | |
| | | } |
| | | |
| | | public static String getDateStr(Date date){ |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | return simpleDateFormat.format(date); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | SlaveProperties slaveProperties = new SlaveProperties(); |
| | | slaveProperties.setDoubleDeep(true); |
| | |
| | | System.out.println(deepRow); |
| | | |
| | | } |
| | | |
| | | } |