[merge] merge origin branch
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.bus.passenger.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
@@ -11,5 +11,5 @@ public interface IBusPassengerControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
}
|
||||
|
||||
@@ -26,9 +26,11 @@ 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.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
@@ -89,7 +91,7 @@ public class BusPassengerModel {
|
||||
private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态
|
||||
private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新
|
||||
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private BusPassengerRoutesResult routesResult = null;
|
||||
|
||||
@@ -272,7 +274,7 @@ public class BusPassengerModel {
|
||||
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -319,13 +321,13 @@ public class BusPassengerModel {
|
||||
}
|
||||
};
|
||||
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLocation = location;
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLocation = gnssInfo;
|
||||
for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
callback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
*/
|
||||
@@ -109,7 +111,7 @@ public class BaseBusPassengerPresenter extends Presenter<BusPassengerRouteFragme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (location != null){
|
||||
runOnUIThread(() -> mView.onCarLocationChanged(location));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.ui;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
@@ -14,7 +16,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -31,7 +32,7 @@ import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -301,8 +302,8 @@ public class BusPassengerRouteFragment extends
|
||||
lastBearing = bearing;
|
||||
}
|
||||
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
updateSpeedView(location.getSpeed());
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
updateSpeedView((float) location.getVehicleSpeed());
|
||||
}
|
||||
|
||||
public void updateSpeedView(float speed){
|
||||
|
||||
@@ -24,12 +24,12 @@ import com.mogo.commons.module.status.StatusDescriptor;
|
||||
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.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -151,7 +151,7 @@ public class OrderModel {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, mMapLocationListener, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -376,25 +376,25 @@ public class OrderModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
|
||||
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
|
||||
if (isGoingToNextStation && !isArrivedStation) {
|
||||
judgeArrivedStation(location);
|
||||
judgeArrivedStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//根据围栏判断,是否到达站点
|
||||
private void judgeArrivedStation(MogoLocation location) {
|
||||
private void judgeArrivedStation(MessagePad.GnssInfo location) {
|
||||
|
||||
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
|
||||
CallerLogger.INSTANCE.e(M_BUS + TAG, "到站数组越界");
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.och.bus.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
*
|
||||
@@ -11,7 +13,7 @@ public interface IBusControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -233,9 +233,9 @@ public class BusPresenter extends Presenter<BusFragment>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location) {
|
||||
runOnUIThread(() -> mView.updateSpeedView(location.getSpeed()));
|
||||
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.mogo.och.common.module.biz.model
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
@@ -18,6 +18,7 @@ import com.mogo.och.common.module.biz.constant.TaxiLoginStatusEnum
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceManager
|
||||
import com.mogo.och.common.module.utils.ToastUtilsOch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
* Created by pangfan on 2021/8/19
|
||||
@@ -26,7 +27,7 @@ import com.mogo.och.common.module.utils.ToastUtilsOch
|
||||
* 网约车 - 出租车业务逻辑处理
|
||||
*/
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object OchCommonLoginModel : IMoGoMapLocationListener {
|
||||
object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
private val TAG = "TaxiLoginModel"
|
||||
private var mContext: Context? = null
|
||||
@@ -36,7 +37,7 @@ object OchCommonLoginModel : IMoGoMapLocationListener {
|
||||
fun init(context: Context) {
|
||||
mContext = context.applicationContext
|
||||
// 达到起始站围栏监听
|
||||
CallerMapLocationListenerManager.addListener(TAG, this, false)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun hasInit(): Boolean {
|
||||
@@ -46,8 +47,8 @@ object OchCommonLoginModel : IMoGoMapLocationListener {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location?.let {
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
|
||||
gnssInfo?.let {
|
||||
mLongitude = it.longitude
|
||||
mLatitude = it.latitude
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
*/
|
||||
public static Map<Integer,List<MogoLocation>> getRemainPointListByCompareNew(int preIndex,
|
||||
List<MogoLocation> mRoutePoints,
|
||||
MogoLocation realLocation) {
|
||||
MessagePad.GnssInfo realLocation) {
|
||||
Map<Integer,List<MogoLocation>> routePonits = new HashMap<>();
|
||||
List<MogoLocation> latePoints = new ArrayList<>(); // 剩余轨迹集合
|
||||
int currentIndex = 0; //记录疑似点
|
||||
@@ -245,8 +245,8 @@ public class CoordinateCalculateRouteUtil {
|
||||
for (int i= 0; i < mRoutePoints.size(); i++){
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
//todo 先看index对应点的方向和realLocation方向是否一致, 方向角度不能过90度
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
latLng.getLongitude(),latLng.getLatitude());
|
||||
@@ -276,7 +276,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
}
|
||||
|
||||
public static int getArrivedPointIndexNew(int preIndex, List<MogoLocation> mRoutePoints,
|
||||
MogoLocation realLocation) {
|
||||
MessagePad.GnssInfo realLocation) {
|
||||
int currentIndex = 0; //记录疑似点 //基础点
|
||||
MogoLocation baseLatLng = mRoutePoints.get(0);
|
||||
float baseDiffDis = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
@@ -285,8 +285,8 @@ public class CoordinateCalculateRouteUtil {
|
||||
|
||||
for (int i = 0; i < mRoutePoints.size(); i++) {
|
||||
MogoLocation latLng = mRoutePoints.get(i);
|
||||
if (realLocation.getBearing() == realLocation.getBearing() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getBearing() - latLng.getBearing()) <= 90){
|
||||
if (realLocation.getHeading() == realLocation.getHeading() - latLng.getBearing() ||
|
||||
Math.abs(realLocation.getHeading() - latLng.getBearing()) <= 90){
|
||||
float diff = CoordinateUtils.calculateLineDistance(realLocation.getLongitude(),
|
||||
realLocation.getLatitude(),
|
||||
latLng.getLongitude(), latLng.getLatitude());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.sweeper.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,7 +11,7 @@ public interface ISweeperControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ import com.mogo.commons.voice.AIAssist;
|
||||
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.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -123,7 +123,7 @@ public class SweeperOrderModel {
|
||||
public void init() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -272,25 +272,25 @@ public class SweeperOrderModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
if (null == gnssInfo) return;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
|
||||
//是否到站的围栏判断 离站状态并且自动驾驶还未触发到站
|
||||
if (isGoingToNextStation && !isArrivedStation) {
|
||||
judgeStartStation(location);
|
||||
judgeStartStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//根据围栏判断,是否到达起点
|
||||
private void judgeStartStation(MogoLocation location) {
|
||||
private void judgeStartStation(MessagePad.GnssInfo location) {
|
||||
|
||||
if (backgroundCurrentStationIndex + 1 > stationList.size() - 1) {
|
||||
return;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.sweeper.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import android.location.Location;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -12,16 +11,15 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
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.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.sweeper.bean.SweeperStationBean;
|
||||
import com.mogo.och.sweeper.callback.ICarOperationStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.callback.IRefreshSweeperStationsCallback;
|
||||
import com.mogo.och.sweeper.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.sweeper.callback.ISweeperControllerStatusCallback;
|
||||
import com.mogo.och.sweeper.fragment.SweeperFragment;
|
||||
import com.mogo.och.sweeper.model.SweeperOrderModel;
|
||||
import com.mogo.och.sweeper.util.SweeperTrajectoryManager;
|
||||
@@ -239,9 +237,9 @@ public class SweeperPresenter extends Presenter<SweeperFragment>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location) {
|
||||
runOnUIThread(() -> mView.updateSpeedView(location.getSpeed()));
|
||||
runOnUIThread(() -> mView.updateSpeedView((float) location.getVehicleSpeed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.taxi.passenger.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,5 +11,5 @@ public interface IOCHTaxiPassengerControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
}
|
||||
|
||||
@@ -26,11 +26,12 @@ 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.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.v2x.LimitingVelocityListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
|
||||
@@ -123,7 +124,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
private int delayTime = 2;
|
||||
|
||||
private double mLongitude, mLatitude;
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private List<MogoLocation> mLocationsModels = new ArrayList<>();
|
||||
|
||||
@@ -236,7 +237,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 定位监听
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationListener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -427,7 +428,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
}
|
||||
|
||||
// TODO: 2021/9/12
|
||||
public void calculateTravelDistance(MogoLocation carLocation){
|
||||
public void calculateTravelDistance(MessagePad.GnssInfo carLocation){
|
||||
if (checkCurrentOCHOrder() && mCurrentOCHOrder.endSiteGcjPoint.size()>0) {
|
||||
double endLon = mCurrentOCHOrder.endSiteGcjPoint.get(0);
|
||||
double endLat = mCurrentOCHOrder.endSiteGcjPoint.get(1);
|
||||
@@ -466,25 +467,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (null == location) return;
|
||||
if (null == gnssInfo) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiPassengerOrderStatusEnum.OnTheWayToEnd) {
|
||||
calculateTravelDistance(location);
|
||||
calculateTravelDistance(gnssInfo);
|
||||
}
|
||||
}
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
|
||||
mLocation = location;
|
||||
// CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"mLongitude = "+mLongitude+", mLatitude = "+mLatitude);
|
||||
mLocation = gnssInfo;
|
||||
// CallerLogger.INSTANCE.e(M_TAXI_P + TAG,"mLongitude = "+mLongitude+", mLatitude = "+mLatitude);
|
||||
for (IOCHTaxiPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
callback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
|
||||
@@ -27,6 +27,8 @@ import com.mogo.och.taxi.passenger.model.TaxiPassengerModel;
|
||||
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/4
|
||||
@@ -120,7 +122,7 @@ public class BaseTaxiPassengerPresenter extends Presenter<TaxiPassengerBaseFragm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
// 速度不用展示
|
||||
// LeftMenuOpen.INSTANCE.callCallBack(-1,-1,location.getSpeed());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.taxi.passenger.presenter;
|
||||
|
||||
import android.location.Location;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
|
||||
@@ -10,8 +11,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -27,7 +26,7 @@ import com.mogo.och.taxi.passenger.ui.TaxiPassengerServingOrderFragment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -140,7 +139,7 @@ public class TaxiPassengerServingOrderPresenter extends Presenter<TaxiPassengerS
|
||||
private static final long TIMEINTERVAL = 4000;
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (location != null){
|
||||
runOnUIThread(() -> mView.onCarLocationChanged(location));
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
@@ -4,7 +4,6 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAX
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorInflater;
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
@@ -22,7 +21,6 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -44,6 +42,8 @@ import com.mogo.och.taxi.passenger.utils.TPRouteDataTestUtils;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/3/8
|
||||
@@ -352,8 +352,8 @@ public class TaxiPassengerServingOrderFragment extends
|
||||
|
||||
}
|
||||
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
updateSpeedView(location.getSpeed());
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
updateSpeedView((float) location.getVehicleSpeed());
|
||||
}
|
||||
|
||||
public void onLimitingVelocityChange(int limitingVelocity) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.taxi.callback;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2021/9/10
|
||||
@@ -11,7 +11,7 @@ public interface ITaxiControllerStatusCallback {
|
||||
// 是否vr map模式
|
||||
void onVRModeChanged(boolean isVRMode);
|
||||
// 自车定位
|
||||
void onCarLocationChanged(MogoLocation location);
|
||||
void onCarLocationChanged(MessagePad.GnssInfo location);
|
||||
//开始开启自动驾驶
|
||||
void startOpenAutopilot();
|
||||
}
|
||||
|
||||
@@ -28,10 +28,11 @@ 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.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -133,7 +134,7 @@ public class TaxiModel {
|
||||
private int mPreRouteIndex = 0;
|
||||
|
||||
private double mLongitude, mLatitude;
|
||||
private MogoLocation mLocation = null;
|
||||
private MessagePad.GnssInfo mLocation = null;
|
||||
|
||||
private LoginService loginService;
|
||||
|
||||
@@ -223,7 +224,7 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//定位监听, 传false是高德坐标系
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener,false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
@@ -995,7 +996,7 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
//根据围栏判断,是否到达起点
|
||||
private void judgeStartStation(MogoLocation location) {
|
||||
private void judgeStartStation(MessagePad.GnssInfo location) {
|
||||
if (mCurrentOCHOrder == null || mCurrentOCHOrder.startSiteGcjPoint == null
|
||||
|| mCurrentOCHOrder.startSiteGcjPoint.size() < 2) {
|
||||
return;
|
||||
@@ -1052,31 +1053,31 @@ public class TaxiModel {
|
||||
};
|
||||
|
||||
// 自车定位
|
||||
private final IMoGoMapLocationListener mMapLocationLIstener = new IMoGoMapLocationListener() {
|
||||
private final IMoGoChassisLocationGCJ02Listener mMapLocationLIstener = new IMoGoChassisLocationGCJ02Listener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (null == location) return;
|
||||
if (null == gnssInfo) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiOrderStatusEnum.OnTheWayToStart) {
|
||||
judgeStartStation(location);
|
||||
judgeStartStation(gnssInfo);
|
||||
}
|
||||
if (getCurOrderStatus() == TaxiOrderStatusEnum.OnTheWayToEnd &&
|
||||
mPrevAPStatus != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
judgeEndStation(location);
|
||||
judgeEndStation(gnssInfo);
|
||||
}
|
||||
}
|
||||
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
mLocation = location;
|
||||
mLongitude = gnssInfo.getLongitude();
|
||||
mLatitude = gnssInfo.getLatitude();
|
||||
mLocation = gnssInfo;
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.onCarLocationChanged(location);
|
||||
mControllerStatusCallback.onCarLocationChanged(gnssInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void judgeEndStation(MogoLocation location) {
|
||||
private void judgeEndStation(MessagePad.GnssInfo location) {
|
||||
if (mCurrentOCHOrder == null || mCurrentOCHOrder.endSiteGcjPoint == null
|
||||
|| mCurrentOCHOrder.endSiteGcjPoint.size() < 2) {
|
||||
return;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.taxi.presenter;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI;
|
||||
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
|
||||
@@ -12,7 +11,6 @@ import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -20,14 +18,14 @@ import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean;
|
||||
import com.mogo.och.common.module.biz.callback.ILoginCallback;
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.constant.TaxiDriverRoleEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRespBean;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean;
|
||||
import com.mogo.och.taxi.callback.ITaxiADASStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiControllerStatusCallback;
|
||||
import com.mogo.och.taxi.callback.ITaxiOrderStatusCallback;
|
||||
import com.mogo.och.taxi.constant.TaxiConst;
|
||||
import com.mogo.och.taxi.constant.TaxiDriverRoleEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.constant.TaxtServingStatusManager;
|
||||
import com.mogo.och.taxi.model.TaxiModel;
|
||||
import com.mogo.och.taxi.ui.TaxiFragment;
|
||||
@@ -36,6 +34,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/1/18
|
||||
@@ -314,10 +314,10 @@ public class TaxiPresenter extends Presenter<TaxiFragment> implements ITaxiADASS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCarLocationChanged(MogoLocation location) {
|
||||
public void onCarLocationChanged(MessagePad.GnssInfo location) {
|
||||
if (null != location){
|
||||
runOnUIThread(() -> {
|
||||
mView.updateSpeedView(location.getSpeed());
|
||||
mView.updateSpeedView((float) location.getVehicleSpeed());
|
||||
mView.updateLocation(location.getLatitude(),location.getLongitude());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ adb shell am broadcast -a com.obu.test_light_recognized --ei obuStates 1 --ei ob
|
||||
|
||||
|
||||
// (旧版本)使用命令行触发各种测试场景演示
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ei sceneType 1
|
||||
|
||||
adb shell am broadcast -a com.v2x.test_panel_control --ez TextPanelOpenStatus true --ei TextPanelOpenType 11
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ import java.util.TimerTask;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.ChassisStatesOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import function_state_management.FunctionStates;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
@@ -469,6 +470,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
getHandler().sendMessage(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVehicleState(MessagePad.Header header, VehicleStateOuterClass.VehicleState vehicleState) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChassisStates(MessagePad.Header header, ChassisStatesOuterClass.ChassisStates chassisStates) {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhjt.mogo_core_function_devatools.binding;
|
||||
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarInfo;
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@@ -18,11 +18,11 @@ public interface BindingCarApiService {
|
||||
/**
|
||||
* 获取绑定车辆的信息
|
||||
*
|
||||
* @return {@link BindingcarInfo}
|
||||
* @return {@link BindingCarInfo}
|
||||
*/
|
||||
@Headers("Content-Type:application/json;charset=UTF-8")
|
||||
@POST("eagleEye-mis/cmdbapi/pad/selectPadByMac")
|
||||
Observable<BindingcarInfo> getBindingCarInfo(/*@Header("access_token") String access_token,*/ @Body RequestBody requestBody);
|
||||
Observable<BindingCarInfo> getBindingCarInfo(/*@Header("access_token") String access_token,*/ @Body RequestBody requestBody);
|
||||
|
||||
/**
|
||||
* 绑定和修改绑定车机
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.zhjt.mogo_core_function_devatools.binding
|
||||
import android.content.Context
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingcarRequest
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarInfo
|
||||
import com.mogo.eagle.core.data.bindingcar.BindingCarRequest
|
||||
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showBindingcarDialog
|
||||
@@ -56,7 +56,11 @@ class BindingCarNetWorkManager private constructor() {
|
||||
) {
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
val request = BindingcarRequest(macAddress, widevineIDWithMd5, screenType)
|
||||
val request = BindingCarRequest(
|
||||
macAddress,
|
||||
widevineIDWithMd5,
|
||||
screenType
|
||||
)
|
||||
val requestBody = RequestBody.create(
|
||||
MediaType.get("application/json;charset=UTF-8"),
|
||||
GsonUtil.jsonFromObject(request)
|
||||
@@ -64,9 +68,9 @@ class BindingCarNetWorkManager private constructor() {
|
||||
mBindingCarApiService.getBindingCarInfo(requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : Observer<BindingcarInfo> {
|
||||
.subscribe(object : Observer<BindingCarInfo> {
|
||||
override fun onSubscribe(d: Disposable) {}
|
||||
override fun onNext(info: BindingcarInfo) {
|
||||
override fun onNext(info: BindingCarInfo) {
|
||||
if (info != null && info.getData() != null) {
|
||||
d(
|
||||
SceneConstant.M_BINDING + TAG,
|
||||
@@ -109,7 +113,11 @@ class BindingCarNetWorkManager private constructor() {
|
||||
) {
|
||||
// String macAddress1 = "48:b0:2d:4d:33:40";
|
||||
// String sn = "X2020220417KA94QIN";
|
||||
val request = BindingcarRequest(macAddress, widevineIDWithMd5, screenType)
|
||||
val request = BindingCarRequest(
|
||||
macAddress,
|
||||
widevineIDWithMd5,
|
||||
screenType
|
||||
)
|
||||
val requestBody = RequestBody.create(
|
||||
MediaType.get("application/json;charset=UTF-8"),
|
||||
GsonUtil.jsonFromObject(request)
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.module.MogoModule;
|
||||
import com.mogo.commons.module.MogoModulePaths;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts;
|
||||
import com.mogo.eagle.core.function.api.devatools.IMogoDevaToolsUpgradeListener;
|
||||
@@ -30,20 +31,18 @@ import com.mogo.eagle.core.function.overview.OverviewDb;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.CpuInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MemInfo;
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 默认初始化一些基础服务配置
|
||||
* 默认初始化一些基础服务配置 todo 分离 overView业务 和 msgBox去各自模块中 --- 扶风
|
||||
*/
|
||||
public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
|
||||
@@ -57,21 +56,23 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
return;
|
||||
}
|
||||
start = System.currentTimeMillis();
|
||||
initOverviewDb();
|
||||
connectAmiIp();
|
||||
// Crash 日志收集
|
||||
initCrashConfig();
|
||||
initLogConfig();
|
||||
initTipToast();
|
||||
initModules();
|
||||
if (DebugConfig.isDebug()) {
|
||||
initKoom();
|
||||
}
|
||||
//查询是否有版本的更新
|
||||
queryAppUpgrade();
|
||||
clearMessageBoxTable();
|
||||
checkMonitorDb();
|
||||
if (ProcessUtils.isMainProcess(this)) {
|
||||
initOverviewDb();
|
||||
if (DebugConfig.isDebug()) {
|
||||
initKoom();
|
||||
}
|
||||
clearMessageBoxTable();
|
||||
CallerMsgBoxManager.INSTANCE.queryAllMessages(this);
|
||||
}
|
||||
upgradeProgressListener();
|
||||
CallerMsgBoxManager.INSTANCE.queryAllMessages(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,7 +82,12 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
}
|
||||
|
||||
private void queryAppUpgrade() {
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CallerDevaToolsManager.INSTANCE.queryAppUpgrade();
|
||||
}
|
||||
},9000);
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
@@ -91,35 +97,27 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date currDate = new Date(System.currentTimeMillis());
|
||||
String currTimeStr = format.format(currDate);
|
||||
if (lastLaunchTimeStr != null && !lastLaunchTimeStr.isEmpty()) {
|
||||
boolean isSameDay = currTimeStr.equals(lastLaunchTimeStr);
|
||||
// 超过一天需要清除消息盒子中的数据,并把时间戳存入SP
|
||||
if (!isSameDay) {
|
||||
try {
|
||||
if (lastLaunchTimeStr != null && !lastLaunchTimeStr.isEmpty()) {
|
||||
boolean isSameDay = currTimeStr.equals(lastLaunchTimeStr);
|
||||
// 超过一天需要清除消息盒子中的数据,并把时间戳存入SP
|
||||
if (!isSameDay) {
|
||||
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
SPUtils.getInstance().put("last_launch", currTimeStr);
|
||||
}
|
||||
} else {
|
||||
// 首次使用App或中途仅删除sp文件
|
||||
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
SPUtils.getInstance().put("last_launch", currTimeStr);
|
||||
}
|
||||
} else {
|
||||
// 首次使用App或中途仅删除sp文件
|
||||
File file = this.getDatabasePath(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
if (file != null && file.exists()) {
|
||||
this.deleteDatabase(MsgBoxDb.INTERNAL_DB_NAME);
|
||||
}
|
||||
SPUtils.getInstance().put("last_launch", currTimeStr);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void checkMonitorDb() {
|
||||
new Thread(() -> {
|
||||
long limitId = 50001;
|
||||
List<CpuInfo> cpuList = MonitorDb.getDb(this).monitorDao().getAllCPUById(limitId);
|
||||
List<MemInfo> memList = MonitorDb.getDb(this).monitorDao().getAllMemById(limitId);
|
||||
// 大于5w条清除
|
||||
if (cpuList.size() > 0 || memList.size() > 0) {
|
||||
this.deleteDatabase(MonitorDb.INTERNAL_DB_NAME);
|
||||
} catch (Exception e) {
|
||||
CallerLogger.INSTANCE.e(TAG, e.getMessage());
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
@@ -201,12 +199,16 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
OverviewDb.Companion.getDb(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接ami
|
||||
*/
|
||||
private void connectAmiIp() {
|
||||
String ipAddress = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().getBaseContext()).getString(MoGoConfig.OBU_IP, "192.168.1.199");
|
||||
AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
}
|
||||
|
||||
private void initModules() {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "initModules");
|
||||
//och模块
|
||||
// MogoModulePaths.addModuleFunction(new MogoModule("/driver/api", "IMoGoFunctionProvider"));
|
||||
// MogoModulePaths.addModuleFunction(new MogoModule("/passenger/api", "IMoGoFunctionProvider"));
|
||||
|
||||
// OBU 模块
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider"));
|
||||
// BIZ
|
||||
@@ -215,13 +217,11 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
|
||||
// V2X 模块
|
||||
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider"));
|
||||
|
||||
// 司机身份专属模块
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
// 地图数据收集模块
|
||||
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER, "MoGoMapDataCollector"));
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.i(M_HMI + TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,7 @@ import mogo.telematics.pad.MessagePad
|
||||
* @author donghongyu
|
||||
* @since 2021-11-09
|
||||
* 高精度地图层UI
|
||||
*
|
||||
*
|
||||
* 地图图层,地图操作都在这个图层完成
|
||||
* 地图图层,地图操作都在这个图层完成 //todo 以view方式进行提供
|
||||
*/
|
||||
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_MAP)
|
||||
class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
||||
@@ -65,7 +63,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
||||
private val mIsControllerByOthersStatus = false
|
||||
|
||||
companion object {
|
||||
val functionName = "MapFragment"
|
||||
const val functionName = "MapFragment"
|
||||
|
||||
/**
|
||||
* sight mode
|
||||
@@ -128,7 +126,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
initMapView()
|
||||
queryInfStructure()
|
||||
initMapBiz()
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
@@ -201,31 +199,20 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
||||
//设置双指缩放手势是否可用。
|
||||
uiSettings.setZoomGesturesEnabled(true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initMapBiz() {
|
||||
// TODO 临时初始化地图监听工控机、OBU等数据监听器,用于感知元素绘制
|
||||
MapIdentifySubscriber.instance
|
||||
MogoRouteOverlayManager.getInstance().init()
|
||||
MapPointCloudSubscriber.instance
|
||||
// TODO GD地图业务需要与高精地图业务拆开 --- 扶风
|
||||
queryInfStructure()
|
||||
}
|
||||
|
||||
private fun queryInfStructure() {
|
||||
val viewModel = this.obtainViewModel(OverViewModel::class.java)
|
||||
// viewModel.getInfStructures().observe(this.getViewLifecycleOwner(), infrastructures -> {
|
||||
// if (isFirst) {
|
||||
// for (Infrastructure entity : infrastructures) {
|
||||
// Double lat = Double.parseDouble(entity.getLat());
|
||||
// Double lon = Double.parseDouble(entity.getLon());
|
||||
// if (lat < 0 || lat > 90 || lon < 0 || lon > 180) {
|
||||
// continue;
|
||||
// }
|
||||
// String geoHash = GeoHash.withCharacterPrecision(lat, lon, 7).toBase32();
|
||||
// viewModel.updateGeoHash(entity.getId(), geoHash);
|
||||
// }
|
||||
// isFirst = false;
|
||||
// }
|
||||
// });
|
||||
viewModel.infStructuresMap.observe(this.viewLifecycleOwner) { t -> InfStructureManager.saveData(t) }
|
||||
|
||||
viewModel.fetchInfStructures()
|
||||
}
|
||||
|
||||
@@ -352,6 +339,7 @@ class MapFragment : MvpFragment<MapView?, MapPresenter?>(),
|
||||
override val functionName: String
|
||||
get() = functionName
|
||||
|
||||
// TODO 全览模式需要自己监听 --- 扶风
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
UiThreadHandler.post { savePlanningData(globalPathResp!!.wayPointsList) }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.v2x.events
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
@@ -13,9 +12,6 @@ import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION
|
||||
import com.mogo.commons.module.status.IMogoStatusChangedListener
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.commons.network.ParamsUtil
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_V2N
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD
|
||||
@@ -47,10 +43,7 @@ import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst.*
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSeekHelpRes
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XStrategyPushRes
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager
|
||||
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshCallback
|
||||
import com.mogo.eagle.core.function.v2x.events.observer.V2XOptimalRouteObserver
|
||||
import com.mogo.eagle.core.function.v2x.events.receiver.SceneBroadcastReceiver
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
|
||||
@@ -58,13 +51,9 @@ import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarke
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.scene.airoad.AiRoadMarker.Marker
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.MapUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TrackUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceManager
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.map.marker.IMogoMarker
|
||||
@@ -95,8 +84,7 @@ import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
|
||||
object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallback,
|
||||
IMogoStatusChangedListener {
|
||||
object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallback{
|
||||
|
||||
private const val TAG = "V2XEventManager"
|
||||
|
||||
@@ -126,19 +114,12 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
V2XManager.start()
|
||||
}
|
||||
|
||||
V2XVoiceManager.init(context)
|
||||
registerListener()
|
||||
refreshStrategyConfig()
|
||||
initCarForHelpStatus()
|
||||
V2XManager.forceRefresh()
|
||||
MoGoAiCloudClient.getInstance().addTokenCallbacks(this)
|
||||
|
||||
// 注册广播接收场景弹窗使用的
|
||||
val localReceiver = SceneBroadcastReceiver()
|
||||
val localBroadcastManager = LocalBroadcastManager.getInstance(context)
|
||||
val intentFilter = IntentFilter()
|
||||
intentFilter.addAction(BROADCAST_SCENE_HANDLER_ACTION)
|
||||
localBroadcastManager.registerReceiver(localReceiver, intentFilter)
|
||||
SceneBroadcastReceiver.register(context)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,17 +133,12 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
return super.onMarkerClicked(marker)
|
||||
}
|
||||
})
|
||||
MogoStatusManager.getInstance()
|
||||
.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
|
||||
|
||||
}
|
||||
|
||||
private fun unRegisterListener() {
|
||||
V2XManager.removeCallback(this)
|
||||
CallerMapLocationListenerManager.removeListener(TAG, false)
|
||||
mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
|
||||
MogoStatusManager.getInstance()
|
||||
.unregisterStatusChangedListener(MODULE_NAME, StatusDescriptor.SEEK_HELPING, this)
|
||||
}
|
||||
|
||||
private fun handleRoadConditionMarkerClick(marker: IMogoMarker?) {
|
||||
@@ -222,68 +198,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
return null
|
||||
}
|
||||
|
||||
override fun onStatusChanged(descriptor: StatusDescriptor?, isTrue: Boolean) {
|
||||
CallerLogger.d("$M_V2X$TAG", "状态发生改变\ndescriptor:$descriptor\nisTrue:$isTrue") // 记录状态更改
|
||||
// 记录状态更改
|
||||
if (descriptor == StatusDescriptor.SEEK_HELPING) {
|
||||
refreshMeSeekHelp(isTrue)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新自车求助状态
|
||||
*
|
||||
* @param isTrue
|
||||
*/
|
||||
private fun refreshMeSeekHelp(isTrue: Boolean) {
|
||||
val entity = V2XMessageEntity<Boolean>()
|
||||
entity.type = V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP
|
||||
entity.content = isTrue
|
||||
V2XScenarioManager.getInstance().handlerMessage(entity)
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新自车求助状态
|
||||
*/
|
||||
private fun initCarForHelpStatus() {
|
||||
CallerLogger.d("$M_V2X$TAG", "刷新自车求助状态……") //本地查询是否超时
|
||||
BridgeApi.refreshModel().getHelpSignal(object : V2XRefreshCallback<V2XSeekHelpRes?> {
|
||||
override fun onSuccess(result: V2XSeekHelpRes?) {
|
||||
if (result != null) {
|
||||
val resultBean = result.result
|
||||
if (resultBean != null) {
|
||||
CallerLogger.d("$M_V2X$TAG", "刷新自车求助状态 resultBean:$resultBean")
|
||||
val vehicleType: Int = resultBean.vehicleType //故障车
|
||||
if (vehicleType == 4) {
|
||||
refreshMeSeekHelp(true)
|
||||
MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, true)
|
||||
} else {
|
||||
refreshMeSeekHelp(false)
|
||||
MogoStatusManager.getInstance().setSeekHelping(MODULE_NAME, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFail(msg: String) {}
|
||||
})
|
||||
}
|
||||
|
||||
private fun refreshStrategyConfig() {
|
||||
CallerLogger.w("$M_V2X$TAG", "刷新V2X中的配置文件")
|
||||
BridgeApi.refreshModel().getStrategyPush(object : V2XRefreshCallback<V2XStrategyPushRes> {
|
||||
override fun onSuccess(result: V2XStrategyPushRes?) { //CallerLogger.w("$M_V2X$TAG", "V2X疲劳驾驶配置数据更新:" + GsonUtil.jsonFromObject(result));
|
||||
val resultBean = result?.result
|
||||
if (resultBean != null) { // 更新本地的v2x提醒策略
|
||||
SharedPrefsMgr.getInstance(Utils.getApp())
|
||||
.putString(V2X_STRATEGY_PUSH, GsonUtil.jsonFromObject(resultBean))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFail(msg: String?) {}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location ?: return
|
||||
BridgeApi.location.set(location)
|
||||
@@ -322,7 +236,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
BridgeApi.v2xMarker()?.v2XRoadEventEntityList,
|
||||
V2XStatusManager.getInstance().location
|
||||
)
|
||||
if (v2XRoadEventEntity != null) { // CallerLogger.w("$M_V2X$TAG",
|
||||
if (v2XRoadEventEntity != null) {
|
||||
val distance = v2XRoadEventEntity.distance
|
||||
val min = if (EventTypeEnum.AI_ROAD_WORK.poiType == v2XRoadEventEntity.poiType) 0 else 5
|
||||
Logger.d(
|
||||
@@ -341,27 +255,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储本地数据
|
||||
*
|
||||
* @param v2XRoadEventEntity 要存储的场景
|
||||
*/
|
||||
private fun saveLocalStory(scenarioType: Int, v2XRoadEventEntity: MarkerExploreWay) {
|
||||
ThreadUtils.getIoPool().execute {
|
||||
try {
|
||||
V2XSQLiteUtils.saveLocalStory(
|
||||
scenarioType,
|
||||
v2XRoadEventEntity,
|
||||
v2XRoadEventEntity.hashCode()
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
CallerLogger.e("$M_V2X$TAG", "$e")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onTokenGot(token: String?, sn: String?) {
|
||||
if (V2XManager.hasInit()) {
|
||||
V2XManager.updateSnAndToken(sn, token)
|
||||
|
||||
@@ -95,7 +95,6 @@ public class V2XAlarmServer {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static boolean isOutOfRange(double poi_lon, double poi_lat, double car_lon, double car_lat, double car_angle) {
|
||||
return !isFrontOfCar(poi_lon, poi_lat, car_lon, car_lat, car_angle);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.*
|
||||
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshModel
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
@@ -44,10 +43,6 @@ internal object BridgeApi {
|
||||
ARouter.getInstance().build(MoGoV2XServicePaths.PATH_V2X_STATUS_MANAGER).navigation(context()) as? IMoGoV2XStatusManager
|
||||
}
|
||||
|
||||
private val v2xRefreshModel by lazy {
|
||||
V2XRefreshModel.getInstance(context())
|
||||
}
|
||||
|
||||
fun init(context: Context) {
|
||||
this.context.set(WeakReference(context))
|
||||
}
|
||||
@@ -66,6 +61,4 @@ internal object BridgeApi {
|
||||
|
||||
fun v2xStatus() = v2xStatus
|
||||
|
||||
fun refreshModel(): V2XRefreshModel = v2xRefreshModel
|
||||
|
||||
}
|
||||
@@ -26,15 +26,12 @@ public class V2XConst {
|
||||
public static final String BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY = "sceneType";
|
||||
|
||||
public static final String BROADCAST_SCENE_ACTION = "com.v2x.scene_local_broadcast";
|
||||
public static final String V2X_STRATEGY_PUSH = "v2x_strategy_push";
|
||||
|
||||
|
||||
/**
|
||||
* V2X 埋点
|
||||
*/
|
||||
public static final String V2X_ROAD_SHOW = "v2x_road_show";
|
||||
public static final String V2X_ROAD_EVET = "v2x_road_event";
|
||||
public static final String V2X_ROAD_EVET_HISTORY_BUTTON = "V2X_button_click";
|
||||
public static final String V2X_ROAD_PRODUCE = "v2x_road_produce";
|
||||
public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click";
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class V2XGiveLike implements Serializable {
|
||||
|
||||
@Expose
|
||||
private Long code;
|
||||
@Expose
|
||||
private String msg;
|
||||
@Expose
|
||||
private String result;
|
||||
@Expose
|
||||
private String sign;
|
||||
|
||||
public Long getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Long code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XLiveCarInfoEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/4/14 2:58 PM
|
||||
* desc : 根据经纬度查询附近可直播车机直播信息
|
||||
* version: 1.0
|
||||
*/
|
||||
public class V2XLiveCarRes extends BaseData implements Serializable {
|
||||
@Expose
|
||||
private ResultBean result;
|
||||
|
||||
public static class ResultBean {
|
||||
|
||||
private List<V2XLiveCarInfoEntity> info;
|
||||
|
||||
public List<V2XLiveCarInfoEntity> getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(List<V2XLiveCarInfoEntity> info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultBean{" +
|
||||
"info=" + info +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XLiveCarRes{" +
|
||||
"result=" + result +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/3/11 4:25 PM
|
||||
* desc : 故障求助查询,当前车辆是否处于求助中
|
||||
* version: 1.0
|
||||
*/
|
||||
public class V2XSeekHelpRes extends BaseData implements Serializable {
|
||||
private ResultBean result;
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
private int vehicleType;
|
||||
|
||||
public int getVehicleType() {
|
||||
return vehicleType;
|
||||
}
|
||||
|
||||
public void setVehicleType(int vehicleType) {
|
||||
this.vehicleType = vehicleType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultBean{" +
|
||||
"vehicleType=" + vehicleType +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XSeekHelpResult{" +
|
||||
"result=" + result +
|
||||
", code=" + code +
|
||||
", msg='" + msg + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,205 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class V2XSpecialCarRes implements Serializable {
|
||||
|
||||
private List<V2XMarkerEntity> coordinates;
|
||||
|
||||
public List<V2XMarkerEntity> getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List<V2XMarkerEntity> coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XMarkerResult{" +
|
||||
"coordinates=" + coordinates +
|
||||
'}';
|
||||
}
|
||||
|
||||
public class V2XMarkerEntity implements Serializable {
|
||||
|
||||
/**
|
||||
* createTime : 1587111513507
|
||||
* distance : 100
|
||||
* lat : 39.96911187
|
||||
* lon : 116.41777396
|
||||
* sn : ZD802B1932L00681
|
||||
* targetId : 20007
|
||||
* targetName : 故障车
|
||||
* userInfo : {"age":33,"displayName":"飞","headImgUrl":"http://img.zhidaohulian.com/fileServer/api/qa/user_info/1068057333299/67933ffb9a7e237c8cc2d8d9f66efcd0.jpg","sex":1,"sn":"ZD801B1920L00568","userId":1068057333299}
|
||||
*/
|
||||
|
||||
private long createTime;
|
||||
private int distance;
|
||||
private double lat;
|
||||
private double lon;
|
||||
private String sn;
|
||||
private int targetId;
|
||||
private String targetName;
|
||||
private UserInfoBean userInfo;
|
||||
|
||||
public long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getTargetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
public void setTargetId(int targetId) {
|
||||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
public String getTargetName() {
|
||||
return targetName;
|
||||
}
|
||||
|
||||
public void setTargetName(String targetName) {
|
||||
this.targetName = targetName;
|
||||
}
|
||||
|
||||
public UserInfoBean getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setUserInfo(UserInfoBean userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
}
|
||||
|
||||
public class UserInfoBean implements Serializable {
|
||||
/**
|
||||
* age : 33
|
||||
* displayName : 飞
|
||||
* headImgUrl : http://img.zhidaohulian.com/fileServer/api/qa/user_info/1068057333299/67933ffb9a7e237c8cc2d8d9f66efcd0.jpg
|
||||
* sex : 1
|
||||
* sn : ZD801B1920L00568
|
||||
* userId : 1068057333299
|
||||
*/
|
||||
|
||||
private int age;
|
||||
private String displayName;
|
||||
private String headImgUrl;
|
||||
private int sex;
|
||||
private String sn;
|
||||
private long userId;
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfoBean{" +
|
||||
"age=" + age +
|
||||
", displayName='" + displayName + '\'' +
|
||||
", headImgUrl='" + headImgUrl + '\'' +
|
||||
", sex=" + sex +
|
||||
", sn='" + sn + '\'' +
|
||||
", userId=" + userId +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "V2XMarkerEntity{" +
|
||||
"createTime=" + createTime +
|
||||
", distance=" + distance +
|
||||
", lat=" + lat +
|
||||
", lon=" + lon +
|
||||
", sn='" + sn + '\'' +
|
||||
", targetId=" + targetId +
|
||||
", targetName='" + targetName + '\'' +
|
||||
", userInfo=" + userInfo +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,253 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/5/26 2:30 PM
|
||||
* desc : 疲劳驾驶提醒策略
|
||||
* version: 1.0
|
||||
*/
|
||||
public class V2XStrategyPushRes extends BaseData implements Serializable {
|
||||
|
||||
/**
|
||||
* result : {"levelList":[{"level":"NORMAL","minMinute":0,"maxMinute":120},{"content":"已连续驾驶2小时,请注意休息","level":"SLIGHT","tts":"已连续驾驶2小时,听歌可以缓解疲劳,可以对我说打开音乐","showSeconds":15,"minMinute":120,"maxMinute":180},{"content":"已连续驾驶3小时,请注意停车休息","highSpeed":{"recommend":"REST_AREA","direction":"FRONT","angle":180,"distance":30},"level":"MODERATE","lowSpeed":{"recommend":"PARK","direction":"FRONT","angle":180,"distance":5},"tts":"已连续驾驶3小时,已为您找到附近服务区/停车场,请停车休息,可以对我说导航前往","showSeconds":20,"noReTts":"已连续驾驶3小时,为避免事故发生,请尽快进入停车区休息","minMinute":180,"maxMinute":240}],"drivingIgnoreMinutes":20,"restIgnoreMinutes":20}
|
||||
*/
|
||||
private ResultBean result;
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* levelList : [{"level":"NORMAL","minMinute":0,"maxMinute":120},{"content":"已连续驾驶2小时,请注意休息","level":"SLIGHT","tts":"已连续驾驶2小时,听歌可以缓解疲劳,可以对我说打开音乐","showSeconds":15,"minMinute":120,"maxMinute":180},{"content":"已连续驾驶3小时,请注意停车休息","highSpeed":{"recommend":"REST_AREA","direction":"FRONT","angle":180,"distance":30},"level":"MODERATE","lowSpeed":{"recommend":"PARK","direction":"FRONT","angle":180,"distance":5},"tts":"已连续驾驶3小时,已为您找到附近服务区/停车场,请停车休息,可以对我说导航前往","showSeconds":20,"noReTts":"已连续驾驶3小时,为避免事故发生,请尽快进入停车区休息","minMinute":180,"maxMinute":240}]
|
||||
* drivingIgnoreMinutes : 20
|
||||
* restIgnoreMinutes : 20
|
||||
*/
|
||||
|
||||
private int drivingIgnoreMinutes;
|
||||
private int restIgnoreMinutes;
|
||||
private List<LevelListBean> levelList;
|
||||
|
||||
public int getDrivingIgnoreMinutes() {
|
||||
return drivingIgnoreMinutes;
|
||||
}
|
||||
|
||||
public void setDrivingIgnoreMinutes(int drivingIgnoreMinutes) {
|
||||
this.drivingIgnoreMinutes = drivingIgnoreMinutes;
|
||||
}
|
||||
|
||||
public int getRestIgnoreMinutes() {
|
||||
return restIgnoreMinutes;
|
||||
}
|
||||
|
||||
public void setRestIgnoreMinutes(int restIgnoreMinutes) {
|
||||
this.restIgnoreMinutes = restIgnoreMinutes;
|
||||
}
|
||||
|
||||
public List<LevelListBean> getLevelList() {
|
||||
return levelList;
|
||||
}
|
||||
|
||||
public void setLevelList(List<LevelListBean> levelList) {
|
||||
this.levelList = levelList;
|
||||
}
|
||||
|
||||
public static class LevelListBean {
|
||||
/**
|
||||
* level : NORMAL
|
||||
* minMinute : 0
|
||||
* maxMinute : 120
|
||||
* content : 已连续驾驶2小时,请注意休息
|
||||
* tts : 已连续驾驶2小时,听歌可以缓解疲劳,可以对我说打开音乐
|
||||
* showSeconds : 15
|
||||
* highSpeed : {"recommend":"REST_AREA","direction":"FRONT","angle":180,"distance":30}
|
||||
* lowSpeed : {"recommend":"PARK","direction":"FRONT","angle":180,"distance":5}
|
||||
* noReTts : 已连续驾驶3小时,为避免事故发生,请尽快进入停车区休息
|
||||
*/
|
||||
|
||||
private String level;
|
||||
private int minMinute;
|
||||
private int maxMinute;
|
||||
private String content;
|
||||
private String tts;
|
||||
private int showSeconds;
|
||||
private HighSpeedBean highSpeed;
|
||||
private LowSpeedBean lowSpeed;
|
||||
private String noReTts;
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getMinMinute() {
|
||||
return minMinute;
|
||||
}
|
||||
|
||||
public void setMinMinute(int minMinute) {
|
||||
this.minMinute = minMinute;
|
||||
}
|
||||
|
||||
public int getMaxMinute() {
|
||||
return maxMinute;
|
||||
}
|
||||
|
||||
public void setMaxMinute(int maxMinute) {
|
||||
this.maxMinute = maxMinute;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getTts() {
|
||||
return tts;
|
||||
}
|
||||
|
||||
public void setTts(String tts) {
|
||||
this.tts = tts;
|
||||
}
|
||||
|
||||
public int getShowSeconds() {
|
||||
return showSeconds;
|
||||
}
|
||||
|
||||
public void setShowSeconds(int showSeconds) {
|
||||
this.showSeconds = showSeconds;
|
||||
}
|
||||
|
||||
public HighSpeedBean getHighSpeed() {
|
||||
return highSpeed;
|
||||
}
|
||||
|
||||
public void setHighSpeed(HighSpeedBean highSpeed) {
|
||||
this.highSpeed = highSpeed;
|
||||
}
|
||||
|
||||
public LowSpeedBean getLowSpeed() {
|
||||
return lowSpeed;
|
||||
}
|
||||
|
||||
public void setLowSpeed(LowSpeedBean lowSpeed) {
|
||||
this.lowSpeed = lowSpeed;
|
||||
}
|
||||
|
||||
public String getNoReTts() {
|
||||
return noReTts;
|
||||
}
|
||||
|
||||
public void setNoReTts(String noReTts) {
|
||||
this.noReTts = noReTts;
|
||||
}
|
||||
|
||||
public static class HighSpeedBean {
|
||||
/**
|
||||
* recommend : REST_AREA
|
||||
* direction : FRONT
|
||||
* angle : 180
|
||||
* distance : 30
|
||||
*/
|
||||
|
||||
private String recommend;
|
||||
private String direction;
|
||||
private int angle;
|
||||
private int distance;
|
||||
|
||||
public String getRecommend() {
|
||||
return recommend;
|
||||
}
|
||||
|
||||
public void setRecommend(String recommend) {
|
||||
this.recommend = recommend;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public int getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(int angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LowSpeedBean {
|
||||
/**
|
||||
* recommend : PARK
|
||||
* direction : FRONT
|
||||
* angle : 180
|
||||
* distance : 5
|
||||
*/
|
||||
|
||||
private String recommend;
|
||||
private String direction;
|
||||
private int angle;
|
||||
private int distance;
|
||||
|
||||
public String getRecommend() {
|
||||
return recommend;
|
||||
}
|
||||
|
||||
public void setRecommend(String recommend) {
|
||||
this.recommend = recommend;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public int getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(int angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,344 +0,0 @@
|
||||
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class V2XUserInfoRes extends BaseData implements Serializable {
|
||||
|
||||
@Expose
|
||||
private Result result;
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Result result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public class Result {
|
||||
|
||||
@Expose
|
||||
private Info info;
|
||||
|
||||
public Info getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(Info info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
|
||||
public class Info {
|
||||
|
||||
@Expose
|
||||
private Long activeStatus;
|
||||
@Expose
|
||||
private Long bindStatus;
|
||||
@Expose
|
||||
private String bindType;
|
||||
@Expose
|
||||
private String bindUserId;
|
||||
@Expose
|
||||
private String erpSnGroup;
|
||||
@Expose
|
||||
private String erpSnType;
|
||||
@Expose
|
||||
private String iccid;
|
||||
@Expose
|
||||
private String ifCarcorder;
|
||||
@Expose
|
||||
private String ifImdemo;
|
||||
@Expose
|
||||
private String ifSocketservice;
|
||||
@Expose
|
||||
private String lastActiveCity;
|
||||
@Expose
|
||||
private Long lastBrandId;
|
||||
@Expose
|
||||
private String lastBrandName;
|
||||
@Expose
|
||||
private String lastCarNum;
|
||||
@Expose
|
||||
private String lastCarNumEn;
|
||||
@Expose
|
||||
private String lastFortaVersion;
|
||||
@Expose
|
||||
private Long lastModelId;
|
||||
@Expose
|
||||
private String lastModelName;
|
||||
@Expose
|
||||
private String sn;
|
||||
@Expose
|
||||
private String snGroupDetail;
|
||||
@Expose
|
||||
private String songTypeTop2;
|
||||
@Expose
|
||||
private String userNickName;
|
||||
@Expose
|
||||
private String cardIdAge;
|
||||
@Expose
|
||||
private String headImgUrl;
|
||||
@Expose
|
||||
private String cardIdSex;
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public String getCardIdSex() {
|
||||
return cardIdSex;
|
||||
}
|
||||
|
||||
public void setCardIdSex(String cardIdSex) {
|
||||
this.cardIdSex = cardIdSex;
|
||||
}
|
||||
|
||||
public String getCardIdAge() {
|
||||
return cardIdAge;
|
||||
}
|
||||
|
||||
public void setCardIdAge(String cardIdAge) {
|
||||
this.cardIdAge = cardIdAge;
|
||||
}
|
||||
|
||||
public Long getActiveStatus() {
|
||||
return activeStatus;
|
||||
}
|
||||
|
||||
public void setActiveStatus(Long activeStatus) {
|
||||
this.activeStatus = activeStatus;
|
||||
}
|
||||
|
||||
public Long getBindStatus() {
|
||||
return bindStatus;
|
||||
}
|
||||
|
||||
public void setBindStatus(Long bindStatus) {
|
||||
this.bindStatus = bindStatus;
|
||||
}
|
||||
|
||||
public String getBindType() {
|
||||
return bindType;
|
||||
}
|
||||
|
||||
public void setBindType(String bindType) {
|
||||
this.bindType = bindType;
|
||||
}
|
||||
|
||||
public String getBindUserId() {
|
||||
return bindUserId;
|
||||
}
|
||||
|
||||
public void setBindUserId(String bindUserId) {
|
||||
this.bindUserId = bindUserId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Info{" +
|
||||
"activeStatus=" + activeStatus +
|
||||
", bindStatus=" + bindStatus +
|
||||
", bindType='" + bindType + '\'' +
|
||||
", bindUserId='" + bindUserId + '\'' +
|
||||
", erpSnGroup='" + erpSnGroup + '\'' +
|
||||
", erpSnType='" + erpSnType + '\'' +
|
||||
", iccid='" + iccid + '\'' +
|
||||
", ifCarcorder='" + ifCarcorder + '\'' +
|
||||
", ifImdemo='" + ifImdemo + '\'' +
|
||||
", ifSocketservice='" + ifSocketservice + '\'' +
|
||||
", lastActiveCity='" + lastActiveCity + '\'' +
|
||||
", lastBrandId=" + lastBrandId +
|
||||
", lastBrandName='" + lastBrandName + '\'' +
|
||||
", lastCarNum='" + lastCarNum + '\'' +
|
||||
", lastCarNumEn='" + lastCarNumEn + '\'' +
|
||||
", lastFortaVersion='" + lastFortaVersion + '\'' +
|
||||
", lastModelId=" + lastModelId +
|
||||
", lastModelName='" + lastModelName + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
", snGroupDetail='" + snGroupDetail + '\'' +
|
||||
", songTypeTop2='" + songTypeTop2 + '\'' +
|
||||
", userNickName='" + userNickName + '\'' +
|
||||
", cardIdAge='" + cardIdAge + '\'' +
|
||||
", headImgUrl='" + headImgUrl + '\'' +
|
||||
", cardIdSex='" + cardIdSex + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getErpSnGroup() {
|
||||
return erpSnGroup;
|
||||
}
|
||||
|
||||
public void setErpSnGroup(String erpSnGroup) {
|
||||
this.erpSnGroup = erpSnGroup;
|
||||
}
|
||||
|
||||
public String getErpSnType() {
|
||||
return erpSnType;
|
||||
}
|
||||
|
||||
public void setErpSnType(String erpSnType) {
|
||||
this.erpSnType = erpSnType;
|
||||
}
|
||||
|
||||
public String getIccid() {
|
||||
return iccid;
|
||||
}
|
||||
|
||||
public void setIccid(String iccid) {
|
||||
this.iccid = iccid;
|
||||
}
|
||||
|
||||
public String getIfCarcorder() {
|
||||
return ifCarcorder;
|
||||
}
|
||||
|
||||
public void setIfCarcorder(String ifCarcorder) {
|
||||
this.ifCarcorder = ifCarcorder;
|
||||
}
|
||||
|
||||
public String getIfImdemo() {
|
||||
return ifImdemo;
|
||||
}
|
||||
|
||||
public void setIfImdemo(String ifImdemo) {
|
||||
this.ifImdemo = ifImdemo;
|
||||
}
|
||||
|
||||
public String getIfSocketservice() {
|
||||
return ifSocketservice;
|
||||
}
|
||||
|
||||
public void setIfSocketservice(String ifSocketservice) {
|
||||
this.ifSocketservice = ifSocketservice;
|
||||
}
|
||||
|
||||
public String getLastActiveCity() {
|
||||
return lastActiveCity;
|
||||
}
|
||||
|
||||
public void setLastActiveCity(String lastActiveCity) {
|
||||
this.lastActiveCity = lastActiveCity;
|
||||
}
|
||||
|
||||
public Long getLastBrandId() {
|
||||
return lastBrandId;
|
||||
}
|
||||
|
||||
public void setLastBrandId(Long lastBrandId) {
|
||||
this.lastBrandId = lastBrandId;
|
||||
}
|
||||
|
||||
public String getLastBrandName() {
|
||||
return lastBrandName;
|
||||
}
|
||||
|
||||
public void setLastBrandName(String lastBrandName) {
|
||||
this.lastBrandName = lastBrandName;
|
||||
}
|
||||
|
||||
public String getLastCarNum() {
|
||||
return lastCarNum;
|
||||
}
|
||||
|
||||
public void setLastCarNum(String lastCarNum) {
|
||||
this.lastCarNum = lastCarNum;
|
||||
}
|
||||
|
||||
public String getLastCarNumEn() {
|
||||
return lastCarNumEn;
|
||||
}
|
||||
|
||||
public void setLastCarNumEn(String lastCarNumEn) {
|
||||
this.lastCarNumEn = lastCarNumEn;
|
||||
}
|
||||
|
||||
public String getLastFortaVersion() {
|
||||
return lastFortaVersion;
|
||||
}
|
||||
|
||||
public void setLastFortaVersion(String lastFortaVersion) {
|
||||
this.lastFortaVersion = lastFortaVersion;
|
||||
}
|
||||
|
||||
public Long getLastModelId() {
|
||||
return lastModelId;
|
||||
}
|
||||
|
||||
public void setLastModelId(Long lastModelId) {
|
||||
this.lastModelId = lastModelId;
|
||||
}
|
||||
|
||||
public String getLastModelName() {
|
||||
return lastModelName;
|
||||
}
|
||||
|
||||
public void setLastModelName(String lastModelName) {
|
||||
this.lastModelName = lastModelName;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public String getSnGroupDetail() {
|
||||
return snGroupDetail;
|
||||
}
|
||||
|
||||
public void setSnGroupDetail(String snGroupDetail) {
|
||||
this.snGroupDetail = snGroupDetail;
|
||||
}
|
||||
|
||||
public String getSongTypeTop2() {
|
||||
return songTypeTop2;
|
||||
}
|
||||
|
||||
public void setSongTypeTop2(String songTypeTop2) {
|
||||
this.songTypeTop2 = songTypeTop2;
|
||||
}
|
||||
|
||||
public String getUserNickName() {
|
||||
return userNickName;
|
||||
}
|
||||
|
||||
public void setUserNickName(String userNickName) {
|
||||
this.userNickName = userNickName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Result{" +
|
||||
"info=" + info +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfoEntity{" +
|
||||
"result=" + result +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 返回刷新
|
||||
*/
|
||||
public class BackRefreshInfo implements Serializable {
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel
|
||||
|
||||
/**
|
||||
* @description
|
||||
*
|
||||
* @author lixiaopeng
|
||||
* @since 2019-10-24
|
||||
*/
|
||||
data class Center (
|
||||
val lat: Double,
|
||||
val lon: Double
|
||||
)
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 构造数据
|
||||
* @since 2020/8/7
|
||||
*/
|
||||
public class SurroundingConstruction implements Serializable {
|
||||
private String poiType;
|
||||
private List<MarkerExploreWay> construtList;
|
||||
|
||||
public SurroundingConstruction(String poiType) {
|
||||
this.poiType = poiType;
|
||||
construtList = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public List<MarkerExploreWay> getConstrutList() {
|
||||
return construtList;
|
||||
}
|
||||
|
||||
public void addMarkerExploreWay(MarkerExploreWay item) {
|
||||
construtList.add(item);
|
||||
}
|
||||
|
||||
public String getTypeNameTTS(String type) {
|
||||
String typeName = "请查看周边的";
|
||||
typeName += EventTypeEnum.getTypeNameTTS(type);
|
||||
return typeName + "信息";
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingRequest {
|
||||
private Center center;
|
||||
private String[] poiTypes;
|
||||
private int radius;
|
||||
private int limit;
|
||||
|
||||
public SurroundingRequest(Center center, String[] poiTypes, int radius, int limit) {
|
||||
this.center = center;
|
||||
this.poiTypes = poiTypes;
|
||||
this.radius = radius;
|
||||
this.limit = limit;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 2020/7/29
|
||||
*/
|
||||
public class SurroundingResponse extends BaseData {
|
||||
/**
|
||||
* msg : null
|
||||
* result : {"exploreWay":[{"infoId":"740635251747942400","type":"CARD_TYPE_ROAD_CONDITION","location":{"lon":116.370207,"lat":39.968394,"angle":180,"address":"测试直播"},"canLive":false,"fileType":1,"addr":"测试直播","generateTime":1596622804859,"cityName":"","distance":717,"userInfo":{"sn":"E841CC2018PZD20408","userId":0,"userName":"零下的雨008","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592473692394.jpeg"},"items":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952448035.mp4?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D465089a3c078ed60c395cb65d41f61b28e9a3397","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1594952453342.jpg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1596701407%3B1596708607%26q-key-time%3D1596701407%3B1596708607%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D6f36b4c945197737f8576e42a5c599ed3d150a4a"}],"uploadType":"2","poiType":"10011"}]}
|
||||
*/
|
||||
private ResultBean result;
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
private List<MarkerExploreWay> exploreWay;
|
||||
|
||||
public List<MarkerExploreWay> getExploreWay() {
|
||||
return exploreWay;
|
||||
}
|
||||
|
||||
public void setExploreWay(List<MarkerExploreWay> exploreWay) {
|
||||
this.exploreWay = exploreWay;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class V2XShareEventDescription extends BaseData implements Serializable {
|
||||
|
||||
/**
|
||||
* detailMsg :
|
||||
* result : {"enthusiasmIndex":{"id":68,"sn":"ZD802B1932L00622","score":10,"shareNum":1024,"likeNum":0,"notLikeNum":0,"enthusiasmIndex":1,"createTime":"2020-07-28T06:21:11.523+0000","updateTime":"2020-07-28T06:21:11.523+0000"}}
|
||||
*/
|
||||
|
||||
private String detailMsg;
|
||||
private ResultBean result;
|
||||
|
||||
public String getDetailMsg() {
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg) {
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* enthusiasmIndex : {"id":68,"sn":"ZD802B1932L00622","score":10,"shareNum":1024,"likeNum":0,"notLikeNum":0,"enthusiasmIndex":1,"createTime":"2020-07-28T06:21:11.523+0000","updateTime":"2020-07-28T06:21:11.523+0000"}
|
||||
*/
|
||||
|
||||
private EnthusiasmIndexBean enthusiasmIndex;
|
||||
|
||||
public EnthusiasmIndexBean getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(EnthusiasmIndexBean enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public static class EnthusiasmIndexBean{
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnthusiasmIndexBean{" +
|
||||
", id=" + id +
|
||||
", sn='" + sn + '\'' +
|
||||
", score=" + score +
|
||||
", shareNum=" + shareNum +
|
||||
", likeNum=" + likeNum +
|
||||
", notLikeNum=" + notLikeNum +
|
||||
", enthusiasmIndex=" + enthusiasmIndex +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", updateTime='" + updateTime + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* id : 68
|
||||
* sn : ZD802B1932L00622
|
||||
* score : 10
|
||||
* shareNum : 1024
|
||||
* likeNum : 0
|
||||
* notLikeNum : 0
|
||||
* enthusiasmIndex : 1.0
|
||||
* createTime : 2020-07-28T06:21:11.523+0000
|
||||
* updateTime : 2020-07-28T06:21:11.523+0000
|
||||
*/
|
||||
private int id;
|
||||
private String sn;
|
||||
private int score;
|
||||
private int shareNum = 0;
|
||||
private int likeNum = 0;
|
||||
private int notLikeNum = 0;
|
||||
private double enthusiasmIndex = 10;
|
||||
private String createTime;
|
||||
private String updateTime;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(int score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public int getShareNum() {
|
||||
return shareNum;
|
||||
}
|
||||
|
||||
public void setShareNum(int shareNum) {
|
||||
this.shareNum = shareNum;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getNotLikeNum() {
|
||||
return notLikeNum;
|
||||
}
|
||||
|
||||
public void setNotLikeNum(int notLikeNum) {
|
||||
this.notLikeNum = notLikeNum;
|
||||
}
|
||||
|
||||
public double getEnthusiasmIndex() {
|
||||
return enthusiasmIndex;
|
||||
}
|
||||
|
||||
public void setEnthusiasmIndex(double enthusiasmIndex) {
|
||||
this.enthusiasmIndex = enthusiasmIndex;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,439 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class V2XShareEventItem extends BaseData implements Serializable {
|
||||
|
||||
private String detailMsg;
|
||||
private ResultBean result;
|
||||
|
||||
public String getDetailMsg() {
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
public void setDetailMsg(String detailMsg) {
|
||||
this.detailMsg = detailMsg;
|
||||
}
|
||||
|
||||
public ResultBean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(ResultBean result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
private PageBean page;
|
||||
|
||||
public PageBean getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(PageBean page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public static class PageBean {
|
||||
|
||||
private int total;
|
||||
private int pageSize;
|
||||
private int pageNum;
|
||||
private List<ContentBean> content;
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getPageNum() {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum(int pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public List<ContentBean> getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(List<ContentBean> content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public static class ContentBean {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ContentBean{" +
|
||||
"viewType=" + viewType +
|
||||
", uploadTimestamp=" + uploadTimestamp +
|
||||
", timeout=" + timeout +
|
||||
", uploadAddress='" + uploadAddress + '\'' +
|
||||
", distance=" + distance +
|
||||
", dbId='" + dbId + '\'' +
|
||||
", poiType='" + poiType + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
", userId=" + userId +
|
||||
", userName='" + userName + '\'' +
|
||||
", userHead='" + userHead + '\'' +
|
||||
", likeNum=" + likeNum +
|
||||
", notlikeNum=" + notlikeNum +
|
||||
", uploadType=" + uploadType +
|
||||
", uploadUser='" + uploadUser + '\'' +
|
||||
", imgUrl=" + imgUrl +
|
||||
", content=" + content +
|
||||
", gasStationId=" + gasStationId +
|
||||
", gasStationName=" + gasStationName +
|
||||
", gasImg=" + gasImg +
|
||||
", gasPrices=" + gasPrices +
|
||||
", endDate='" + endDate + '\'' +
|
||||
", fabulous=" + fabulous +
|
||||
", direction=" + direction +
|
||||
", virtualLikeNum=" + virtualLikeNum +
|
||||
", status=" + status +
|
||||
", sourceType='" + sourceType + '\'' +
|
||||
", hitId='" + hitId + '\'' +
|
||||
", userType=" + userType +
|
||||
", coordinates=" + coordinates +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
private int viewType = V2XShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
private Long uploadTimestamp;
|
||||
private long timeout;
|
||||
private String uploadAddress;
|
||||
private Integer distance;
|
||||
private String dbId;
|
||||
private String poiType;
|
||||
private String sn;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private String userHead;
|
||||
private Integer likeNum;
|
||||
private int notlikeNum;
|
||||
private Integer uploadType;
|
||||
private String uploadUser;
|
||||
private String imgUrl;
|
||||
private String content;
|
||||
private String gasStationId;
|
||||
private String gasStationName;
|
||||
private String gasImg;
|
||||
private String gasPrices;
|
||||
private String endDate;
|
||||
private boolean fabulous;
|
||||
private Integer direction;
|
||||
private Integer virtualLikeNum;
|
||||
private Integer status;
|
||||
private String sourceType;
|
||||
private String hitId;
|
||||
private Integer userType;
|
||||
private List<Double> coordinates;
|
||||
private List<DataBean> data;
|
||||
|
||||
public Long getUploadTimestamp() {
|
||||
return uploadTimestamp;
|
||||
}
|
||||
|
||||
public void setUploadTimestamp(Long uploadTimestamp) {
|
||||
this.uploadTimestamp = uploadTimestamp;
|
||||
}
|
||||
|
||||
public long getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(Long timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public String getUploadAddress() {
|
||||
return uploadAddress;
|
||||
}
|
||||
|
||||
public void setUploadAddress(String uploadAddress) {
|
||||
this.uploadAddress = uploadAddress;
|
||||
}
|
||||
|
||||
public Integer getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(Integer distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public String getDbId() {
|
||||
return dbId;
|
||||
}
|
||||
|
||||
public void setDbId(String dbId) {
|
||||
this.dbId = dbId;
|
||||
}
|
||||
|
||||
public String getPoiType() {
|
||||
return poiType;
|
||||
}
|
||||
|
||||
public void setPoiType(String poiType) {
|
||||
this.poiType = poiType;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserHead() {
|
||||
return userHead;
|
||||
}
|
||||
|
||||
public void setUserHead(String userHead) {
|
||||
this.userHead = userHead;
|
||||
}
|
||||
|
||||
public Integer getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(Integer likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
public int getNotlikeNum() {
|
||||
return notlikeNum;
|
||||
}
|
||||
|
||||
public void setNotlikeNum(int notlikeNum) {
|
||||
this.notlikeNum = notlikeNum;
|
||||
}
|
||||
|
||||
public Integer getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(Integer uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
public String getUploadUser() {
|
||||
return uploadUser;
|
||||
}
|
||||
|
||||
public void setUploadUser(String uploadUser) {
|
||||
this.uploadUser = uploadUser;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getGasStationId() {
|
||||
return gasStationId;
|
||||
}
|
||||
|
||||
public void setGasStationId(String gasStationId) {
|
||||
this.gasStationId = gasStationId;
|
||||
}
|
||||
|
||||
public String getGasStationName() {
|
||||
return gasStationName;
|
||||
}
|
||||
|
||||
public void setGasStationName(String gasStationName) {
|
||||
this.gasStationName = gasStationName;
|
||||
}
|
||||
|
||||
public String getGasImg() {
|
||||
return gasImg;
|
||||
}
|
||||
|
||||
public void setGasImg(String gasImg) {
|
||||
this.gasImg = gasImg;
|
||||
}
|
||||
|
||||
public String getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(String gasPrices) {
|
||||
this.gasPrices = gasPrices;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public boolean isFabulous() {
|
||||
return fabulous;
|
||||
}
|
||||
|
||||
public void setFabulous(boolean fabulous) {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Integer getVirtualLikeNum() {
|
||||
return virtualLikeNum;
|
||||
}
|
||||
|
||||
public void setVirtualLikeNum(Integer virtualLikeNum) {
|
||||
this.virtualLikeNum = virtualLikeNum;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getSourceType() {
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setSourceType(String sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public String getHitId() {
|
||||
return hitId;
|
||||
}
|
||||
|
||||
public void setHitId(String hitId) {
|
||||
this.hitId = hitId;
|
||||
}
|
||||
|
||||
public Integer getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(Integer userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public List<Double> getCoordinates() {
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
public void setCoordinates(List<Double> coordinates) {
|
||||
this.coordinates = coordinates;
|
||||
}
|
||||
|
||||
public List<DataBean> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DataBean> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DataBean {
|
||||
/**
|
||||
* url : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4
|
||||
* thumbnail : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4
|
||||
* content : null
|
||||
* illegalCount : null
|
||||
*/
|
||||
|
||||
private String url;
|
||||
private String thumbnail;
|
||||
private String content;
|
||||
private Object illegalCount;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getThumbnail() {
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
public void setThumbnail(String thumbnail) {
|
||||
this.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Object getIllegalCount() {
|
||||
return illegalCount;
|
||||
}
|
||||
|
||||
public void setIllegalCount(Object illegalCount) {
|
||||
this.illegalCount = illegalCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
public interface V2XShareEventItemEnum {
|
||||
|
||||
int ITEM_TYPE_NUM_DES = 0;
|
||||
int ITEM_TYPE_SHARE_LIST = 1;
|
||||
int ITEM_TYPE_SHARE_EMPTY = 2;
|
||||
int ITEM_TYPE_LOAD_MORE_STATUS = 3;
|
||||
int ITEM_TYPE_NO_MORE = 4;
|
||||
int ITEM_TYPE_OTHER = 5;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.panel;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/*
|
||||
* 没有任何分享,去分享/加载更多/没有更多了
|
||||
* */
|
||||
public class V2XShareEventLoadMoreItem extends BaseData implements Serializable {
|
||||
private String statusText;
|
||||
private int viewType;
|
||||
private boolean clickable = true;
|
||||
|
||||
public boolean isClickable() {
|
||||
return clickable;
|
||||
}
|
||||
|
||||
public void setClickable(boolean clickable) {
|
||||
this.clickable = clickable;
|
||||
}
|
||||
|
||||
public int getViewType() {
|
||||
return viewType;
|
||||
}
|
||||
|
||||
public void setViewType(int viewType) {
|
||||
this.viewType = viewType;
|
||||
}
|
||||
|
||||
public void setStatusText(String statusText) {
|
||||
this.statusText = statusText;
|
||||
}
|
||||
|
||||
public String getStatusText() {
|
||||
return statusText;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.manager;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.manager;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.manager;
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.network;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XLiveCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XUserInfoRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.panel.SurroundingResponse;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.panel.V2XShareEventDescription;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.panel.V2XShareEventItem;
|
||||
|
||||
import java.util.Map;
|
||||
import io.reactivex.Observable;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-03
|
||||
* <p>
|
||||
* 接口描述
|
||||
*/
|
||||
public interface V2XApiService {
|
||||
|
||||
/**
|
||||
* 直播点赞
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-geo-fence-carService/restrictedRules/car/liveBroadcastPraise")
|
||||
Observable<BaseData> giveLikeLiveVideo(@FieldMap Map<String, Object> parameters);
|
||||
|
||||
/**
|
||||
* 同过SN获取用户信息
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@POST("/yycp-realtimeLocations/realTimeLocationServer/queryUserInfoBySn")
|
||||
Observable<V2XUserInfoRes> queryUserInfoBySn(@Body RequestBody jsonStr);
|
||||
|
||||
/**
|
||||
* 车辆故障求助查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-realtimeLocations/vehicleTypeManage/car/updateVehicleType/v1")
|
||||
Observable<BaseData> sendHelpSignal(@FieldMap Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 根据经纬度查询附近可直播车机直播信息
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-realtimeLocations/realTimeLocationServer/car/queryNearbyVehicleLiveByLocation/v1")
|
||||
Observable<V2XLiveCarRes> queryNearbyVehicleLiveByLocation(@FieldMap Map<String, Object> parameters);
|
||||
|
||||
|
||||
/**
|
||||
* 点赞接口
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/poiInfoFabulous/car/poi/no/addPoiInfoFabulous/v1")
|
||||
Observable<BaseData> addPoiInfoFabulous(@FieldMap Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 响应求助
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/poiInfoFabulous/car/poi/no/RespondingToHelp/v1")
|
||||
Observable<BaseData> respondingToHelp(@FieldMap Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 道路事件UGC
|
||||
* 需求地址
|
||||
* http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/car/poi/no/manualMarkingTrafficJam")
|
||||
Observable<BaseData> manualMarkingTrafficJam(@FieldMap Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 根据名称获取策略详情
|
||||
*/
|
||||
@GET("/yycp-strategyPush/push/strategy/item?name=TIRE_DRIVING")
|
||||
Observable<V2XStrategyPushRes> getStrategyPush();
|
||||
|
||||
/**
|
||||
* 车辆故障求助查询
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/yycp-realtimeLocations/vehicleTypeManage/car/queryVehicleType/v1")
|
||||
Observable<V2XSeekHelpRes> queryHelpSignal(@FieldMap Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 我的分享-热心指数等
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/poiInfoFabulous/car/poi/no/queryEnthusiasmIndex/v1")
|
||||
Observable<V2XShareEventDescription> getEnthusiasmIndex(@FieldMap Map<String, Object> parames);
|
||||
|
||||
/**
|
||||
* 我的分享-列表
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/deva/car/pathAndPoi/no/queryInfo")
|
||||
Observable<V2XShareEventItem> getShareEventList(@FieldMap Map<String, Object> parames);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.network;
|
||||
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.commons.constants.HostConst;
|
||||
|
||||
/**
|
||||
* 应对不同接口对应不同服务域名的工厂累
|
||||
*/
|
||||
public class V2XApiServiceFactory {
|
||||
|
||||
private static V2XApiService mDevaApiService;
|
||||
private static V2XApiService mGeoFenceCarServiceApiService;
|
||||
private static V2XApiService mRealtimeLocationApiService;
|
||||
private static V2XApiService mDataServiceApiService;
|
||||
|
||||
/**
|
||||
* 获取指定域名下的 API 服务
|
||||
*/
|
||||
public static V2XApiService getApiService(String netHost) {
|
||||
return MoGoRetrofitFactory.getInstance(netHost).create(V2XApiService.class);
|
||||
}
|
||||
|
||||
public static V2XApiService getDevaApiService() {
|
||||
if (mDevaApiService == null) {
|
||||
synchronized (V2XApiServiceFactory.class) {
|
||||
if (mDevaApiService == null) {
|
||||
mDevaApiService = getApiService(HostConst.DEVA_HOST);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mDevaApiService;
|
||||
}
|
||||
|
||||
public static V2XApiService getGeoFenceCarServiceApiService() {
|
||||
if (mGeoFenceCarServiceApiService == null) {
|
||||
synchronized (V2XApiServiceFactory.class) {
|
||||
if (mGeoFenceCarServiceApiService == null) {
|
||||
mGeoFenceCarServiceApiService = getApiService(HostConst.GEOFENCE_HOST);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mGeoFenceCarServiceApiService;
|
||||
}
|
||||
|
||||
public static V2XApiService getRealtimeLocationApiService() {
|
||||
if (mRealtimeLocationApiService == null) {
|
||||
synchronized (V2XApiServiceFactory.class) {
|
||||
if (mRealtimeLocationApiService == null) {
|
||||
mRealtimeLocationApiService = getApiService(HostConst.REALTIME_LOCATION_HOST);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mRealtimeLocationApiService;
|
||||
}
|
||||
|
||||
public static V2XApiService getStrategyPushApiService() {
|
||||
if (mDataServiceApiService == null) {
|
||||
synchronized (V2XApiServiceFactory.class) {
|
||||
if (mDataServiceApiService == null) {
|
||||
mDataServiceApiService = getApiService(HostConst.STRATEGY_PUSH_HOST);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mDataServiceApiService;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.network;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-03
|
||||
* <p>
|
||||
* 刷新回调
|
||||
*/
|
||||
public interface V2XRefreshCallback<T> {
|
||||
|
||||
void onSuccess(T result);
|
||||
|
||||
void onFail(String msg);
|
||||
}
|
||||
@@ -1,367 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.network;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XLiveCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSeekHelpRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XStrategyPushRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XUserInfoRes;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
|
||||
/**
|
||||
* 数据接口API
|
||||
*
|
||||
* @author donghongyu
|
||||
* @since 2020-01-03
|
||||
*/
|
||||
public class V2XRefreshModel {
|
||||
|
||||
private Context mContext;
|
||||
private static V2XRefreshModel mV2XRefreshModel;
|
||||
|
||||
private V2XRefreshModel() {
|
||||
}
|
||||
|
||||
public synchronized static V2XRefreshModel getInstance(Context context) {
|
||||
if (mV2XRefreshModel == null) {
|
||||
synchronized (V2XRefreshModel.class) {
|
||||
if (mV2XRefreshModel == null) {
|
||||
mV2XRefreshModel = new V2XRefreshModel();
|
||||
mV2XRefreshModel.init(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mV2XRefreshModel;
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直播点赞👍
|
||||
*
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void giveLikeLiveVideo(final V2XRefreshCallback callback, String snStr) {
|
||||
final Map<String, Object> query = new ParamsProvider.Builder(mContext).build();
|
||||
query.put("data", "{\"sn\":" + snStr + "}");
|
||||
V2XApiServiceFactory.getGeoFenceCarServiceApiService().giveLikeLiveVideo(query)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @param sn 目标车机SN
|
||||
*/
|
||||
public void queryUserInfoBySn(String sn, final V2XRefreshCallback<V2XUserInfoRes> callback) {
|
||||
RequestBody body = RequestBody.create(
|
||||
okhttp3.MediaType.parse("application/json; charset=utf-8"),
|
||||
"{\"sn\":\"" + sn + "\"}");
|
||||
|
||||
V2XApiServiceFactory.getRealtimeLocationApiService().queryUserInfoBySn(body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XUserInfoRes>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(V2XUserInfoRes o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度查询附近可直播车机直播信息
|
||||
*
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void queryNearbyVehicleLiveByLocation(
|
||||
V2XRefreshCallback<V2XLiveCarRes> callback, double lon, double lat) {
|
||||
final Map<String, Object> query = new ParamsProvider.Builder(mContext).build();
|
||||
|
||||
StringBuffer dataStr = new StringBuffer();
|
||||
dataStr.append("{");
|
||||
dataStr.append("\"lon\":");
|
||||
dataStr.append(lon);
|
||||
dataStr.append(",");
|
||||
dataStr.append("\"lat\":");
|
||||
dataStr.append(lat);
|
||||
dataStr.append(",");
|
||||
dataStr.append("\"radius\":");
|
||||
dataStr.append(0.5);
|
||||
dataStr.append(",");
|
||||
dataStr.append("\"size\":");
|
||||
dataStr.append(5);
|
||||
dataStr.append("}");
|
||||
|
||||
query.put("data", dataStr.toString());
|
||||
V2XApiServiceFactory.getRealtimeLocationApiService().queryNearbyVehicleLiveByLocation(query)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XLiveCarRes>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(V2XLiveCarRes o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消求助
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void cancelHelpSignal(V2XRefreshCallback<BaseData> callback) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = new StringBuilder()
|
||||
.append("{")
|
||||
.append("\"sn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append(",")
|
||||
.append("\"vehicleType\":")
|
||||
.append(0)
|
||||
.append("}").toString();
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getRealtimeLocationApiService().sendHelpSignal(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞接口
|
||||
*/
|
||||
public void addPoiInfoFabulous(V2XRefreshCallback<BaseData> callback,
|
||||
String infoId,
|
||||
String poiType,
|
||||
int likeOrDislike) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = new StringBuilder()
|
||||
.append("{")
|
||||
.append("\"infoId\":").append(infoId)
|
||||
.append(",")
|
||||
.append("\"poiType\":").append(poiType)
|
||||
.append(",")
|
||||
.append("\"likeOrdislike\":").append(likeOrDislike)
|
||||
.append(",")
|
||||
.append("\"sn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append("}").toString();
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService().addPoiInfoFabulous(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应求助
|
||||
* "seekHelpSn":"testSn01",求助SN
|
||||
* "enthusiasticSn":"testSn02",响应求助SN
|
||||
*/
|
||||
public void respondingToHelp(String seekHelpSn) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = new StringBuilder()
|
||||
.append("{")
|
||||
.append("\"seekHelpSn\":").append(seekHelpSn)
|
||||
.append(",")
|
||||
.append("\"enthusiasticSn\":").append(MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.append("}").toString();
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService().respondingToHelp(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 道路事件UGC
|
||||
* 需求地址
|
||||
* http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
|
||||
* {"id":"","status":1,"markUser":"name","sn":"111111","helpId":"222"}
|
||||
*/
|
||||
public void manualMarkingTrafficJam(String id,
|
||||
int status,
|
||||
String helpId) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
String json = "{" + "\"id\":\"" + id + "\"," + "\"sn\":\"" + MoGoAiCloudClientConfig.getInstance().getSn() + "\"," + "\"status\":" + status + "," + "\"helpId\":\"" + helpId + "\"}";
|
||||
map.put("data", json);
|
||||
V2XApiServiceFactory.getDevaApiService().manualMarkingTrafficJam(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据名称获取策略详情
|
||||
*/
|
||||
public void getStrategyPush(V2XRefreshCallback<V2XStrategyPushRes> callback) {
|
||||
V2XApiServiceFactory.getStrategyPushApiService().getStrategyPush().subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XStrategyPushRes>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(V2XStrategyPushRes o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前车辆故障求助状态
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getHelpSignal(V2XRefreshCallback<V2XSeekHelpRes> callback) {
|
||||
final Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
map.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
V2XApiServiceFactory.getRealtimeLocationApiService().queryHelpSignal(map).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<V2XSeekHelpRes>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(V2XSeekHelpRes o) {
|
||||
super.onSuccess(o);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(o);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
if (TextUtils.isEmpty(message)) {
|
||||
message = "网络错误,请稍后重试";
|
||||
}
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.network;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.network.ParamsProvider;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.network.RequestOptions;
|
||||
import com.mogo.eagle.core.network.SubscribeImpl;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
import io.reactivex.ObservableSource;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Function;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class V2XShareNetworkModel {
|
||||
private static final String TAG = "V2XShareNetworkModel";
|
||||
private final Context mContext;
|
||||
|
||||
public V2XShareNetworkModel(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 两个任务串行
|
||||
* 1.分享次数,热心指数
|
||||
* 2.分享列表
|
||||
*/
|
||||
public void getShareEventResponse(int page, int size, V2XRefreshCallback callback) {
|
||||
|
||||
Observable<String> indexObservable = Observable.create(new ObservableOnSubscribe<String>() {
|
||||
|
||||
@Override
|
||||
public void subscribe(ObservableEmitter<String> emitter) throws Exception {
|
||||
emitter.onNext("1");
|
||||
emitter.onComplete();
|
||||
}
|
||||
});
|
||||
|
||||
Observable<String> listObservable = Observable.create(new ObservableOnSubscribe<String>() {
|
||||
@Override
|
||||
public void subscribe(ObservableEmitter<String> emitter) throws Exception {
|
||||
emitter.onNext("2");
|
||||
emitter.onComplete();
|
||||
}
|
||||
});
|
||||
indexObservable.flatMap(new Function<String, ObservableSource<?>>() {
|
||||
@Override
|
||||
public ObservableSource<?> apply(String s) throws Exception {
|
||||
return listObservable;
|
||||
}
|
||||
})
|
||||
.observeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<Object>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
try {
|
||||
getShareIndex(callback);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(Object o) {
|
||||
try {
|
||||
getShareEventList(page, size, callback);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 热心指数
|
||||
*/
|
||||
public void getShareIndex(V2XRefreshCallback callback) {
|
||||
final ParamsProvider.Builder builder = new ParamsProvider.Builder(mContext);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
builder.append("data", GsonUtil.jsonFromObject(hashMap));
|
||||
Map<String, Object> parameters = builder.build();
|
||||
//热心指数
|
||||
V2XApiServiceFactory.getDevaApiService().getEnthusiasmIndex(parameters)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create((mContext))) {
|
||||
@Override
|
||||
public void onSuccess(BaseData resultData) {
|
||||
super.onSuccess(resultData);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(resultData);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
if (callback != null) {
|
||||
callback.onFail("网络异常,点击刷新重试");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分享列表
|
||||
*/
|
||||
public void getShareEventList(int page, int size, V2XRefreshCallback callback) {
|
||||
|
||||
final ParamsProvider.Builder builder = new ParamsProvider.Builder(mContext);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("sn", MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
hashMap.put("pageNum", page);
|
||||
hashMap.put("pageSize", size);
|
||||
builder.append("data", GsonUtil.jsonFromObject(hashMap));
|
||||
Map<String, Object> parameters = builder.build();
|
||||
|
||||
V2XApiServiceFactory.getDevaApiService().getShareEventList(parameters)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(mContext)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData resultData) {
|
||||
super.onSuccess(resultData);
|
||||
if (callback != null) {
|
||||
callback.onSuccess(resultData);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
if (callback != null) {
|
||||
callback.onFail(message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
if (callback != null) {
|
||||
callback.onFail("网络异常,点击刷新重试");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,23 @@ package com.mogo.eagle.core.function.v2x.events.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.V2XScenarioManager
|
||||
import java.lang.Exception
|
||||
|
||||
class SceneBroadcastReceiver: BroadcastReceiver() {
|
||||
class SceneBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
fun register(context: Context) {
|
||||
val localReceiver = SceneBroadcastReceiver()
|
||||
val localBroadcastManager = LocalBroadcastManager.getInstance(context)
|
||||
val intentFilter = IntentFilter()
|
||||
intentFilter.addAction(V2XConst.BROADCAST_SCENE_HANDLER_ACTION)
|
||||
localBroadcastManager.registerReceiver(localReceiver, intentFilter)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
try {
|
||||
|
||||
@@ -6,19 +6,13 @@ import android.content.Intent;
|
||||
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.mogo.commons.module.status.MogoStatusManager;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.function.call.chat.CallerChatManager;
|
||||
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.TestOnLineCarUtils;
|
||||
import com.mogo.eagle.core.function.v2x.events.utils.V2XSQLiteUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -52,30 +46,12 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
* @param sceneType 场景类型
|
||||
*/
|
||||
private void dispatchSceneTest(int sceneType) {
|
||||
if (sceneType == 0) {//打开用户信息
|
||||
CallerChatManager.INSTANCE.call(Utils.getApp(), "X20202111230C01");
|
||||
} else if (sceneType == 1) {// 触发道路事件
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioRoadEventData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
|
||||
// 存储本地,出行动态作展示
|
||||
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
|
||||
v2XMessageEntity.getContent().getNoveltyInfo());
|
||||
}
|
||||
if (sceneType == 2) {// 触发AI道路施工事件
|
||||
if (sceneType == 1) {// 触发AI道路施工事件
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioAIRoadEventData();
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
|
||||
// 存储本地,出行动态作展示
|
||||
saveLocalStory(V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING,
|
||||
v2XMessageEntity.getContent().getNoveltyInfo());
|
||||
} else if (sceneType == 10) {//触发事件UGC
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioRoadEventUGCData();
|
||||
@@ -109,13 +85,6 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
} else if (sceneType == 18) {// 自车求助
|
||||
V2XMessageEntity<Boolean> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioCarForHelpEventData();
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
MogoStatusManager.getInstance().setSeekHelping(V2XConst.MODULE_NAME, true);
|
||||
} else if (sceneType == 20) {// 小地图绘制线
|
||||
List<MogoLatLng> coordinates = TestOnLineCarUtils.getTestCoordinates();
|
||||
CallerSmpManager.drawablePolyline(coordinates);
|
||||
@@ -124,17 +93,4 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 存储本地数据
|
||||
*
|
||||
* @param v2XRoadEventEntity 要存储的场景
|
||||
*/
|
||||
public void saveLocalStory(int scenarioType, MarkerExploreWay v2XRoadEventEntity) {
|
||||
try {
|
||||
V2XSQLiteUtils.saveLocalStory(scenarioType, v2XRoadEventEntity, v2XRoadEventEntity.hashCode());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/11/20 10:35 AM
|
||||
*/
|
||||
public class V2XBasWindow extends RelativeLayout {
|
||||
private final String TAG = "V2XBasWindow";
|
||||
|
||||
public V2XBasWindow(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public V2XBasWindow(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public V2XBasWindow(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "onAttachedToWindow……");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "onDetachedFromWindow……");
|
||||
release();
|
||||
}
|
||||
|
||||
/**
|
||||
* 这里释放资源
|
||||
*/
|
||||
protected void release() {
|
||||
CallerLogger.INSTANCE.w(M_V2X + TAG, "release……");
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.route;
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.observer.V2XOptimalRouteObserver;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.model.DrawLineInfo;
|
||||
import com.mogo.eagle.core.data.v2x.DrawLineInfo;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoPersonWarnPolylineManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoStopPolylineManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoWarnPolylineManager;
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.view;
|
||||
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/5/15 5:02 PM
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface IV2XButton {
|
||||
/**
|
||||
* 设置监听器,处理button点击和语音唤醒
|
||||
* @param listener
|
||||
*/
|
||||
void setOnActionListener(IV2XButtonListener listener);
|
||||
|
||||
/**
|
||||
* 按钮显示
|
||||
*/
|
||||
void show();
|
||||
|
||||
/**
|
||||
* 按钮关闭
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 语音注册
|
||||
*/
|
||||
void registerVoice();
|
||||
|
||||
/**
|
||||
* 语音反注册
|
||||
*/
|
||||
void unRegisterVoice();
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.view;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
* @Package: com.mogo.module.v2x.scenario.view
|
||||
* @ClassName: IV2XButtonListener
|
||||
* @Description: java类作用描述
|
||||
* @Author: fenghl
|
||||
* @CreateDate: 2020/5/18 15:58
|
||||
* @UpdateUser: 更新者:
|
||||
* @UpdateDate: 2020/5/18 15:58
|
||||
* @UpdateRemark: 更新说明:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IV2XButtonListener {
|
||||
/**
|
||||
* 响应点击或语音触发事件
|
||||
*/
|
||||
void onAction();
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.view;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
* @Package: com.mogo.module.v2x.statusmanager
|
||||
* @ClassName: IV2XWindow
|
||||
* @Description: java类作用描述
|
||||
* @Author: fenghl
|
||||
* @CreateDate: 2020/5/15 11:24
|
||||
* @UpdateUser: 更新者:
|
||||
* @UpdateDate: 2020/5/15 11:24
|
||||
* @UpdateRemark: 更新说明:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IV2XWindow<T> {
|
||||
|
||||
/**
|
||||
* 展示1/2窗口
|
||||
*/
|
||||
void show(T entity);
|
||||
|
||||
/**
|
||||
* 关闭1/2窗口
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* 返回窗体
|
||||
*
|
||||
* @return 当前窗体
|
||||
*/
|
||||
View getView();
|
||||
}
|
||||
@@ -3,15 +3,12 @@ package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
import static com.mogo.eagle.core.data.map.entity.V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerResponse;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XWarningEntity;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.eagle.core.data.v2x.V2XOptimalRouteDataRes;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
|
||||
@@ -28,39 +25,6 @@ import java.util.List;
|
||||
*/
|
||||
public class TestOnLineCarUtils {
|
||||
|
||||
/**
|
||||
* 模拟道路事件测试数据
|
||||
*/
|
||||
public static V2XMessageEntity<V2XRoadEventEntity> getV2XScenarioRoadEventData() {
|
||||
try {
|
||||
InputStream inputStream = Utils.getApp()
|
||||
.getResources()
|
||||
.openRawResource(R.raw.scenario_road_event_data);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
int len = -1;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = inputStream.read(buffer)) != -1) {
|
||||
baos.write(buffer, 0, len);
|
||||
}
|
||||
inputStream.close();
|
||||
|
||||
// 加载数据源
|
||||
V2XRoadEventEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XRoadEventEntity.class);
|
||||
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(ALERT_ROAD_WARNING);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(v2xRoadEventEntity);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟道路事件测试数据
|
||||
*/
|
||||
@@ -77,6 +41,7 @@ public class TestOnLineCarUtils {
|
||||
body.setType(ALERT_ROAD_WARNING);
|
||||
return body;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟道路事件UGC测试数据
|
||||
*/
|
||||
|
||||
@@ -10,35 +10,6 @@ import java.util.Map;
|
||||
* 统计埋点工具
|
||||
*/
|
||||
public class TrackUtils {
|
||||
|
||||
//埋点
|
||||
public static void trackV2xRoadShow(String dbid, String type, String style) {
|
||||
try {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("dbid", dbid);
|
||||
properties.put("type", type);
|
||||
properties.put("lng", V2XStatusManager.getInstance().getLocation().getLongitude());
|
||||
properties.put("lat", V2XStatusManager.getInstance().getLocation().getLatitude());
|
||||
properties.put("style", style);
|
||||
AnalyticsUtils.track(V2XConst.V2X_ROAD_SHOW, properties);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//道路事件操作埋点 v2x_road_event
|
||||
public static void trackV2xRoadEvent(String dbid, String sn, String type) {
|
||||
try {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("dbid", dbid);
|
||||
properties.put("sn", sn);
|
||||
properties.put("type", type);
|
||||
AnalyticsUtils.track(V2XConst.V2X_ROAD_EVET, properties);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type type=1 短距离角度匹配
|
||||
* type=2 历史轨迹匹配
|
||||
@@ -63,26 +34,4 @@ public class TrackUtils {
|
||||
}
|
||||
}
|
||||
|
||||
//道路事件操作埋点 V2X_button
|
||||
|
||||
/**
|
||||
* @param type type=1 桌面按钮
|
||||
* <p>
|
||||
* type=2 tab1按钮-出行动态
|
||||
* <p>
|
||||
* type=3 tab2按钮-周边事件
|
||||
* <p>
|
||||
* type=4 tab3按钮-我的分享
|
||||
* <p>
|
||||
* type=5 tab4按钮-关闭按钮
|
||||
*/
|
||||
public static void trackV2xHistoryEvent(int type) {
|
||||
try {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type", type);
|
||||
AnalyticsUtils.track(V2XConst.V2X_ROAD_EVET_HISTORY_BUTTON, properties);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.utils;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
|
||||
|
||||
import com.mogo.eagle.core.data.map.entity.V2XEventZanData;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XHistoryScenarioData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.sqlite.SQLIDao;
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.utils.sqlite.SQLDaoFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据库操作工具类
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
public class V2XSQLiteUtils {
|
||||
|
||||
/**
|
||||
* 场景数据管理
|
||||
*/
|
||||
private static SQLIDao<V2XHistoryScenarioData> mScenarioHistoryDao;
|
||||
|
||||
/**
|
||||
* 点赞数据管理
|
||||
*/
|
||||
private static SQLIDao<V2XEventZanData> mV2XEventZanDao;
|
||||
|
||||
/**
|
||||
* 点赞数据管理
|
||||
*/
|
||||
public static SQLIDao<V2XEventZanData> getV2XEventZanDao() {
|
||||
if (mV2XEventZanDao == null) {
|
||||
synchronized (V2XSQLiteUtils.class) {
|
||||
if (mV2XEventZanDao == null) {
|
||||
mV2XEventZanDao = SQLDaoFactory.Companion.getInstance()
|
||||
.getBaseDao(Utils.getApp(), V2XEventZanData.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mV2XEventZanDao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储本地数据
|
||||
*
|
||||
* @param v2XEventZanData 要存储的场景
|
||||
*/
|
||||
public static void saveEventZanLocalStory(V2XEventZanData v2XEventZanData) {
|
||||
try {
|
||||
if (!isZanEvent(v2XEventZanData.eventId)) {
|
||||
// 进行数据库存储
|
||||
V2XSQLiteUtils.getV2XEventZanDao().insert(v2XEventZanData);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否已经存在
|
||||
*
|
||||
* @param eventId 要判断的事件ID
|
||||
* @return true-已存在,false-没存在
|
||||
*/
|
||||
public static boolean isZanEvent(String eventId) {
|
||||
try {
|
||||
// 查询数据库,判断是否存在
|
||||
for (V2XEventZanData eventZanDatum : getEventZanData()) {
|
||||
if (eventZanDatum.eventId.equals(eventId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当天的V2X数据
|
||||
*/
|
||||
public static List<V2XEventZanData> getEventZanData() {
|
||||
return getV2XEventZanDao().query(new V2XEventZanData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改指定的数据
|
||||
*/
|
||||
public static void updateScenarioHistoryData(V2XHistoryScenarioData oldScenarioData, V2XHistoryScenarioData newScenarioData) {
|
||||
try {
|
||||
int result = getScenarioHistoryDao().update(oldScenarioData, newScenarioData);
|
||||
//V2XEventPanelFragment.Companion.getInstance().changeEventCount();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 场景数据管理
|
||||
*/
|
||||
public static SQLIDao<V2XHistoryScenarioData> getScenarioHistoryDao() {
|
||||
if (mScenarioHistoryDao == null) {
|
||||
synchronized (V2XSQLiteUtils.class) {
|
||||
if (mScenarioHistoryDao == null) {
|
||||
mScenarioHistoryDao = SQLDaoFactory.Companion.getInstance()
|
||||
.getBaseDao(Utils.getApp(), V2XHistoryScenarioData.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mScenarioHistoryDao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当天的V2X数据
|
||||
*/
|
||||
public static List<V2XHistoryScenarioData> getScenarioHistoryData() {
|
||||
return getScenarioHistoryDao().query(new V2XHistoryScenarioData(), "triggerTime", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据库中存储的昨天的数据
|
||||
*/
|
||||
public static void clearYesterdayScenarioHistoryData() {
|
||||
try {
|
||||
List<V2XHistoryScenarioData> historyScenarioData = getScenarioHistoryDao().query(new V2XHistoryScenarioData());
|
||||
for (V2XHistoryScenarioData historyScenarioDatum : historyScenarioData) {
|
||||
Long triggerTime = historyScenarioDatum.getTriggerTime();
|
||||
if (!TimeUtils.isToday(triggerTime)) {
|
||||
int result = getScenarioHistoryDao().delete(historyScenarioDatum);
|
||||
if (result > 0) {
|
||||
CallerLogger.INSTANCE.d(M_V2X + "V2XSQLiteUtils", "删除过期数据成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储本地数据,每个数据只能存在一次,所以存储之前先查询数据库如果已经存在则修改触碰时间
|
||||
*
|
||||
* @param markerExploreWay 要存储的场景
|
||||
*/
|
||||
public static void saveLocalStory(int scenarioType, Object markerExploreWay, int hashCode) {
|
||||
try {
|
||||
|
||||
CallerLogger.INSTANCE.d(M_V2X + "V2XSQLiteUtils", "saveLocalStory:" + markerExploreWay);
|
||||
|
||||
// 进行数据库存储
|
||||
V2XHistoryScenarioData v2XHistoryScenarioData = new V2XHistoryScenarioData();
|
||||
v2XHistoryScenarioData.setScenarioType(scenarioType);
|
||||
v2XHistoryScenarioData.setEventJsonDataHashCode(hashCode);
|
||||
|
||||
List<V2XHistoryScenarioData> historyScenarioData = getTargetScenarioHistoryData(v2XHistoryScenarioData);
|
||||
|
||||
v2XHistoryScenarioData.setEventJsonData(GsonUtil.jsonFromObject(markerExploreWay));
|
||||
v2XHistoryScenarioData.setTriggerTime(TimeUtils.getNowMills());
|
||||
v2XHistoryScenarioData.setDispose(false);
|
||||
|
||||
if (historyScenarioData != null && historyScenarioData.size() > 0) {
|
||||
// 更新数据
|
||||
V2XSQLiteUtils.getScenarioHistoryDao().update(historyScenarioData.get(0), v2XHistoryScenarioData);
|
||||
} else {
|
||||
// 存储新数据
|
||||
V2XSQLiteUtils.getScenarioHistoryDao().insert(v2XHistoryScenarioData);
|
||||
}
|
||||
//V2XEventPanelFragment.Companion.getInstance().changeEventCount();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当天的指定的V2X数据
|
||||
*/
|
||||
public static List<V2XHistoryScenarioData> getTargetScenarioHistoryData(V2XHistoryScenarioData scenarioData) {
|
||||
return getScenarioHistoryDao().query(scenarioData, "triggerTime", true);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,10 @@ import kotlinx.android.synthetic.main.view_marker_event_car.view.*
|
||||
*/
|
||||
class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
|
||||
ConstraintLayout(context) {
|
||||
val TAG = "V2XMarkerRoadEventView"
|
||||
|
||||
companion object{
|
||||
const val TAG = "V2XMarkerRoadEventView"
|
||||
}
|
||||
|
||||
init {
|
||||
initView(context, alarmInfo)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.voice;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
* e-mail : 1358506549@qq.com
|
||||
* date : 2020/4/21 4:47 PM
|
||||
* desc : 语音回调
|
||||
* version: 1.0
|
||||
*/
|
||||
public interface V2XVoiceCallbackListener {
|
||||
void onCallback(String command, Intent intent);
|
||||
}
|
||||
@@ -1,347 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.voice;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
* @Package: com.mogo.module.v2x
|
||||
* @ClassName: V2XVoiceConstants
|
||||
* @Description: V2X语音唤醒词常量
|
||||
* @Author: fenghl
|
||||
* @CreateDate: 2020/3/23 10:37
|
||||
* @UpdateUser: 更新者:
|
||||
* @UpdateDate: 2020/3/23 10:37
|
||||
* @UpdateRemark: 更新说明:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public class V2XVoiceConstants {
|
||||
/**
|
||||
* 免唤醒
|
||||
*/
|
||||
public static final Map<String, String[]> sVoiceCmds = new HashMap<>();
|
||||
/**
|
||||
* 查看前方实况
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_LIVE_ROAD = "com.zhidao.auxiliaryDriving.liveBroadcastAhead";
|
||||
/**
|
||||
* 关闭前方实况
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CLOSE_WINDOW = "com.zhidao.auxiliaryDriving.closeLiveBroadcast";
|
||||
/**
|
||||
* 下一条
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_NEXT = "com.zhidao.desk.next";
|
||||
/**
|
||||
* 和他通话
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CALL_CHATTING = "com.zhidao.onlinecar.chat";
|
||||
/**
|
||||
* 点赞
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_ZAN = "com.zhidao.thumsup";
|
||||
/**
|
||||
* 上报路况
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_REPORT = "com.zhidao.pathfinder.report.roadCondition";
|
||||
|
||||
/**
|
||||
* 取消求助
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CANCEL_HELP = "com.zhidao.auxiliaryDriving.cancelTroubleHelp";
|
||||
/**
|
||||
* 发起故障求助
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_SEEK_HELP = "com.zhidao.auxiliaryDriving.pubTroubleHelp";
|
||||
/**
|
||||
* 导航前往
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_NAVI = "com.zhidao.navi";
|
||||
/**
|
||||
* 分享
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_SHARE = "com.zhidao.share";
|
||||
/**
|
||||
* 确定
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_COMMON_CONFIRM = "com.zhidao.commin.confirm";
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_COMMON_CANCEL = "com.zhidao.commin.cancel";
|
||||
|
||||
/**
|
||||
* 呼叫前方车辆
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR = "com.zhidao.imdemo.chat.callFrontCar";
|
||||
|
||||
/**
|
||||
* 刷新直播车辆
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_REFRESH_CAR_LIVE = "com.zhidao.user.action.retry";
|
||||
|
||||
/**
|
||||
* 唤醒词:查看前车视频
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_AHEAD_LIVE = "com.zhidao.ahead.live";
|
||||
|
||||
/**
|
||||
* 唤醒词:查看周围路口直播
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CROSSROADS_LIVE = "com.zhidao.crossroads.live";
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 发起定向车聊聊
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP = "COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP_WORDS = {"和他通话", "和他聊天", "聊更多", "拨打电话", "联系他"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 点赞
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_ZAN_UN_WAKEUP = "COMMAND_V2X_TO_ZAN_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_ZAN_UN_WAKEUP_WORDS = {"感谢他", "感谢分享", "点个赞", "点赞"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 上报路况
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_REPORT_ROAD_UN_WAKEUP = "COMMAND_V2X_TO_REPORT_ROAD_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_REPORT_ROAD_UN_WAKEUP_WORDS = {"信息纠错", "路况纠错"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 发起车聊聊求助周边车友
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_SEEK_HELP_UN_WAKEUP = "COMMAND_V2X_TO_SEEK_HELP_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_SEEK_HELP_UN_WAKEUP_WORDS = {"故障求助", "发起故障求助"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 说取消求助,弹框显示
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP = "COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_CANCEL_FOR_HELP_WAKEUP_WORDS = {"取消故障求助", "关闭故障求助", "取消求助"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 帮助他,发起车聊聊
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_HELP_UN_WAKEUP = "COMMAND_V2X_TO_HELP_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_HELP_UN_WAKEUP_WORDS = {"帮助他"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 导航到POI信息点
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_NAVI_UN_WAKEUP = "COMMAND_V2X_TO_NAVI_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_NAVI_UN_WAKEUP_WORDS = {"导航前往", "开始导航", "开启导航", "好", "开始", "导航", "确定", "确认", "好的"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 取消导航
|
||||
*/
|
||||
public static final String COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP = "COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP_WORDS = {"取消","关闭","不要","不导航"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 调起分享流程
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_SHARE_UN_WAKEUP = "COMMAND_V2X_TO_SHARE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_SHARE_UN_WAKEUP_WORDS = {"上报油价", "我要分享"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 确定,打开路况详情,确定放弃求助
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_CONFIRM_UN_WAKEUP = "COMMAND_V2X_TO_CONFIRM_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_CONFIRM_UN_WAKEUP_WORDS = {"确认", "确定"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 取消,继续求助
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_CANCEL_UN_WAKEUP = "COMMAND_V2X_TO_CANCEL_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_CANCEL_UN_WAKEUP_WORDS = {"取消", "继续求助"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 关闭路况详情
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP = "COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP";
|
||||
public static final String[] COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP_WORDS = {"关闭", "关闭页面"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 反馈"正确"语音回调
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_FEEDBACK_TRUE = "COMMAND_V2X_TO_FEEDBACK_TRUE";
|
||||
public static final String[] COMMAND_V2X_TO_FEEDBACK_TRUE_WORDS = {"正确"};
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* 反馈"错误"语音回调
|
||||
*/
|
||||
public static final String COMMAND_V2X_TO_FEEDBACK_ERROR = "COMMAND_V2X_TO_FEEDBACK_ERROR";
|
||||
public static final String[] COMMAND_V2X_TO_FEEDBACK_ERROR_WORDS = {"错误"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* "呼叫前方车辆"语音回调
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_UN_WAKEUP_WORDS = {"呼叫前方车辆"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* "查看直播","查看实况"
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP_WORDS = {"查看直播", "查看实况"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* "关闭直播","关闭实况"
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CLOSE_LIVE_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_CLOSE_LIVE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_CLOSE_LIVE_UN_WAKEUP_WORDS = {"关闭直播", "关闭实况"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* "重新尝试","重试"
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP_WORDS = {"重新尝试", "重试"};
|
||||
|
||||
/**
|
||||
* 违章停车
|
||||
* 有用
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_YOUYONG_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_YOUYONG_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_YOUYONG_UN_WAKEUP_WORDS = {"有用"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
* "查看前车视频","查看前车直播","查看前车视角"
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_DEMO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_DEMO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_DEMO_UN_WAKEUP_WORDS = {"查看前车视频", "查看前车直播", "查看前车视角"};
|
||||
|
||||
/**
|
||||
* 应用内免唤醒
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_ROAD_CAMERA_LIVE_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_ROAD_CAMERA_LIVE_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_ROAD_CAMERA_LIVE_UN_WAKEUP_WORDS = {"查看路口实况", "查看路口直播", "查看路口视频"};
|
||||
|
||||
/**
|
||||
* 违章停车
|
||||
* 没用
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_MEIYONG_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_MEIYONG_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_MEIYONG_UN_WAKEUP_WORDS = {"没用"};
|
||||
|
||||
/**
|
||||
* 出行动态
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_HISTORY_EVENT_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_HISTORY_EVENT_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_HISTORY_EVENT_UN_WAKEUP_WORDS = {"出行动态"};
|
||||
|
||||
/**
|
||||
* 周边事件
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_SURROUNDING_EVENT_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_SURROUNDING_EVENT_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_SURROUNDING_EVENT_UN_WAKEUP_WORDS = {"周边事件"};
|
||||
|
||||
/**
|
||||
* 我的分享
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_SHEAR_EVENT_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_SHEAR_EVENT_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_SHEAR_EVENT_UN_WAKEUP_WORDS = {"我的分享"};
|
||||
|
||||
/**
|
||||
* 查看车辆信息
|
||||
*/
|
||||
public static final String COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP_UN_WAKEUP_WORDS = {"查看车辆信息"};
|
||||
|
||||
|
||||
/**
|
||||
* 用户UGC反馈免唤醒词语
|
||||
*/
|
||||
// 拥堵
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP_WORDS = {"拥堵", "很堵", "堵死了", "有点堵", "确定"};
|
||||
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP_WORDS = {"没注意", "不堵", "很畅通", "取消", "关闭"};
|
||||
|
||||
|
||||
// 封路
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP_WORDS = {"封路了", "封了", "封路", "有封路", "确定"};
|
||||
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP_WORDS = {"不封路", "没注意", "没看到", "没有", "没封路", "无封路", "取消", "关闭"};
|
||||
|
||||
|
||||
// 事故
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP_WORDS = {"有事故", "存在交通事故", "确定"};
|
||||
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP_WORDS = {"没注意", "没有事故", "无事故", "没看到", "没有", "取消", "关闭"};
|
||||
|
||||
|
||||
// 道路施工
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP_WORDS = {"有", "在施工", "有施工", "确定"};
|
||||
|
||||
public static final String COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP = "COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP";
|
||||
public static final String[] COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP_WORDS = {"没注意", "没看到", "没有施工", "无施工", "很正常", "取消", "关闭"};
|
||||
|
||||
//免唤醒词
|
||||
public static final String V2X_CONFIRM_ACTION = "V2X_CONFIRM_ACTION";
|
||||
public static final String[] UNWAKE_NAVI_CONFIRM = {"开始导航", "开启导航", "好的", "开始", "导航", "确定", "确认", "好"};
|
||||
|
||||
public static final String V2X_CANCLE_ACTION = "V2X_CANCLE_ACTION";
|
||||
public static final String[] UNWAKE_NAVI_CANCLE = {"取消", "关闭", "不要", "不导航"};
|
||||
|
||||
|
||||
static {
|
||||
// 免唤醒 默认
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP, COMMAND_V2X_TO_CHAT_MORE_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_NAVI_UN_WAKEUP, COMMAND_V2X_TO_NAVI_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP, COMMAND_V2X_CANCEL_NAVI_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_CONFIRM_UN_WAKEUP, COMMAND_V2X_TO_CONFIRM_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_CANCEL_UN_WAKEUP, COMMAND_V2X_TO_CANCEL_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_ZAN_UN_WAKEUP, COMMAND_V2X_TO_ZAN_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_REPORT_ROAD_UN_WAKEUP, COMMAND_V2X_TO_REPORT_ROAD_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP, COMMAND_V2X_TO_CLOSE_WINDOW_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_SEEK_HELP_UN_WAKEUP, COMMAND_V2X_TO_SEEK_HELP_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP, COMMAND_V2X_TO_CANCEL_FOR_HELP_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_HELP_UN_WAKEUP, COMMAND_V2X_TO_HELP_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_FEEDBACK_TRUE, COMMAND_V2X_TO_FEEDBACK_TRUE_WORDS);
|
||||
sVoiceCmds.put(COMMAND_V2X_TO_FEEDBACK_ERROR, COMMAND_V2X_TO_FEEDBACK_ERROR_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_LIVE_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_CLOSE_LIVE_UN_WAKEUP, COMMAND_ZHIDAO_V2X_CLOSE_LIVE_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP, COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_YOUYONG_UN_WAKEUP, COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_YOUYONG_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_MEIYONG_UN_WAKEUP, COMMAND_ZHIDAO_V2X_ILLEGAL_PARKMARKER_FEEDBACK_MEIYONG_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_HISTORY_EVENT_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_HISTORY_EVENT_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_SURROUNDING_EVENT_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_SURROUNDING_EVENT_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_SHEAR_EVENT_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_SHEAR_EVENT_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_CAR_INFO_UN_WAKEUP_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_YES_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_YONG_DU_NO_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_YES_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_FENG_LU_NO_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_YES_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GU_NO_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_YES_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_FEEDBACK_SHI_GONG_NO_UN_WAKEUP_WORDS);
|
||||
|
||||
sVoiceCmds.put(V2X_CONFIRM_ACTION, UNWAKE_NAVI_CONFIRM);
|
||||
sVoiceCmds.put(V2X_CANCLE_ACTION, UNWAKE_NAVI_CANCLE);
|
||||
|
||||
|
||||
//2020-6-24 顺义演示需求添加,现合并至launcher 更新时间:2020-08-25
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_DEMO_UN_WAKEUP, COMMAND_ZHIDAO_V2X_CALL_FRONT_CAR_DEMO_UN_WAKEUP_WORDS);
|
||||
sVoiceCmds.put(COMMAND_ZHIDAO_V2X_OPEN_ROAD_CAMERA_LIVE_UN_WAKEUP, COMMAND_ZHIDAO_V2X_OPEN_ROAD_CAMERA_LIVE_UN_WAKEUP_WORDS);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.voice
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.text.TextUtils
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener
|
||||
import com.mogo.commons.module.intent.IntentManager
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
*
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
* @Package: com.mogo.module.v2x.window
|
||||
* @ClassName: V2XVoiceManager
|
||||
* @Description: java类作用描述
|
||||
* @Author: fenghl
|
||||
* @CreateDate: 2020/3/23 13:08
|
||||
* @UpdateUser: 更新者:
|
||||
* @UpdateDate: 2020/3/23 13:08
|
||||
* @UpdateRemark: 更新说明:
|
||||
* @Version: 1.0
|
||||
*/
|
||||
object V2XVoiceManager : IMogoVoiceCmdCallBack, IMogoIntentListener {
|
||||
private val TAG = V2XVoiceManager.javaClass.simpleName
|
||||
private lateinit var mContext: WeakReference<Context>
|
||||
|
||||
// 记录,免唤醒和唤醒词及对应的回调
|
||||
private val voiceCallbackMap = ConcurrentHashMap<String, V2XVoiceCallbackListener>()
|
||||
|
||||
fun init(context: Context) {
|
||||
mContext = WeakReference(context)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun removeAllOnVoiceReceiveListener() {
|
||||
try {
|
||||
for (mutableEntry in voiceCallbackMap) {
|
||||
unRegisterWakeCmd(mutableEntry.key)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
// 注册唤醒词
|
||||
@Synchronized
|
||||
fun registerWakeCmd(cmd: String, callbackListener: V2XVoiceCallbackListener): V2XVoiceManager {
|
||||
try {
|
||||
unRegisterWakeCmd(cmd)
|
||||
voiceCallbackMap[cmd] = callbackListener
|
||||
IntentManager.getInstance().registerIntentListener(cmd, this)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
// 反注册唤醒词
|
||||
@Synchronized
|
||||
fun unRegisterWakeCmd(cmd: String): V2XVoiceManager {
|
||||
try {
|
||||
voiceCallbackMap.remove(cmd)
|
||||
IntentManager.getInstance().unregisterIntentListener(cmd, this)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
// 注册免唤醒词
|
||||
@Synchronized
|
||||
fun registerUnWakeVoice(
|
||||
cmd: String,
|
||||
callbackListener: V2XVoiceCallbackListener
|
||||
): V2XVoiceManager {
|
||||
try {
|
||||
if (!TextUtils.isEmpty(cmd)) {
|
||||
try {
|
||||
unRegisterUnWakeVoice(cmd)
|
||||
mContext.get()?.let {
|
||||
voiceCallbackMap[cmd] = callbackListener
|
||||
AIAssist.getInstance(it)
|
||||
.registerUnWakeupCommand(cmd, V2XVoiceConstants.sVoiceCmds[cmd], this)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
// 反注册面唤醒词
|
||||
@Synchronized
|
||||
fun unRegisterUnWakeVoice(cmd: String): V2XVoiceManager {
|
||||
try {
|
||||
if (!TextUtils.isEmpty(cmd)) {
|
||||
try {
|
||||
mContext.get()?.let {
|
||||
voiceCallbackMap.remove(cmd)
|
||||
AIAssist.getInstance(it).unregisterUnWakeupCommand(cmd, this)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
override fun onIntentReceived(command: String?, intent: Intent?) {
|
||||
voiceCallbackMap[command]?.onCallback(command, intent)
|
||||
}
|
||||
|
||||
override fun onCmdSelected(cmd: String?) {
|
||||
voiceCallbackMap[cmd]?.onCallback(cmd, null)
|
||||
}
|
||||
|
||||
override fun onSpeakEnd(speakText: String?) {
|
||||
|
||||
}
|
||||
|
||||
override fun onCmdAction(speakText: String?) {}
|
||||
|
||||
override fun onCmdCancel(speakText: String?) {}
|
||||
|
||||
override fun onSpeakSelectTimeOut(speakText: String?) {}
|
||||
|
||||
}
|
||||
@@ -4,29 +4,30 @@ import android.util.Log
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_IVP_GREEN
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrentRoadTrafficLight
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.util.LocationUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.floor
|
||||
@@ -34,7 +35,7 @@ import kotlin.math.min
|
||||
|
||||
|
||||
class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
IMoGoMapLocationListener {
|
||||
IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
private var vip: Boolean = false
|
||||
|
||||
@@ -44,7 +45,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
// 是否已进入到路口(停止线处)
|
||||
private var isEnter = false
|
||||
|
||||
private var mLocation: MogoLocation? = null
|
||||
private var mLocation: MessagePad.GnssInfo? = null
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -84,7 +85,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
|
||||
fun listenTrafficLight() {
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
CallerMapLocationListenerManager.addListener(TAG, this, false)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallVipSetListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
@@ -100,7 +101,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
// 路口100m闯红灯预警
|
||||
mLocation?.let {
|
||||
// 单位m/s
|
||||
val speed = it.speed
|
||||
val speed = it.vehicleSpeed
|
||||
// 车停止或者速度非常慢,可能返回负数或者很小的值,需要过滤
|
||||
CallerLogger.d("$M_V2X$TAG", "speed is:$speed")
|
||||
if (speed <= 2.5f) return// 小于等于9km/h不处理
|
||||
@@ -208,9 +209,11 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
|
||||
V2XMsg(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.content,
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.tts)
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP.tts
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
@@ -246,9 +249,11 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
V2XMsg(
|
||||
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
|
||||
content,
|
||||
tts)
|
||||
tts
|
||||
)
|
||||
)
|
||||
)
|
||||
CallerHmiManager.warningV2X(
|
||||
@@ -270,11 +275,11 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
fun onDestroy() {
|
||||
CallVipSetListenerManager.removeListener(TAG)
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
CallerMapLocationListenerManager.removeListener(TAG,false)
|
||||
CallerMapLocationListenerManager.removeListener(TAG, false)
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location?.let {
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
|
||||
gnssInfo?.let {
|
||||
mLocation = it
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,9 @@ import static com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.V2I;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallLimitingVelocityListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -18,16 +17,18 @@ import com.zhjt.service_biz.BizConfig;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* 限速
|
||||
*
|
||||
* @author mogoauto
|
||||
*/
|
||||
public class SpeedLimitDataManager implements IMoGoMapLocationListener {
|
||||
public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
private final static String TAG = "SpeedLimitDataManager";
|
||||
private static SpeedLimitDataManager instance;
|
||||
private MogoLocation mLocation;
|
||||
private MessagePad.GnssInfo mLocation;
|
||||
|
||||
private SpeedLimitDataManager() {
|
||||
}
|
||||
@@ -44,8 +45,8 @@ public class SpeedLimitDataManager implements IMoGoMapLocationListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
mLocation = location;
|
||||
public void onChassisLocationGCJ02(@Nullable MessagePad.GnssInfo gnssInfo) {
|
||||
mLocation = gnssInfo;
|
||||
}
|
||||
|
||||
private class SpeedTimerTask extends TimerTask {
|
||||
@@ -61,7 +62,7 @@ public class SpeedLimitDataManager implements IMoGoMapLocationListener {
|
||||
@BizConfig(biz = V2I, dependentBizNode = "", bizNode = BIZ_SLW)
|
||||
private void getSpeedLimit() {
|
||||
if (!isShowObuLimitSpeedView) {
|
||||
int speedLimit = CallerMapUIServiceManager.INSTANCE.getMapUIController().getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), mLocation.getBearing());
|
||||
int speedLimit = CallerMapUIServiceManager.INSTANCE.getMapUIController().getLimitSpeed(mLocation.getLongitude(), mLocation.getLatitude(), (float) mLocation.getHeading());
|
||||
UiThreadHandler.post(() -> {
|
||||
if (speedLimit > 0) {
|
||||
CallerHmiManager.INSTANCE.showLimitingVelocity(speedLimit);
|
||||
@@ -73,7 +74,7 @@ public class SpeedLimitDataManager implements IMoGoMapLocationListener {
|
||||
}
|
||||
|
||||
public void start() {
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this, false);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
Timer mTimer = new Timer();
|
||||
mTimer.schedule(new SpeedTimerTask(), 3000, 1000);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,9 @@ package com.mogo.eagle.core.function.v2x.trafficlight.core
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.TrafficLightHMIManager
|
||||
@@ -17,8 +16,9 @@ import com.mogo.eagle.core.function.v2x.trafficlight.core.TrafficLightThreadHand
|
||||
import com.mogo.eagle.core.function.v2x.trafficlight.network.TrafficLightNetWorkModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -31,7 +31,7 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val trafficLightNetWorkModel = TrafficLightNetWorkModel()
|
||||
private var mLocation: MogoLocation? = null
|
||||
private var mLocation: MessagePad.GnssInfo? = null
|
||||
private var roadIDResult: RoadIDResult? = null
|
||||
private var trafficLightResult: TrafficLightResult? = null
|
||||
|
||||
@@ -42,7 +42,7 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
|
||||
fun initServer(context: Context) {
|
||||
mContext = context
|
||||
CallerMapLocationListenerManager.addListener(TAG, this, false)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
mThreadHandler =
|
||||
TrafficLightThreadHandler(Looper.getMainLooper(), {
|
||||
//第一次查询路口时,如果红绿灯显示,则隐藏掉
|
||||
@@ -55,7 +55,7 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
val tileId = CallerMapUIServiceManager.getMapUIController()
|
||||
?.getTileId(it.longitude, it.latitude) ?: 0
|
||||
trafficLightNetWorkModel.requestRoadID(
|
||||
tileId, it.latitude, it.longitude, it.bearing.toDouble(),
|
||||
tileId, it.latitude, it.longitude, it.heading,
|
||||
{
|
||||
mThreadHandler?.sendEmptyMessage(MSG_WHAT_STOP_SEARCH_CROSS_ROAD)
|
||||
roadIDResult = it
|
||||
@@ -75,7 +75,7 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
val road =
|
||||
if (roadIDResult?.rsCrossId.isNullOrBlank()) "" else roadIDResult?.rsCrossId
|
||||
trafficLightNetWorkModel.requestTrafficLight(
|
||||
it.latitude, it.longitude, it.bearing.toDouble(), road, { result ->
|
||||
it.latitude, it.longitude, it.heading, road, { result ->
|
||||
trafficLightResult = result
|
||||
// TrafficLightHMIManager.INSTANCE.updateTrafficLight(result)
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightStatus(result)
|
||||
@@ -173,13 +173,6 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
)
|
||||
}
|
||||
|
||||
override fun onLocationChanged(location: MogoLocation?, from: Int, isGps: Boolean) {
|
||||
location?.let {
|
||||
mLocation = it
|
||||
checkOutOfRange()
|
||||
}
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
mThreadHandler = null
|
||||
mContext = null
|
||||
@@ -187,5 +180,12 @@ class MogoTrafficLightManager : IMoGoMapLocationListener {
|
||||
trafficLightResult = null
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
|
||||
gnssInfo?.let {
|
||||
mLocation = it
|
||||
checkOutOfRange()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,14 +2,12 @@ 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 class BindingCarInfo extends BaseData {
|
||||
public CarInfo data;
|
||||
|
||||
public CarInfo getData() {
|
||||
@@ -5,12 +5,12 @@ package com.mogo.eagle.core.data.bindingcar;
|
||||
* @description
|
||||
* @since: 11/15/21
|
||||
*/
|
||||
public class BindingcarRequest {
|
||||
public class BindingCarRequest {
|
||||
private String mac;
|
||||
private String sn;
|
||||
private int type;
|
||||
|
||||
public BindingcarRequest(String mac, String sn, int type) {
|
||||
public BindingCarRequest(String mac, String sn, int type) {
|
||||
this.mac = mac;
|
||||
this.sn = sn;
|
||||
this.type = type;
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.mogo.eagle.core.data.bindingcar;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description
|
||||
* @since 6/21/22
|
||||
*/
|
||||
public class IdInfo implements Serializable {
|
||||
private long timestamp;
|
||||
private String date;
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.mogo.eagle.core.data.v2x
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
/**
|
||||
* 路口碰撞预警、盲区预警等通用Bean
|
||||
*/
|
||||
@Keep
|
||||
data class AdvanceWarningBean(
|
||||
var objectId: String,// 物体唯一标识
|
||||
var objectType: Int,// 物体类型 1-人 2-自行车 3-小轿车 4-摩托车 5-红绿灯 6-bus 8-truck 9-路边摄像头
|
||||
var status: Int,// 1.add 2.update 3.delete
|
||||
var typeId: Int,// 首位大类标识 1预警 2规划 3拥堵 4事故
|
||||
var time: Long,
|
||||
var level: Int,// 预警等级
|
||||
var threatLevel: Int,// 危险等级:0保留,1模型原始颜色,2通知--黄,3警告--红
|
||||
var position: Position,
|
||||
var heading: Double,
|
||||
var speed: Double,
|
||||
var distance: Double,
|
||||
var roadId: String,// 道路id
|
||||
var laneId: String,// 车道id
|
||||
var laneNum: Int,// 车道号:中心线编号为0, 中心线右侧编号为负数,3车道通行Road的车道编号,0,-1,-2,-3
|
||||
var gdLocusList: List<Position>,// 线性经纬度轨迹列表(高德)
|
||||
var locusList: List<Position>// 轨迹列表(Wgs84坐标系)
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class Position(var lat: Double, var lon: Double)
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.model;
|
||||
package com.mogo.eagle.core.data.v2x;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
package com.mogo.eagle.core.data.v2x;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.entity.net;
|
||||
package com.mogo.eagle.core.data.v2x;
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
|
||||
@@ -93,8 +93,8 @@ WEBSOCKET_VERSION=1.1.7
|
||||
applicationId=com.mogo.launcer
|
||||
applicationName=IntelligentPilot
|
||||
# RoboBus司机端:2.5.1;RoboTaxi司机端:2.5.1;RoboTaxi乘客端:1.0.0
|
||||
versionCode=2130000
|
||||
versionName=2.13.0
|
||||
versionCode=3000000
|
||||
versionName=3.0.0
|
||||
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_HMI_VERSION=0.0.58.10
|
||||
|
||||
Reference in New Issue
Block a user