Junjie
2023-07-27 fed17b9162273d70043f7d5e9061bc7afd17c6ef
src/main/java/com/zy/common/utils/NavigatePositionConvert.java
@@ -5,6 +5,7 @@
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.utils.Utils;
/**
 * 库位编号和A*算法的xy轴转换工具类
@@ -34,17 +35,23 @@
        return Short.parseShort(sb.toString());
    }
    //xyz轴转库位号
    public static String xyzToLocNo(int x, int y, int z) {
        String locNo = Utils.getLocNo(x, y, z);
        return locNo;
    }
    //xyz轴转坐标编号
    public static Short xyToPosition(int x, int y, int z) {
        StringBuffer sb = new StringBuffer();
        sb.append(x);
        if (x < 10) {
            sb.append("00");
        } else if (x < 100) {
            sb.append("0");
        }
        sb.append(x);
        if (y < 10) {
            sb.append("00");
        }else if (y < 100) {
            sb.append("0");
        }
        sb.append(y);