自动化立体仓库 - WMS系统
zwl
3 天以前 58ca88b5008448532f19dca8bf030ceeba347bd5
src/main/java/com/zy/asrs/utils/Utils.java
@@ -1357,6 +1357,37 @@
        return row + "-" + boy + "-" + lev;
    }
    //将wcs库位号转换成wms库位号
    public static String WCSLocToWMSLoc(String locNo) {
        String wmsLoc = "";
        String[] split = locNo.split("-");
        if (split.length == 3) {
            //排
            if (split[0].length() == 2) {
                wmsLoc = split[0];
            }else if (split[0].length() == 1) {
                wmsLoc = "0"+split[0];
            }
            //列
            if (split[1].length() == 3) {
                wmsLoc += split[1];
            }else if (split[1].length() == 2) {
                wmsLoc += "0"+split[1];
            }else if (split[1].length() == 1) {
                wmsLoc += "00" + split[1];
            }
            //层
            if (split[2].length() == 2) {
                wmsLoc += split[2];
            }else if (split[2].length() == 1) {
                wmsLoc += "0"+split[2];
            }
        }else {
            return null;
        }
        return wmsLoc;
    }
}