From 58acd2994b1714bb7e4e6e7bcf545afa782474d0 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 3 Mar 2023 08:42:22 +0800 Subject: [PATCH] =?UTF-8?q?[m1]=20[1.1.2]=20[=E4=B8=9A=E5=8A=A1BUSINESS=5F?= =?UTF-8?q?STRING=E5=8C=85=E8=A3=B9=E7=B1=BB=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/bus/passenger/model/PM2DrivingModel.kt | 4 ++-- .../shuttle/java/com/mogo/och/bus/model/OrderModel.java | 9 +++++---- .../och/bus/passenger/presenter/BusPassengerPresenter.kt | 4 ++-- .../com/mogo/och/bus/passenger/ui/view/LineSiteView.kt | 9 ++++----- .../com/magic/mogo/och/charter/model/DriverM1Model.kt | 5 ++--- .../och/common/module/biz/constant/OchCommonConst.kt | 1 + 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt index ec75137b43..77981565a4 100644 --- a/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt +++ b/OCH/mogo-och-bus-passenger/src/m2/java/com/mogo/och/bus/passenger/model/PM2DrivingModel.kt @@ -10,7 +10,6 @@ import com.mogo.commons.voice.IMogoVoiceCmdCallBack import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.data.telematic.TelematicConstant import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener @@ -37,6 +36,7 @@ import com.mogo.och.bus.passenger.constant.BusPassengerConst import com.mogo.och.bus.passenger.network.PM2ModelLoopManager import com.mogo.och.common.module.bean.AppConnectMsg import com.mogo.och.common.module.biz.network.OchCommonServiceCallback +import com.mogo.och.common.module.biz.constant.OchCommonConst import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil import mogo.telematics.pad.MessagePad import kotlin.math.abs @@ -143,7 +143,7 @@ class PM2DrivingModel private constructor() { private val mReceivedMsgListener: IReceivedMsgListener = object : IReceivedMsgListener{ override fun onReceivedMsg(type: Int, byteArray: ByteArray) {//接收司机端发来的信息 - if (TelematicConstant.BUSINESS_STRING == type){ + if (OchCommonConst.BUSINESS_STRING == type){ val msg = GsonUtils.fromJson(String(byteArray),AppConnectMsg::class.java) as AppConnectMsg Logger.d(SceneConstant.M_BUS_P+TAG,"onReceivedMsg = "+GsonUtils.toJson(msg)) if (msg.isPlay){ //播报 diff --git a/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java b/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java index 2483dd45a9..3021334acd 100644 --- a/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java +++ b/OCH/mogo-och-bus/src/shuttle/java/com/mogo/och/bus/model/OrderModel.java @@ -25,6 +25,7 @@ import com.mogo.eagle.core.data.BaseData; import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.map.MogoLocation; +import com.mogo.och.common.module.biz.constant.OchCommonConst; import com.mogo.eagle.core.data.telematic.TelematicConstant; import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; @@ -701,7 +702,7 @@ public class OrderModel { AppConnectMsg arrivedMsg = new AppConnectMsg(false,true,String.format(mContext .getString(R.string.bus_arrived_station_tip), arriveStation)); - CallerTelematicManager.INSTANCE.sendMsgToAllClients(TelematicConstant.BUSINESS_STRING, + CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(arrivedMsg).getBytes()); } @@ -710,7 +711,7 @@ public class OrderModel { .getString(R.string.bus_leave_station_tip), nextStation)); UiThreadHandler.postDelayed(()->{ - CallerTelematicManager.INSTANCE.sendMsgToAllClients(TelematicConstant.BUSINESS_STRING, + CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(arrivedMsg).getBytes()); },DELAY_10S); } @@ -719,14 +720,14 @@ public class OrderModel { AppConnectMsg arrivedMsg = new AppConnectMsg(false,true,mContext .getString(R.string.bus_end_task_tip)); - CallerTelematicManager.INSTANCE.sendMsgToAllClients(TelematicConstant.BUSINESS_STRING, + CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(arrivedMsg).getBytes()); } public void sendWriteOffNumToClient(String msg){ AppConnectMsg arrivedMsg = new AppConnectMsg(false,true,msg); - CallerTelematicManager.INSTANCE.sendMsgToAllClients(TelematicConstant.BUSINESS_STRING, + CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(arrivedMsg).getBytes()); } diff --git a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt index 7ab9c633f4..8880fb6d3f 100644 --- a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt +++ b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerPresenter.kt @@ -3,7 +3,6 @@ package com.mogo.och.bus.passenger.presenter import androidx.lifecycle.LifecycleOwner import com.mogo.eagle.core.data.config.HdMapBuildConfig import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.data.telematic.TelematicConstant import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager @@ -22,6 +21,7 @@ import com.mogo.och.bus.passenger.model.OrderStatusEnum import com.mogo.och.bus.passenger.ui.MainFragment import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg import com.mogo.och.common.module.bean.dpmsg.DPMsgType +import com.mogo.och.common.module.biz.constant.OchCommonConst import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager import com.mogo.och.common.module.utils.DateTimeUtil import com.mogo.och.common.module.utils.NumberFormatUtil @@ -78,7 +78,7 @@ class BusPassengerPresenter(view: MainFragment?) : val msgReceived = object : IReceivedMsgListener { override fun onReceivedMsg(type: Int, byteArray: ByteArray) { UiThreadHandler.post { - if (type == TelematicConstant.BUSINESS_STRING) { + if (type == OchCommonConst.BUSINESS_STRING) { val msg = GsonUtils.fromJson( String(byteArray), ChangeDestMsg::class.java diff --git a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/view/LineSiteView.kt b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/view/LineSiteView.kt index 3ab473d117..ba0ffc2d48 100644 --- a/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/view/LineSiteView.kt +++ b/OCH/mogo-och-charter-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/view/LineSiteView.kt @@ -7,8 +7,6 @@ import android.view.LayoutInflater import android.view.View import android.view.animation.LinearInterpolator import androidx.constraintlayout.widget.ConstraintLayout -import androidx.recyclerview.widget.LinearLayoutManager -import com.mogo.eagle.core.data.telematic.TelematicConstant import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager @@ -30,6 +28,7 @@ import com.mogo.och.bus.passenger.ui.adapter.OrderSiteItemAdapter import com.mogo.och.bus.passenger.view.BottomDecoration import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg import com.mogo.och.common.module.bean.dpmsg.DPMsgType +import com.mogo.och.common.module.biz.constant.OchCommonConst import com.mogo.och.common.module.biz.network.OchCommonServiceCallback import kotlinx.android.synthetic.m1.m1_order_lineside.view.* import me.jessyan.autosize.utils.AutoSizeUtils @@ -200,7 +199,7 @@ class LineSiteView @JvmOverloads constructor( false ) CallerTelematicManager.sendMsgToServer( - TelematicConstant.BUSINESS_STRING, + OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(msg).toByteArray() ) startAni() @@ -232,7 +231,7 @@ class LineSiteView @JvmOverloads constructor( false ) CallerTelematicManager.sendMsgToServer( - TelematicConstant.BUSINESS_STRING, + OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(msg).toByteArray() ) } @@ -271,7 +270,7 @@ class LineSiteView @JvmOverloads constructor( val msgReceived = object : IReceivedMsgListener { override fun onReceivedMsg(type: Int, byteArray: ByteArray) { UiThreadHandler.post { - if (type == TelematicConstant.BUSINESS_STRING) { + if (type == OchCommonConst.BUSINESS_STRING) { val msg = GsonUtils.fromJson( String(byteArray), ChangeDestMsg::class.java diff --git a/OCH/mogo-och-charter/src/driverm1/java/com/magic/mogo/och/charter/model/DriverM1Model.kt b/OCH/mogo-och-charter/src/driverm1/java/com/magic/mogo/och/charter/model/DriverM1Model.kt index 6b036fe6e1..c01607fc4f 100644 --- a/OCH/mogo-och-charter/src/driverm1/java/com/magic/mogo/och/charter/model/DriverM1Model.kt +++ b/OCH/mogo-och-charter/src/driverm1/java/com/magic/mogo/och/charter/model/DriverM1Model.kt @@ -28,7 +28,6 @@ import com.mogo.commons.module.intent.IntentManager import com.mogo.eagle.core.data.BaseData import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.data.telematic.TelematicConstant import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilot @@ -213,7 +212,7 @@ class DriverM1Model { private val mReceivedMsgListener: IReceivedMsgListener = object : IReceivedMsgListener { override fun onReceivedMsg(type: Int, byteArray: ByteArray) { - if (TelematicConstant.BUSINESS_STRING == type){ + if (OchCommonConst.BUSINESS_STRING == type){ try { val msg = GsonUtils.fromJson(String(byteArray), BaseDPMsg::class.java) as BaseDPMsg @@ -523,7 +522,7 @@ class DriverM1Model { private fun sendMsgToClient(msg: BaseDPMsg?){ sendMsgToAllClients( - TelematicConstant.BUSINESS_STRING, + OchCommonConst.BUSINESS_STRING, GsonUtils.toJson(msg).toByteArray() ) } diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/constant/OchCommonConst.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/constant/OchCommonConst.kt index 8d2c9e4c93..7102e3a8f3 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/constant/OchCommonConst.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/constant/OchCommonConst.kt @@ -20,5 +20,6 @@ class OchCommonConst { const val LOGINSERVICE = "/ochbiz/common/login" + const val BUSINESS_STRING = 100 } } \ No newline at end of file