Merge branch 'release_robobus-d_230413_3.1.0.1'
# Conflicts: # OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/fragment/BusFragment.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/SweeperProvider.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/fragment/SweeperFragment.java # core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/AppIdentityModeUtils.kt # gradle.properties
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
# 网约车(Online Car Hailing)
|
||||
1. mogo-och-bus:Bus司机端(Bus)
|
||||
2. mogo-och-bus-passenger:Bus乘客端(BusPassenger)
|
||||
3. mogo-och-taxi:Taxi司机端(Taxi)
|
||||
4. mogo-och-taxi-passenger:Taxi乘客端(TaxiPassenger)
|
||||
5. mogo-och-noop:空实现,用于独立鹰眼打包
|
||||
6. mogo-och-sweeper: 清扫车(Sweeper)
|
||||
1. mogo-och-bus: 公交车模式司机端
|
||||
2. mogo-och-bus-passenger: 公交车模式乘客端
|
||||
3. mogo-och-charter 包车模式司机端
|
||||
4. mogo-och-charter-passenger 包车模式乘客端
|
||||
5. mogo-och-common-module 公用代码
|
||||
6. mogo-och-data 数据
|
||||
7. mogo-och-noop: 空实现,用于独立鹰眼打包
|
||||
8. mogo-och-shuttle 接驳模式司机端
|
||||
9. mogo-och-shuttle-passenger 接驳模式乘客屏
|
||||
10. mogo-och-sweeper: 清扫车
|
||||
11. mogo-och-taxi: 出租车模式司机端
|
||||
12. mogo-och-taxi-passenger: 出租车乘客端
|
||||
@@ -30,6 +30,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
@@ -48,17 +52,6 @@ android {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '0'
|
||||
}
|
||||
// 车型:金旅m1 小巴业务
|
||||
m1 {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '1'
|
||||
}
|
||||
|
||||
// 车型:金旅m1 小巴业务
|
||||
m2 {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
@@ -77,14 +78,23 @@ public class MogoOCHBusPassenger implements IMogoOCH {
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
if (mPassengerFragment == null) {
|
||||
FragmentManager supportFragmentManager = mActivity.getSupportFragmentManager();
|
||||
if(mPassengerFragment == null){
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "准备add fragment======");
|
||||
mPassengerFragment = new BusPassengerRouteFragment();
|
||||
mActivity.getSupportFragmentManager().beginTransaction().add(mContainerId, mPassengerFragment).commitAllowingStateLoss();
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(BusPassengerRouteFragment.TAG);
|
||||
if (fragmentByTag instanceof BusPassengerRouteFragment){
|
||||
mPassengerFragment = (BusPassengerRouteFragment)fragmentByTag;
|
||||
}else {
|
||||
mPassengerFragment = new BusPassengerRouteFragment();
|
||||
}
|
||||
if (!mPassengerFragment.isAdded()){
|
||||
supportFragmentManager.beginTransaction().add(mContainerId, mPassengerFragment,BusPassengerRouteFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "准备show fragment");
|
||||
mActivity.getSupportFragmentManager().beginTransaction().show(mPassengerFragment).commitAllowingStateLoss();
|
||||
supportFragmentManager.beginTransaction().show(mPassengerFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
private void hideFragment(){
|
||||
|
||||
@@ -4,8 +4,6 @@ import com.amap.api.maps.model.LatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* Created on 2022/3/31
|
||||
*/
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.constant
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun getBaseUrl(): String {
|
||||
return if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
OchCommonConst.getShuttleUrl()
|
||||
}else{
|
||||
OchCommonConst.getBaseUrl()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,14 +27,19 @@ 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.telematic.IReceivedMsgListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
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;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
@@ -50,9 +55,16 @@ import com.mogo.och.bus.passenger.callback.IBusPassengerRouteLineInfoCallback;
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.bus.passenger.network.BusPassengerModelLoopManager;
|
||||
import com.mogo.och.bus.passenger.network.BusPassengerServiceManager;
|
||||
import com.mogo.och.common.module.bean.dpmsg.AppConnectMsg;
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg;
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType;
|
||||
import com.mogo.och.common.module.bean.dpmsg.LoginCacheStatus;
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager;
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback;
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -283,6 +295,9 @@ public class BusPassengerModel {
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
|
||||
//监听司机端消息
|
||||
CallerTelematicListenerManager.INSTANCE.addListener(TAG,mReceivedMsgListener);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext);
|
||||
}
|
||||
|
||||
@@ -297,10 +312,31 @@ public class BusPassengerModel {
|
||||
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener);
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
CallerTelematicListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors();
|
||||
}
|
||||
|
||||
private final IReceivedMsgListener mReceivedMsgListener = new IReceivedMsgListener() {
|
||||
@Override
|
||||
public void onReceivedMsg(int type, @NonNull byte[] byteArray) {
|
||||
if (OchCommonConst.BUSINESS_STRING == type){
|
||||
|
||||
BaseDPMsg baseMsg = GsonUtils.fromJson(new String(byteArray), BaseDPMsg.class);
|
||||
Logger.d(SceneConstant.M_BUS_P+TAG,"onReceivedMsg = "+GsonUtils.toJson(baseMsg));
|
||||
|
||||
if (baseMsg != null && baseMsg.getType() == DPMsgType.TYPE_COMMON.getType()){
|
||||
AppConnectMsg msg = GsonUtils.fromJson(new String(byteArray), AppConnectMsg.class);
|
||||
if (msg.isViewShow()){ //消息盒子显示内容
|
||||
OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(
|
||||
DateTimeUtil.getCurrentTimeStamp(),msg.getMsg(),
|
||||
OCHSocketMessageManager.OPERATION_SYSTEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//监听网络变化,避免启动机器时无网导致无法更新订单信息
|
||||
private final IMogoIntentListener mNetWorkIntentListener = new IMogoIntentListener() {
|
||||
@Override
|
||||
@@ -511,11 +547,7 @@ public class BusPassengerModel {
|
||||
}
|
||||
|
||||
public int getAverageSpeed(){
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
return BusPassengerConst.SHUTTLE_AVERAGE_SPEED;
|
||||
}else {
|
||||
return BusPassengerConst.BUS_AVERAGE_SPEED;
|
||||
}
|
||||
return BusPassengerConst.BUS_AVERAGE_SPEED;
|
||||
}
|
||||
|
||||
public void startRemainRouteInfo() {
|
||||
|
||||
@@ -4,13 +4,10 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.getServerToken
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerRoutesResponse
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.och.bus.passenger.constant.URLConst.Companion.getBaseUrl
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.biz.network.OchCommonSubscribeImpl
|
||||
import com.mogo.och.common.module.biz.network.interceptor.transformTry
|
||||
@@ -22,17 +19,15 @@ object BusPassengerServiceManager {
|
||||
|
||||
private var driverSnCache = ""
|
||||
|
||||
private var mShuttleBusPassengerServiceApi =
|
||||
MoGoRetrofitFactory.getInstance(getBaseUrl()).create(ShettlePassengerServiceApi::class.java)
|
||||
private var mBusPassengerServiceApi =
|
||||
MoGoRetrofitFactory.getInstance(getBaseUrl()).create(PassengerServiceApi::class.java)
|
||||
MoGoRetrofitFactory.getInstance(OchCommonConst.getBaseUrl()).create(PassengerServiceApi::class.java)
|
||||
|
||||
/**
|
||||
* 获取Bus司机端的sn
|
||||
* @return
|
||||
*/
|
||||
val driverAppSn: String
|
||||
get(){
|
||||
get() {
|
||||
val serverToken = getServerToken()
|
||||
if (serverToken != driverSnCache && serverToken.isNotEmpty()) {
|
||||
driverSnCache = serverToken
|
||||
@@ -49,25 +44,14 @@ object BusPassengerServiceManager {
|
||||
fun queryDriverSiteByCoordinate(
|
||||
context: Context, callback: OchCommonServiceCallback<BusPassengerRoutesResponse>?
|
||||
) {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
mShuttleBusPassengerServiceApi.queryDriverSiteByCoordinate(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusPassengerQueryLineRequest(
|
||||
driverAppSn
|
||||
)
|
||||
).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate"))
|
||||
} else {
|
||||
mBusPassengerServiceApi.queryDriverSiteByCoordinate(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusPassengerQueryLineRequest(
|
||||
driverAppSn
|
||||
)
|
||||
).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate"))
|
||||
}
|
||||
mBusPassengerServiceApi.queryDriverSiteByCoordinate(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
BusPassengerQueryLineRequest(
|
||||
driverAppSn
|
||||
)
|
||||
).transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate"))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,22 +64,12 @@ object BusPassengerServiceManager {
|
||||
context: Context,
|
||||
callback: OchCommonServiceCallback<BusPassengerOperationStatusResponse>?
|
||||
) {
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
mShuttleBusPassengerServiceApi.queryDriverOperationStatus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
driverAppSn
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverOperationStatus"))
|
||||
} else {
|
||||
mBusPassengerServiceApi.queryDriverOperationStatus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
driverAppSn
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverOperationStatus"))
|
||||
}
|
||||
mBusPassengerServiceApi.queryDriverOperationStatus(
|
||||
MoGoAiCloudClientConfig.getInstance().serviceAppId,
|
||||
MoGoAiCloudClientConfig.getInstance().token,
|
||||
driverAppSn
|
||||
)
|
||||
.transformTry()
|
||||
.subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverOperationStatus"))
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class BusPassengerRouteFragment extends
|
||||
BusPassengerBaseFragment<BusPassengerRouteFragment, BaseBusPassengerPresenter>
|
||||
implements IBusPassengerMapViewCallback {
|
||||
|
||||
private final String TAG = "BusPassengerRouteFragment";
|
||||
public static final String TAG = "BusPassengerRouteFragment";
|
||||
|
||||
private final List<BusPassengerStation> mStationsList = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -161,4 +161,13 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.BusPassengerMsgBoxBubbleView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginRight="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -9,5 +9,5 @@
|
||||
<string name="bus_p_cur_next_station_title">下一站:</string>
|
||||
<string name="bus_p_cur_station_title_init">始发站:</string>
|
||||
<string name="bus_p_cur_station_arrived_tip">请携带好随身物品下车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐蘑菇车联自动驾驶车。</string>
|
||||
<string name="bus_p_cur_station_arrived_tip_init">欢迎乘坐\'蘑菇车联\'自动驾驶车。</string>
|
||||
</resources>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,234 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui.video
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
|
||||
import com.mogo.och.bus.passenger.ui.widget.video.RotationItem
|
||||
import kotlinx.android.synthetic.m2.p_m2_video_fragment.*
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/4/12
|
||||
*/
|
||||
class PM2VideoFragment :
|
||||
MvpFragment<PM2VideoFragment?, PM2VideoPresenter?>() {
|
||||
|
||||
private var arrayListOf = mutableListOf<RotationItem>()
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.p_m2_video_fragment
|
||||
}
|
||||
|
||||
|
||||
override fun createPresenter(): PM2VideoPresenter {
|
||||
return PM2VideoPresenter(this)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = PM2VideoFragment::class.java.simpleName
|
||||
}
|
||||
|
||||
override fun getTagName(): String {
|
||||
return TAG
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
initResourceData()
|
||||
imageVideoRotationView.setData(arrayListOf)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
imageVideoRotationView.setPause()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
imageVideoRotationView.setResume()
|
||||
}
|
||||
|
||||
private fun initResourceData() {
|
||||
arrayListOf.clear()
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1678946244305/dalim2.mp4",
|
||||
1,
|
||||
"",
|
||||
"1"
|
||||
)
|
||||
)
|
||||
// if (BuildConfig.FLAVOR.contains("dali")){ //大理 目前还都使用的mogo 的cos https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1678932482045/1080%2A565%20.mp4",
|
||||
// 1,
|
||||
// "",
|
||||
// "1"
|
||||
// )
|
||||
// )
|
||||
// }else if (BuildConfig.FLAVOR.contains("yantai")){ //烟台
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "1"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
// 0,
|
||||
// "",
|
||||
// "2"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
// "3"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "4"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// "5"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// "6"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "7"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "8"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
// 0,
|
||||
// "",
|
||||
// "9"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
// "10"
|
||||
// )
|
||||
// )
|
||||
// }else{ // mogo
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "1"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
// 0,
|
||||
// "",
|
||||
// "2"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
// "3"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "4"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// "5"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
// "6"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "7"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
// 0,
|
||||
// "",
|
||||
// "8"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
// 0,
|
||||
// "",
|
||||
// "9"
|
||||
// )
|
||||
// )
|
||||
// arrayListOf.add(
|
||||
// RotationItem(
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
// 1,
|
||||
// "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
// "10"
|
||||
// )
|
||||
// )
|
||||
// }
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui.widget.video
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/6
|
||||
* type:0 图片
|
||||
* type:1 视频
|
||||
*/
|
||||
data class RotationItem(var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB |
@@ -1,235 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_driving_selector">
|
||||
|
||||
<!-- 全览地图带站点-->
|
||||
<com.mogo.eagle.core.function.view.OverMapView
|
||||
android:id="@+id/overMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/m2_over_map_style_path"
|
||||
app:isClearArrived="true"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:carDrawable = "@drawable/m2_map_car_icon"
|
||||
app:startPointDrawable="@drawable/m2_map_start_icon"
|
||||
app:endPointDrawable="@drawable/m2_map_end_icon"
|
||||
app:leftPadding="400"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_drive_bg"
|
||||
android:layout_width="@dimen/dp_350"
|
||||
android:layout_height="@dimen/dp_210"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/img_drive_bg"/>
|
||||
|
||||
<!-- 行车卡片-->
|
||||
<TextView
|
||||
android:id="@+id/speed_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/m2_p_speed_tv_color"
|
||||
android:textSize="@dimen/dp_56"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
|
||||
android:layout_marginLeft="@dimen/dp_48"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_drive_bg"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:textColor="@color/m2_line_during_tv_color"
|
||||
android:text="@string/m2_p_speed_unit_txt"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/speed_tv"
|
||||
app:layout_constraintLeft_toRightOf="@+id/speed_tv" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/auto_tv"
|
||||
android:layout_width="@dimen/dp_66"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:background="@drawable/bg_p_m2_auto"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="@string/m2_p_auto_tv"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/m2_button_auto_tv_color"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/speed_tv" />
|
||||
|
||||
<!-- 转向灯 IMoGoChassisLamplightListener-->
|
||||
<com.mogo.och.bus.passenger.ui.widget.M2TurnLightView
|
||||
android:id="@+id/turn_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toRightOf="@+id/auto_tv"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_tv"
|
||||
app:visible="true"
|
||||
app:day_light_mode="true"/>
|
||||
|
||||
<!-- 红绿灯-->
|
||||
<com.mogo.och.bus.passenger.ui.widget.M2PTrafficLightView
|
||||
android:id="@+id/traffic_light_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
app:layout_constraintLeft_toRightOf="@+id/turn_light_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/auto_tv" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_line_bg"
|
||||
android:layout_width="@dimen/dp_350"
|
||||
android:layout_height="@dimen/dp_210"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/auto_tv"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/img_line_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_line_location_bg"
|
||||
android:layout_width="@dimen/dp_77"
|
||||
android:layout_height="@dimen/dp_96"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:scaleType="fitXY"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_line_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_line_bg"
|
||||
app:layout_constraintRight_toRightOf="@+id/img_line_bg"
|
||||
android:src="@drawable/m2_line_location_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/station_name_title_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/m2_p_station_title_tv"
|
||||
android:textSize="@dimen/dp_18"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_line_location_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_next_tv_color"/>
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/station_name_tv"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
app:customGap="0.2"
|
||||
app:useCustomGap="true"
|
||||
android:text="@string/m2_p_empty_tv"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/station_name_title_tv"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_line_name_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/remain_mt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/m2_p_empty_remain_km_minute"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_line_location_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_next_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/img_time_bg"
|
||||
android:layout_width="@dimen/dp_350"
|
||||
android:layout_height="@dimen/dp_210"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/remain_mt"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/img_drive_bg"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/img_time_bg"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/dashed_line"
|
||||
android:layout_width="@dimen/dp_251"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:background="@drawable/bg_dashed_line"
|
||||
android:layout_marginTop="@dimen/dp_104"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/speed_tv"
|
||||
app:layout_constraintEnd_toEndOf="@+id/img_line_location_bg"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_line_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/m2_p_no_line"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dashed_line"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_next_tv_color"/>
|
||||
|
||||
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/line_name_tv"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
app:customGap="0.2"
|
||||
app:useCustomGap="true"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_time_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_line_name_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/line_during_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textSize="@dimen/dp_16"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/line_name_tv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/line_name_tv"
|
||||
android:textColor="@color/m2_line_during_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_time_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold"
|
||||
android:text="--"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dashed_line"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/speed_tv"
|
||||
android:textColor="@color/m2_current_time_tv_color"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_weekday_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toRightOf="@+id/current_time_tv"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/current_time_tv"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:text="--"
|
||||
android:textColor="@color/m2_text_time_tv_color"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 行车卡片--><!-- 全览地图带站点-->
|
||||
<FrameLayout
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_percent="0.295"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<!-- 高精地图-->
|
||||
<FrameLayout
|
||||
android:id="@+id/hd_map_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_percent="0.415"
|
||||
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
|
||||
<!-- 图片或视频广告-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/video_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintHeight_percent="0.290"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 高精地图 -->
|
||||
|
||||
<com.mogo.eagle.core.function.view.MapBizView
|
||||
android:id="@+id/mapBizView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 消息盒子气泡-->
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
||||
android:id="@+id/box_bubble_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginLeft="@dimen/dp_26"/>
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:id="@+id/pnc_actions_view"
|
||||
android:layout_width="@dimen/dp_231"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:background_resource="@drawable/bg_pnc" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -28,6 +28,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
|
||||
@@ -8,6 +8,7 @@ package com.mogo.och.bus.bean;
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String nameKr;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
@@ -21,6 +22,10 @@ public class BusStationBean {
|
||||
private int status;
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
|
||||
public String getNameKr() {
|
||||
return nameKr;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.bus.constant
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -581,11 +581,12 @@ public class OrderModel {
|
||||
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation, String nextStation) {
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation,
|
||||
String nextStation, String nextStationKr) {
|
||||
|
||||
onStartAutopilot(leaveIndex);
|
||||
|
||||
leaveTTSTips(nextStation);
|
||||
leaveTTSTips(nextStation,nextStationKr);
|
||||
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
@@ -657,6 +658,7 @@ public class OrderModel {
|
||||
}
|
||||
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
|
||||
String arriveStation = stationList.get(arrivedStationIndex).getName();
|
||||
String arriveStationKr = stationList.get(arrivedStationIndex).getNameKr();
|
||||
String departureStopName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "arriveSiteStation-currentStationIndex = " + arrivedStationIndex);
|
||||
|
||||
@@ -672,7 +674,8 @@ public class OrderModel {
|
||||
queryBusRoutes();
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr);
|
||||
}
|
||||
//5s轮询核销乘客
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
@@ -701,7 +704,8 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName, String arriveStation) {
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName,
|
||||
String arriveStation, String arriveStationKr) {
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
if (arrivedStationIndex == busRoutesResult.getSites().size() - 1) {
|
||||
@@ -714,7 +718,7 @@ public class OrderModel {
|
||||
, arriveStation
|
||||
, isLastStop);
|
||||
}
|
||||
VoiceManager.INSTANCE.arrivedStation(arriveStation);
|
||||
VoiceManager.INSTANCE.arrivedStationBus(arriveStation,arriveStationKr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -723,11 +727,14 @@ public class OrderModel {
|
||||
public void leaveStation() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "leaveStation-backgroundCurrentStationIndex = " + backgroundCurrentStationIndex);
|
||||
String nextStationName = "";
|
||||
String nextStationNameKr = "";
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
nextStationName = stationList.get(backgroundCurrentStationIndex + 1).getName();
|
||||
nextStationNameKr = stationList.get(backgroundCurrentStationIndex + 1).getNameKr();
|
||||
}
|
||||
final String currentStationName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
String finalNextStationName = nextStationName;
|
||||
String finalNextStationNameKr = nextStationNameKr;
|
||||
OrderServiceManager.leaveStation(mContext,
|
||||
stationList.get(backgroundCurrentStationIndex).getSeq(),
|
||||
stationList.get(backgroundCurrentStationIndex).getSiteId(),
|
||||
@@ -740,7 +747,8 @@ public class OrderModel {
|
||||
//需要更改当前站和下一站的状态 然后渲染
|
||||
//startOrStopQueryPassengerWriteOff(false);
|
||||
queryBusRoutes();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName, finalNextStationName);
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr);
|
||||
}
|
||||
|
||||
|
||||
@@ -765,12 +773,12 @@ public class OrderModel {
|
||||
}
|
||||
|
||||
//车站10s后播报
|
||||
private void leaveTTSTips(String nextStation) {
|
||||
private void leaveTTSTips(String nextStation,String nextStationKr) {
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
VoiceManager.INSTANCE.leaveStation(nextStation);
|
||||
VoiceManager.INSTANCE.leaveStationBus(nextStation,nextStationKr);
|
||||
}
|
||||
},DELAY_10S);
|
||||
}
|
||||
@@ -1041,7 +1049,7 @@ public class OrderModel {
|
||||
}
|
||||
|
||||
private void ttsEndTask() {
|
||||
VoiceManager.INSTANCE.endOrder();
|
||||
VoiceManager.INSTANCE.endOrderBus();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询核销乘客
|
||||
@@ -21,4 +24,150 @@ public class BusWriteOffPassengersQueryRequest {
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/19
|
||||
*/
|
||||
public static class BusOrdersResponse extends BaseData {
|
||||
public com.mogo.och.bus.bean.BusOrdersResponse.Result data;
|
||||
public static class Result{
|
||||
public List<BusOrderBean> orders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusOrdersResponse{" +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口请求响应结果
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public static class BusRoutesResponse extends BaseData {
|
||||
private BusRoutesResult data;
|
||||
|
||||
public BusRoutesResult getResult() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setResult(BusRoutesResult data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusRoutesResponse{" +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public static class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private boolean leaving;
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
public double getGcjLat() {
|
||||
return gcjLat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public int getDrivingStatus() {
|
||||
return drivingStatus;
|
||||
}
|
||||
|
||||
public boolean isLeaving() {
|
||||
return leaving;
|
||||
}
|
||||
|
||||
public void setSiteId(int siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public void setGcjLon(double gcjLon) {
|
||||
this.gcjLon = gcjLon;
|
||||
}
|
||||
|
||||
public void setGcjLat(double gcjLat) {
|
||||
this.gcjLat = gcjLat;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public void setDrivingStatus(int drivingStatus) {
|
||||
this.drivingStatus = drivingStatus;
|
||||
}
|
||||
|
||||
public void setLeaving(boolean leaving) {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusStationBean{" +
|
||||
"siteId=" + siteId +
|
||||
", name='" + name + '\'' +
|
||||
", seq=" + seq +
|
||||
", gcjLon=" + gcjLon +
|
||||
", gcjLat=" + gcjLat +
|
||||
", lon=" + lon +
|
||||
", lat=" + lat +
|
||||
", drivingStatus=" + drivingStatus +
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.och.bus.fragment;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -14,7 +14,9 @@ import androidx.constraintlayout.widget.Group;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.temp.EventLogout;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
@@ -37,6 +39,8 @@ import com.mogo.och.common.module.biz.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.utils.BlinkAnimationUtil;
|
||||
import com.mogo.och.common.module.utils.OCHThreadPoolManager;
|
||||
import com.mogo.och.common.module.utils.QRUtilsKt;
|
||||
import com.mogo.och.common.module.wigets.BindQRCodeDialog;
|
||||
import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
import com.mogo.och.common.module.wigets.OCHCommitDialog;
|
||||
|
||||
@@ -46,7 +50,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils;
|
||||
|
||||
|
||||
/**
|
||||
@@ -127,6 +131,22 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
if (eventLogout.getMessgae() == EventLogout.LOGOUT_TYPE){
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"changeOverview Event消息去登出");
|
||||
mPresenter.logout();
|
||||
}else if (eventLogout.getMessgae() == EventLogout.SHOW_QR_TYPE){ //显示二维码
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"changeOverview Event qrcode");
|
||||
String qrUrl = String.format(FunctionBuildConfig.urlJson.getBindDriverQRUrl(),
|
||||
MoGoAiCloudClientConfig.getInstance().getSn());
|
||||
Bitmap bmQr = QRUtilsKt.createQRCodeWithPicture(
|
||||
BitmapFactory.decodeResource(getResources(), R.drawable.icon_qr_center_logo)
|
||||
,qrUrl, AutoSizeUtils.dp2px(getContext(),340f),
|
||||
AutoSizeUtils.dp2px(getContext(),340f),true);
|
||||
if (bmQr != null){
|
||||
BindQRCodeDialog.Builder builder = new BindQRCodeDialog.Builder();
|
||||
builder.title(getString(R.string.bind_driver_qr_title))
|
||||
.cancelStr(getString(R.string.qr_cancel))
|
||||
.qrBm(bmQr).build(getContext()).show();
|
||||
}else {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG,"bmQr = null ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,16 +382,16 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
}else {
|
||||
firstStationItem.setStationNameColor(getResources().getColor(R.color.bus_station_tag_txt_un_color));
|
||||
thirdStationItem.setStationNameColor(getResources().getColor(R.color.bus_line_station_color_selected));
|
||||
if (isArrived){ //到终点
|
||||
firstStationItem.setStationPointBg(0);
|
||||
firstStationItem.setStationArrowBg(0);
|
||||
thirdStationItem.setStationPointBg(1);
|
||||
if (isArrived){ //到终点
|
||||
firstStationItem.setStationPointBg(0);
|
||||
firstStationItem.setStationArrowBg(0);
|
||||
thirdStationItem.setStationPointBg(1);
|
||||
|
||||
}else { //到终点途中
|
||||
firstStationItem.setStationPointBg(0);
|
||||
firstStationItem.setStationArrowBg(1);
|
||||
thirdStationItem.setStationPointBg(1);
|
||||
}
|
||||
}else { //到终点途中
|
||||
firstStationItem.setStationPointBg(0);
|
||||
firstStationItem.setStationArrowBg(1);
|
||||
thirdStationItem.setStationPointBg(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,8 +554,4 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerResult(@NonNull BagManagerOuterClass.BagManager bagManager) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,10 +62,16 @@ class SwitchLineAdapter(
|
||||
line.taskList,
|
||||
object : SwitchLineTaskAdapter.TaskItemClickListener {
|
||||
override fun onItemClick(position: Int,isCheck:Boolean) {
|
||||
if(isCheck) {
|
||||
checkLineId = line.lineId
|
||||
checkTaskId = line.taskList[position].id
|
||||
}else{
|
||||
try {
|
||||
if (isCheck) {
|
||||
checkLineId = line.lineId
|
||||
checkTaskId = line.taskList[position].id
|
||||
} else {
|
||||
checkLineId = -1
|
||||
checkTaskId = -1
|
||||
}
|
||||
}catch (e:Exception){
|
||||
e.printStackTrace()
|
||||
checkLineId=-1
|
||||
checkTaskId=-1
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.bus.constant
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
/**
|
||||
* Created on 2021/12/6
|
||||
*/
|
||||
class URLConst {
|
||||
companion object {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.och.bus.passenger
|
||||
import android.content.Context
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager.stepInDayMode
|
||||
@@ -51,16 +52,26 @@ class MogoOCHBusPassenger : IMogoOCH {
|
||||
}
|
||||
|
||||
private fun showFragment() {
|
||||
val supportFragmentManager: FragmentManager? = mActivity?.supportFragmentManager
|
||||
|
||||
if (mPassengerFragment == null) {
|
||||
d(SceneConstant.M_TAXI_P + TAG, "准备add fragment======")
|
||||
mPassengerFragment = MainFragment()
|
||||
mActivity!!.supportFragmentManager.beginTransaction()
|
||||
.add(mContainerId, mPassengerFragment!!).commitAllowingStateLoss()
|
||||
var fragmentByTag: Fragment? = supportFragmentManager?.findFragmentByTag(MainFragment.TAG)
|
||||
mPassengerFragment = if (fragmentByTag is MainFragment){
|
||||
fragmentByTag
|
||||
}else{
|
||||
MainFragment()
|
||||
}
|
||||
|
||||
if (!mPassengerFragment?.isAdded!!){
|
||||
supportFragmentManager?.beginTransaction()
|
||||
?.add(mContainerId, mPassengerFragment!!, MainFragment.TAG)?.commitAllowingStateLoss()
|
||||
}
|
||||
return
|
||||
}
|
||||
d(SceneConstant.M_TAXI_P + TAG, "准备show fragment")
|
||||
mActivity!!.supportFragmentManager.beginTransaction().show(mPassengerFragment!!)
|
||||
.commitAllowingStateLoss()
|
||||
supportFragmentManager?.beginTransaction()?.show(mPassengerFragment!!)
|
||||
?.commitAllowingStateLoss()
|
||||
}
|
||||
|
||||
private fun hideFragment() {
|
||||
|
||||
@@ -14,8 +14,10 @@ data class OrderInfoResponse(val data: OrderInfo?) : BaseData() {
|
||||
val lineName: String?,//线路名称
|
||||
var startSiteId: Int?,
|
||||
var startSiteName: String?,
|
||||
var startSiteNameKr: String?,
|
||||
val siteId: Long?,//站点id
|
||||
val siteName: String?,//站点名称
|
||||
val siteNameKr: String?,//站点名称
|
||||
val wgs84Lat: Double?,
|
||||
val wgs84Lon: Double?,
|
||||
var gcj02Lat: Double?,
|
||||
|
||||
@@ -232,6 +232,7 @@ object CharterPassengerModel {
|
||||
override fun onAutopilotSNRequest() {}
|
||||
override fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {
|
||||
mADASStatusCallback?.onAutopilotArriveEnd()
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"底盘给到站信息")
|
||||
arriveDest()
|
||||
}
|
||||
|
||||
@@ -403,6 +404,7 @@ object CharterPassengerModel {
|
||||
)
|
||||
// 小于15m到站
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"小于15米到站1")
|
||||
arriveDest()
|
||||
}
|
||||
}
|
||||
@@ -492,6 +494,7 @@ object CharterPassengerModel {
|
||||
// 车辆空闲 订单结束已经还车
|
||||
// 结束车态轮训
|
||||
endCarStatusLoop()
|
||||
this.carTypeChageListener?.setCarChangeListener(0)
|
||||
setOrderStatus(OrderStatusEnum.NoOrderUnuse)
|
||||
}
|
||||
}
|
||||
@@ -548,11 +551,7 @@ object CharterPassengerModel {
|
||||
AbsMogoApplication.getApp()
|
||||
.getString(R.string.m1_end_order_5min), 2
|
||||
)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
VoiceManager.surplus5min(VoiceFocusManager.getVoiceCmdCallBack())
|
||||
}else{
|
||||
VoiceManager.surplus5min()
|
||||
}
|
||||
VoiceManager.surplus5min(VoiceFocusManager.getVoiceCmdCallBack())
|
||||
CallerLogger.d(M_BUS_P+ TAG,"倒计时5分钟${it.orderNo}")
|
||||
SharedPrefs.getInstance(mContext).putBoolean("${it.orderNo}$min5Speak",true)
|
||||
}
|
||||
@@ -711,6 +710,7 @@ object CharterPassengerModel {
|
||||
+ " thread = " + Thread.currentThread().name
|
||||
)
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG,"小于15米到站2")
|
||||
arriveDest()
|
||||
}
|
||||
iDistanceTimeCallback?.setDistancecAndTime(lastSumLength.toLong(), lastTime.toLong())
|
||||
@@ -852,19 +852,19 @@ object CharterPassengerModel {
|
||||
@Synchronized
|
||||
fun arriveDest() {
|
||||
orderInfo?.lineId?.let {
|
||||
if(orderInfo!!.arriveStatus==OrderInfoResponse.ARRIVING) {
|
||||
if (broadcastList.get("${it}$endKey")==null||broadcastList.get("${it}$endKey")==false) {
|
||||
orderInfo?.siteId?.let { siteId ->
|
||||
if (orderInfo!!.arriveStatus == OrderInfoResponse.ARRIVING) {
|
||||
if (broadcastList.get("${siteId}$endKey") == null || broadcastList.get("${siteId}$endKey") == false) {
|
||||
BusPassengerServiceManager.arriveDest(
|
||||
mContext, lindId = it, object : OchCommonServiceCallback<BaseData> {
|
||||
override fun onSuccess(data: BaseData?) {
|
||||
if (null != data && 0 == data.code) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
VoiceManager.arrivedStation(orderInfo!!.siteName!!,
|
||||
VoiceFocusManager.getVoiceCmdCallBack())
|
||||
}else{
|
||||
VoiceManager.arrivedStation(orderInfo!!.siteName!!,)
|
||||
}
|
||||
broadcastList["${it}$endKey"] = true
|
||||
VoiceManager.arrivedStation(
|
||||
orderInfo!!.siteName!!,
|
||||
orderInfo!!.siteNameKr ?: "",
|
||||
VoiceFocusManager.getVoiceCmdCallBack()
|
||||
)
|
||||
broadcastList["${siteId}$endKey"] = true
|
||||
// 到站结束自驾
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
// 结束路距计算
|
||||
@@ -879,17 +879,18 @@ object CharterPassengerModel {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun leaveStation(){
|
||||
orderInfo?.siteName?.let {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
VoiceManager.leaveStation(it,VoiceFocusManager.getVoiceCmdCallBack())
|
||||
}else{
|
||||
VoiceManager.leaveStation(it)
|
||||
}
|
||||
fun cleanbroadcastListInfo(){
|
||||
broadcastList.clear()
|
||||
}
|
||||
|
||||
fun leaveStation() {
|
||||
orderInfo?.siteName?.let {cn->
|
||||
VoiceManager.leaveStation(cn,orderInfo?.siteNameKr?:"", VoiceFocusManager.getVoiceCmdCallBack())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
|
||||
}
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(1)
|
||||
disposeSubscribe(subscribeDoorStatus)
|
||||
subscribeDoorStatus = createSubscribe {
|
||||
subscribeDoorStatus = createSubscribe(6000) {
|
||||
if (!OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) {
|
||||
ToastUtils.showShort("车门无法开启,请使用车内物理按钮")
|
||||
}
|
||||
@@ -80,7 +80,7 @@ class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
|
||||
}
|
||||
CallerAutoPilotControlManager.sendRoboBusJinlvM1FrontDoorCmd(2)
|
||||
disposeSubscribe(subscribeDoorStatus)
|
||||
subscribeDoorStatus = createSubscribe {
|
||||
subscribeDoorStatus = createSubscribe(6000) {
|
||||
if (OCHM1LightAirconditionDoorStatusManager.doorStatus.isOpen) {
|
||||
ToastUtils.showShort("车门无法关闭,请使用车内物理按钮")
|
||||
}
|
||||
|
||||
@@ -10,44 +10,15 @@ import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
|
||||
class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1ContainFragment?>(view),
|
||||
OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback {
|
||||
BusBasePassengerFunctionDevicePresenter<M1ContainFragment?>(view) {
|
||||
companion object{
|
||||
private const val TAG = "BusPassengerFunctionPresenter"
|
||||
}
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
OCHPlanningStopSideStatusManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
super.onDestroy(owner)
|
||||
OCHPlanningStopSideStatusManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onStartAutopilotFailure(
|
||||
actionStatus: OCHPlanningStopSideStatusManager.Status,
|
||||
stopSideStatus: Boolean?,
|
||||
errorInfo: String?
|
||||
) {
|
||||
UiThreadHandler.post {
|
||||
when (actionStatus) {
|
||||
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
|
||||
ToastUtils.showShort(errorInfo)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.START -> {
|
||||
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.DOING -> {
|
||||
// 正在靠边停车
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
|
||||
ToastUtils.showShort("靠边停车成功")
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.EndingFaile -> {
|
||||
ToastUtils.showShort("靠边停车失败")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener
|
||||
@@ -20,23 +21,24 @@ import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener
|
||||
import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.*
|
||||
|
||||
class BusPassengerPresenter(view: MainFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<MainFragment?>(view),
|
||||
IBusPassengerControllerStatusCallback, IDistanceTimeCallback, IOrderChangeCallback,
|
||||
IOrderStatusChangeListener {
|
||||
IOrderStatusChangeListener, OCHPlanningStopSideStatusManager.OCHPlanningActionsCallback {
|
||||
|
||||
private var subscribe: Disposable? = null
|
||||
private var gnssSpeed = 0.0f
|
||||
@@ -49,7 +51,8 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
CharterPassengerModel.setCarTypeChangeListener(this)
|
||||
CharterPassengerModel.setStatusChangeListener(TAG,this)
|
||||
CallerTelematicListenerManager.addListener(TAG, msgReceived)
|
||||
setCarChangeListener(R.raw.aiqinghao)
|
||||
OCHPlanningStopSideStatusManager.addListener(TAG,this)
|
||||
setCarChangeListener(R.raw.m1)
|
||||
//BusPassengerModel.setMoGoAutopilotPlanningListener(this)
|
||||
|
||||
}
|
||||
@@ -60,6 +63,7 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
CharterPassengerModel.setiDistanceTimeCallback(null)
|
||||
CharterPassengerModel.setCarTypeChangeListener(null)
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
OCHPlanningStopSideStatusManager.removeListener(TAG)
|
||||
}
|
||||
private fun setSpeed(speed:Float){
|
||||
UiThreadHandler.post {
|
||||
@@ -210,7 +214,7 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
mView?.setCarModle(R.raw.pengyouhao)
|
||||
}
|
||||
else -> {
|
||||
mView?.setCarModle(R.raw.aiqinghao)
|
||||
mView?.setCarModle(R.raw.m1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,4 +264,30 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
mView?.drawEndStation(latLng)
|
||||
}
|
||||
|
||||
override fun onStartAutopilotFailure(
|
||||
actionStatus: OCHPlanningStopSideStatusManager.Status,
|
||||
stopSideStatus: Boolean?,
|
||||
errorInfo: String?
|
||||
) {
|
||||
UiThreadHandler.post {
|
||||
when (actionStatus) {
|
||||
OCHPlanningStopSideStatusManager.Status.NOSTART -> {
|
||||
ToastUtils.showShort(errorInfo)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.START -> {
|
||||
VoiceNotice.showNotice(context.getString(R.string.m1_stop_site_zh), AIAssist.LEVEL1)
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.DOING -> {
|
||||
// 正在靠边停车
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.EndingSuccess -> {
|
||||
ToastUtils.showShort("靠边停车成功")
|
||||
}
|
||||
OCHPlanningStopSideStatusManager.Status.EndingFaile -> {
|
||||
ToastUtils.showShort("靠边停车失败")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,7 +52,6 @@ class MainFragment :
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
setCarModle(R.raw.m1)
|
||||
cb_bp_video_player.onClick {
|
||||
openSettingPage(M1ContainFragment.VIDEOTAB)
|
||||
}
|
||||
@@ -256,6 +255,6 @@ class MainFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusPassengerRouteFragment"
|
||||
public const val TAG = "BusPassengerRouteFragment"
|
||||
}
|
||||
}
|
||||
@@ -25,17 +25,16 @@ import com.mogo.och.bus.passenger.bean.response.SiteInfoResponse
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerModelLoopManager
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerServiceManager
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionDevicePresenter
|
||||
import com.mogo.och.bus.passenger.ui.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderLineItemAdapter
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderSiteItemAdapter
|
||||
import com.mogo.och.bus.passenger.utils.RxUtils
|
||||
import com.mogo.och.bus.passenger.view.BottomDecoration
|
||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.network.OchCommonServiceCallback
|
||||
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||
import io.reactivex.disposables.Disposable
|
||||
import kotlinx.android.synthetic.m1.m1_order_lineside.view.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
@@ -442,6 +441,7 @@ class LineSiteView @JvmOverloads constructor(
|
||||
}
|
||||
go2StartCar()
|
||||
CharterPassengerModel.queryOrder()
|
||||
CharterPassengerModel.cleanbroadcastListInfo()
|
||||
} else {
|
||||
tempCheckLineIsSubmit = true
|
||||
ToastUtils.showShort("司机端拒绝请重新选择")
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
|
||||
object VoiceFocusManager {
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
|
||||
fun getVoiceCmdCallBack():IMogoVoiceCmdCallBack{
|
||||
UiThreadHandler.post {
|
||||
GSYVideoManager.onPause()
|
||||
|
||||
Binary file not shown.
@@ -29,6 +29,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
|
||||
@@ -41,12 +41,13 @@ class CharterProvider: ICharterOCH{
|
||||
} else {
|
||||
DriverM1Fragment()
|
||||
}
|
||||
if (!driverM1Fragment!!.isAdded) {
|
||||
if (!driverM1Fragment?.isAdded!!) {
|
||||
mContainerId?.let {
|
||||
supportFragmentManager?.beginTransaction()
|
||||
?.add(it, driverM1Fragment!!, DriverM1Fragment.TAG)?.commitAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
d(TAG, "准备show fragment")
|
||||
supportFragmentManager?.beginTransaction()?.show(driverM1Fragment!!)?.commitAllowingStateLoss()
|
||||
|
||||
@@ -9,5 +9,6 @@ import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
|
||||
interface DriverM1OrderCallback {
|
||||
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result) // 到达站
|
||||
fun updateOverCountDown(minutes: Long) //倒计时ms
|
||||
fun clearCountDown() //清除倒计时
|
||||
fun updateReturnCarStatus(returnSuccess: Boolean)
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun clearCountDownTimer() {
|
||||
fun clearCountDownTimer() {
|
||||
if (countDownTimer != null){
|
||||
countDownTimer?.cancel()
|
||||
countDownTimer = null
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.mogo.och.common.module.manager.CharterSendTripInfoManager.END_TRIP
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.START_TRIP
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.utils.*
|
||||
import com.mogo.och.data.bean.*
|
||||
import io.reactivex.exceptions.UndeliverableException
|
||||
import io.reactivex.functions.Consumer
|
||||
import io.reactivex.plugins.RxJavaPlugins
|
||||
@@ -206,6 +207,8 @@ class DriverM1Model {
|
||||
OCHSocketMessageManager.msgWriteOffPassengerType
|
||||
)
|
||||
stopLoopAbnormalFactors()
|
||||
|
||||
CallerTelematicListenerManager.removeListener(TAG)
|
||||
}
|
||||
/**
|
||||
* 接收乘客屏发来确认信息
|
||||
@@ -255,7 +258,7 @@ class DriverM1Model {
|
||||
val list = obj.screenList
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "onMsgReceived = " + GsonUtils.toJson(list))
|
||||
if (list != null && list.contains(1)){ // 司机端
|
||||
pushOperationalToMsgBox(obj.pushTimeStamp, obj.context)
|
||||
pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp(), obj.context)
|
||||
}
|
||||
if (list != null && list.contains(2)){ //发送乘客屏
|
||||
sendMsgToClient(DPCommonOperationMsg(obj.context))
|
||||
@@ -514,6 +517,7 @@ class DriverM1Model {
|
||||
DriverM1LooperManager.starCountDownLoop()
|
||||
}else{
|
||||
DriverM1LooperManager.stopCountDownLoop()
|
||||
mOrderCallback?.clearCountDown()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
|
||||
mView?.updateCountDown(minutes)
|
||||
}
|
||||
|
||||
override fun clearCountDown() {
|
||||
mView?.clearCountDownTimer()
|
||||
}
|
||||
|
||||
override fun updateReturnCarStatus(returnSuccess: Boolean) {
|
||||
mView?.updateReturnCarStatus(returnSuccess)
|
||||
}
|
||||
|
||||
@@ -326,16 +326,13 @@ abstract class CharterBaseFragment<V : IView?, P : Presenter<V>?>() :
|
||||
}else{
|
||||
ctvAutopilotStatusTv!!.setTextColor(resources.getColor(R.color.bus_autopilot_text_color_normal))
|
||||
ctvAutopilotStatusIv!!.setImageResource(R.drawable.bus_ic_autopilot)
|
||||
ctvAutopilotStatusTv!!.text =
|
||||
resources.getString(R.string.bus_loading_autopilot_runnig_tv)
|
||||
ctvAutopilotStatus!!.isClickable = true
|
||||
if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE == autopilotStatus) { //1可用
|
||||
// ctvAutopilotStatus!!.isSelected = false
|
||||
ctvAutopilotStatus!!.isClickable = true
|
||||
ctvAutopilotStatus!!.background = getDrawable(R.drawable.bus_autopilot_0_1_status_bg)
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == autopilotStatus) {
|
||||
ctvAutopilotStatusTv!!.text =
|
||||
resources.getString(R.string.bus_loading_autopilot_runnig_tv)
|
||||
ctvAutopilotStatus!!.isClickable = true
|
||||
ctvAutopilotStatus!!.background = getDrawable(R.drawable.bus_autopilot_2_status_bg)
|
||||
// ctvAutopilotStatus!!.isSelected = true
|
||||
} else if (IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING
|
||||
== autopilotStatus){
|
||||
ctvAutopilotStatusTv!!.text =
|
||||
|
||||
@@ -30,6 +30,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
@@ -57,6 +61,10 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.litezxing
|
||||
|
||||
api project(":OCH:mogo-och-data")
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogoutils
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.mogo.och.common.module.bean
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/14
|
||||
*/
|
||||
data class AppConnectMsg(var isViewShow: Boolean,var isPlay: Boolean,var msg: String)
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/24
|
||||
*/
|
||||
open class BaseDPMsg(var type: Int) // 0: 常规 1:确认路线/站点 2:开/关车门 3:结束订单
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/24
|
||||
*/
|
||||
data class ChangeDestMsg(
|
||||
var lineId: Int, //线路id
|
||||
var lineName: String = "", //线路名称
|
||||
var startSiteId: Int= 0, //当前站点
|
||||
var startSiteName: String = "",
|
||||
var destSiteId: Int= 0, //目的地
|
||||
var destSiteName: String = "",
|
||||
var isConfirmed: Boolean = false //司机端是否同意
|
||||
): BaseDPMsg(DPMsgType.TYPE_CHANGE_DEST.type)
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/24
|
||||
*/
|
||||
data class DPCommonOperationMsg(
|
||||
var msg: String
|
||||
): BaseDPMsg(DPMsgType.TYPE_COMMON.type)
|
||||
@@ -8,5 +8,7 @@ enum class DPMsgType(val type: Int) {
|
||||
TYPE_COMMON(0), //常规
|
||||
TYPE_CHANGE_DEST(1),// 变更目的地确认
|
||||
TYPE_OPEN_CLOSE_DOOR(2),//开关门
|
||||
TYPE_ORDER_CLOSED(3) // 订单结束
|
||||
TYPE_ORDER_CLOSED(3), // 订单结束
|
||||
TYPE_TASK_DETAILS(4), //路线任务详情
|
||||
TYPE_LOGIN_STATUS(5) //login status
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/24
|
||||
*/
|
||||
data class DPOperateDoorMsg(
|
||||
var open: Boolean = false // true: 开门, false: 关门
|
||||
): BaseDPMsg(DPMsgType.TYPE_OPEN_CLOSE_DOOR.type)
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/2/24
|
||||
*/
|
||||
data class DPOrderClosedMsg(
|
||||
var closed: Boolean = true // true: 开门, false: 关门
|
||||
): BaseDPMsg(DPMsgType.TYPE_ORDER_CLOSED.type)
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mogo.och.common.module.bean.dpmsg
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/3/27
|
||||
*/
|
||||
|
||||
object BusCacheKey{
|
||||
const val BUS_LINE_CACHE = "bus_line_cache"
|
||||
const val BUS_LOGIN_STATUS_CACHE = "bus_login_status_cache"
|
||||
}
|
||||
|
||||
open class BaseDPMsg(open var type: Int) // 0: 常规 1:确认路线/站点 2:开/关车门 3:结束订单
|
||||
|
||||
data class LoginCacheStatus(
|
||||
var loginStatus: Int,
|
||||
var updateTime: Long
|
||||
): BaseDPMsg(DPMsgType.TYPE_LOGIN_STATUS.type)
|
||||
|
||||
data class ChangeDestMsg(
|
||||
var lineId: Int, //线路id
|
||||
var lineName: String = "", //线路名称
|
||||
var startSiteId: Int= 0, //当前站点
|
||||
var startSiteName: String = "",
|
||||
var destSiteId: Int= 0, //目的地
|
||||
var destSiteName: String = "",
|
||||
var isConfirmed: Boolean = false //司机端是否同意
|
||||
): BaseDPMsg(DPMsgType.TYPE_CHANGE_DEST.type)
|
||||
|
||||
data class DPCommonOperationMsg(
|
||||
var msg: String
|
||||
): BaseDPMsg(DPMsgType.TYPE_COMMON.type)
|
||||
|
||||
data class DPOperateDoorMsg(
|
||||
var open: Boolean = false // true: 开门, false: 关门
|
||||
): BaseDPMsg(DPMsgType.TYPE_OPEN_CLOSE_DOOR.type)
|
||||
|
||||
data class DPOrderClosedMsg(
|
||||
var closed: Boolean = true // true: 开门, false: 关门
|
||||
): BaseDPMsg(DPMsgType.TYPE_ORDER_CLOSED.type)
|
||||
|
||||
data class AppConnectMsg(var isViewShow: Boolean, var isPlay: Boolean, var msg: String,
|
||||
): BaseDPMsg(DPMsgType.TYPE_COMMON.type)
|
||||
|
||||
data class TaskDetailsMsg(
|
||||
var msg: String?,
|
||||
): BaseDPMsg(DPMsgType.TYPE_TASK_DETAILS.type)
|
||||
@@ -3,11 +3,18 @@ package com.mogo.och.common.module.biz.model
|
||||
import android.annotation.SuppressLint
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.och.common.module.bean.dpmsg.BusCacheKey
|
||||
import com.mogo.och.common.module.bean.dpmsg.LoginCacheStatus
|
||||
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.callback.ILoginViewCallback
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager.isLogin
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.data.manager.cache.CacheDataManager
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object OchCommonLoginStatusDefaultModel : OchCommonLoginStatusModel() {
|
||||
@@ -29,6 +36,16 @@ object OchCommonLoginStatusDefaultModel : OchCommonLoginStatusModel() {
|
||||
loginViewCallback?.showLoginDialogFragment()
|
||||
}
|
||||
loginCallback?.loginSuccess(data)
|
||||
|
||||
data?.data?.driverStatus?.let { updateLoginLocalStatus(it) }
|
||||
|
||||
}
|
||||
|
||||
private fun updateLoginLocalStatus(loginStatus: Int = 0) {
|
||||
var loginCacheStatus = LoginCacheStatus(loginStatus,DateTimeUtil.getCurrentTimeStamp())
|
||||
|
||||
CacheDataManager.instance.putCacheData(mContext, BusCacheKey.BUS_LOGIN_STATUS_CACHE,
|
||||
GsonUtils.toJson(loginCacheStatus))
|
||||
}
|
||||
|
||||
override fun loginFail(isLogin: Boolean) {
|
||||
@@ -39,6 +56,8 @@ object OchCommonLoginStatusDefaultModel : OchCommonLoginStatusModel() {
|
||||
loginViewCallback?.showLoginDialogFragment()
|
||||
}
|
||||
loginCallback?.loginFail(isLogin)
|
||||
|
||||
updateLoginLocalStatus(0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -101,4 +102,12 @@ public class DateTimeUtil {
|
||||
public static long getCurrentTimeStamp(){
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static long getTodayStartTime(){
|
||||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
|
||||
calendar.set(Calendar.HOUR_OF_DAY,0);
|
||||
calendar.set(Calendar.MINUTE,0);
|
||||
calendar.set(Calendar.SECOND,0);
|
||||
return calendar.getTimeInMillis();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.mogo.och.common.module.utils
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import com.google.zxing.BarcodeFormat
|
||||
import com.google.zxing.EncodeHintType
|
||||
import com.google.zxing.common.BitMatrix
|
||||
import com.google.zxing.qrcode.QRCodeWriter
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
|
||||
import java.util.*
|
||||
|
||||
|
||||
/**
|
||||
* isDeleteWhite 是否删除白边
|
||||
*/
|
||||
fun createQRCode(address: String, width: Int, height: Int,isDeleteWhite: Boolean): Bitmap? {
|
||||
val hints = Hashtable<EncodeHintType, Any>()
|
||||
hints[EncodeHintType.CHARACTER_SET] = "utf-8"
|
||||
hints[EncodeHintType.ERROR_CORRECTION] = ErrorCorrectionLevel.H
|
||||
hints[EncodeHintType.MARGIN] = if (isDeleteWhite) 1 else 0
|
||||
var bitMatrix = QRCodeWriter().encode(
|
||||
address,
|
||||
BarcodeFormat.QR_CODE, width, height, hints
|
||||
)
|
||||
|
||||
if (isDeleteWhite) {
|
||||
//删除白边
|
||||
bitMatrix = deleteWhite(bitMatrix)
|
||||
}
|
||||
val widthNew = bitMatrix.width
|
||||
val heightNew = bitMatrix.height
|
||||
|
||||
val pixels = IntArray(widthNew * heightNew)
|
||||
//下面这里按照二维码的算法,逐个生成二维码的图片,
|
||||
//两个for循环是图片横列扫描的结果
|
||||
for (y in 0 until heightNew) {
|
||||
for (x in 0 until widthNew) {
|
||||
if (bitMatrix.get(x, y)) {
|
||||
pixels[y * widthNew + x] = -0x1000000
|
||||
} else {
|
||||
pixels[y * widthNew + x] = -0x1
|
||||
}
|
||||
}
|
||||
}
|
||||
//生成二维码图片的格式,使用ARGB_8888
|
||||
var bitmap = Bitmap.createBitmap(widthNew, heightNew, Bitmap.Config.ARGB_8888)
|
||||
bitmap.setPixels(pixels, 0, widthNew, 0, 0, widthNew, heightNew)
|
||||
return bitmap
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除白色边框
|
||||
*
|
||||
* @param matrix matrix
|
||||
* @return BitMatrix
|
||||
*/
|
||||
private fun deleteWhite(matrix: BitMatrix): BitMatrix? {
|
||||
val rec = matrix.enclosingRectangle
|
||||
val resWidth = rec[2] + 1
|
||||
val resHeight = rec[3] + 1
|
||||
val resMatrix = BitMatrix(resWidth, resHeight)
|
||||
resMatrix.clear()
|
||||
for (i in 0 until resWidth) {
|
||||
for (j in 0 until resHeight) {
|
||||
if (matrix[i + rec[0], j + rec[1]]) resMatrix[i] = j
|
||||
}
|
||||
}
|
||||
return resMatrix
|
||||
}
|
||||
|
||||
fun createQRCodeWithPicture(bmCenter: Bitmap,address: String, width: Int, height: Int,isDeleteWhite: Boolean): Bitmap?{
|
||||
var qrCode = createQRCode(address,width,height,isDeleteWhite)
|
||||
//8,创建一个bitmap对象用于作为其图标
|
||||
qrCode?.let {
|
||||
val resultBitmap = addLogo(it,bmCenter)
|
||||
if (resultBitmap != null){
|
||||
return resultBitmap
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于向创建的二维码中添加一个logo
|
||||
* @param bmQr
|
||||
* @param bmCenter
|
||||
* @return
|
||||
*/
|
||||
fun addLogo(bmQr: Bitmap, bmCenter:Bitmap) :Bitmap?{
|
||||
if (bmQr == null) {
|
||||
return null
|
||||
}
|
||||
if (bmCenter == null) {
|
||||
return bmQr
|
||||
}
|
||||
|
||||
//获取图片的宽高
|
||||
val bmQrWidth = bmQr.width
|
||||
val bmQrHeight = bmQr.height
|
||||
val bmCenterWidth = bmCenter.width
|
||||
val bmCenterHeight = bmCenter.height
|
||||
|
||||
var bitmap = Bitmap.createBitmap(bmQrWidth, bmQrHeight, Bitmap.Config.ARGB_8888)
|
||||
try {
|
||||
var canvas = Canvas(bitmap)
|
||||
canvas.drawBitmap(bmQr, 0f, 0f, null)
|
||||
canvas.drawBitmap(bmCenter, ((bmQrWidth-bmCenterWidth)/2-bmCenterWidth/2).toFloat(),
|
||||
((bmQrHeight-bmCenterHeight)/2-bmCenterHeight/2).toFloat(), null)
|
||||
|
||||
canvas.save()
|
||||
canvas.restore()
|
||||
} catch (e: Exception) {
|
||||
bitmap = null
|
||||
e.stackTrace
|
||||
}
|
||||
return bitmap
|
||||
}
|
||||
@@ -10,50 +10,66 @@ import java.util.ArrayList
|
||||
|
||||
object VoiceManager {
|
||||
|
||||
fun arrivedStation(siteName: String) {
|
||||
arrivedStation(siteName,null)
|
||||
fun arrivedStation(siteNameCN: String?) {
|
||||
arrivedStation(siteNameCN,"")
|
||||
}
|
||||
fun arrivedStation(siteName: String,callBack: IMogoTTSCallback?=null) {
|
||||
fun arrivedStation(siteNameCN: String?,siteNameKR: String?) {
|
||||
arrivedStation(siteNameCN,siteNameKR,null)
|
||||
}
|
||||
|
||||
fun arrivedStation(siteNameCN: String?, siteNameKR: String?,callBack: IMogoTTSCallback?=null) {
|
||||
val contenxt = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
val chineseTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_zh, siteName),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_en, siteName),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val koreanTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_ko, siteName),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
siteNameCN?.let {
|
||||
val chineseTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_zh, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_en, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val koreanTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.arrived_station_ko, siteNameKR?:it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
}
|
||||
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,callBack)
|
||||
}
|
||||
fun leaveStation(siteName: String){
|
||||
leaveStation(siteName,null)
|
||||
|
||||
fun leaveStation(siteNameCN: String?){
|
||||
leaveStation(siteNameCN,"")
|
||||
}
|
||||
fun leaveStation(siteName: String,callBack: IMogoTTSCallback?=null) {
|
||||
val contenxt = AbsMogoApplication.getApp()
|
||||
|
||||
fun leaveStation(siteNameCN: String?,siteNameKR: String?){
|
||||
leaveStation(siteNameCN,siteNameKR,null)
|
||||
}
|
||||
|
||||
fun leaveStation(siteNameCN: String?, siteNameKR: String?,callBack: IMogoTTSCallback?=null) {
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
val chineseTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_zh, siteName),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_en, siteName),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val koreanTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_ko, siteName),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
val contenxt = AbsMogoApplication.getApp()
|
||||
siteNameCN?.let {
|
||||
val chineseTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_zh, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_en, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
|
||||
val koreanTTS = LangTtsEntity(
|
||||
contenxt.getString(R.string.leave_station_ko, siteNameKR ?: it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(koreanTTS)
|
||||
}
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,callBack)
|
||||
}
|
||||
|
||||
@@ -86,4 +102,65 @@ object VoiceManager {
|
||||
list.add(koreanTTS)
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0,callBack)
|
||||
}
|
||||
|
||||
fun arrivedStationBus(siteNameCN: String?, siteNameKR: String?) {
|
||||
val context = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
siteNameCN?.let {
|
||||
val chineseTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_arrived_station_tip, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_arrived_station_english_tip, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val koreanTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_arrived_station_korean_tip, siteNameKR?:it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
}
|
||||
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
}
|
||||
|
||||
fun leaveStationBus(siteNameCN: String?, siteNameKR: String?) {
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
val context = AbsMogoApplication.getApp()
|
||||
siteNameCN?.let {
|
||||
val chineseTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_leave_station_tip, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
val engTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_leave_station_english_tip, it),
|
||||
LanguageType.CHINESE
|
||||
)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
|
||||
val koreanTTS = LangTtsEntity(
|
||||
context.getString(R.string.bus_leave_station_korean_tip, siteNameKR ?: it),
|
||||
LanguageType.KOREAN
|
||||
)
|
||||
list.add(koreanTTS)
|
||||
}
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL1,null)
|
||||
}
|
||||
|
||||
fun endOrderBus() {
|
||||
val context = AbsMogoApplication.getApp()
|
||||
val list: MutableList<LangTtsEntity> = ArrayList()
|
||||
val chineseTTS = LangTtsEntity(context.getString(R.string.bus_end_task_tip), LanguageType.CHINESE)
|
||||
val engTTS = LangTtsEntity(context.getString(R.string.bus_end_task_english_tip), LanguageType.ENGLISH)
|
||||
val koreanTTS = LangTtsEntity(context.getString(R.string.bus_end_task_korean_tip), LanguageType.KOREAN)
|
||||
list.add(chineseTTS)
|
||||
list.add(engTTS)
|
||||
list.add(koreanTTS)
|
||||
VoiceNotice.showNotice(list, AIAssist.LEVEL0,null)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.mogo.och.common.module.wigets
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.lifecycle.LifecycleObserver
|
||||
import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
|
||||
import com.mogo.och.common.module.R
|
||||
|
||||
/**
|
||||
* 带有title, tip,confirm,cancel的dialog
|
||||
*/
|
||||
class BindQRCodeDialog: BaseFloatDialog, LifecycleObserver {
|
||||
|
||||
private var qrBm : AppCompatImageView? = null
|
||||
private var qrCancel: AppCompatTextView? = null
|
||||
private var qrTitle: AppCompatTextView? = null
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
constructor(builder: Builder,context: Context) : super(context) {
|
||||
qrTitle?.text = builder.titleStr
|
||||
qrCancel?.text = builder.cancelStr
|
||||
qrBm?.setImageBitmap(builder.qrBm)
|
||||
}
|
||||
|
||||
init{
|
||||
setContentView(R.layout.bind_driver_qr_view)
|
||||
|
||||
setCanceledOnTouchOutside(true)
|
||||
|
||||
qrTitle = findViewById(R.id.qr_title)
|
||||
qrBm = findViewById(R.id.qr_bm)
|
||||
qrCancel = findViewById(R.id.bind_qr_cancel)
|
||||
|
||||
qrCancel?.setOnClickListener {
|
||||
clickListener?.cancel()
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun cancel()
|
||||
}
|
||||
|
||||
class Builder{
|
||||
var titleStr:String = ""
|
||||
var cancelStr:String = ""
|
||||
var qrBm: Bitmap? = null
|
||||
|
||||
fun title(title: String) : Builder{
|
||||
this.titleStr = title
|
||||
return this
|
||||
}
|
||||
|
||||
fun cancelStr(cancel: String) : Builder{
|
||||
this.cancelStr = cancel
|
||||
return this
|
||||
}
|
||||
|
||||
fun qrBm(bm: Bitmap) : Builder{
|
||||
this.qrBm = bm
|
||||
return this
|
||||
}
|
||||
|
||||
fun build(context: Context): BindQRCodeDialog? {
|
||||
return BindQRCodeDialog(this,context)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,13 +49,6 @@ class OCHCommitDialog: BaseFloatDialog, LifecycleObserver {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
fun showUpgradeDialog(){
|
||||
if(isShowing){
|
||||
return
|
||||
}
|
||||
show()
|
||||
}
|
||||
|
||||
interface ClickListener{
|
||||
fun confirm()
|
||||
fun cancel()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.och.common.module.wigets.video
|
||||
|
||||
data class AdsDatas(val ads:MutableList<RotationItem>)
|
||||
|
||||
data class RotationItem(
|
||||
var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String
|
||||
)
|
||||
@@ -2,7 +2,6 @@ package com.mogo.och.common.module.wigets.video
|
||||
|
||||
import AdvancePagerAdapter
|
||||
import AdvanceViewPager
|
||||
import RotationItem
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.mogo.och.common.module.wigets.video
|
||||
|
||||
import RotationItem
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.och.common.module.R
|
||||
import kotlinx.android.synthetic.main.fragment_video_player.*
|
||||
|
||||
@@ -47,87 +49,12 @@ class VideoPlayerFragment :
|
||||
}
|
||||
|
||||
private fun initResourceData() {
|
||||
arrayListOf.clear()
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
0,
|
||||
"",
|
||||
"1"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
0,
|
||||
"",
|
||||
"2"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
1,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"3"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
0,
|
||||
"",
|
||||
"4"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
1,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"5"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
1,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"6"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
0,
|
||||
"",
|
||||
"7"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
0,
|
||||
"",
|
||||
"8"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
0,
|
||||
"",
|
||||
"9"
|
||||
)
|
||||
)
|
||||
arrayListOf.add(
|
||||
RotationItem(
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
1,
|
||||
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"10"
|
||||
)
|
||||
)
|
||||
try {
|
||||
arrayListOf.clear()
|
||||
var datas: AdsDatas = GsonUtils.fromJson(FunctionBuildConfig.tempConfig,object : TypeToken<AdsDatas>() {}.type)
|
||||
arrayListOf.addAll(datas.ads)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.och.common.module.wigets.video.ImageVideoRotationView
|
||||
import com.mogo.och.common.module.wigets.video.RotationItem
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
||||
@@ -456,13 +457,6 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
|
||||
}
|
||||
}
|
||||
|
||||
data class RotationItem(
|
||||
var path: String,
|
||||
var type: Int,
|
||||
var cacheImgPath: String,
|
||||
var title: String
|
||||
)
|
||||
|
||||
class AdvanceImageView @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : RelativeLayout(context, attrs) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_32"/>
|
||||
<solid android:color="@color/qr_bg_color"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_890"
|
||||
android:layout_height="@dimen/dp_780"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
android:background="@drawable/bind_driver_qr_bg">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qr_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bind_driver_qr_title"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_48"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/qr_bm"
|
||||
android:layout_width="@dimen/dp_357"
|
||||
android:layout_height="@dimen/dp_357"
|
||||
android:padding="8dp"
|
||||
android:background="@android:color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/qr_title"
|
||||
app:layout_constraintBottom_toTopOf="@+id/line"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="@color/qr_line_bg_color"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bind_qr_cancel"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/bind_qr_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_162"
|
||||
android:gravity="center"
|
||||
android:text="@string/qr_cancel"
|
||||
android:textSize="@dimen/dp_52"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -22,6 +22,8 @@
|
||||
android:id="@+id/common_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingRight="@dimen/dp_40"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/common_title"
|
||||
|
||||
@@ -11,4 +11,7 @@
|
||||
<color name="taxi_4D000000">#4D000000</color>
|
||||
|
||||
<color name="och_dialog_bg_color">#3B4577</color>
|
||||
|
||||
<color name="qr_line_bg_color">#66B8BFE8</color>
|
||||
<color name="qr_bg_color">#3B4577</color>
|
||||
</resources>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<string name="module_och_taxi_login_title">欢迎您登录</string>
|
||||
<string name="module_och_taxi_login_btn">登录</string>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<string name="arrived_station_en">We are arriving at %1$s</string>
|
||||
<string name="arrived_station_ko">%1$s 역에 도착했습니다</string>
|
||||
<string name="arrived_station_zh">已到达%1$s站</string>
|
||||
<string name="arrived_station_zh">已到达%1$s</string>
|
||||
|
||||
<string name="leave_station_zh">车辆起步,请扶稳坐好,前方到站 %1$s</string>
|
||||
<string name="leave_station_en">The next station is %1$s</string>
|
||||
@@ -30,4 +30,19 @@
|
||||
<string name="end_order_zh">感谢您体验\'蘑菇车联\'自动驾驶小巴车,本次旅程已结束,我们下次乘车再见</string>
|
||||
<string name="end_order_en">Thank you for experiencing the self-driving minibus. See you next time</string>
|
||||
<string name="end_order_ko">자율주행 버스를 체험해 주셔서 감사합니다. 다음에 또 뵙겠습니다</string>
|
||||
|
||||
<string name="bus_arrived_station_tip">已到达%1$s,带好随身物品,下车请注意安全。</string>
|
||||
<string name="bus_arrived_station_english_tip">We are arriving at %1$s ,get off with your belongings</string>
|
||||
<string name="bus_arrived_station_korean_tip">%1$s 역에 도착했습니다 , 소지품 챙겨서 내리세요</string>
|
||||
|
||||
<string name="bus_leave_station_tip">车辆起步,请扶稳坐好,前方到站是%1$s,请下车的乘客做好准备。</string>
|
||||
<string name="bus_leave_station_english_tip">The next station is %1$s ,please get ready for your arrival</string>
|
||||
<string name="bus_leave_station_korean_tip">전방에서 역에 도착하는 %1$s ,차에서 내리는 승객은 준비하세요</string>
|
||||
|
||||
<string name="bus_end_task_tip">感谢您体验\'蘑菇车联\'自动驾驶小巴车,我们下次再见。</string>
|
||||
<string name="bus_end_task_english_tip">Thank you for experiencing the self-driving minibus. See you next time</string>
|
||||
<string name="bus_end_task_korean_tip">자율주행 버스를 체험해 주셔서 감사합니다. 다음에 또 뵙겠습니다</string>
|
||||
|
||||
<string name="qr_cancel">取消</string>
|
||||
<string name="bind_driver_qr_title">扫描二维码完成车辆绑定</string>
|
||||
</resources>
|
||||
50
OCH/mogo-och-data/build.gradle
Normal file
50
OCH/mogo-och-data/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 31
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.material
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
api rootProject.ext.dependencies.mogoutils
|
||||
}else {
|
||||
api project(":core:mogo-core-utils")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.och.data
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.mogo.och.data.test", appContext.packageName)
|
||||
}
|
||||
}
|
||||
5
OCH/mogo-och-data/src/main/AndroidManifest.xml
Normal file
5
OCH/mogo-och-data/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.och.data">
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.mogo.och.data.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口返回接口数据封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusRoutesResult {
|
||||
private List<BusStationBean> sites;
|
||||
private int lineId;
|
||||
private String name;
|
||||
private int lineType; //线路类型,0:环形
|
||||
private String description;
|
||||
private int status;
|
||||
private long taskTime; //线路时间班次
|
||||
private int taskId;// 线路班次id
|
||||
private String runningDur; //运营时间
|
||||
private long writeVersion; //更新时间戳
|
||||
|
||||
//线路轨迹相关字段
|
||||
public String csvFileUrl = ""; //轨迹文件下载的cos url,默认“”
|
||||
public String csvFileMd5 = ""; //轨迹文件md5,默认“”
|
||||
public String txtFileUrl = ""; //打点文件下载的cos url,默认“”
|
||||
public String txtFileMd5 = ""; //轨迹文件md5,默认“”
|
||||
public long contrailSaveTime; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
public String carModel = ""; //[optional] 车型号(如红旗H9),默认“”,暂不加入校验逻辑、用于人工排查问题
|
||||
public String csvFileUrlDPQP = ""; //轨迹文件下载的cos url,默认“”
|
||||
public String csvFileMd5DPQP = ""; //轨迹文件md5,默认“”
|
||||
public String txtFileUrlDPQP = ""; //打点文件下载的cos url,默认“”
|
||||
public String txtFileMd5DPQP = ""; //轨迹文件md5,默认“”
|
||||
public long contrailSaveTimeDPQP; //上传轨迹完成时间戳ms:用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖
|
||||
|
||||
public String getRunningDur() {
|
||||
return runningDur;
|
||||
}
|
||||
|
||||
public void setRunningDur(String runningDur) {
|
||||
this.runningDur = runningDur;
|
||||
}
|
||||
|
||||
public int getLineId() {
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public int getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<BusStationBean> getSites() {
|
||||
return sites;
|
||||
}
|
||||
|
||||
public void setSite(List<BusStationBean> site) {
|
||||
this.sites = sites;
|
||||
}
|
||||
|
||||
public long getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
public long getWriteVersion() {
|
||||
return writeVersion;
|
||||
}
|
||||
|
||||
public void setWriteVersion(long writeVersion) {
|
||||
this.writeVersion = writeVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BusRoutesResult that = (BusRoutesResult) o;
|
||||
return lineId == that.lineId
|
||||
&& lineType == that.lineType
|
||||
&& status == that.status
|
||||
&& sites.equals(that.sites)
|
||||
&& name.equals(that.name)
|
||||
&& writeVersion == that.writeVersion
|
||||
&& runningDur.equals(that.runningDur);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusRoutesResult{" +
|
||||
"sites=" + sites +
|
||||
", lineId=" + lineId +
|
||||
", name='" + name + '\'' +
|
||||
", lineType=" + lineType +
|
||||
", description='" + description + '\'' +
|
||||
", status=" + status +
|
||||
", taskTime=" + taskTime +
|
||||
", taskId=" + taskId +
|
||||
", writeVersion=" + writeVersion +
|
||||
", csvFileUrl='" + csvFileUrl + '\'' +
|
||||
", csvFileMd5='" + csvFileMd5 + '\'' +
|
||||
", txtFileUrl='" + txtFileUrl + '\'' +
|
||||
", txtFileMd5='" + txtFileMd5 + '\'' +
|
||||
", contrailSaveTime=" + contrailSaveTime +
|
||||
", carModel='" + carModel + '\'' +
|
||||
", csvFileUrlDPQP='" + csvFileUrlDPQP + '\'' +
|
||||
", csvFileMd5DPQP='" + csvFileMd5DPQP + '\'' +
|
||||
", txtFileUrlDPQP='" + txtFileUrlDPQP + '\'' +
|
||||
", txtFileMd5DPQP='" + txtFileMd5DPQP + '\'' +
|
||||
", contrailSaveTimeDPQP=" + contrailSaveTimeDPQP +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
package com.mogo.och.bus.bean;
|
||||
package com.mogo.och.data.bean;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
@@ -8,6 +10,7 @@ package com.mogo.och.bus.bean;
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String nameKr;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
@@ -16,6 +19,10 @@ public class BusStationBean {
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private boolean leaving;
|
||||
|
||||
public String getNameKr() {
|
||||
return nameKr;
|
||||
}
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
@@ -88,6 +95,28 @@ public class BusStationBean {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BusStationBean that = (BusStationBean) o;
|
||||
return siteId == that.siteId
|
||||
&& seq == that.seq
|
||||
&& Double.compare(that.gcjLon, gcjLon) == 0
|
||||
&& Double.compare(that.gcjLat, gcjLat) == 0
|
||||
&& Double.compare(that.lon, lon) == 0
|
||||
&& Double.compare(that.lat, lat) == 0
|
||||
&& drivingStatus == that.drivingStatus
|
||||
&& leaving == that.leaving
|
||||
&& name.equals(that.name)
|
||||
&& nameKr.equals(that.nameKr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(siteId, name, nameKr, seq, gcjLon, gcjLat, lon, lat, drivingStatus, leaving);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusStationBean{" +
|
||||
@@ -102,4 +131,6 @@ public class BusStationBean {
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.mogo.och.data.bean
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/3/31
|
||||
*/
|
||||
data class BusTransferData (
|
||||
var loginStatus: Int,
|
||||
var routesResult: BusRoutesResult?,
|
||||
)
|
||||
28
OCH/mogo-och-data/src/main/java/com/mogo/och/data/manager/cache/CacheDataManager.kt
vendored
Normal file
28
OCH/mogo-och-data/src/main/java/com/mogo/och/data/manager/cache/CacheDataManager.kt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.mogo.och.data.manager.cache
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2023/3/27
|
||||
*/
|
||||
class CacheDataManager private constructor(){
|
||||
companion object{
|
||||
val instance: CacheDataManager by lazy (mode = LazyThreadSafetyMode.SYNCHRONIZED) {
|
||||
CacheDataManager()
|
||||
}
|
||||
}
|
||||
|
||||
fun putCacheData(context: Context, key:String, jsonStr: String){
|
||||
SharedPrefsMgr.getInstance(context).putString(key,jsonStr)
|
||||
}
|
||||
|
||||
fun getCacheData(context: Context, key: String) : String{
|
||||
return SharedPrefsMgr.getInstance(context).getString(key)
|
||||
}
|
||||
|
||||
fun clearCacheData(context: Context, key: String){
|
||||
SharedPrefsMgr.getInstance(context).remove(key)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.mogo.och.data
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,10 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
|
||||
1
OCH/mogo-och-shuttle-passenger/.gitignore
vendored
Normal file
1
OCH/mogo-och-shuttle-passenger/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
15
OCH/mogo-och-shuttle-passenger/README.md
Normal file
15
OCH/mogo-och-shuttle-passenger/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
src
|
||||
- androidTest Android 测试代码
|
||||
- basecommon 金旅开沃、接驳车 公用代码部分
|
||||
- jinlvvan 金旅开沃 独立代码部分
|
||||
- m1 金旅m1 独立代码部分
|
||||
- m2 金旅m2 独立代码部分
|
||||
- main 所有车型公用代码部分
|
||||
- shuttle 接驳车独立代码 因为接驳车和金旅开沃代码耦合厉害暂时放入到mogo-och-bus-passenger里面
|
||||
后期会创建独立module和mogo-och-bus-passenger平级
|
||||
- test 普通代码测试
|
||||
87
OCH/mogo-och-shuttle-passenger/build.gradle
Normal file
87
OCH/mogo-och-shuttle-passenger/build.gradle
Normal file
@@ -0,0 +1,87 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode Integer.valueOf(VERSION_CODE)
|
||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
|
||||
kapt {
|
||||
useBuildCache = false
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "vehicle"
|
||||
productFlavors {
|
||||
// 车型:金旅星辰、开沃 小巴业务
|
||||
jinlvvan {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '0'
|
||||
}
|
||||
// 车型:金旅m1 小巴业务
|
||||
m1 {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '1'
|
||||
}
|
||||
|
||||
// 车型:金旅m1 小巴业务
|
||||
m2 {
|
||||
dimension "vehicle"
|
||||
buildConfigField 'int', 'NEW_TEST', '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation rootProject.ext.dependencies.material
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
api project(":OCH:mogo-och-common-module")
|
||||
compileOnly project(":libraries:mogo-map")
|
||||
implementation project(':core:mogo-core-res')
|
||||
testImplementation 'junit:junit:4.12'
|
||||
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
0
OCH/mogo-och-shuttle-passenger/consumer-rules.pro
Normal file
0
OCH/mogo-och-shuttle-passenger/consumer-rules.pro
Normal file
3
OCH/mogo-och-shuttle-passenger/gradle.properties
Normal file
3
OCH/mogo-och-shuttle-passenger/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.och
|
||||
POM_ARTIFACT_ID=och-bus-passenger
|
||||
VERSION_CODE=1
|
||||
21
OCH/mogo-och-shuttle-passenger/proguard-rules.pro
vendored
Normal file
21
OCH/mogo-och-shuttle-passenger/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.mogo.och.bus.passenger;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.mogo.och.bus.passenger.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.mogo.och.bus.passenger;
|
||||
|
||||
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_TAXI_P;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils;
|
||||
import com.mogo.och.bus.passenger.constant.BusPassengerConst;
|
||||
import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment;
|
||||
import com.mogo.och.common.module.wigets.video.VideoPlayerActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* 网约车-Bus-乘客端
|
||||
*
|
||||
* Created on 2022/3/29
|
||||
*/
|
||||
@Route(path = BusPassengerConst.PATH)
|
||||
public class MogoOCHBusPassenger implements IMogoOCH {
|
||||
private static final String TAG = MogoOCHBusPassenger.class.getSimpleName();
|
||||
|
||||
private FragmentActivity mActivity;
|
||||
private int mContainerId;
|
||||
private BusPassengerRouteFragment mPassengerFragment;
|
||||
|
||||
@Override
|
||||
public void createCoverage(FragmentActivity activity, int containerId) {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Fragment createCoverage(@Nullable FragmentActivity activity, @Nullable Integer containerId) {
|
||||
this.mActivity = activity;
|
||||
this.mContainerId = containerId;
|
||||
showFragment();
|
||||
|
||||
if (AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)) {
|
||||
MultiDisplayUtils.INSTANCE.startActWithSecond(activity, VideoPlayerActivity.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
// 若不调用finish, 设置中打开关闭UITouch,会造成och fragment 重叠
|
||||
if (mActivity == null) return;
|
||||
mActivity.finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入鹰眼模式,设置手势缩放地图失效
|
||||
*/
|
||||
private void stepIntoVrMode() {
|
||||
CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "进入vr模式" );
|
||||
CallerMoGoUiSettingManager.INSTANCE.stepInDayMode();//白天模式 状态栏字体颜色变黑
|
||||
}
|
||||
|
||||
private void showFragment() {
|
||||
FragmentManager supportFragmentManager = mActivity.getSupportFragmentManager();
|
||||
if(mPassengerFragment == null){
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "准备add fragment======");
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(BusPassengerRouteFragment.TAG);
|
||||
if (fragmentByTag instanceof BusPassengerRouteFragment){
|
||||
mPassengerFragment = (BusPassengerRouteFragment)fragmentByTag;
|
||||
}else {
|
||||
mPassengerFragment = new BusPassengerRouteFragment();
|
||||
}
|
||||
if (!mPassengerFragment.isAdded()){
|
||||
supportFragmentManager.beginTransaction().add(mContainerId, mPassengerFragment
|
||||
,BusPassengerRouteFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "准备show fragment");
|
||||
supportFragmentManager.beginTransaction().show(mPassengerFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
private void hideFragment(){
|
||||
if (mPassengerFragment != null){
|
||||
mActivity.getSupportFragmentManager().beginTransaction().hide(mPassengerFragment).commitAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.mogo.och.bus.passenger.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.bean.BusPassengerStation;
|
||||
import com.mogo.och.common.module.utils.BlinkAnimationUtil;
|
||||
import com.mogo.och.common.module.wigets.MarqueeTextView;
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING;
|
||||
import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2022/4/6
|
||||
*/
|
||||
public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
private Context mContext;
|
||||
private List<BusStationBean> mStations;
|
||||
|
||||
public BusPassengerLineStationsAdapter(Context context, List<BusStationBean> stations){
|
||||
this.mContext = context;
|
||||
this.mStations = stations;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.bus_p_stations_common_item,parent,false);
|
||||
StationViewHolder viewHolder = new StationViewHolder(view);
|
||||
return viewHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
BusStationBean station = mStations.get(position);
|
||||
StationViewHolder viewHolder = (StationViewHolder)holder;
|
||||
viewHolder.stationName.setText(station.getName());
|
||||
BlinkAnimationUtil.clearAnimation(viewHolder.stationCircle);
|
||||
if (position == 0){ //第一个 起点
|
||||
viewHolder.stationTagTxt.setText("起");
|
||||
viewHolder.stationStationTag.setBackground(mContext.getDrawable(R.drawable.bg_bus_p_start_tag_bg));
|
||||
viewHolder.groupStationTagPanel.setVisibility(View.VISIBLE);
|
||||
viewHolder.curArrowBg.setVisibility(View.GONE);
|
||||
if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else {
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_gray);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
|
||||
}
|
||||
}else{
|
||||
if (position == mStations.size() - 1){
|
||||
viewHolder.stationTagTxt.setText("终");
|
||||
viewHolder.stationStationTag.setBackground(mContext.getDrawable(R.drawable.bg_bus_p_end_tag_bg));
|
||||
viewHolder.groupStationTagPanel.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
viewHolder.groupStationTagPanel.setVisibility(View.GONE);
|
||||
}
|
||||
viewHolder.curArrowBg.setVisibility(View.VISIBLE);
|
||||
BusStationBean preStation = mStations.get(position -1);
|
||||
if (station.getDrivingStatus() == STATION_STATUS_LEAVING ||
|
||||
(station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_grey);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_gray);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
|
||||
} else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_grey);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_current_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_green);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_green);
|
||||
BlinkAnimationUtil.setAnimation(viewHolder.stationCircle);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||
}else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING &&
|
||||
(preStation.getDrivingStatus() == STATION_STATUS_ARRIVING
|
||||
|| preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的
|
||||
viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_station_txt_color));
|
||||
viewHolder.curArrowBg.setImageResource(R.drawable.bus_p_line_blue);
|
||||
viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_blue);
|
||||
viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mStations.size();
|
||||
}
|
||||
}
|
||||
class StationViewHolder extends RecyclerView.ViewHolder{
|
||||
public MarqueeTextView stationName;
|
||||
public ImageView stationCircle;
|
||||
public ImageView curArrowBg;
|
||||
public ImageView stationStationTag;
|
||||
public TextView stationTagTxt;
|
||||
public Group groupStationTagPanel;
|
||||
public StationViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
stationName = itemView.findViewById(R.id.bus_p_station);
|
||||
stationCircle = itemView.findViewById(R.id.bus_p_circle);
|
||||
curArrowBg = itemView.findViewById(R.id.bus_p_cur_arrow_bg);
|
||||
stationStationTag = itemView.findViewById(R.id.bus_p_tag);
|
||||
stationTagTxt = itemView.findViewById(R.id.bus_p_tag_txt);
|
||||
groupStationTagPanel = itemView.findViewById(R.id.group_station_tag_panel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.och.bus.passenger.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/3/22
|
||||
*
|
||||
* 小巴车运营状态返回参数
|
||||
*/
|
||||
public class BusPassengerOperationStatusResponse extends BaseData {
|
||||
|
||||
public Result data;
|
||||
|
||||
public static class Result {
|
||||
private String sn; //司机屏sn
|
||||
private String phone; //司机手机号
|
||||
public String plateNumber; //车牌号
|
||||
public int driverStatus;//0:已收车,1:已出车
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mogo.och.bus.passenger.bean;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2021/3/22
|
||||
*
|
||||
* 根据车机行驶线路站点信息
|
||||
*/
|
||||
class BusPassengerQueryLineRequest {
|
||||
|
||||
private String sn;
|
||||
public BusPassengerQueryLineRequest(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.och.bus.passenger.bean;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.och.data.bean.BusRoutesResult;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusPassengerRoutesResponse extends BaseData {
|
||||
private BusRoutesResult data;
|
||||
|
||||
public BusRoutesResult getResult() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setResult(BusRoutesResult data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OchBusRoutesResponse{" +
|
||||
"data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.mogo.och.bus.passenger.bean;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 网约车小巴路线接口返回接口数据封装
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class BusPassengerRoutesResult {
|
||||
private List<BusPassengerStation> sites;
|
||||
private int lineId;
|
||||
private String name; //线路名称
|
||||
private int lineType; //线路类型,0:环形
|
||||
private String description;
|
||||
private int status;
|
||||
private String runningDur; //运营时间
|
||||
private long taskTime; //线路时间班次
|
||||
private long writeVersion;//更新时间戳
|
||||
|
||||
public List<BusPassengerStation> getSites() {
|
||||
return sites;
|
||||
}
|
||||
|
||||
public int getLineId() {
|
||||
return lineId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getLineType() {
|
||||
return lineType;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getRunningDur() {
|
||||
return runningDur;
|
||||
}
|
||||
|
||||
public long getWriteVersion() {
|
||||
return writeVersion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BusPassengerRoutesResult{" +
|
||||
"sites=" + sites +
|
||||
", lineId=" + lineId +
|
||||
", name='" + name + '\'' +
|
||||
", lineType=" + lineType +
|
||||
", description='" + description + '\'' +
|
||||
", status=" + status +
|
||||
", writeVersion="+ writeVersion+
|
||||
", runningDur='" + runningDur + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BusPassengerRoutesResult that = (BusPassengerRoutesResult) o;
|
||||
return lineId == that.lineId
|
||||
&& lineType == that.lineType
|
||||
&& status == that.status
|
||||
&& sites.equals(that.sites)
|
||||
&& name.equals(that.name)
|
||||
&& runningDur.equals(that.runningDur);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sites, lineId, name, lineType, description, status, runningDur);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.mogo.och.bus.passenger.bean;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 单个网约车小巴车站信息
|
||||
*
|
||||
* @author wangmingjun
|
||||
*/
|
||||
public class BusPassengerStation {
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private String cityCode;
|
||||
private double lon; //高精坐标
|
||||
private double lat; //高精坐标
|
||||
private double gcjLon; //高德坐标
|
||||
private double gcjLat; //高德坐标
|
||||
private int businessType; //站点类型,9:taxi,10:bus
|
||||
private int status;
|
||||
private int siteId;
|
||||
private int seq;
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
private boolean leaving;
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public void setCityCode(String cityCode) {
|
||||
this.cityCode = cityCode;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public void setBusinessType(int businessType) {
|
||||
this.businessType = businessType;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setSiteId(int siteId) {
|
||||
this.siteId = siteId;
|
||||
}
|
||||
|
||||
public void setSeq(int seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public void setDrivingStatus(int drivingStatus) {
|
||||
this.drivingStatus = drivingStatus;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public String getCityCode() {
|
||||
return cityCode;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
public double getGcjLat() {
|
||||
return gcjLat;
|
||||
}
|
||||
|
||||
public int getBusinessType() {
|
||||
return businessType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
public int getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public int getDrivingStatus() {
|
||||
return drivingStatus;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setIfStop(int ifStop) {
|
||||
this.ifStop = ifStop;
|
||||
}
|
||||
|
||||
public int getIfStop() {
|
||||
return ifStop;
|
||||
}
|
||||
|
||||
public void setLeaving(boolean leaving) {
|
||||
this.leaving = leaving;
|
||||
}
|
||||
|
||||
public boolean isLeaving() {
|
||||
return leaving;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OchBusStation{" +
|
||||
"name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", cityCode='" + cityCode + '\'' +
|
||||
", lon=" + lon +
|
||||
", lat=" + lat +
|
||||
", businessType=" + businessType +
|
||||
", status=" + status +
|
||||
", siteId=" + siteId +
|
||||
", seq=" + seq +
|
||||
", drivingStatus=" + drivingStatus +
|
||||
", ifStop=" + ifStop +
|
||||
", leaving=" + leaving +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
BusPassengerStation that = (BusPassengerStation) o;
|
||||
return Double.compare(that.lon, lon) == 0
|
||||
&& Double.compare(that.lat, lat) == 0
|
||||
&& Double.compare(that.gcjLon, gcjLon) == 0
|
||||
&& Double.compare(that.gcjLat, gcjLat) == 0
|
||||
&& businessType == that.businessType
|
||||
&& status == that.status
|
||||
&& siteId == that.siteId
|
||||
&& seq == that.seq
|
||||
&& drivingStatus == that.drivingStatus
|
||||
&& ifStop == that.ifStop
|
||||
&& leaving == that.leaving
|
||||
&& Objects.equals(name, that.name)
|
||||
&& Objects.equals(cityCode, that.cityCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, description, cityCode, lon, lat, gcjLon, gcjLat, businessType, status, siteId, seq, drivingStatus, ifStop, leaving);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.och.bus.passenger.callback;
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
* @date: 2021/10/22
|
||||
*/
|
||||
public interface IBusPassegerDriverStatusCallback {
|
||||
void changeOperationStatus(boolean changeStatus);
|
||||
void updatePlateNumber(String plateNumber);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user