[6.0.0/5.0.0]MessagePad.Line新增lineName字段:各业务更新接口
This commit is contained in:
@@ -26,13 +26,15 @@ object CharterTrajectoryManager {
|
||||
private const val TAG = "CharterTrajectoryManager"
|
||||
private var mAutoPilotLine: AutoPilotLine? = null
|
||||
private var mLineId = 0
|
||||
private var mLineName = ""
|
||||
private var mSendReqDisposable: Disposable? = null
|
||||
|
||||
/**
|
||||
* 同步Bus路线信息
|
||||
*/
|
||||
fun syncTrajectoryInfo(lineId: Int) {
|
||||
fun syncTrajectoryInfo(lineId: Int, lineName: String) {
|
||||
mLineId = lineId
|
||||
mLineName = lineName
|
||||
val routesResult = get().getBusRoutesResult()
|
||||
if (LoginStatusManager.isLogin() && routesResult != null) {
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "syncTrajectoryInfo() start.")
|
||||
@@ -81,7 +83,8 @@ object CharterTrajectoryManager {
|
||||
} else if ("ISSM_FUNC_AUTO_PILOT_READY" == guardianInfo.getCode()) {
|
||||
// 收到ssm的自动驾驶变为ready,再次下发轨迹下载.解决:域控重启,或者102域控启动太早,107节点初始化未完成导致的轨迹未进行下载。
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "onAutopilotGuardian() ssm ready,再次发起下载")
|
||||
syncTrajectoryInfo(get().getBusOrderResult()?.lineId!!)
|
||||
syncTrajectoryInfo(get().getBusOrderResult()?.lineId!!,
|
||||
get().getBusOrderResult()?.lineName!!)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +99,7 @@ object CharterTrajectoryManager {
|
||||
} else {
|
||||
if (mAutoPilotLine == null) {
|
||||
mAutoPilotLine = AutoPilotLine(
|
||||
mLineId.toLong(),
|
||||
mLineId.toLong(), mLineName,
|
||||
routesResult.csvFileUrl, routesResult.csvFileMd5,
|
||||
routesResult.txtFileUrl, routesResult.txtFileMd5,
|
||||
routesResult.contrailSaveTime, routesResult.carModel,
|
||||
@@ -106,6 +109,7 @@ object CharterTrajectoryManager {
|
||||
)
|
||||
} else {
|
||||
mAutoPilotLine!!.lineId = mLineId.toLong()
|
||||
mAutoPilotLine!!.lineName = mLineName
|
||||
mAutoPilotLine!!.trajUrl = routesResult.csvFileUrl
|
||||
mAutoPilotLine!!.trajMd5 = routesResult.csvFileMd5
|
||||
mAutoPilotLine!!.stopUrl = routesResult.txtFileUrl
|
||||
@@ -124,6 +128,7 @@ object CharterTrajectoryManager {
|
||||
private fun clearAutoPilotLine() {
|
||||
if (mAutoPilotLine == null) return
|
||||
mAutoPilotLine!!.lineId = -1
|
||||
mAutoPilotLine!!.lineName = ""
|
||||
mAutoPilotLine!!.trajUrl = ""
|
||||
mAutoPilotLine!!.trajMd5 = ""
|
||||
mAutoPilotLine!!.stopUrl = ""
|
||||
@@ -206,7 +211,7 @@ object CharterTrajectoryManager {
|
||||
|
||||
init {
|
||||
mAutoPilotLine = AutoPilotLine(
|
||||
-1,
|
||||
-1, "",
|
||||
"", "", "", "", 0, "",
|
||||
"", "", "", "", 0
|
||||
)
|
||||
|
||||
@@ -607,7 +607,7 @@ class DriverM1Model {
|
||||
parameters.vehicleType = VEHICLE_TYPE
|
||||
if (parameters.autoPilotLine == null) {
|
||||
parameters.autoPilotLine = AutopilotControlParameters.AutoPilotLine(
|
||||
mCurrentOrder!!.lineId.toLong(),
|
||||
mCurrentOrder!!.lineId.toLong(), mCurrentOrder!!.lineName,
|
||||
mCurrentRoute!!.csvFileUrl, mCurrentRoute!!.csvFileMd5,
|
||||
mCurrentRoute!!.txtFileUrl, mCurrentRoute!!.txtFileMd5,
|
||||
mCurrentRoute!!.contrailSaveTime, mCurrentRoute!!.carModel,
|
||||
@@ -841,7 +841,8 @@ class DriverM1Model {
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "checkoutContrail-=="
|
||||
+ GsonUtils.toJson(data.data))
|
||||
mCurrentRoute = data.data
|
||||
CharterTrajectoryManager.syncTrajectoryInfo(mCurrentOrder?.lineId!!)
|
||||
CharterTrajectoryManager.syncTrajectoryInfo(mCurrentOrder?.lineId!!,
|
||||
mCurrentOrder?.lineName!!)
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
|
||||
Reference in New Issue
Block a user