[fea]
[车模设置、orderId改名为自驾id]
This commit is contained in:
yangyakun
2024-09-29 10:29:15 +08:00
parent b53876df82
commit 484dd8bdc4
5 changed files with 25 additions and 23 deletions

View File

@@ -5,6 +5,7 @@ import android.view.View
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HdMapBuildConfig
import com.mogo.eagle.core.data.enums.Carmodel
import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
@@ -155,6 +156,10 @@ class LoginProvider : LoginService {
CallerEagleBaseFunctionCall4OchManager.setOchLoginNo(loginInfo.phone)
CallerEagleBaseFunctionCall4OchManager.setOchCarModel(Carmodel.getCarModelFromServerName(loginInfo.carModel))
CallerEagleBaseFunctionCall4OchManager.setOchPlateNumber(loginInfo.plateNumber)
CallerEagleBaseFunctionCall4OchManager.updateTenantId(loginInfo.tenantId)
val carModel = Carmodel.getCarModelFromServerName(LoginStatusManager.getLoginInfo()?.carModel)
HdMapBuildConfig.currentCarVrIconRes = carModel.rawValue
}

View File

@@ -173,13 +173,15 @@ object LoginModel {
mContext?.let {
queryDriverServiceStatus(it, object : OchCommonServiceCallback<DriverStatusQueryRespBean> {
override fun onSuccess(data: DriverStatusQueryRespBean?) {
data?.let {
LoginStatusManager.setLoginInfo(data.data)
}
if(FunctionBuildConfig.ochdebug){
return
}
if (null != data && 0 == data.code) {
// 不用登录也可以获得支持的业务模式
LoginStatusManager.setBusinessType(data.data.businessType)
CallerEagleBaseFunctionCall4OchManager.updateTenantId(data.data.tenantId)
iTaxiLoginCallback?.searchStatusSuccess()
// 后台已登录
if(!FunctionBuildConfig.isOffLine){
@@ -193,7 +195,6 @@ object LoginModel {
LoginStatusManager.setLoginStatus(data.data.driverStatus)
}
LoginStatusManager.setOpenOrderType(data.data.servingStatus)
LoginStatusManager.setLoginInfo(data.data)
d(SceneConstant.M_TAXI + TAG, "登录信息:$data")
loginSuccess(data)
}

View File

@@ -32,6 +32,7 @@ import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.data.bean.BusStationBean
import com.mogo.och.data.bean.ContraiInfo
import com.mogo.och.data.bean.LineInfo
import kotlin.properties.Delegates
/**
* 订单中
@@ -70,7 +71,15 @@ object LineManager : CallerBase<ILineCallback>() {
var isFirstStartAutopilot = true
private var orderId = ""
/**
* 线路、轨迹、站点 三者确定的id
*/
private var autopilotId: String by Delegates.observable("") { _, oldValue, newValue ->
if (oldValue != newValue) {
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(newValue)
}
}
// 自车定位
private val mMapLocationListener = object : IMoGoChassisLocationGCJ02Listener {
@@ -84,7 +93,7 @@ object LineManager : CallerBase<ILineCallback>() {
mogoLocation.longitude, mogoLocation.latitude
)
if (distance <= OchCommonConst.ARRIVE_AT_END_STATION_DISTANCE) {
val token = CallerAutoPilotControlManager.sendSsmFuncQueryAutoPilotStation(orderId)
val token = CallerAutoPilotControlManager.sendSsmFuncQueryAutoPilotStation(autopilotId)
OchChainLogManager.writeChainLogAutopilot("到站逻辑","距离站点:$distance 请求token$token")
}
}
@@ -93,7 +102,7 @@ object LineManager : CallerBase<ILineCallback>() {
fun invokeArrivedStation(orderId: String, arrivedStationFlag: Boolean) {
if (this.orderId==orderId&&arrivedStationFlag){
if (this.autopilotId==orderId&&arrivedStationFlag){
M_LISTENERS.forEach {
it.value.arrivedStationSuccessBySearch()
}
@@ -101,7 +110,7 @@ object LineManager : CallerBase<ILineCallback>() {
}
fun invokeSetIsFirstAutopilot(orderId: String?, firstAutopilotFlag: Boolean, count: Int) {
if (this.orderId==orderId){
if (this.autopilotId==orderId){
if(count>=1){
isFirstStartAutopilot = false
}else{
@@ -252,8 +261,7 @@ object LineManager : CallerBase<ILineCallback>() {
private fun clearAutopilotControlParameters(){
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null)
TrajectoryAndDistanceManager.setStationPoint(null, null, null)
this.orderId = ""
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(this.orderId)
this.autopilotId = ""
OchLocationManager.removeGCJ02Listener(TAG)
}
@@ -298,10 +306,9 @@ object LineManager : CallerBase<ILineCallback>() {
parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon)
parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon)
parameters?.vehicleType = 10
this.orderId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}"
parameters?.orderId = this.orderId
this.autopilotId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}"
parameters?.orderId = this.autopilotId
parameters?.firstAutopilotFlag = isFirstStartAutopilot
CallerEagleBaseFunctionCall4OchManager.setOchAutopilotOrderId(this.orderId)
if (parameters?.autoPilotLine == null) {
parameters?.autoPilotLine = AutoPilotLine(

View File

@@ -59,9 +59,6 @@ class CommonLoadingView @JvmOverloads constructor(
// 设置地图样式
MogoMapListenerHandler.mogoMapListenerHandler.onMapModeChanged(EnumMapUI.MAP_STYLE_DAY_VR)
val carModel = Carmodel.getCarModelFromServerName(LoginStatusManager.getLoginInfo()?.carModel)
HdMapBuildConfig.currentCarVrIconRes = carModel.rawValue
CallerMapUIServiceManager.getMapUIController()?.changeCurrentIcon(HdMapBuildConfig.currentCarVrIconRes)
UiThreadHandler.postDelayed({ visibility = GONE },2_000,UiThreadHandler.MODE.QUEUE)
}

View File

@@ -17,13 +17,6 @@ object CallerEagleBaseFunctionCall4OchManager : IEagleBaseFunctionCall4Och {
const val TAG = "CallerEagleBaseFunctionCall4OchManager"
private var _autopilotOrderId: String? by Delegates.observable(null) { _, oldValue, newValue ->
if (oldValue != newValue) {
}
}
/**
* 注册 工具箱 item点击事件监听 (默认样式item的点击事件监听自定义样式的item的点击交给view自己处理)
*/
@@ -132,7 +125,6 @@ object CallerEagleBaseFunctionCall4OchManager : IEagleBaseFunctionCall4Och {
}
override fun setOchAutopilotOrderId(orderId: String?) {
super.setOchAutopilotOrderId(orderId)
_autopilotOrderId = orderId
}
}