From 26f49ac7ccbef69312c3e2ff69fe4ec6fb3c4e96 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 23 Mar 2023 20:40:21 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Frobobus-d=5F230322=5F3.0.0]=E4=BA=91?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E5=92=8CBus=E4=B9=98=E5=AE=A2=E7=AB=AF?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9B=92=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../res/layout/bus_p_base_fragment.xml | 9 + .../eagle/function/biz/FuncBizProvider.kt | 8 + .../biz/dispatch/DispatchAutoPilotManager.kt | 149 ++++++++++++-- .../dispatch/network/DispatchServiceModel.kt | 8 +- .../ui/msgbox/BusPassengerMsgBoxBubbleView.kt | 81 ++++++++ .../BusPassengerMsgBoxBubbleAdapter.kt | 136 +++++++++++++ .../hmi/ui/notice/DispatchCarsDialog.java | 39 +++- .../hmi/ui/notice/DispatchDialogManager.java | 18 +- .../icon_bus_passenger_logo.png | Bin 0 -> 9543 bytes .../res/layout/dialog_adas_dispatch_cars.xml | 2 + .../main/res/layout/item_bus_box_notice.xml | 52 +++++ .../res/layout/item_bus_box_operation.xml | 52 +++++ .../src/main/res/layout/item_bus_box_v2x.xml | 52 +++++ .../layout_bus_passenegr_msg_box_bubble.xml | 8 + .../DispatchAdasAutoPilotLocReceiverBean.java | 189 +++++++++++++++++- .../biz/dispatch/ReportDispatchResult.java | 15 +- .../function/api/biz/IMoGoFuncBizProvider.kt | 11 + 17 files changed, 799 insertions(+), 30 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/BusPassengerMsgBoxBubbleView.kt create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/BusPassengerMsgBoxBubbleAdapter.kt create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_notice.xml create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_operation.xml create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_v2x.xml create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_bus_passenegr_msg_box_bubble.xml diff --git a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_base_fragment.xml b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_base_fragment.xml index 608ac59429..06f31d335e 100644 --- a/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_base_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/jinlvvan/res/layout/bus_p_base_fragment.xml @@ -161,4 +161,13 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" /> + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt index 4148358f57..4d457efad4 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt @@ -62,10 +62,18 @@ class FuncBizProvider : IMoGoFuncBizProvider { dispatchAutoPilotManager.affirm() } + override fun stopDispatchAffirm() { + dispatchAutoPilotManager.stopAffirm() + } + override fun dispatchCancel(manualTrigger: Boolean) { dispatchAutoPilotManager.cancel(manualTrigger) } + override fun stopDispatchCancel(manualTrigger: Boolean) { + dispatchAutoPilotManager.stopCancel(manualTrigger) + } + override fun testDispatch(sceneType: Int) { dispatchAutoPilotManager.testDispatch(sceneType) } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt index 59468e898a..df94c15db0 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.dispatch import android.content.Context import android.os.Handler import android.os.Message +import android.util.Log import com.mogo.aicloud.services.socket.IMogoOnMessageListener import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters @@ -21,19 +22,25 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.CoordinateUtils +import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_COMPLETED import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_AFFIRM +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_MANUAL_CANCEL +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_TIMER_CANCEL import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel import mogo.telematics.pad.MessagePad +import mogo_msg.MogoReportMsg //负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗 class DispatchAutoPilotManager private constructor() : - IMogoOnMessageListener, - IMoGoCheckAutoPilotBtnListener, - IMoGoPlanningRottingListener, - IMoGoAutopilotStatusListener { + IMogoOnMessageListener, + IMoGoCheckAutoPilotBtnListener, + IMoGoPlanningRottingListener, + IMoGoAutopilotStatusListener { companion object { private const val TAG = "DispatchAutoPilotManager" @@ -110,6 +117,7 @@ class DispatchAutoPilotManager private constructor() : } override fun onMsgReceived(adasAutoPilotLocReceiverBean: DispatchAdasAutoPilotLocReceiverBean?) { + Log.i(TAG,"onMsgReceived 收到云调度长链接") if (adasAutoPilotLocReceiverBean != null && adasAutoPilotLocReceiverBean.startLat != 0.0 && adasAutoPilotLocReceiverBean.startLon != 0.0) { receiverBean = adasAutoPilotLocReceiverBean val message = Message() @@ -117,6 +125,47 @@ class DispatchAutoPilotManager private constructor() : message.obj = adasAutoPilotLocReceiverBean handler.sendMessage(message) } + //同步调用路线下载逻辑 + adasAutoPilotLocReceiverBean?.let { + if(it.type == 1){ + val mAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5,it.stopUrl,it.stopMd5,it.timestamp, + it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp,it.stopMd5_dpqp,it.timestamp_dpqp) + CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mAutoPilotLine) + Log.i(TAG,"调用路线下载逻辑") + } + } + + adasAutoPilotLocReceiverBean?.let { + Log.i(TAG,"taskId="+it.taskId) + Log.i(TAG,"type="+it.type) + Log.i(TAG,"source="+it.source) + Log.i(TAG,"lineName="+it.lineName) + Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp) + Log.i(TAG,"stopUrl_dpqp="+it.stopUrl_dpqp) + Log.i(TAG,"trajMd5_dpqp="+it.trajMd5_dpqp) + Log.i(TAG,"trajUrl_dpqp="+it.trajUrl_dpqp) + Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp) + Log.i(TAG,"stopMd5="+it.stopMd5) + Log.i(TAG,"stopUrl="+it.stopUrl) + Log.i(TAG,"trajUrl="+it.trajUrl) + Log.i(TAG,"trajMd5="+it.trajMd5) + Log.i(TAG,"endLocAddress="+it.endLocAddress) + Log.i(TAG,"flightInfo="+it.flightInfo) + Log.i(TAG,"poiId="+it.poiId) + Log.i(TAG,"startLocAddress="+it.startLocAddress) + Log.i(TAG,"taskInfo="+it.taskInfo) + Log.i(TAG,"taskTime="+it.taskTime) + Log.i(TAG,"vehicleModel="+it.vehicleModel) + Log.i(TAG,"endLat="+it.endLat) + Log.i(TAG,"endLon="+it.endLon) + Log.i(TAG,"lineId="+it.lineId) + Log.i(TAG,"startLat="+it.startLat) + Log.i(TAG,"startLon="+it.startLon) + Log.i(TAG,"stopsList="+it.stopsList) + Log.i(TAG,"timestamp="+it.timestamp) + Log.i(TAG,"systemTime="+it.systemTime) + Log.i(TAG,"timestamp_dpqp="+it.timestamp_dpqp) + } } private fun startAutoPilot() { @@ -141,20 +190,56 @@ class DispatchAutoPilotManager private constructor() : AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon) currentAutopilot.vehicleType = 10 CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot") + Log.i(TAG,"开启自动驾驶====$currentAutopilot") CallerAutoPilotControlManager.startAutoPilot(currentAutopilot) } } fun affirm() { CallerHmiManager.dismissDispatchDialog() - dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM) + receiverBean?.taskId?.let { + dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it, + onSuccess = { + //调用工控机开启自动驾驶 + startAutoPilot() + },onError = { + + }) + } + } + + /** + * 停止调度确认 + */ + fun stopAffirm(){ + CallerHmiManager.dismissDispatchDialog() + receiverBean?.taskId?.let{ + dispatchServiceModel.dispatchResultUpload(DISPATCH_STOP_AFFIRM, it, + onSuccess = { + //取消自动驾驶 + CallerAutoPilotControlManager.cancelAutoPilot() + Log.i(TAG,"stopAffirm 取消自动驾驶") + }, onError = {}) + } } fun cancel(manualTrigger: Boolean) { CallerHmiManager.dismissDispatchDialog() - dispatchServiceModel.dispatchResultUpload( - if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL - ) + receiverBean?.taskId?.let { + dispatchServiceModel.dispatchResultUpload( + if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL, it) + } + } + + /** + * 停止调度取消 + */ + fun stopCancel(manualTrigger: Boolean){ + CallerHmiManager.dismissDispatchDialog() + receiverBean?.taskId?.let{ + dispatchServiceModel.dispatchResultUpload( + if (manualTrigger) DISPATCH_STOP_MANUAL_CANCEL else DISPATCH_STOP_TIMER_CANCEL, it) + } } override fun onCheck(isChecked: Boolean) { @@ -197,7 +282,7 @@ class DispatchAutoPilotManager private constructor() : SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt data : $arrivalNotification" ) - + Log.i(TAG,"onArriveAt data : $arrivalNotification") if (arrivalNotification.endLocation == null) { return } @@ -211,13 +296,40 @@ class DispatchAutoPilotManager private constructor() : SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt cal distance : $distanceFromSelf" ) + Log.i(TAG,"onArriveAt cal distance : $distanceFromSelf") if (distanceFromSelf < 10) { CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt end location") isDispatch = false isArriveEnd = true + //到站,调度完成 + receiverBean?.let { + //调度完成,同步云端,并且吐司提示 + dispatchServiceModel.dispatchResultUpload(DISPATCH_COMPLETED, it.taskId) + ToastUtils.showLong("云调度完成,车辆即将到达${it.endLocAddress}") + } } } + /** + * 接口MEC反馈的常规信息(MAP v2.5.0新增轨迹相关信息) + * @param guardianInfo + */ + override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) { + if (guardianInfo == null || !guardianInfo.hasCode()) return + if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_START 轨迹管理_轨迹开始下载(本地已有对应轨迹也触发)") + }else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发)") + }else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_FAILURE 轨迹管理_轨迹下载失败,本地无对应轨迹") + }else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功") + }else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时") + } + + } + fun testDispatch(sceneType: Int) { when (sceneType) { 0 -> testEZhouStart() @@ -243,7 +355,10 @@ class DispatchAutoPilotManager private constructor() : "AR453航班", "你车需执行编号ca1098次航班的引导任务,从A区A1到B区B1", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) @@ -265,7 +380,10 @@ class DispatchAutoPilotManager private constructor() : "", "", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) @@ -287,14 +405,19 @@ class DispatchAutoPilotManager private constructor() : "", "", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) } private fun testDispatchResultUpload() { - dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM) + receiverBean?.taskId?.let { + dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it) + } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt index 13a5aa2c10..0b1d759469 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt @@ -23,6 +23,10 @@ class DispatchServiceModel private constructor() { const val DISPATCH_RESULT_AFFIRM = 0 const val DISPATCH_RESULT_MANUAL_CANCEL = 1 const val DISPATCH_RESULT_TIMER_CANCEL = 2 + const val DISPATCH_STOP_AFFIRM = 3 //云端终止指令-确认 + const val DISPATCH_STOP_TIMER_CANCEL = 4 //云端终止指令-超时拒绝 + const val DISPATCH_STOP_MANUAL_CANCEL = 5 //云端终止指令-手动拒绝 + const val DISPATCH_COMPLETED = 6 //调度完成 val dispatchServiceModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) { DispatchServiceModel() @@ -111,6 +115,7 @@ class DispatchServiceModel private constructor() { */ fun dispatchResultUpload( dispatchResultType: Int, + taskId: Long, onSuccess: ((BaseData) -> Unit)? = null, onError: ((String) -> Unit)? = null ) { @@ -118,7 +123,8 @@ class DispatchServiceModel private constructor() { val reportDispatchResult = ReportDispatchResult( sn, - dispatchResultType + dispatchResultType, + taskId ) val map: MutableMap = HashMap() map["sn"] = sn diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/BusPassengerMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/BusPassengerMsgBoxBubbleView.kt new file mode 100644 index 0000000000..f88d023f2d --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/BusPassengerMsgBoxBubbleView.kt @@ -0,0 +1,81 @@ +package com.mogo.eagle.core.function.hmi.ui.msgbox + +import android.app.Activity +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.recyclerview.widget.LinearLayoutManager +import com.mogo.eagle.core.data.msgbox.MsgBoxBean +import com.mogo.eagle.core.data.msgbox.MsgBoxCountDownBean +import com.mogo.eagle.core.data.msgbox.MsgBoxType +import com.mogo.eagle.core.data.msgbox.MsgCategory +import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager +import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.BusPassengerMsgBoxBubbleAdapter +import com.mogo.eagle.core.function.msgbox.MsgBoxConfig +import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import kotlinx.android.synthetic.main.layout_bus_passenegr_msg_box_bubble.view.* + +class BusPassengerMsgBoxBubbleView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 +) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener { + + private val TAG = "BusPassengerMsgBoxBubbleView" + private val dataList :ArrayList = ArrayList() + private var busPassengerMsgBoxBubbleAdapter: BusPassengerMsgBoxBubbleAdapter?= null + private var isShowData = true + + init { + LayoutInflater.from(context).inflate(R.layout.layout_bus_passenegr_msg_box_bubble, this, true) + initView() + } + + private fun initView(){ + val linearLayoutManager = LinearLayoutManager(context) + linearLayoutManager.orientation = LinearLayoutManager.VERTICAL + busPassengerMsgBoxBubbleAdapter = BusPassengerMsgBoxBubbleAdapter(context as Activity) + rvBusBoxBubbleList.adapter =busPassengerMsgBoxBubbleAdapter + rvBusBoxBubbleList.layoutManager = linearLayoutManager + } + + /** + * 是否展示接收消息,消息盒子打开状态下不再展示气泡消息 + * @param show true 展示;false 不展示 + */ + fun isShowData(show: Boolean){ + isShowData = show + } + + override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean){ + UiThreadHandler.post{ + if(category == MsgCategory.NOTICE){ + if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X + || msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){ + MsgBoxConfig.noticeList.add(msgBoxList) + if(isShowData){ + CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true) + val msgBoxCountDownBean = MsgBoxCountDownBean(msgBoxList) + dataList.add(msgBoxCountDownBean) + busPassengerMsgBoxBubbleAdapter?.setData(dataList) + } + } + } + } + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + CallerMsgBoxListenerManager.addListener(TAG,this) + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + CallerMsgBoxListenerManager.removeListener(TAG) + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/BusPassengerMsgBoxBubbleAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/BusPassengerMsgBoxBubbleAdapter.kt new file mode 100644 index 0000000000..a64c894066 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/BusPassengerMsgBoxBubbleAdapter.kt @@ -0,0 +1,136 @@ +package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter + +import android.app.Activity +import android.os.CountDownTimer +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView +import com.mogo.eagle.core.data.enums.EventTypeEnumNew +import com.mogo.eagle.core.data.msgbox.* +import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager +import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.util.TimeUtils +import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat + +class BusPassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter() { + + private var data: ArrayList ?= null + + private val notice: Int = 1 + private val v2x: Int = 2 + private val operation: Int = 3 + + fun setData(data: ArrayList){ + this.data = data + if(data.size>3){ + data.removeAt(0) + } + notifyDataSetChanged() + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder{ + return when (viewType){ + notice ->{ + val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_notice,parent,false) + BusBubbleNoticeHolder(view) + } + operation ->{ + val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_operation,parent,false) + BusBubbleOperationHolder(view) + } + else ->{ + val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bus_box_v2x,parent,false) + BusBubbleV2XHolder(view) + } + } + } + + override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int){ + when (holder){ + is BusBubbleNoticeHolder -> { + data?.let{ + val noticeFrCloudMsg = it[position].msgBoxBean.bean as NoticeFrCloudMsg + if(noticeFrCloudMsg.type == 0){ + val noticeNormalData = noticeFrCloudMsg.noticeNormalData + holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) + holder.tvBusPNoticeContent.text = noticeNormalData?.content + }else{ + val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData + holder.tvBusPNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) + holder.tvBusPNoticeContent.text = noticeTrafficStylePushData?.content + } + } + } + is BusBubbleOperationHolder -> { + //运营消息 + data?.let{ + val operationMsg = it[position].msgBoxBean.bean as OperationMsg + holder.tvBusPOperationTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) + holder.tvBusPOperationContent.text = operationMsg.content + } + } + is BusBubbleV2XHolder -> { + data?.let{ + val msgBoxBean = it[position] + val v2XMsg = msgBoxBean.msgBoxBean.bean as V2XMsg + holder.tvBusPV2XTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) + holder.tvBusPV2XContent.text = v2XMsg.content + holder.ivBusPV2XImage.setImageDrawable(activity.resources.getDrawable( + EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))) + } + } + } + + val msgBoxBean: MsgBoxCountDownBean = data!![position] + msgBoxBean.countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),CallerMsgBoxManager.getDismissTime()){ + override fun onTick(p0: Long) { + + } + + override fun onFinish() { + data?.remove(msgBoxBean) + notifyDataSetChanged() +// notifyItemRemoved(index) +// notifyItemRangeChanged(index,recordTypeEntity.size-index) + } + + } + msgBoxBean.countDownTimer?.start() + + } + + override fun getItemCount() = data?.size ?: 0 + + override fun getItemViewType(position: Int): Int{ + return if(data!![position].msgBoxBean.type == MsgBoxType.NOTICE){ + notice + }else if(data!![position].msgBoxBean.type == MsgBoxType.OPERATION){ + operation + } else{ + v2x + } + } + + //Notice + class BusBubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){ + var tvBusPNoticeTime: TextView = itemView.findViewById(R.id.tvBusPNoticeTime) + var tvBusPNoticeContent: TextView = itemView.findViewById(R.id.tvBusPNoticeContent) + } + + //OBU、V2X + class BusBubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){ + var ivBusPV2XImage: ImageView = itemView.findViewById(R.id.ivBusPV2XImage) + var tvBusPV2XTime: TextView = itemView.findViewById(R.id.tvBusPV2XTime) + var tvBusPV2XContent: TextView = itemView.findViewById(R.id.tvBusPV2XContent) + } + + //运营消息 + class BusBubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){ + var tvBusPOperationTime: TextView = itemView.findViewById(R.id.tvBusPOperationTime) + var tvBusPOperationContent: TextView = itemView.findViewById(R.id.tvBusPOperationContent) + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java index 5324063e86..d2d4446df3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java @@ -21,6 +21,10 @@ public class DispatchCarsDialog extends DispatchBaseDialog { private final TextView tvTimer; private final TextView tvLoc; + private final TextView tvAdasDispatchTitle; + private final TextView tvAdasDispatchRemindContent; + + private int dispatchType = 1;//调度类型:1:启动 2:停止 private final Handler handler = new Handler() { @Override @@ -44,21 +48,40 @@ public class DispatchCarsDialog extends DispatchBaseDialog { setCanceledOnTouchOutside(false); tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer); tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc); - Button btnAffirm = (Button) findViewById(R.id.module_adas_dispatch_remind_affirm); - Button btnCancel = (Button) findViewById(R.id.module_adas_dispatch_remind_cancel); + tvAdasDispatchTitle = findViewById(R.id.tv_adas_dispatch_title); + tvAdasDispatchRemindContent = findViewById(R.id.tv_adas_dispatch_remind_content); + Button btnAffirm = findViewById(R.id.module_adas_dispatch_remind_affirm); + Button btnCancel = findViewById(R.id.module_adas_dispatch_remind_cancel); tvTimer.setText(String.valueOf(TIMER)); btnAffirm.setOnClickListener(v -> { - CallerFuncBizManager.getBizProvider().dispatchAffirm(); + if(dispatchType == 1){ + //开始调度确认 + CallerFuncBizManager.getBizProvider().dispatchAffirm(); + }else if(dispatchType == 2){ + //停止调度确认 + CallerFuncBizManager.getBizProvider().stopDispatchAffirm(); + } dismissDialog(); }); btnCancel.setOnClickListener(v -> { - CallerFuncBizManager.getBizProvider().dispatchCancel(true); + if(dispatchType == 1){ + //开始调度手动取消 + CallerFuncBizManager.getBizProvider().dispatchCancel(true); + }else if(dispatchType == 2){ + //停止调度手动取消 + CallerFuncBizManager.getBizProvider().stopDispatchCancel(true); + } dismissDialog(); }); } private void hideDialog() { - CallerFuncBizManager.getBizProvider().dispatchCancel(false); + if(dispatchType == 1){ + //开始调度自动取消 + CallerFuncBizManager.getBizProvider().dispatchCancel(false); + }else if(dispatchType == 2){ + CallerFuncBizManager.getBizProvider().stopDispatchCancel(false); + } dismissDialog(); } @@ -74,6 +97,12 @@ public class DispatchCarsDialog extends DispatchBaseDialog { return; } show(); + if(dispatchContent.getType() == 2){ + //取消调度 + tvAdasDispatchTitle.setText("调度取消确认"); + tvAdasDispatchRemindContent.setText("车辆将取消到以下位置的自动驾驶"); + } + dispatchType = dispatchContent.getType(); handler.sendEmptyMessage(MSG_TYPE_TIMER); tvLoc.setText(dispatchContent.getEndLocAddress()); } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java index 6d6cf91503..d3a04fa4bd 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java @@ -54,15 +54,17 @@ public class DispatchDialogManager { } private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) { - if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度 - if (dialog != null && dialog.isShowing()) { //避免下发两次 - return; - } - if (dialog == null) { - dialog = new DispatchCarsDialog(mContext); - } - dialog.showDialog(msgData); +// if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度 +// } + //开始、取消调度 + if (dialog != null && dialog.isShowing()) { //避免下发两次 + return; } + if (dialog == null) { + dialog = new DispatchCarsDialog(mContext); + } + dialog.showDialog(msgData); + } private void dispatchEZhou(DispatchAdasAutoPilotLocReceiverBean msgData) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f3b37355ccfa9d0518811241eeaf1619201d5d91 GIT binary patch literal 9543 zcmV-NCAiv&P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91YoG%F1ONa40RR91YXATM0BdP_MF0RKu}MThRCod1U3t)5XIX#l{g&j* z)+8;38t7t|bYUrFsjaoN2(29yRAjRl7*xR4aTpzy#f2Fy)iNyVh`=A9fwHJ5)sa$) zq%g#`EM>7NO)0cAO~GynO|yO5_4j+;=l94l=F> z11?WnVOaKDvtwIYZM$K(Z68JBzR_##&`}uYAqO;whqBADY(V|IK?3IScM6 zRw}-9IXb`OQ8=1J#jIbDGrx_-nQcVlu0`Xv)83&3hJMHZO*$XW--_ij6s?_i8AcRE zE$W(UNJMmsmOy%$ls6CrHz#IYUv%iIxwPrJwAZp}=wEL`_KuNO>wm~Q6j0`M(EOuG zFMzYRVYx`fQDInBr-7MyjEn^(h#!$>8Sx=f(wYvDMQ_|JO;JZ(o=G3}ZfbSxs*#b_ z=b>>>AyPg#KGCEL;prOG<=lFKJc6>|AoR#YLA{vZ7vip7u0k|5febg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+ + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_operation.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_operation.xml new file mode 100644 index 0000000000..c73c5380ef --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_operation.xml @@ -0,0 +1,52 @@ + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_v2x.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_v2x.xml new file mode 100644 index 0000000000..1c4c09f901 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_bus_box_v2x.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_bus_passenegr_msg_box_bubble.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_bus_passenegr_msg_box_bubble.xml new file mode 100644 index 0000000000..72ab34e2f5 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/layout_bus_passenegr_msg_box_bubble.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java index 99a1b51322..4e32f60caf 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java @@ -29,7 +29,31 @@ public class DispatchAdasAutoPilotLocReceiverBean { private long systemTime; private List stopsList; - public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, String taskInfo, long systemTime, List stopsList) { + private long taskId; //任务调度记录的ID + private int lineId; //路线Id + private String lineName; //路线名称 + + private String trajUrl; + private String trajMd5; + private String stopUrl; + private String stopMd5; + private long timestamp; + private String vehicleModel; + private String trajUrl_dpqp;//轨迹文件下载的cos url,默认“” + private String trajMd5_dpqp;//轨迹文件md5,默认“” + private String stopUrl_dpqp;//打点文件下载的cos url,默认“” + private String stopMd5_dpqp;//轨迹文件md5,默认“” + private long timestamp_dpqp;//上传轨迹完成时间戳(ms):用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖 + + public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, + double startLon, String startLocAddress, double endLat, + double endLon, String endLocAddress, String taskTime, + String flightInfo, String taskInfo, long systemTime, + List stopsList, long taskId, int lineId, + String lineName, String trajUrl, String trajMd5, + String stopUrl, String stopMd5, long timestamp, + String vehicleModel, String trajUrl_dpqp, String trajMd5_dpqp, + String stopUrl_dpqp, String stopMd5_dpqp, long timestamp_dpqp) { this.source = source; this.type = type; this.poiId = poiId; @@ -44,6 +68,43 @@ public class DispatchAdasAutoPilotLocReceiverBean { this.taskInfo = taskInfo; this.systemTime = systemTime; this.stopsList = stopsList; + this.taskId = taskId; + this.lineId = lineId; + this.lineName = lineName; + this.trajUrl = trajUrl; + this.trajMd5 = trajMd5; + this.stopUrl = stopUrl; + this.stopMd5 = stopMd5; + this.timestamp = timestamp; + this.vehicleModel = vehicleModel; + this.trajUrl_dpqp = trajUrl_dpqp; + this.trajMd5_dpqp = trajMd5_dpqp; + this.stopUrl_dpqp = stopUrl_dpqp; + this.stopMd5_dpqp = stopMd5_dpqp; + this.timestamp_dpqp = timestamp_dpqp; + } + + public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, + double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, + String taskInfo, long systemTime, List stopsList, + long taskId, int lineId, String lineName) { + this.source = source; + this.type = type; + this.poiId = poiId; + this.startLat = startLat; + this.startLon = startLon; + this.startLocAddress = startLocAddress; + this.endLat = endLat; + this.endLon = endLon; + this.endLocAddress = endLocAddress; + this.taskTime = taskTime; + this.flightInfo = flightInfo; + this.taskInfo = taskInfo; + this.systemTime = systemTime; + this.stopsList = stopsList; + this.taskId = taskId; + this.lineId = lineId; + this.lineName = lineName; } public int getSource() { @@ -158,6 +219,118 @@ public class DispatchAdasAutoPilotLocReceiverBean { this.stopsList = stopsList; } + public long getTaskId(){ + return taskId; + } + + public void setTaskId(long taskId){ + this.taskId = taskId; + } + + public int getLineId(){ + return lineId; + } + + public void setLineId(int lineId){ + this.lineId =lineId; + } + + public String getLineName(){ + return lineName; + } + + public void setLineName(String lineName){ + this.lineName = lineName; + } + + public String getTrajUrl() { + return trajUrl; + } + + public void setTrajUrl(String trajUrl) { + this.trajUrl = trajUrl; + } + + public String getTrajMd5() { + return trajMd5; + } + + public void setTrajMd5(String trajMd5) { + this.trajMd5 = trajMd5; + } + + public String getStopUrl() { + return stopUrl; + } + + public void setStopUrl(String stopUrl) { + this.stopUrl = stopUrl; + } + + public String getStopMd5() { + return stopMd5; + } + + public void setStopMd5(String stopMd5) { + this.stopMd5 = stopMd5; + } + + public long getTimestamp() { + return timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + public String getVehicleModel() { + return vehicleModel; + } + + public void setVehicleModel(String vehicleModel) { + this.vehicleModel = vehicleModel; + } + + public String getTrajUrl_dpqp() { + return trajUrl_dpqp; + } + + public void setTrajUrl_dpqp(String trajUrl_dpqp) { + this.trajUrl_dpqp = trajUrl_dpqp; + } + + public String getTrajMd5_dpqp() { + return trajMd5_dpqp; + } + + public void setTrajMd5_dpqp(String trajMd5_dpqp) { + this.trajMd5_dpqp = trajMd5_dpqp; + } + + public String getStopUrl_dpqp() { + return stopUrl_dpqp; + } + + public void setStopUrl_dpqp(String stopUrl_dpqp) { + this.stopUrl_dpqp = stopUrl_dpqp; + } + + public String getStopMd5_dpqp() { + return stopMd5_dpqp; + } + + public void setStopMd5_dpqp(String stopMd5_dpqp) { + this.stopMd5_dpqp = stopMd5_dpqp; + } + + public long getTimestamp_dpqp() { + return timestamp_dpqp; + } + + public void setTimestamp_dpqp(long timestamp_dpqp) { + this.timestamp_dpqp = timestamp_dpqp; + } + @Override public String toString() { return "DispatchAdasAutoPilotLocReceiverBean{" + @@ -175,6 +348,20 @@ public class DispatchAdasAutoPilotLocReceiverBean { ", taskInfo='" + taskInfo + '\'' + ", systemTime=" + systemTime + ", stopsList=" + stopsList + + ", taskId=" + taskId + + ", lineId=" + lineId + + ", lineName='" + lineName + '\'' + + ", trajUrl='" + trajUrl + '\'' + + ", trajMd5='" + trajMd5 + '\'' + + ", stopUrl='" + stopUrl + '\'' + + ", stopMd5='" + stopMd5 + '\'' + + ", timestamp=" + timestamp + + ", vehicleModel='" + vehicleModel + '\'' + + ", trajUrl_dpqp='" + trajUrl_dpqp + '\'' + + ", trajMd5_dpqp='" + trajMd5_dpqp + '\'' + + ", stopUrl_dpqp='" + stopUrl_dpqp + '\'' + + ", stopMd5_dpqp='" + stopMd5_dpqp + '\'' + + ", timestamp_dpqp=" + timestamp_dpqp + '}'; } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java index 24bc5a0833..18099d2194 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java @@ -4,10 +4,12 @@ public class ReportDispatchResult { private String sn; private int dispatchResult; + private long taskId; - public ReportDispatchResult(String sn, int dispatchResult) { + public ReportDispatchResult(String sn, int dispatchResult,long taskId) { this.sn = sn; this.dispatchResult = dispatchResult; + this.taskId = taskId; } public String getSn() { @@ -26,11 +28,20 @@ public class ReportDispatchResult { this.dispatchResult = dispatchResult; } + public long getTaskId() { + return taskId; + } + + public void setTaskId(long taskId) { + this.taskId = taskId; + } + @Override public String toString() { return "ReportDispatchResult{" + "sn='" + sn + '\'' + - ", dispatchResult=" + dispatchResult + + ", dispatchResult=" + dispatchResult + '\''+ + ", taskId=" + taskId + '}'; } } diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt index 3179eafd81..a14a34fe90 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt @@ -29,12 +29,23 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider { */ fun dispatchAffirm() + /** + * 停止调度确认 + */ + fun stopDispatchAffirm() + /** * 调度取消 * @param manualTrigger 是否手动 */ fun dispatchCancel(manualTrigger: Boolean) + /** + * 停止调度取消 + * @param manualTrigger 是否手动 + */ + fun stopDispatchCancel(manualTrigger: Boolean) + /** * 调度测试 */