[m1]
[1.1.2] [业务BUSINESS_STRING包裹类修改]
This commit is contained in:
@@ -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){ //播报
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@ class OchCommonConst {
|
||||
|
||||
const val LOGINSERVICE = "/ochbiz/common/login"
|
||||
|
||||
const val BUSINESS_STRING = 100
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user