From 01ad2c3c7580b9a2cd4292d6cab650af88de8524 Mon Sep 17 00:00:00 2001 From: duzhichao <1098974448@qq.com> Date: Mon, 3 Aug 2026 21:31:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/central/order/controller/OrderController.java | 11 +++-------- .../MapContainer/3d/BottomPanel/LeftControlPanel.tsx | 4 ++-- .../components/MapContainer/3d/hooks/useFlyToPoint.ts | 10 +++++----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java index ee6b41ec..24e2ed20 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java @@ -595,15 +595,10 @@ public class OrderController { @Operation(summary = "后台管理更新订单") @PostMapping("/update/order") public Result updateOrder(@RequestBody Order order) { - LoginAppUser loginAppUser = LoginUserContextHolder.getUser(); - // - if (loginAppUser.getId() == 1 || loginAppUser.getId() == 1073) { - boolean res = orderService.updateOrder(order); - if (res){ - return Result.succeed("已更新"); - } + boolean res = orderService.updateOrder(order); + if (res) { + return Result.succeed("已更新"); } - return Result.failed("请重试"); } diff --git a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/BottomPanel/LeftControlPanel.tsx b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/BottomPanel/LeftControlPanel.tsx index 8be23231..536cb480 100644 --- a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/BottomPanel/LeftControlPanel.tsx +++ b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/BottomPanel/LeftControlPanel.tsx @@ -111,8 +111,8 @@ const LeftControlPanel: React.FC = ({ hSpeed: Number(data?.horizontal_speed ?? 0).toFixed(1), vSpeed: Number(data?.vertical_speed ?? 0).toFixed(1), alt: Number(data?.height ?? data?.elevation ?? 0).toFixed(1), - relAlt: Number(data?.height ?? 0).toFixed(1), - absAlt: Number(data?.elevation ?? 0).toFixed(1), + relAlt: Number(data?.elevation ?? 0).toFixed(1), + absAlt: Number(data?.height ?? 0).toFixed(1), dist: Number(data?.home_distance ?? 0).toFixed(1), sat: data?.position_state?.gps_number ?? 0, rtk: data?.position_state?.is_fixed === 2 ? 'FIX' : 'FLOAT', diff --git a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useFlyToPoint.ts b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useFlyToPoint.ts index a67ee431..60ece837 100644 --- a/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useFlyToPoint.ts +++ b/zlt-web/yingyan/src/pages/map3d/components/MapContainer/3d/hooks/useFlyToPoint.ts @@ -42,13 +42,13 @@ export function useFlyToPoint(droneData: DroneData | null, onStarted?: (deviceSn try { setState('TAKING_OFF'); setDeviceSn(sn); - takeoffElevationRef.current = droneData?.elevation ?? droneData?.height ?? 0; + takeoffElevationRef.current = droneData?.height ?? droneData?.elevation ?? 0; const res = await missionApi.startFlyToPoint({ deviceSn: sn, dockLatitude: dockLat, dockLongitude: dockLng, dockHeight: dockH, - isAirborne: (droneData?.height ?? 0) > SAFE_HEIGHT || ((droneData?.elevation ?? 0) - takeoffElevationRef.current) > SAFE_HEIGHT, + isAirborne: (droneData?.elevation ?? 0) > SAFE_HEIGHT || ((droneData?.height ?? 0) - takeoffElevationRef.current) > SAFE_HEIGHT, }); if (res?.resp_code !== 0 || !res?.data?.missionCode) { throw new Error(res?.resp_msg || '启动失败'); @@ -165,8 +165,8 @@ export function useFlyToPoint(droneData: DroneData | null, onStarted?: (deviceSn } if (!droneData) return; - const relHeight = droneData.height ?? 0; - const elevation = droneData.elevation ?? 0; + const relHeight = droneData.elevation ?? 0; + const elevation = droneData.height ?? 0; // 起飞检测:相对高度 > 5m,或椭球高相对起飞基准升高 > 5m const isAirborne = relHeight > SAFE_HEIGHT || (elevation - takeoffElevationRef.current) > SAFE_HEIGHT; const target = targetRef.current; @@ -204,7 +204,7 @@ export function useFlyToPoint(droneData: DroneData | null, onStarted?: (deviceSn return { state, missionCode, deviceSn, candidateTarget, currentTarget, distanceToTarget, isSending, startFlyToPoint, selectTarget, cancelTarget, confirmFly, endFlight, cancel, - isAirborne: (droneData?.height ?? 0) > SAFE_HEIGHT || ((droneData?.elevation ?? 0) - takeoffElevationRef.current) > SAFE_HEIGHT, + isAirborne: (droneData?.elevation ?? 0) > SAFE_HEIGHT || ((droneData?.height ?? 0) - takeoffElevationRef.current) > SAFE_HEIGHT, }; }