From 833f9dcaea849a8225e8bbae19c5e48c9818bcca Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 12 Aug 2025 08:35:12 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[8.2.0]=20[ack]=20[=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=94=B6=E5=88=B0ack=20=E4=B8=8D=E7=BB=9F=E8=AE=A1=E8=87=AA?= =?UTF-8?q?=E9=A9=BE=E5=A4=B1=E8=B4=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autopilot/autopilot/OchAutoPilotManager.kt | 13 ++++++++++++- .../autopilot/OchAutoPilotStatusListenerManager.kt | 4 ++-- .../autopilot/autopilot/OchAutopilotAnalytics.kt | 8 +++++++- .../autopilot/autopilot/bean/SessionWithTime.kt | 2 +- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotManager.kt b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotManager.kt index afbffa060d..d07607e4cf 100644 --- a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotManager.kt +++ b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotManager.kt @@ -96,7 +96,7 @@ object OchAutoPilotManager { @JvmStatic fun startAutoPilot(controlParameters: AutopilotControlParameters?): Long { val sessionId = CallerAutoPilotControlManager.startAutoPilot(controlParameters) - globalSessionId.set(SessionWithTime(sessionId,System.currentTimeMillis())) + globalSessionId.set(SessionWithTime(sessionId,System.currentTimeMillis(),-1L)) OchAutoPilotStatusListenerManager.fsmBackSessionId.set(-1L) OchAutopilotAnalytics.triggerStartAutopilotParameters(controlParameters, sessionId) return sessionId @@ -116,4 +116,15 @@ object OchAutoPilotManager { } } } + + fun setAckTimeWithSessionId(msgId: Long, receiveTime: Long) { + if(msgId == globalSessionId.get().sessionId){ + globalSessionId.get().ackTime = receiveTime + } + } + + fun getSessionidAndAcktime():Pair{ + val sessionInfo = globalSessionId.get() ?: return Pair(-1L,-1L) + return Pair(sessionInfo.sessionId, sessionInfo.ackTime) + } } \ No newline at end of file diff --git a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotStatusListenerManager.kt b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotStatusListenerManager.kt index 4292c4d9a4..c13e508984 100644 --- a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotStatusListenerManager.kt +++ b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/autopilot/OchAutoPilotStatusListenerManager.kt @@ -280,8 +280,8 @@ object OchAutoPilotStatusListenerManager : CallerBase Date: Tue, 12 Aug 2025 15:17:26 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[8.2.0]=20[mind]=20[=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=B1=95=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/ui/aiview/AIViewModel.kt | 53 +++++++++---------- .../ui/aiview/adapter/AIMessageViewHolder.kt | 18 +++++-- .../src/main/res/layout/item_ai_msg_qa.xml | 1 + 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt index a44fcf8155..a78c8e14df 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt @@ -122,9 +122,21 @@ class AIViewModel : ViewModel(), AIMessageManager.AIMessageListener, IWakeUpList llmResultJob = viewModelScope.launch(Dispatchers.IO) { V2XRepository.llmResultFlow.collect { result -> + if (result.queryId.startsWith("AUTO")) { + return@collect + } + if (result.aiMsg.eventType != "workflow_finished") { + return@collect + } Log.d(TAG, "llm result: $result") val title = result.aiMsg?.title ?: "" - val suggestion = result.aiMsg?.suggestion ?: result.answer ?: "" + val suggestion1 = result.aiMsg?.suggestion + val answer = result.answer + val suggestion = if(suggestion1.isNullOrEmpty()){ + answer + }else{ + suggestion1 + } val msg = msgList.findLast { it.id == result.queryId } @@ -133,33 +145,18 @@ class AIViewModel : ViewModel(), AIMessageManager.AIMessageListener, IWakeUpList return@collect } - if (result.aiMsg?.data != null) { - val data: MGCommonTitleBean? = result.aiMsg?.parseData() - val content = data?.title ?: "" - AIMessage.QA( - id = result.queryId, - title = title, - tts = content, - answer = content, - question = "", - pictureUrl = result.imgUrls.getOrNull(0) ?: "", - pictureUrlList = result.imgUrls, - ) - }else{ - AIMessageManager.post( - AIMessage.QA( - id = result.queryId, - title = result.answer, - tts = result.answer, - answer = suggestion, - question = msg.question, - state = AIMessage.QA.QuestionState.FINISH, - pictureUrl = result.imgUrls.getOrNull(0) ?: "", - pictureUrlList = result.imgUrls - ) - ) - } - + AIMessageManager.post( + AIMessage.QA( + id = result.queryId, + title = result.answer, + tts = result.answer, + answer = suggestion, + question = msg.question, + state = AIMessage.QA.QuestionState.FINISH, + pictureUrl = result.imgUrls.getOrNull(0) ?: "", + pictureUrlList = result.imgUrls + ) + ) } } } diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt index c9b82721e3..6633fdf3d7 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt @@ -136,11 +136,19 @@ class QAViewHolder(val binding: View) : MessageViewHolder(binding) { tvPncActionDesc.visibility = View.GONE tvTitleImage.visibility = View.VISIBLE }else{ - tvTitle.text = item.title - tvPncActionDesc.text = item.answer - tvTitle.visibility = View.VISIBLE - tvPncActionDesc.visibility = View.VISIBLE - tvTitleImage.visibility = View.VISIBLE + if(item.title.isNullOrEmpty()){ + tvTitle.text = item.title + tvPncActionDesc.text = item.answer + tvTitle.visibility = View.VISIBLE + tvPncActionDesc.visibility = View.GONE + tvTitleImage.visibility = View.VISIBLE + }else { + tvTitle.text = item.title + tvPncActionDesc.text = item.answer + tvTitle.visibility = View.VISIBLE + tvPncActionDesc.visibility = View.VISIBLE + tvTitleImage.visibility = View.VISIBLE + } } handleTimestamp(item, tvTimestamp) diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml index 7a34262925..e39e88465f 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml @@ -100,6 +100,7 @@ android:visibility="gone" tools:visibility="visible" android:textStyle="bold" + android:singleLine="true" style="@style/AIMsgTextTitle" tools:text="前方道路施工" /> From 4758dc0572f0b8da4b11ba7ea58150adf5fc564f Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Tue, 12 Aug 2025 19:20:28 +0800 Subject: [PATCH 3/8] =?UTF-8?q?[8.2.0][fix]=E7=82=B9=E5=87=BB=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E6=90=9C=E7=B4=A2=E5=86=85=E5=AE=B9=E9=87=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt index fef22376f0..7c105e2d23 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt @@ -141,6 +141,7 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_default) switch_routing_rv.smoothScrollToPosition(0) acctv_search_byid.isChecked = false + acctv_search_byid.text="" acctv_search_byid.setBackgroundResource(R.drawable.biz_input_order_id_normal) aciv_input_icon.setImageResource(R.drawable.biz_routing_search_right_normal) InputManager.setKeyboardVisable(View.GONE) From 11eed83b19e3add05d592f6c3679b7f27ef11d54 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 13 Aug 2025 10:35:32 +0800 Subject: [PATCH 4/8] =?UTF-8?q?[8.2.0]=20[mind]=20[=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=86=E7=BB=84]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../passenger/ui/aiview/AIViewModel.kt | 149 +++++++++++++++--- .../ui/aiview/adapter/AIMessageViewHolder.kt | 22 +-- .../passenger/ui/aiview/bean/AICrossBean.kt | 59 +++++++ .../ui/aiview/bean/MGDefaultQABean.kt | 26 +++ .../ui/aiview/bean/MGEagleEyeBean.kt | 53 +++++++ .../passenger/ui/aiview/bean/MGSpotPKBean.kt | 27 ++++ .../src/main/res/layout/item_ai_msg_qa.xml | 3 +- core/mogo-core-utils/build.gradle | 2 +- 8 files changed, 309 insertions(+), 32 deletions(-) create mode 100644 OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AICrossBean.kt create mode 100644 OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGDefaultQABean.kt create mode 100644 OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGEagleEyeBean.kt create mode 100644 OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGSpotPKBean.kt diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt index a78c8e14df..b562ac4f10 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/AIViewModel.kt @@ -25,10 +25,14 @@ import com.mogo.och.data.taxi.TaxiOrderStatusEnum import com.mogo.och.unmanned.passenger.bean.ai.LatLonBody import com.mogo.och.unmanned.passenger.network.ai.AiServiceManager import com.mogo.och.unmanned.passenger.ui.aiview.bean.MGCommonTitleBean +import com.mogo.och.unmanned.passenger.ui.aiview.bean.MGDefaultQABean +import com.mogo.och.unmanned.passenger.ui.aiview.bean.MGEagleEyeBean +import com.mogo.och.unmanned.passenger.ui.aiview.bean.MGSpotPKBean import com.mogo.och.unmanned.taxi.utils.order.OrderListener import com.mogo.och.unmanned.taxi.utils.order.OrderModel import com.mogo.service.v2n.bean.MGEventExtInfoBean import com.mogo.service.v2n.bean.MGLlmQueryBean +import com.mogo.service.v2n.bean.MGLlmQueryRespBean import com.mogo.service.v2n.utils.JsonUtil import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job @@ -129,14 +133,7 @@ class AIViewModel : ViewModel(), AIMessageManager.AIMessageListener, IWakeUpList return@collect } Log.d(TAG, "llm result: $result") - val title = result.aiMsg?.title ?: "" - val suggestion1 = result.aiMsg?.suggestion - val answer = result.answer - val suggestion = if(suggestion1.isNullOrEmpty()){ - answer - }else{ - suggestion1 - } + val msg = msgList.findLast { it.id == result.queryId } @@ -145,22 +142,100 @@ class AIViewModel : ViewModel(), AIMessageManager.AIMessageListener, IWakeUpList return@collect } - AIMessageManager.post( - AIMessage.QA( - id = result.queryId, - title = result.answer, - tts = result.answer, - answer = suggestion, - question = msg.question, - state = AIMessage.QA.QuestionState.FINISH, - pictureUrl = result.imgUrls.getOrNull(0) ?: "", - pictureUrlList = result.imgUrls - ) - ) + postAIEvent(result, question = msg.question) + } } } + fun postAIEvent( + result: MGLlmQueryRespBean, + question: String = "", + isAuto: Boolean = false, isShowAll: Boolean = true + ) { + val title = result.aiMsg?.title ?: "" + val msgType = result.aiMsg?.type ?: 0 + val fromValue = AIMessageReplyType.fromValue(msgType) + val state = result.aiMsg.getMessageState() + val stateDes = result.aiMsg?.nodeStatus ?: "" + val flowType = result.aiMsg?.flowType ?: 0 + when (fromValue) { + //千里眼 + AIMessageReplyType.EagleEye -> { + val data: MGEagleEyeBean? = result.aiMsg?.parseData() + val content = data?.title ?: "" + AIMessage.QA( + id = result.queryId, + title = title, + tts = "$title,$content", + answer = content, + question = question, + state = state, + pictureUrl = data?.liveInfo?.imgUrl?:"", + ) + } + + //景点PK + AIMessageReplyType.SpotPK -> { + val data: MGSpotPKBean? = result.aiMsg?.parseData() + val content = data?.title ?: "" + AIMessage.QA( + id = result.queryId, + title = title, + tts = "$title,$content", + answer = content, + question = question, + state = state, + ) + } + + // 默认QA + else -> { + if (result.aiMsg?.responseMode == MGEventExtInfoBean.RESPONSE_MODE_STREAM) { + val data: MGDefaultQABean? = result.aiMsg?.parseData() + val titleName = data?.title ?: "" + val suggestion = data?.suggestion ?: result.answer ?: "" + var imagesUrl = data?.getImagesUrl()?: mutableListOf() + if (result.imgUrls.isNotEmpty()) { + imagesUrl = result.imgUrls + } + AIMessage.QA( + id = result.queryId, + title = titleName, + tts = titleName, + answer = suggestion, + question = question, + state = state, + pictureUrl = imagesUrl.getOrNull(0) ?: "", + pictureUrlList = imagesUrl + ) + } else { + val suggestion = result.aiMsg?.suggestion ?: result.answer ?: "" + val new = MGDefaultQABean().apply { + this.title = result.aiMsg?.title ?: "" + this.suggestion = suggestion + this.status = result.aiMsg.status + this.description = result.aiMsg.description + this.images = result.aiMsg.images + } + AIMessage.QA( + id = result.queryId, + title = new.title, + tts = "$title,$suggestion", + answer = suggestion, + question = question, + state = state, + pictureUrl = result.imgUrls.getOrNull(0) ?: "", + pictureUrlList = result.imgUrls, + ) + } + } + }.let { + AIMessageManager.post(it) + } + } + + override fun onCleared() { AIMessageManager.unregisterListener(this) @@ -409,6 +484,40 @@ inline fun MGEventExtInfoBean.parseData(): T? { } } +enum class AIMessageReplyType(val code: Int) { + Default(0), + RoutePlan(20), + Guardian(21), + SpotPK(22), + EagleEye(23), + Cross(25); + + + companion object { + fun fromValue(value: Int): AIMessageReplyType? { + return values().find { it.code == value } + } + } +} + +fun MGEventExtInfoBean?.getMessageState(): AIMessage.QA.QuestionState { + if (this == null) { + return AIMessage.QA.QuestionState.FINISH + } + + if (this.eventType.isNullOrEmpty()) { + return AIMessage.QA.QuestionState.FINISH + } + +// if (this.eventType == "workflow_started") { +// return AIMessage.QuestionState.PROCESSING +// } + + if (this.eventType == "workflow_finished") { + return AIMessage.QA.QuestionState.FINISH + } + return AIMessage.QA.QuestionState.FINISH +} diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt index 6633fdf3d7..38ac6ccca2 100644 --- a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/adapter/AIMessageViewHolder.kt @@ -32,6 +32,7 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.mogo.glide.GlideImageLoader import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform import com.mogo.eagle.core.utilcode.mogo.imageloader.MogoImageView +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.util.DateTimeUtils import com.mogo.och.common.module.utils.FrameAnimatorContainer import com.mogo.och.common.module.biz.media.VoiceNotice @@ -117,7 +118,7 @@ class QAViewHolder(val binding: View) : MessageViewHolder(binding) { private var clContain: ConstraintLayout = binding.findViewById(R.id.clContain) private var tvTimestamp: TextView = binding.findViewById(R.id.tvTimestamp) private var tvStateContent: TextView = binding.findViewById(R.id.tvStateContent) - private var tvPncActionDesc: TextView = binding.findViewById(R.id.tvPncActionDesc) + private var tvAnswer: TextView = binding.findViewById(R.id.tvPncActionDesc) // private var ivPicture: OchRoundImageView = binding.findViewById(R.id.ivPicture) private var llState: LinearLayout = binding.findViewById(R.id.llState) private var picBanner = binding.findViewById>(R.id.picBanner) @@ -125,28 +126,29 @@ class QAViewHolder(val binding: View) : MessageViewHolder(binding) { override fun bind(item: AIMessage, onItemClickListener: OnItemClickListener?) { if (item is AIMessage.QA) { + CallerLogger.d(TAG,"bind:${item}") binding.apply { handleState(item.state) tvQuestion.text = item.question Log.d(TAG, "bind: ${item}") if(item.title==item.answer){ tvTitle.text = item.title - tvPncActionDesc.text = item.answer + tvAnswer.text = item.answer tvTitle.visibility = View.VISIBLE - tvPncActionDesc.visibility = View.GONE + tvAnswer.visibility = View.GONE tvTitleImage.visibility = View.VISIBLE }else{ if(item.title.isNullOrEmpty()){ - tvTitle.text = item.title - tvPncActionDesc.text = item.answer - tvTitle.visibility = View.VISIBLE - tvPncActionDesc.visibility = View.GONE - tvTitleImage.visibility = View.VISIBLE + tvTitle.text = item.answer + tvAnswer.text = item.answer + tvTitle.visibility = View.GONE + tvAnswer.visibility = View.VISIBLE + tvTitleImage.visibility = View.GONE }else { tvTitle.text = item.title - tvPncActionDesc.text = item.answer + tvAnswer.text = item.answer tvTitle.visibility = View.VISIBLE - tvPncActionDesc.visibility = View.VISIBLE + tvAnswer.visibility = View.VISIBLE tvTitleImage.visibility = View.VISIBLE } } diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AICrossBean.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AICrossBean.kt new file mode 100644 index 0000000000..58c3131e54 --- /dev/null +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/AICrossBean.kt @@ -0,0 +1,59 @@ +package com.mogo.och.unmanned.passenger.ui.aiview.bean + +data class AICrossBean( + val cameraLiveUrl: String?, + val cameraPicUrl: String?, + val currentLaneFlow: RoadFlowInfo?, + val flowStatistics: FlowStatistics?, + val title: String, + var otherQuestion: List? = null, +) + +data class RoadFlowInfo( + val totalPcuCount: Double, + val avgSpeed: Double, + val level: Int, + val infos: List +) + +data class LaneInfo( +// val crossId: String, + val roadId: String, + val laneNo: String, +// val vehicleCount: Int, +// val avgSpeed: Double, + val pcuCount: Double, + val bearing: Int, + val arrowType: Int +) + +data class FlowStatistics( + val v2nInfoList: List?, + val flowTimeInfo: FlowInfo?, +) + + +data class FlowInfo( + val defaultCount: Int, + val totalPcuCount: Double?, + val flowTimeInfoList: List +) + + +data class FlowTimeInfo( + val flowTime: Long, + val flowTimeStr: String, + val count: Int, + val avgSpeed: Double, + val pcuCount: Double, + val level: String, + val flag: String +) + +data class V2nEventInfo( + val id: Int, + //10006 道路施工; 10007 道路拥堵 + val poiType: String, + val updateTimeLong: Long, + val createTimeLong: Long, +) diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGDefaultQABean.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGDefaultQABean.kt new file mode 100644 index 0000000000..da81153b32 --- /dev/null +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGDefaultQABean.kt @@ -0,0 +1,26 @@ +package com.mogo.och.unmanned.passenger.ui.aiview.bean + +import com.mogo.service.v2n.bean.MGEventExtInfoBean + +class MGDefaultQABean +/** + * 默认构造函数 + * 初始化基本字段为默认值 + */ +{ + fun getImagesUrl(): MutableList { + val rusult = mutableListOf() + images?.forEach { + rusult.add(it.url) + } + return rusult + } + + // Getters and setters + var title: String = "" // 事件标题 + var status: Int = 0 // 事件状态 1 显示 0 不显示 + var suggestion: String = "" // 建议操作 + var description: List? = null // 事件描述列表 + var images: List? = null // 事件相关图片信息 + var congestion: List? = null +} \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGEagleEyeBean.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGEagleEyeBean.kt new file mode 100644 index 0000000000..e3cce431f0 --- /dev/null +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGEagleEyeBean.kt @@ -0,0 +1,53 @@ +package com.mogo.och.unmanned.passenger.ui.aiview.bean + +data class MGEagleEyeBean( + val title: String = "", + val liveInfo: LiveInfo? = null, + val parkingLots: List? = null, + val trafficInfo: TrafficInfo? = null, + val touristDensity: String? = null, + var personCount:Int = 0, + val weatherInfo: WeatherInfo? = null, + val noise: String? = null, + var otherQuestion: List? = null, +) { + data class LiveInfo( + val imgUrl: String = "", + val liveUrl: String = "" + ) + + data class ParkingLot( + val name: String = "", + val address: String = "", + val businessHours: String = "", + val fee: String = "", + val total: String = "", + val free: String = "", + val freeRate: String = "", + val lat: Double = 0.0, + val lng: Double = 0.0, + val imgUrl: String = "", + val liveUrl: String = "" + ) + // driveDuration":165.48,"driveDistance":154.58,"busDistance":14.45,"busDuration":48.48,"level":2 + data class TrafficInfo( + val driveDistance: String = "", + val busDistance: String = "", + val driveDuration: String = "", + val busDuration: String = "", + val level: Int = 0, + val lon: Double = 0.0, + val lat: Double = 0.0, + val address:String = "", + val status: String = "" + ) + + data class WeatherInfo( + val temperature: String = "", + val windDirection: String = "", + val windPower: String = "", + val weather: String = "", + val sunlightIntensity: String = "", + val dressingAdv: String? = null, + ) +} \ No newline at end of file diff --git a/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGSpotPKBean.kt b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGSpotPKBean.kt new file mode 100644 index 0000000000..efb14ed5d3 --- /dev/null +++ b/OCH/taxi/unmanned-passenger/src/main/java/com/mogo/och/unmanned/passenger/ui/aiview/bean/MGSpotPKBean.kt @@ -0,0 +1,27 @@ +package com.mogo.och.unmanned.passenger.ui.aiview.bean +data class MGSpotPKBean( + val title: String = "", + val spots: List = emptyList(), + var otherQuestion: List? = null, +) { + data class Spot( + val name: String = "", + val isRecommend: Int = 0, + val roadStatus: String = "", + val distance: String = "", + val weather: String = "", + val crowded: String = "", + val feature: String = "", + val fee: String = "", + val lat: Double = 0.0, + val lng: Double = 0.0, + val imgUrl: String = "", + val liveUrl: String = "", + val parkingAddress:String? = null, + var parkingName:String? = null, + val parkingType:String? = null, + val parkingLon: Double? = null, + val parkingLat: Double? = null, + val parkingUrl: String? = null + ) +} diff --git a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml index e39e88465f..134930defa 100644 --- a/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml +++ b/OCH/taxi/unmanned-passenger/src/main/res/layout/item_ai_msg_qa.xml @@ -74,7 +74,7 @@ Date: Wed, 13 Aug 2025 11:46:53 +0800 Subject: [PATCH 5/8] =?UTF-8?q?[8.2.0][fix]=E7=BA=BF=E8=B7=AF=E5=8F=AF?= =?UTF-8?q?=E7=94=A8=E5=88=B7=E6=96=B0=E6=95=B0=E6=8D=AE=E5=B9=B6=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt index 7c105e2d23..eaa7a18a8e 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt @@ -294,6 +294,8 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC } } } + actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_default) + acctv_search_byid.text="" cancleAni() } From ee9171feb90b7f00cbebab345ebb23c9316d965b Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 13 Aug 2025 11:50:42 +0800 Subject: [PATCH 6/8] =?UTF-8?q?[8.2.0][opt]=E6=96=B0=E5=A2=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt index eaa7a18a8e..7968fd1e25 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectView.kt @@ -185,6 +185,7 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC switch_routing_rv.smoothScrollToPosition(0) } actv_order_by_num_desc.onClick { + // 按照总验证次序降序排列,而不是今日验证次序 mRoutingLineList.sortByDescending { (it.lineSuccessCount?:0)+(it.lineFailCount?:0) } @@ -283,6 +284,7 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback, InputTextC } override fun onQueryRoutingGrayLineListSuccess(data: MutableList) { + // 数据默认按照距离排序过了 onRoutingGrayLineListChanged(data) if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode) From 46103d5e4711af7da7aeadb665557f93c6dd25b6 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 13 Aug 2025 12:05:35 +0800 Subject: [PATCH 7/8] =?UTF-8?q?[8.2.0][opt]=E6=96=B0=E5=A2=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt index 0a4e18d186..4dc47ad675 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt @@ -138,8 +138,10 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac } private fun showFeedbackDialog(grayId: Long) { + CallerLogger.d(TAG, "showFeedbackDialog!") val occurrenceTime = System.currentTimeMillis() if(closeRouting==null) { + CallerLogger.d(TAG, "closeRouting is null!") closeRouting = CommonDialogStatus .Builder() .title("路线验证结束") @@ -152,6 +154,7 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac .build(context) }else{ if(closeRouting?.isShowing==true){ + CallerLogger.d(TAG, "closeRouting is showing, return!") return } } @@ -170,6 +173,7 @@ class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallbac ) } }) + CallerLogger.d(TAG, "closeRouting show!") closeRouting?.show() } From af18cc4d9ce7d22d8ede529511fde9dbde7a5321 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Wed, 13 Aug 2025 16:19:20 +0800 Subject: [PATCH 8/8] =?UTF-8?q?[8.2.0][app]=20=E4=BF=AE=E5=A4=8D=E8=BF=90?= =?UTF-8?q?=E8=90=A5=E9=9D=A2=E6=9D=BFV2X=E4=B8=AA=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E7=82=B9=E5=87=BB=E9=94=99=E4=B9=B1?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=BB=A5=E5=8F=8AToast=E5=9C=A8=E9=9D=9EV2X?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=BC=B9=E5=87=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/hmi/ui/MoGoHmiProvider.kt | 2 - .../hmi/ui/operate/OperatePanelLayout.kt | 139 ++++++++---------- .../core/data/config/FunctionBuildConfig.kt | 6 - 3 files changed, 65 insertions(+), 82 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt index 1749466cfa..9d62c65bc9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt @@ -494,13 +494,11 @@ class MoGoHmiProvider : IMoGoHmiProvider { if (target != null && target.visibility != View.VISIBLE) { TransitionManager.beginDelayedTransition(target.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(target) }) target.visibility = View.VISIBLE - CallerHmiViewControlListenerManager.invokeOperatePanelDisplayStatus(true) } } else { if (target != null && target.visibility == View.VISIBLE) { TransitionManager.beginDelayedTransition(target.parent as ViewGroup, Slide(Gravity.START).also { it.duration = 150; it.addTarget(target) }) target.visibility = View.GONE - CallerHmiViewControlListenerManager.invokeOperatePanelDisplayStatus(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 9b0fbbff56..3c7bccca8f 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 @@ -332,7 +332,10 @@ class OperatePanelLayout : LinearLayout { class V2XPreferenceFragmentCompat : OperatePanelDetailBase(), IV2XListener, IMoGoAutopilotStatusListener,IViewControlListener { - + private var v2xIsShow: Boolean = false + private var operatePaneIsShow = true + private var prevIpcConnectStatus = false + private var customToast: Toast? = null companion object { private const val TAG = "V2XPreferenceFragmentCompat" private const val NDE_UPWARD_SWITCH = "nde_upward_switch" //NDE(数据上车)上行 @@ -347,6 +350,8 @@ class OperatePanelLayout : LinearLayout { private const val V2I_WEAK_TRAFFIC_PARTICIPANT = "v2i_weak_traffic_participant" //弱势交通参与者 private const val V2I_PERCEPTION_DATA_TO_PNC = "v2i_perception_data_to_pnc" //感知数据进PNC应用 private const val V2V_DOWNWARD_SWITCH = "v2v_downward_switch" //V2V下行 + + private const val WHAT_UPDATE_ENABLE = 0x00//更新按钮状态 } override fun onCreateView(inflater: LayoutInflater, @@ -361,25 +366,31 @@ class OperatePanelLayout : LinearLayout { //车辆图像上传行云大模型状态查询 CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery() } + prevIpcConnectStatus = AppConfigInfo.isConnectAutopilot CallerAutoPilotStatusListenerManager.addListener(TAG, this) CallerHmiViewControlListenerManager.addListener(TAG,this) return super.onCreateView(inflater, container, savedInstanceState) } override fun onDestroyView() { + super.onDestroyView() CallerV2XManager.removeListener(TAG) CallerAutoPilotStatusListenerManager.removeListener(TAG) - super.onDestroyView() + CallerHmiViewControlListenerManager.removeListener(TAG) + handler.removeCallbacksAndMessages(null) } override fun operatePanelDisplayStatus(isShow: Boolean) { super.operatePanelDisplayStatus(isShow) - if(isShow){ - CallerAutoPilotStatusListenerManager.addListener(TAG, this) - FunctionBuildConfig.v2xIsShow = true - }else{ - CallerAutoPilotStatusListenerManager.removeListener(TAG) - FunctionBuildConfig.v2xIsShow = false + operatePaneIsShow = isShow + if (isShow) { + if (v2xIsShow) { + handler.sendEmptyMessage(WHAT_UPDATE_ENABLE) + } + } else { + handler.removeMessages(WHAT_UPDATE_ENABLE) + customToast?.cancel() + customToast = null } } @@ -442,95 +453,70 @@ class OperatePanelLayout : LinearLayout { } override fun onResume() { - FunctionBuildConfig.v2xIsShow = true - if(AppConfigInfo.isConnectAutopilot){ - FunctionBuildConfig.currentStatus = true - handler.removeMessages(2) - handler.sendEmptyMessage(1) - }else{ - FunctionBuildConfig.currentStatus = false - handler.removeMessages(1) - handler.sendEmptyMessage(2) - } super.onResume() + prevIpcConnectStatus = AppConfigInfo.isConnectAutopilot + v2xIsShow = true + handler.sendEmptyMessage(WHAT_UPDATE_ENABLE) } + override fun onPause() { - FunctionBuildConfig.v2xIsShow = false - handler.removeMessages(1) - handler.removeMessages(2) super.onPause() + v2xIsShow = false + handler.removeMessages(WHAT_UPDATE_ENABLE) + customToast?.cancel() + customToast = null } - private val handler =object : Handler(Looper.getMainLooper()){ - override fun handleMessage(msg: Message){ + private val handler = object : Handler(Looper.getMainLooper()) { + override fun handleMessage(msg: Message) { super.handleMessage(msg) - //与域控连接正常 - if(msg.what == 1){ - Log.i(TAG,"与域控连接正常 handler操作1") - setEnableStatus(true) - FunctionBuildConfig.currentStatus = true - this.removeMessages(2) - } - //与域控断连 - else if(msg.what == 2){ - Log.i(TAG,"与域控断连 handler操作2 ="+FunctionBuildConfig.v2xIsShow) - if(FunctionBuildConfig.v2xIsShow){ - Log.i(TAG,"currentStatus = "+FunctionBuildConfig.currentStatus) - if(FunctionBuildConfig.currentStatus){ - return - } - Log.i(TAG,"执行断连UI操作") - setEnableStatus(false) + if (msg.what == WHAT_UPDATE_ENABLE) { + if (this.hasMessages(WHAT_UPDATE_ENABLE)) { + this.removeMessages(WHAT_UPDATE_ENABLE) + } + setEnableStatus(AppConfigInfo.isConnectAutopilot) + if (AppConfigInfo.isConnectAutopilot) { + customToast?.cancel() + customToast = null + } else { showConnectToast() - this.removeMessages(2) - this.sendEmptyMessageDelayed(2,5000) + this.sendEmptyMessageDelayed(WHAT_UPDATE_ENABLE, 5000) } } } } - private var lastToastTime: Long = 0L - private fun showConnectToast(){ - if(System.currentTimeMillis() - lastToastTime > 4500){ - try { - AppStateManager.currentActivity()?.let { - val customToastView = it.layoutInflater.inflate(R.layout.view_ipc_connect_status_toast,null) - val customToast = Toast(MainMoGoApplication.getApp().applicationContext) - customToast.duration = Toast.LENGTH_SHORT - customToast.view = customToastView - customToast.setGravity(Gravity.START,AutoSizeUtils.dp2px(MainMoGoApplication.getApp().applicationContext, 280f),0) - customToast.show() - } - }catch (_: Exception){} - lastToastTime = System.currentTimeMillis() + private fun showConnectToast() { + try { + AppStateManager.currentActivity()?.let { + val customToastView = + it.layoutInflater.inflate(R.layout.view_ipc_connect_status_toast, null) + customToast = Toast(MainMoGoApplication.getApp().applicationContext) + customToast!!.duration = Toast.LENGTH_SHORT + customToast!!.view = customToastView + customToast!!.setGravity( + Gravity.START, + AutoSizeUtils.dp2px(MainMoGoApplication.getApp().applicationContext, 280f), + 0 + ) + customToast!!.show() + } + } catch (_: Exception) { } } override fun onAutopilotIpcConnectStatusChanged( status: AdasConstants.IpcConnectionStatus, reason: String? - ){ - ThreadUtils.runOnUiThread{ - if(status == AdasConstants.IpcConnectionStatus.CONNECTED){ - //域控连接成功,恢复正常状态 - Log.i(TAG,"域控连接成功") -// handler.sendEmptyMessage(1) -// handler.removeMessages(2) -// if(!currentStatus){ -// currentStatus = true -// } - this.onResume() - }else{ - //断连中,持续提示:请等待与域控恢复连接后操作;并且将所有开关置为不可用状态 - Log.i(TAG,"请等待与域控恢复连接后操作"+FunctionBuildConfig.currentStatus) - FunctionBuildConfig.currentStatus = false - handler.removeMessages(1) - handler.sendEmptyMessage(2) - this.onResume() + ) { + if (prevIpcConnectStatus != AppConfigInfo.isConnectAutopilot) { + if (operatePaneIsShow && v2xIsShow) { + handler.sendEmptyMessage(WHAT_UPDATE_ENABLE) } } + prevIpcConnectStatus = AppConfigInfo.isConnectAutopilot } private fun setEnableStatus(isEnable: Boolean){ @@ -1964,4 +1950,9 @@ class OperatePanelLayout : LinearLayout { } isClickable = true } + + override fun onVisibilityChanged(changedView: View, visibility: Int) { + super.onVisibilityChanged(changedView, visibility) + CallerHmiViewControlListenerManager.invokeOperatePanelDisplayStatus(visibility == View.VISIBLE) + } } \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index 6fc91ea5ce..fa4cff15a6 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -531,11 +531,5 @@ object FunctionBuildConfig { @JvmField var isDriveSeatVideoStream: Boolean = false - @Volatile - @JvmField - var v2xIsShow: Boolean = false //运营面板V2X页面是否是显示状态 - @Volatile - @JvmField - var currentStatus: Boolean = false //当前工控机连接状态连接状态 } \ No newline at end of file