From 92364678519dbc883047d6760bdb8ad3e9f4c7e6 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 13 Jun 2025 16:13:32 +0800 Subject: [PATCH] =?UTF-8?q?[8.0.0]=20[fix]=20[=E5=85=B3=E9=97=AD=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E3=80=81=E6=8E=A8=E5=87=BA=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=AE=97=E8=B7=AF=E6=A8=A1=E5=9D=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/weaknet/model/OrderModel.kt | 3 +++ .../och/weaknet/ui/modeswitch/TopSwitchBizView.kt | 11 ++++++++++- .../och/unmanned/taxi/ui/bizswitch/SwitchBizView.kt | 11 ++++++++++- .../mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt | 2 ++ .../function/hmi/ui/operate/OperatePanelLayout.kt | 8 +++++++- .../core/function/api/setting/ISopSettingListener.kt | 5 +++++ .../function/call/setting/CallerSopSettingManager.kt | 7 +++++++ 7 files changed, 44 insertions(+), 3 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt index 864621ab6f..6038e99550 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt @@ -8,6 +8,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager +import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS @@ -521,6 +522,8 @@ object OrderModel { OchChainLogManager.writeChainLog("错误","${e.message}") } MogoStatusManager.getInstance().setShuttleDriverPerformTask(TAG, false) + MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, false) + CallerSopSettingManager.invokeRoutingListener(false) MapMakerManager.removeAllMapMarkerByOwner(TAG) BusTrajectoryManager.stopTrajReqLoop() LoginStatusManager.loginOut() diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/modeswitch/TopSwitchBizView.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/modeswitch/TopSwitchBizView.kt index 6fda7678a4..719dad46f6 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/modeswitch/TopSwitchBizView.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/modeswitch/TopSwitchBizView.kt @@ -3,9 +3,11 @@ package com.mogo.och.weaknet.ui.modeswitch import android.content.Context import android.util.AttributeSet import android.view.LayoutInflater +import android.view.ViewGroup import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeViewModelStoreOwner import com.mogo.och.common.module.biz.routing.RoutingManager +import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager import com.mogo.och.common.module.wigets.WindowRelativeLayout import com.mogo.och.shuttle.weaknet.R import kotlinx.android.synthetic.main.shuttle_weak_biz.view.routingSwitchView @@ -55,7 +57,14 @@ class TopSwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCall switchOchBiz.visibility = GONE routingSwitchView.visibility = VISIBLE RoutingManager.getRoutingView()?.let { - routingSwitchView.addView(it) + try { + if (it.parent!=null) { + (it.parent as ViewGroup).removeAllViews() + } + routingSwitchView.addView(it) + }catch (e:Exception){ + OchChainLogManager.writeChainLogError("添加routingview错误:TopSwitchBizView",e.message?:"") + } } } diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/bizswitch/SwitchBizView.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/bizswitch/SwitchBizView.kt index 8ba54ca61c..0a21109c89 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/bizswitch/SwitchBizView.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/bizswitch/SwitchBizView.kt @@ -3,9 +3,11 @@ package com.mogo.och.unmanned.taxi.ui.bizswitch import android.content.Context import android.util.AttributeSet import android.view.LayoutInflater +import android.view.ViewGroup import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeViewModelStoreOwner import com.mogo.och.common.module.biz.routing.RoutingManager +import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager import com.mogo.och.common.module.wigets.WindowRelativeLayout import com.mogo.och.unmanned.taxi.R import kotlinx.android.synthetic.main.unmanned_switch_biz.view.itinerarySwitchView @@ -55,7 +57,14 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac itinerarySwitchView.visibility = GONE routingSwitchView.visibility = VISIBLE RoutingManager.getRoutingView()?.let { - routingSwitchView.addView(it) + try { + if (it.parent!=null) { + (it.parent as ViewGroup).removeAllViews() + } + routingSwitchView.addView(it) + }catch (e:Exception){ + OchChainLogManager.writeChainLogError("添加routingview错误:SwitchBizView",e.message?:"") + } } } diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt index 61df40c1d9..da5cbb8c85 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt @@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager +import com.mogo.eagle.core.function.call.setting.CallerSopSettingManager import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager import com.mogo.eagle.core.network.utils.GsonUtil import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger @@ -1407,6 +1408,7 @@ object TaxiTaskModel { MogoStatusManager.getInstance().setTaxiUnmanedDriverTakingOrders(TAG, false) MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, false) MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingVerifyMode(TAG, false) + CallerSopSettingManager.invokeRoutingListener(false) } //导航去订单终点目的地 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt index e067259afa..e73f1d09d0 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt @@ -668,7 +668,7 @@ class OperatePanelLayout : LinearLayout { } } - class BusinessPreferenceFragmentCompat : OperatePanelDetailBase(), IReceivedMsgListener { + class BusinessPreferenceFragmentCompat : OperatePanelDetailBase(), IReceivedMsgListener,ISopSettingListener { companion object { private const val TAG = "BusinessPreferenceFragmentCompat" @@ -688,6 +688,7 @@ class OperatePanelLayout : LinearLayout { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) CallerTelematicListenerManager.addListener(TAG, this) + CallerSopSettingManager.addListener(TAG,this) lifecycleScope.launchWhenResumed { val p = preferenceScreen.findPreferenceReal(KEY_DRIVE_SEAT_VIDEO_STREAM)?.also { CallerDevaToolsManager.driveSeatVideoProvider()?.requestVideoInfo({ data -> @@ -711,6 +712,11 @@ class OperatePanelLayout : LinearLayout { CallerTelematicListenerManager.removeListener(TAG) } + override fun onRoutingClickEvent(status: Boolean) { + super.onRoutingClickEvent(status) + preferenceScreen.findPreferenceReal(KEY_SELF_ROUTING_VERIFY_MODE)?.also { changeValue(it, status) } + } + override fun getDefaultVal(pref: Preference): Any? { when (pref.key) { KEY_FAULT_REPORT_TIP -> { diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/ISopSettingListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/ISopSettingListener.kt index 8955be268d..4d6483aeb0 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/ISopSettingListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/ISopSettingListener.kt @@ -30,4 +30,9 @@ interface ISopSettingListener { */ fun onCarApertureClickEvent(status: Boolean){} + /** + * 验证算路模式 + */ + fun onRoutingClickEvent(status: Boolean){} + } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerSopSettingManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerSopSettingManager.kt index 4a379d00ad..e037b6fdad 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerSopSettingManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerSopSettingManager.kt @@ -55,4 +55,11 @@ object CallerSopSettingManager: CallerBase() { } } + fun invokeRoutingListener(status: Boolean){ + M_LISTENERS.forEach { + val listener = it.value + listener.onRoutingClickEvent(status) + } + } + } \ No newline at end of file