add bindingcar and opt
This commit is contained in:
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingcarProvider;
|
||||
import com.mogo.eagle.core.function.bindingcar.network.BindingcarNetWorkManager;
|
||||
|
||||
@@ -30,11 +31,14 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void modifyCarInfo() {
|
||||
BindingcarNetWorkManager.getInstance().requestAccidentInfo("");
|
||||
public void modifyCarInfo(BindingcarCallBack callBack) {
|
||||
BindingcarNetWorkManager.getInstance().getBindingcarInfo("");
|
||||
// BindingcarNetWorkManager.getInstance().modifyBindingcar(callBack);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.eagle.core.function.bindingcar.network;
|
||||
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@@ -15,14 +17,21 @@ import retrofit2.http.POST;
|
||||
*/
|
||||
public interface BindingcarApiService {
|
||||
/**
|
||||
* 获取道路事故详情
|
||||
* 获取绑定车辆的信息
|
||||
*
|
||||
* @param requestBody 请求体(infoId 交警任务id)
|
||||
* @return {@link NoticeTrafficStyleInfo}
|
||||
* @return {@link BindingcarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("/deva/accidentInfoManage/queryMyAccidentHandleInfo/server/v1")
|
||||
Observable<NoticeTrafficStyleInfo> getAccidentInfo(@Body RequestBody requestBody);
|
||||
@POST("/pad/selectPadByMac")
|
||||
Observable<BindingcarInfo> getBindingcarInfo(@Body RequestBody requestBody);
|
||||
|
||||
/**
|
||||
* 绑定和修改绑定车机
|
||||
*
|
||||
* @return {@link ModifyBindingcarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("/pad/updatePadByMac")
|
||||
Observable<ModifyBindingcarInfo> modifyBindingcarInfo(@Body RequestBody requestBody);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
package com.mogo.eagle.core.function.bindingcar.network;
|
||||
|
||||
import com.mogo.cloud.network.NetConstants;
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
@@ -14,8 +26,11 @@ public class BindingcarNetWorkManager {
|
||||
private static volatile BindingcarNetWorkManager requestNoticeManager;
|
||||
private final BindingcarApiService mBindingcarApiService;
|
||||
|
||||
private BindingcarNetWorkManager() {
|
||||
mBindingcarApiService = RetrofitFactory.INSTANCE.getInstance(NetConstants.DEVA_HOST)
|
||||
private BindingcarNetWorkManager() { //TODO
|
||||
// mBindingcarApiService = RetrofitFactory.INSTANCE.getInstance(NetConstants.DEVA_HOST)
|
||||
// .create(BindingcarApiService.class);
|
||||
|
||||
mBindingcarApiService = RetrofitFactory.INSTANCE.getInstance("http://cmdb.ee-private-dev.myghost.zhidaoauto.com/")
|
||||
.create(BindingcarApiService.class);
|
||||
}
|
||||
|
||||
@@ -31,15 +46,77 @@ public class BindingcarNetWorkManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取事故详细信息
|
||||
* 获取绑定的车辆信息
|
||||
*
|
||||
* @param macAddress mac地址 TODO
|
||||
*
|
||||
* @param macAddress mac地址
|
||||
* @param callBack 回调
|
||||
*/
|
||||
public void requestAccidentInfo(String macAddress) {
|
||||
public void getBindingcarInfo(String macAddress) {
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
BindingcarRequest request = new BindingcarRequest(sn, "48:b0:2d:3a:9c:19");
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mBindingcarApiService.getBindingcarInfo(requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BindingcarInfo>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.d("liyz", "getBindingcarInfo onSubscribe -----> ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BindingcarInfo info) {
|
||||
Log.d("liyz", "getBindingcarInfo onNext info =" + info.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.d("liyz", "getBindingcarInfo onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.d("liyz", "getBindingcarInfo onComplete");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定和修改绑定车辆
|
||||
*/
|
||||
public void modifyBindingcar(BindingcarCallBack callBack) {
|
||||
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
BindingcarRequest request = new BindingcarRequest(sn, "48:b0:2d:3a:9c:19");
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mBindingcarApiService.modifyBindingcarInfo(requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<ModifyBindingcarInfo>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.d("liyz", "modifyBindingcar onSubscribe -----> ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull ModifyBindingcarInfo info) {
|
||||
if (info.getData() != null) {
|
||||
callBack.callBackResult(info);
|
||||
}
|
||||
Log.d("liyz", "modifyBindingcar onNext info " + info.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.d("liyz", "modifyBindingcar onError e = " + e.toString() + "---e.getMessage = " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.d("liyz", "modifyBindingcar onComplete ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,17 +6,35 @@ package com.mogo.eagle.core.function.bindingcar.network;
|
||||
* @since: 11/15/21
|
||||
*/
|
||||
public class BindingcarRequest {
|
||||
private String infoId;
|
||||
private String mac;
|
||||
private String sn;
|
||||
|
||||
public BindingcarRequest(String infoId) {
|
||||
this.infoId = infoId;
|
||||
public BindingcarRequest(String mac, String sn) {
|
||||
this.mac = mac;
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public String getInfoId() {
|
||||
return infoId;
|
||||
public String getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setInfoId(String infoId) {
|
||||
this.infoId = infoId;
|
||||
public void setMac(String mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BindingcarRequest{" +
|
||||
"mac='" + mac + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,5 +46,13 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!--绑定车辆-->
|
||||
<receiver android:name="com.mogo.eagle.core.function.hmi.receiver.BindingcarBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.hmi.bindingcar" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.mogo.eagle.core.function.hmi.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBindingcarDialog
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBrakeLight
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showModifyBindingcarDialog
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showTurnLight
|
||||
|
||||
/**
|
||||
* 绑定车辆
|
||||
*
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class BindingcarBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BindingcarBroadcastReceiver"
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
try {
|
||||
val type = intent.getIntExtra("type", 0)
|
||||
showTurnLight(type)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun showTurnLight( //type 1获取车辆信息,2修改绑定信息
|
||||
type: Int
|
||||
) {
|
||||
if (type == 1) {
|
||||
showBindingcarDialog()
|
||||
} else if (type == 2) {
|
||||
showModifyBindingcarDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,13 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.ModifyBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeNormalBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -823,6 +826,24 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
}
|
||||
}
|
||||
|
||||
private var modifyBindingCarDialog: ModifyBindingCarDialog? = null
|
||||
private var toBindingCarDialog: ToBindingCarDialog? = null
|
||||
|
||||
override fun showToBindingcarDialog() {
|
||||
if (toBindingCarDialog == null) {
|
||||
toBindingCarDialog = ToBindingCarDialog(requireContext())
|
||||
}
|
||||
toBindingCarDialog!!.showToBindingcarDialog()
|
||||
}
|
||||
|
||||
override fun showModifyBindingcarDialog() {
|
||||
if (modifyBindingCarDialog == null) {
|
||||
modifyBindingCarDialog = ModifyBindingCarDialog(requireContext())
|
||||
}
|
||||
modifyBindingCarDialog!!.showModifyBindingcarDialog()
|
||||
|
||||
}
|
||||
|
||||
override fun setTurnLightFunction(isOpen: Boolean) {
|
||||
HmiBuildConfig.isShowTurnLightView = isOpen
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
import android.content.Context
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
@@ -11,10 +13,10 @@ import com.mogo.service.statusmanager.StatusDescriptor
|
||||
|
||||
|
||||
/**
|
||||
* @brief 绑定车辆对话框
|
||||
* @brief 修改车辆对话框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class BindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
|
||||
class ModifyBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
|
||||
|
||||
private val TAG = "BindingCarDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
@@ -47,7 +49,14 @@ class BindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleOb
|
||||
* 修改绑定车机 TODO
|
||||
*/
|
||||
fun modifyBindingcar() {
|
||||
|
||||
CallerBindingcarManager.getBindingcarProvider().modifyCarInfo {
|
||||
if (it.code == 200) {
|
||||
TipToast.shortTip("修改绑定成功")
|
||||
} else {
|
||||
TipToast.shortTip("修改绑定失败")
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.bindingcar
|
||||
|
||||
import android.content.Context
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener
|
||||
import com.mogo.service.statusmanager.StatusDescriptor
|
||||
|
||||
|
||||
/**
|
||||
* @brief 绑定车辆对话框
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class ToBindingCarDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver{
|
||||
|
||||
private val TAG = "ToBindingCarDialog"
|
||||
private var confirmTv: TextView? = null
|
||||
private var cancleTv: TextView? = null
|
||||
|
||||
private var mServiceApis: IMogoServiceApis? = null
|
||||
private val statusChangedListenerForCheckNotice = IMogoStatusChangedListener { descriptor, isTrue ->
|
||||
if (descriptor == StatusDescriptor.MAIN_PAGE_IS_BACKGROUND) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
setContentView(R.layout.dialog_to_bindingcar)
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
confirmTv = findViewById(R.id.tv_to_bindingcar_confirm)
|
||||
cancleTv = findViewById(R.id.tv_to_bindingcar_cancel)
|
||||
|
||||
confirmTv?.setOnClickListener {
|
||||
toBindingcar()
|
||||
}
|
||||
|
||||
cancleTv?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绑定车机 TODO
|
||||
*/
|
||||
fun toBindingcar() {
|
||||
CallerBindingcarManager.getBindingcarProvider().modifyCarInfo {
|
||||
if (it.code == 200) {
|
||||
TipToast.shortTip("绑定成功")
|
||||
} else {
|
||||
TipToast.shortTip("绑定失败")
|
||||
}
|
||||
}
|
||||
dismiss()
|
||||
}
|
||||
|
||||
override fun dismiss() {
|
||||
super.dismiss()
|
||||
}
|
||||
|
||||
fun showToBindingcarDialog() {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
|
||||
show()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="840px"
|
||||
android:layout_height="470px"
|
||||
android:background="@color/dialog_bg_color"
|
||||
app:roundLayoutRadius="32px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bindingcar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50px"
|
||||
android:text="@string/bindingcar_title"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bindingcar_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50px"
|
||||
android:text="@string/to_binding_car"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="43px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_bindingcar_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_horizontal_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:layout_marginTop="80px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_bindingcar_tips" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_vertical_line"
|
||||
android:layout_width="3px"
|
||||
android:layout_height="0dp"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_to_bindingcar_confirm"
|
||||
android:layout_width="400px"
|
||||
android:layout_height="100px"
|
||||
android:gravity="center"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/view_vertical_line"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_to_bindingcar_cancel"
|
||||
android:layout_width="400px"
|
||||
android:layout_height="100px"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="46px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/view_vertical_line"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line" />
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -333,6 +333,8 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_CHECK, "CheckProvider"));
|
||||
// 推送模块
|
||||
MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, "PUSH_UI"));
|
||||
// 绑定车辆
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_BINDING_CAR, "IMoGoBindingcarProvider"));
|
||||
|
||||
// 司机身份专属模块
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.eagle.core.data.bindingcar;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 绑定的车辆信息
|
||||
* @since: 3/16/22
|
||||
*/
|
||||
public class BindingcarInfo extends BaseData {
|
||||
public CarInfo data;
|
||||
|
||||
public CarInfo getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(CarInfo data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BindingcarInfo{" +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.data.bindingcar;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 3/16/22
|
||||
*/
|
||||
public class CarInfo implements Serializable {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.mogo.eagle.core.data.bindingcar;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 修改绑定信息
|
||||
* @since: 3/16/22
|
||||
*/
|
||||
public class ModifyBindingcarInfo extends BaseData {
|
||||
public String data;
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ModifyBindingcarInfo{" +
|
||||
"data='" + data + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.eagle.core.function.api.bindingcar;
|
||||
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 网络请求回调
|
||||
* @since: 3/16/22
|
||||
*/
|
||||
public interface BindingcarCallBack {
|
||||
void callBackResult(ModifyBindingcarInfo modifyBindingcarInfo);
|
||||
}
|
||||
@@ -8,5 +8,5 @@ import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider;
|
||||
* @since: 3/15/22
|
||||
*/
|
||||
public interface IMoGoBindingcarProvider extends IMoGoFunctionServerProvider {
|
||||
void modifyCarInfo();
|
||||
void modifyCarInfo(BindingcarCallBack callBack);
|
||||
}
|
||||
|
||||
@@ -184,6 +184,16 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy {
|
||||
*/
|
||||
fun showBrakeLight(brakeLight: Int)
|
||||
|
||||
/**
|
||||
* 展示绑定车辆弹框
|
||||
*/
|
||||
fun showToBindingcarDialog()
|
||||
|
||||
/**
|
||||
* 展示修改绑定车辆弹框
|
||||
*/
|
||||
fun showModifyBindingcarDialog()
|
||||
|
||||
/**
|
||||
* 展示工控机下载、升级状态信息
|
||||
* @param upgradeMode 升级模式(提示升级、静默升级)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mogo.eagle.core.function.call.bindingcar;
|
||||
|
||||
import com.mogo.eagle.core.function.api.bindingcar.IMoGoBindingcarProvider;
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase;
|
||||
|
||||
import static com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_BINDING_CAR;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
public class CallerBindingcarManager extends CallerBase {
|
||||
|
||||
public static IMoGoBindingcarProvider getBindingcarProvider() {
|
||||
return getApiInstance(IMoGoBindingcarProvider.class, PATH_BINDING_CAR);
|
||||
}
|
||||
}
|
||||
@@ -246,6 +246,14 @@ object CallerHmiManager : CallerBase() {
|
||||
waringProviderApi?.showBrakeLight(brakeLight)
|
||||
}
|
||||
|
||||
fun showBindingcarDialog() {
|
||||
waringProviderApi?.showToBindingcarDialog()
|
||||
}
|
||||
|
||||
fun showModifyBindingcarDialog() {
|
||||
waringProviderApi?.showModifyBindingcarDialog()
|
||||
}
|
||||
|
||||
fun showNoSignalView() {
|
||||
waringProviderApi?.showNoSignView()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user