自动化立体仓库 - WCS系统
zjj
2023-11-21 ac0906df88505ec24ee910899a036676823f9d63
src/main/java/com/zy/asrs/utils/Utils.java
@@ -22,6 +22,11 @@
        return (float) Arith.multiplys(2, f, 1);
    }
    //站点号转换
    public static String getEquipmentCode(String targetPoint){
        return "J-1"+targetPoint;
    }
    public static String zerofill(String msg, Integer count){
        if (msg.length() == count){
            return msg;
@@ -143,6 +148,13 @@
        throw new RuntimeException("库位解析异常");
    }
    public static Short getRowShort(String locNo) {
        if (!Cools.isEmpty(locNo)) {
            return Short.valueOf(locNo.substring(0, 2));
        }
        throw new RuntimeException("库位解析异常");
    }
    /**
     * 通过库位号获取 列
     */
@@ -164,6 +176,26 @@
    }
    /**
     * 通过库位号获取 列
     */
    public static short getBayShort(String locNo) {
        if (!Cools.isEmpty(locNo)) {
            return Short.parseShort(locNo.substring(2, 5));
        }
        throw new RuntimeException("库位解析异常");
    }
    /**
     * 通过库位号获取 层
     */
    public static short getLevShort(String locNo) {
        if (!Cools.isEmpty(locNo)) {
            return Short.parseShort(locNo.substring(5, 7));
        }
        throw new RuntimeException("库位解析异常");
    }
    /**
     * 当检索到双深库位的浅库位时,如果深库位无货,则放入对应的深库位
     */
    public static void toDeepIfEmptyByShallow(String shallowLoc) {