#
vincentlu
2025-01-13 89c7f6e5bcc21b0e8f83a2bc6d680e2ffe431e6f
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java
@@ -1,6 +1,5 @@
package com.zy.acs.manager.core.service;
import com.alibaba.fastjson.JSONObject;
import com.zy.acs.common.enums.AgvDirectionType;
import com.zy.acs.framework.common.Cools;
import com.zy.acs.manager.common.utils.MapDataUtils;
@@ -125,7 +124,7 @@
    // 角度计算
    public Double calculateDirection(Code startCode, Code endCode) {
    public Double calculateDirection(Code startCode, Code endCode, int angleOffsetVal) {
        Double x0 = startCode.getX();
        Double y0 = startCode.getY();
@@ -135,7 +134,6 @@
        double deltaX = x1 - x0;
        double deltaY = y1 - y0;
        double angle = -Math.atan2(deltaX, deltaY);
        int angleOffsetVal = configService.getVal("mapAngleOffsetVal", Integer.class);
        angle = Math.toDegrees(angle) + angleOffsetVal;
        angle = (angle + 360) % 360; // 将角度转换为正值
@@ -143,8 +141,7 @@
    }
    // 坐标货架阈值 todo:luxiaotao
    public AgvDirectionType calculateAgvWorkDirection(JSONObject storeDirection, Loc loc, Code code) {
        storeDirection.getString("key");
    public AgvDirectionType calculateAgvWorkDirection(Loc loc, Code code) {
        Integer compDirect = loc.getCompDirect();
        AgvDirectionType agvDirectionType = null;
        if (compDirect == 0) {