From b7fda50dd5851acba369b5c7e4b90b0c9101dbee Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 23 May 2025 21:04:15 +0800 Subject: [PATCH] =?UTF-8?q?[routing]=20[fea]=20[bus=E3=80=81=E6=8E=A5?= =?UTF-8?q?=E9=A9=B3=E3=80=81=E7=8F=AD=E8=BD=A6=20=E9=AA=8C=E8=B7=AF?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20UI=20=E6=B5=81=E7=A8=8B=E5=AE=8C=E6=88=90]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/routing/bean/RoutingBean.kt | 82 +++-- .../och/biz/routing/net/RoutingServiceApi.kt | 24 ++ .../biz/routing/net/RoutingServiceManager.kt | 140 ++++++-- .../och/biz/routing/ui/RoutingSwitchView.kt | 26 +- .../ui/routingselect/RoutingSelectModel.kt | 33 +- .../ui/runing/other/TaskRunningAdapter.kt | 263 ++++++++++++++ .../ui/runing/other/TaskRunningModel.kt | 253 ++++++++++++++ .../ui/runing/other/TaskRunningView.kt | 233 +++++++++++++ ...ingRunningModel.kt => TaxiRunningModel.kt} | 7 +- ...utingRunningView.kt => TaxiRunningView.kt} | 7 +- .../drawable-nodpi/bus_runnint_task_end.png | Bin 0 -> 1798 bytes .../bus_runnint_task_middle.png | Bin 0 -> 610 bytes .../drawable-nodpi/bus_runnint_task_past.png | Bin 0 -> 261 bytes .../drawable-nodpi/bus_runnint_task_start.png | Bin 0 -> 1606 bytes .../bus_switch_line_adapter_point.png | Bin 0 -> 610 bytes .../bus_switch_line_adapter_point_pass.png | Bin 0 -> 261 bytes ...s_running_task_arrive_station_selector.xml | 8 + .../bus_running_task_complete_selector.xml | 8 + .../drawable/bus_switch_line_normal.xml | 6 + .../drawable/bus_switch_line_selected.xml | 8 + .../drawable/bus_switch_line_selector.xml | 6 + .../drawable/bus_switch_task_normal.xml | 6 + .../drawable/bus_switch_task_selected.xml | 6 + .../drawable/bus_task_current_station_bg.xml | 6 + .../res/routing/layout/biz_other_running.xml | 122 +++++++ .../routing/layout/biz_other_running_item.xml | 79 +++++ .../res/routing/layout/biz_taxi_switch.xml | 12 +- .../main/res/routing/values/strings.xm.xml | 4 + .../och/bridge/autopilot/line/LineManager.kt | 132 ++++--- .../common/src/main/res/values/strings.xml | 4 + .../com/mogo/och/data/bean/BusStationBean.kt | 323 ++++++++---------- .../com/mogo/och/data/bean/ContraiInfo.kt | 2 +- .../mogo/och/offline/model/ThirdDeviceData.kt | 8 +- .../mogo/och/weaknet/model/ThirdDeviceData.kt | 8 +- .../ui/BusPassengerRouteFragment.java | 4 +- .../BusPassengerLineStationsAdapter.java | 18 +- .../taxi/bean/TaxiDriverCarServiceBean.kt | 2 +- 37 files changed, 1481 insertions(+), 359 deletions(-) create mode 100644 OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningAdapter.kt create mode 100644 OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningModel.kt create mode 100644 OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt rename OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/{RoutingRunningModel.kt => TaxiRunningModel.kt} (97%) rename OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/{RoutingRunningView.kt => TaxiRunningView.kt} (97%) create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_end.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_middle.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_past.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_start.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_switch_line_adapter_point.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_switch_line_adapter_point_pass.png create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_running_task_arrive_station_selector.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_running_task_complete_selector.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_normal.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selected.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selector.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_normal.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_selected.xml create mode 100644 OCH/common/biz/src/main/res/routing/drawable/bus_task_current_station_bg.xml create mode 100644 OCH/common/biz/src/main/res/routing/layout/biz_other_running.xml create mode 100644 OCH/common/biz/src/main/res/routing/layout/biz_other_running_item.xml create mode 100644 OCH/common/biz/src/main/res/routing/values/strings.xm.xml diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/bean/RoutingBean.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/bean/RoutingBean.kt index 46af25f4e2..c758b12848 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/bean/RoutingBean.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/bean/RoutingBean.kt @@ -3,6 +3,7 @@ package com.mogo.och.biz.routing.bean import com.mogo.eagle.core.data.BaseData import com.mogo.och.data.bean.BusStationBean import com.mogo.och.data.bean.ContraiInfo +import com.mogo.och.data.bean.LineInfo /** * 灰度路线信息 @@ -29,7 +30,6 @@ data class RoutingSite( var gcjLon: Double,// 高德坐标 var wgs84Lon: Double,//高精坐标 var wgs84Lat: Double,//高精坐标 - var pointType: Int // 1:途径点 2:禁行点 3:站点 ) { fun toBusStationBean(): BusStationBean { val temp = BusStationBean() @@ -39,7 +39,6 @@ data class RoutingSite( temp.lon = wgs84Lon temp.gcjLat = gcjLat temp.gcjLon = gcjLon - temp.pointType = pointType temp.isLeaving = true return temp } @@ -49,36 +48,65 @@ data class RoutingSite( * 轨迹信息 */ data class ContrailBean( + var businessType:Int=0, + var contrailId: Long = -1L, + var contrailSaveTime: Long = -1L, + var csvFileMd5: String = "", + var csvFileUrl: String = "", var lineId: Long = -1L, var lineName: String = "", - var contrailId: Long = -1L, - var csvFileUrl: String = "", - var csvFileMd5: String = "", - var txtFileUrl: String = "", + var segmentPointList:MutableList = mutableListOf(), var txtFileMd5: String = "", - var contrailSaveTime: Long = -1L, - var csvFileUrlDPQP: String = "", - var csvFileMd5DPQP: String = "", - var txtFileUrlDPQP: String = "", - var txtFileMd5DPQP: String = "", - var contrailSaveTimeDPQP: Long = -1L, - var version: Long = -1L, - var passPoints: MutableList?, // 用于算路的经停点 - var blackPoints: MutableList?, // 用于算路的黑名單點 + var txtFileUrl: String = "", ) { fun toContraiInfo(): ContraiInfo { val tempPassPoints = mutableListOf() - passPoints?.forEach { - tempPassPoints.add(it.toBusStationBean()) - } val tempblackPoints = mutableListOf() - blackPoints?.forEach { - tempPassPoints.add(it.toBusStationBean()) + segmentPointList.forEach { + for (pointInfo in it.blackList) { + tempblackPoints.add(pointInfo.toBusStationBean()) + } + for (pointInfo in it.pointList) { + tempPassPoints.add(pointInfo.toBusStationBean()) + } } - return ContraiInfo(lineId,csvFileUrl,csvFileMd5,txtFileUrl,txtFileMd5,contrailSaveTime,tempPassPoints,tempblackPoints) + return ContraiInfo(lineId,csvFileUrl,csvFileMd5,txtFileUrl,txtFileMd5,contrailSaveTime,tempPassPoints,tempblackPoints, 2) + } + + fun getPassAndBlackPoint(index: Int): Pair, MutableList> { + val tempPassPoints = mutableListOf() + val tempblackPoints = mutableListOf() + segmentPointList.forEach { + if(it.segment==index){ + for (pointInfo in it.blackList) { + tempblackPoints.add(pointInfo.toBusStationBean()) + } + for (pointInfo in it.pointList) { + tempPassPoints.add(pointInfo.toBusStationBean()) + } + return Pair(tempPassPoints,tempblackPoints) + } + } + return Pair(tempPassPoints,tempblackPoints) } } +data class PointInfoGroup(var blackList:MutableList,//用于算路的黑名單點 + var pointList:MutableList,//用于算路的经停点 + var segment:Int) + +data class PointInfo(var latitude:Double,var longitude:Double,var pointType:Int,var segment:Int) { + fun toBusStationBean(): BusStationBean { + val temp = BusStationBean() + temp.lat = latitude + temp.lon = longitude + temp.pointType = pointType + temp.isLeaving = true + return temp + } +} + + /** * 查询灰度线路列表 */ @@ -114,7 +142,8 @@ data class EndGrayContrailTaskReq( data class StartGrayAndQueryContrailRsp( var taskId: Long?, var contrail: ContrailBean?, - var grayLineBean: GrayLineBean + var grayLineBean: GrayLineBean, + var stationList: MutableList ) : BaseData() data class PointError(var code: String, var name: String, var isCheck: Boolean = false) @@ -144,5 +173,14 @@ enum class EndGrayTaskFeedbackType(var type: Int) { USABLE_NO(2) } +data class BindLineListResponse(val data: List?) : BaseData() { + + data class Result( + var line: LineInfo?, + var siteList: List?,//站点名称 + ) +} + + diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceApi.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceApi.kt index 021763c49e..07408228a7 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceApi.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceApi.kt @@ -3,6 +3,7 @@ package com.mogo.och.biz.routing.net import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.commons.storage.SharedPrefsMgr import com.mogo.eagle.core.data.BaseData +import com.mogo.och.biz.routing.bean.BindLineListResponse import com.mogo.och.biz.routing.bean.QueryGrayContrailListRsp import com.mogo.och.biz.routing.bean.QueryPointErrorReasonsRsp import com.mogo.och.biz.routing.bean.QueryRoutingContrailByIdRsp @@ -84,4 +85,27 @@ interface RoutingServiceApi { @Header("ticket") ticket: String = SharedPrefsMgr.getInstance().token, @Body data: SaveGrayContrailErrorReasons ): Observable + + + /** + * 查询车辆配置的所有路线 + * @param appId + * @param ticket + * @param sn + * @return + */ + @GET("/och-vehicle/public/car/queryBindLineListBySn") + fun queryBindLineListBySn( + @Header("appId") appId: String?, + @Header("ticket") ticket: String?, + @Query("sn") sn: String? + ): Observable? + + @GET("/och-shuttle-cabin/api/business/v1/driver/queryBindLineListBySn") + fun daliQueryBindLineListBySn( + @Header("appId") appId: String?, + @Header("ticket") ticket: String?, + @Query("sn") sn: String? + ): Observable? + } \ No newline at end of file diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceManager.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceManager.kt index 9b2365015a..c6c752ba44 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceManager.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/net/RoutingServiceManager.kt @@ -1,22 +1,31 @@ package com.mogo.och.biz.routing.net import android.content.Context +import com.mogo.cloud.passport.MoGoAiCloudClientConfig +import com.mogo.commons.env.ProjectUtils import com.mogo.commons.storage.SharedPrefsMgr import com.mogo.eagle.core.data.BaseData +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.network.MoGoRetrofitFactory +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.och.biz.routing.bean.EndGrayContrailTaskReq import com.mogo.och.biz.routing.bean.GrayLineBean import com.mogo.och.biz.routing.bean.QueryGrayContrailListRsp import com.mogo.och.biz.routing.bean.QueryPointErrorReasonsRsp +import com.mogo.och.biz.routing.bean.QueryRoutingContrailByIdRsp import com.mogo.och.biz.routing.bean.SaveGrayContrailErrorReasons import com.mogo.och.biz.routing.bean.StartGrayAndQueryContrailRsp import com.mogo.och.biz.routing.bean.StartGrayContrailTaskReq +import com.mogo.och.biz.routing.bean.StartGrayContrailTaskRsp import com.mogo.och.common.module.biz.login.LoginStatusManager import com.mogo.och.common.module.constant.OchCommonConst import com.mogo.och.common.module.network.OchCommonServiceCallback import com.mogo.och.common.module.network.OchCommonSubscribeImpl import com.mogo.och.common.module.network.interceptor.transformTry +import com.mogo.och.data.bean.BusStationBean +import com.mogo.och.weaknet.repository.db.exception.NetDataException import io.reactivex.Observable +import io.reactivex.functions.BiFunction object RoutingServiceManager { @@ -78,40 +87,103 @@ object RoutingServiceManager { callback: OchCommonServiceCallback ) { val data = StartGrayContrailTaskReq(sn, contrailId ,LoginStatusManager.getOchLoginInfo()?.driverId?:0L) - var taskId: Long - mRoutingServiceApi.startGrayTask(data = data) - .flatMap { startGrayRsp -> - if (startGrayRsp.data == null) { - taskId = -1L - val result = StartGrayAndQueryContrailRsp( - taskId = taskId, - contrail = null, - grayLineBean = grayLineBean - ) - result.code = startGrayRsp.code - result.msg = startGrayRsp.msg - return@flatMap Observable.just(result) - } - taskId = startGrayRsp.data!! - return@flatMap mRoutingServiceApi.queryRoutingContrailById(contrailId = contrailId) - .map { queryRoutingContrailRsp -> - val result = StartGrayAndQueryContrailRsp( - taskId = taskId, - contrail = queryRoutingContrailRsp.data, - grayLineBean = grayLineBean - ) - result.code = queryRoutingContrailRsp.code - result.msg = queryRoutingContrailRsp.msg - result - } - } - .transformTry() - .subscribe( - OchCommonSubscribeImpl( - context, - callback, - "startGrayTaskAndQueryRoutingContrail" + + val requestContral = mRoutingServiceApi.queryRoutingContrailById(contrailId = contrailId) + val startRouting = mRoutingServiceApi.startGrayTask(data = data) + + + if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) + ||AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode) + ||AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode) + ) { + val querySites = if(ProjectUtils.isSaas()) { + mRoutingServiceApi.queryBindLineListBySn( + MoGoAiCloudClientConfig.getInstance().serviceAppId, + SharedPrefsMgr.getInstance().token, + SharedPrefsMgr.getInstance().sn ) - ) + }else if(ProjectUtils.isDali()){ + mRoutingServiceApi.queryBindLineListBySn( + MoGoAiCloudClientConfig.getInstance().serviceAppId, + SharedPrefsMgr.getInstance().token, + SharedPrefsMgr.getInstance().sn + ) + }else{ + null + } + querySites?.let { querysites-> + Observable.zip(requestContral,startRouting,querysites) { t1, t2, t3 -> + if ((t1.code != 0 && t1.code != 200) || t1.data == null) { + throw NetDataException(t1.code, "${t1.msg}_queryCabinContrailById") + } + if (t2.code != 0 && t2.code != 200 || t2.data == null) { + throw NetDataException(t2.code, "${t2.msg}_saveFeedback") + } + if (t3.code != 0 && t3.code != 200 || t3.data == null) { + throw NetDataException(t3.code, "${t3.msg}_saveFeedback") + } + val stationList = mutableListOf() + t3.data.let { lineList-> + val info = lineList.filter { + it.line?.lineId==grayLineBean.lineId + } + if(info.isNotEmpty()){ + info.first().siteList?.let { it1 -> stationList.addAll(it1) } + }else{ + throw NetDataException(t3.code, "${t3.msg}_queryBindLineListBySn _ 未找到线路") + } + } + val result = StartGrayAndQueryContrailRsp( + taskId = t2.data!!, + contrail = t1.data, + grayLineBean = grayLineBean, + stationList = stationList + ) + result.code = t1.code + result.msg = t1.msg + result + }.transformTry() + .subscribe( + OchCommonSubscribeImpl( + context, + callback, + "startGrayTaskAndQueryRoutingContrail" + ) + ) + } + }else if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + Observable.zip(requestContral,startRouting) { t1, t2 -> + if ((t1.code != 0 && t1.code != 200)||t1.data==null) { + throw NetDataException(t1.code,"${t1.msg}_queryCabinContrailById") + } + if (t2.code != 0 && t2.code != 200||t2.data==null) { + throw NetDataException(t2.code,"${t2.msg}_saveFeedback") + } + val stationList = mutableListOf() + grayLineBean.startSite?.toBusStationBean()?.let { + stationList.add(it) + } + grayLineBean.endSite?.toBusStationBean()?.let { + stationList.add(it) + } + val result = StartGrayAndQueryContrailRsp( + taskId = t2.data!!, + contrail = t1.data, + grayLineBean = grayLineBean, + stationList = stationList + ) + result.code = t1.code + result.msg = t1.msg + result + }.transformTry() + .subscribe( + OchCommonSubscribeImpl( + context, + callback, + "startGrayTaskAndQueryRoutingContrail" + ) + ) + } + } } \ No newline at end of file diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/RoutingSwitchView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/RoutingSwitchView.kt index f87e747569..81b92d0132 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/RoutingSwitchView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/RoutingSwitchView.kt @@ -6,13 +6,16 @@ import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeViewModelStoreOwner +import com.mogo.eagle.core.data.config.FunctionBuildConfig +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.och.biz.R import com.mogo.och.biz.routing.bean.StartGrayAndQueryContrailRsp import com.mogo.och.common.module.utils.ResourcesUtils -import kotlinx.android.synthetic.main.biz_taxi_switch.view.routingRunningView +import kotlinx.android.synthetic.main.biz_taxi_switch.view.routingOtherRunningView import kotlinx.android.synthetic.main.biz_taxi_switch.view.routingSelectView +import kotlinx.android.synthetic.main.biz_taxi_switch.view.routingTaxiRunningView import kotlinx.android.synthetic.main.biz_taxi_switch.view.switch_routing_loading class RoutingSwitchView: ConstraintLayout, RoutingSwitchModel.SwtichLineViewCallback { @@ -63,7 +66,8 @@ class RoutingSwitchView: ConstraintLayout, RoutingSwitchModel.SwtichLineViewCall override fun showLoadingView(){ startLoading = System.currentTimeMillis() routingSelectView.visibility = GONE - routingRunningView.visibility = GONE + routingTaxiRunningView.visibility = GONE + routingOtherRunningView.visibility = GONE switch_routing_loading.visibility = VISIBLE } @@ -73,7 +77,8 @@ class RoutingSwitchView: ConstraintLayout, RoutingSwitchModel.SwtichLineViewCall CallerLogger.d(TAG,"展示选择线路 lading 展示了 ${dex}毫秒") ThreadUtils.runOnUiThreadDelayed({ routingSelectView.visibility = VISIBLE - routingRunningView.visibility = GONE + routingTaxiRunningView.visibility = GONE + routingOtherRunningView.visibility = GONE switch_routing_loading.visibility = GONE },dex, ThreadUtils.MODE.QUEUE) } @@ -84,9 +89,20 @@ class RoutingSwitchView: ConstraintLayout, RoutingSwitchModel.SwtichLineViewCall CallerLogger.d(TAG,"展示线路 lading 展示了 ${dex}毫秒") ThreadUtils.runOnUiThreadDelayed({ routingSelectView.visibility = GONE - routingRunningView.visibility = VISIBLE switch_routing_loading.visibility = GONE - routingRunningView.setData(data) + if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) + || AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode) + || AppIdentityModeUtils.isScheduled(FunctionBuildConfig.appIdentityMode) + ) { + routingTaxiRunningView.visibility = GONE + routingOtherRunningView.visibility = VISIBLE + routingOtherRunningView.setData(data) + }else if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + routingTaxiRunningView.visibility = VISIBLE + routingOtherRunningView.visibility = GONE + routingTaxiRunningView.setData(data) + } + },dex, ThreadUtils.MODE.QUEUE) } diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectModel.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectModel.kt index 29018ea77a..f73b7cfcd1 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectModel.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/routingselect/RoutingSelectModel.kt @@ -6,6 +6,7 @@ import com.mogo.commons.storage.SharedPrefsMgr import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.core.utilcode.util.NetworkUtils import com.mogo.eagle.core.utilcode.util.ToastUtils @@ -17,7 +18,7 @@ import com.mogo.och.bridge.autopilot.line.LineManager import com.mogo.och.common.module.network.OchCommonServiceCallback import com.mogo.och.data.bean.BusStationBean import com.mogo.och.data.bean.LineInfo -import com.mogo.och.biz.routing.ui.runing.taxi.RoutingRunningModel +import com.mogo.och.biz.routing.ui.runing.taxi.TaxiRunningModel import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager /** @@ -27,7 +28,7 @@ import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager */ class RoutingSelectModel : ViewModel() { - private val TAG = RoutingRunningModel::class.java.simpleName + private val TAG = M_OCHCOMMON +"RoutingSelectModel" private var viewCallback: SwtichRoutingViewCallback? = null @@ -146,37 +147,35 @@ class RoutingSelectModel : ViewModel() { val grayLineBean = data.grayLineBean val contrailBean = data.contrail val grayId = data.taskId - if (grayLineBean == null || contrailBean == null) { + val stationList = data.stationList + if (grayLineBean == null || contrailBean == null || stationList.size < 2) { ToastUtils.showShort("灰度线路或轨迹信息异常,请稍后再试") OchChainLogManager.writeChainLogRouting("[开始任务]","[开始任务] 灰度线路或轨迹信息异常,请稍后再试") return } OchChainLogManager.writeChainLogRouting("[启自驾]","[启自驾] 准备启动自驾") - val startStation = grayLineBean.startSite?.toBusStationBean() - val endStation = grayLineBean.endSite?.toBusStationBean() - val temp = mutableListOf() - if(startStation!=null){ - temp.add(startStation) - } - if(endStation!=null){ - temp.add(endStation) + stationList.forEachIndexed { index, busStationBean -> + if(index>0){ + val (tempPassPoints, tempblackPoints) = contrailBean.getPassAndBlackPoint(index) + busStationBean.passPoints = tempPassPoints + busStationBean.blackPoints = tempblackPoints + } } + LineManager.setLineInfo( - LineInfo( - grayLineBean.lineId?:0L, + LineInfo(grayLineBean.lineId?:0L, grayLineBean.lineName?:"", orderId = "${data.taskId}", - siteInfos = temp - ) + siteInfos = stationList) ) LineManager.setContraiInfo(contrailBean.toContraiInfo()) - LineManager.setStartAndEndStation(startStation,endStation) CallerEagleBaseFunctionCall4OchManager.updateOrderStatus(true) viewCallback?.onStartGrayTaskAndQueryContrailSuccess(data) // Routing 从这里解析出经停信息,轨迹信息,并调用下载轨迹接口 - LineManager.initAutopilotControlParameters()?.let { + LineManager.initAutopilotControlParametersFromContrai()?.let { + CallerLogger.d(TAG,"下发下载轨迹信息:${it}") CallerAutoPilotControlManager.sendTrajectoryDownloadReq(it) } } diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningAdapter.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningAdapter.kt new file mode 100644 index 0000000000..f62e9aa90a --- /dev/null +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningAdapter.kt @@ -0,0 +1,263 @@ +package com.mogo.och.biz.routing.ui.runing.other + +import android.animation.ArgbEvaluator +import android.content.Context +import android.graphics.drawable.GradientDrawable +import android.util.TypedValue +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.appcompat.widget.AppCompatImageView +import androidx.appcompat.widget.AppCompatTextView +import androidx.recyclerview.widget.RecyclerView +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON +import com.mogo.och.biz.R +import com.mogo.och.common.module.utils.ResourcesUtils +import com.mogo.och.data.bean.BusStationBean +import me.jessyan.autosize.utils.AutoSizeUtils + +/** + * 路线列表adapter + */ +class TaskRunningAdapter( + private val mContext: Context, + val mData: MutableList +) : RecyclerView.Adapter() { + + companion object { + const val TAG = "${M_OCHCOMMON}TaskRunningAdapter" + } + + private val argbEvaluator: ArgbEvaluator = ArgbEvaluator() + private val startColor = ResourcesUtils.getColor(R.color.common_1970FF) + private val endColor = ResourcesUtils.getColor(R.color.common_19FF7F) + private val heightItem = 100f + private val halfHeight = 16.5f + private var totalHeight = 0f + + + + override fun onCreateViewHolder( + parent: ViewGroup, + viewType: Int + ): TaskRunningViewHolder { + val view = LayoutInflater.from(mContext).inflate( + R.layout.biz_other_running_item, parent, false + ) + return TaskRunningViewHolder(view) + } + + override fun onBindViewHolder(holder: TaskRunningViewHolder, position: Int) { + val currentPosition = holder.bindingAdapterPosition + val line = mData[currentPosition] + holder.actvStationName.text = line.name + val startStationIndex = TaskRunningModel.currentIndex + if (startStationIndex > 0) { + CallerLogger.d(TAG, "位置:$currentPosition 当前站${mData[startStationIndex]} ") + } + + if (currentPosition < startStationIndex) { + holder.actvStationName.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + AutoSizeUtils.dp2px(mContext, 40f).toFloat() + ) + holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.common_4DFFFFFF)) + holder.acivStationHead.setImageResource(R.drawable.bus_switch_line_adapter_point_pass) + } else if (currentPosition == startStationIndex) { + holder.actvStationName.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + AutoSizeUtils.dp2px(mContext, 45f).toFloat() + ) + holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.common_2EACFF)) + holder.acivStationHead.setImageResource(R.drawable.bus_runnint_task_middle) + } else { + holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.white)) + holder.actvStationName.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + AutoSizeUtils.dp2px(mContext, 40f).toFloat() + ) + holder.itemView.background = null + holder.acivStationHead.setImageResource(R.drawable.bus_runnint_task_middle) + } + + when (currentPosition) { + 0 -> { + holder.acivStationHeadBig.visibility = View.VISIBLE + holder.acivStationHead.visibility = View.INVISIBLE + holder.acivStationHeadBig.setImageResource(R.drawable.bus_runnint_task_start) + holder.middleStationBg.visibility = View.GONE + holder.startStationBg.visibility = View.VISIBLE + holder.endStationBg.visibility = View.GONE + if (startStationIndex == 0) { + if (line.isLeaving) { + // 下端 灰色 + holder.startStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + holder.itemView.background = null + } else { + // 下端 彩色 + holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg) + + val orientation = GradientDrawable.Orientation.TOP_BOTTOM + val temp01 = GradientDrawable( + orientation, intArrayOf( + startColor, + endColor + ) + ) + holder.startStationBg.background = temp01 + } + } else { + // 下端 灰色 + holder.startStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + holder.itemView.background = null + } + } + + mData.size - 1 -> { + holder.acivStationHeadBig.visibility = View.VISIBLE + holder.acivStationHead.visibility = View.INVISIBLE + holder.acivStationHeadBig.setImageResource(R.drawable.bus_runnint_task_end) + holder.middleStationBg.visibility = View.GONE + holder.startStationBg.visibility = View.GONE + holder.endStationBg.visibility = View.VISIBLE + if (startStationIndex == itemCount - 1) { + if (line.isLeaving) { + holder.endStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg) + } else { + holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg) + holder.endStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + } + } else { + // 上端 彩色 + holder.itemView.background = null + val startColorTemp = argbEvaluator.evaluate( + ((totalHeight - halfHeight) / totalHeight).toFloat(), + startColor, + endColor + ) as Int + val endColorTemp = argbEvaluator.evaluate(1f, startColor, endColor) as Int + val orientation = GradientDrawable.Orientation.TOP_BOTTOM + val temp01 = GradientDrawable( + orientation, intArrayOf( + startColorTemp, + endColorTemp + ) + ) + holder.endStationBg.background = temp01 + } + } + + else -> { + holder.acivStationHeadBig.visibility = View.GONE + holder.acivStationHead.visibility = View.VISIBLE + holder.middleStationBg.visibility = View.VISIBLE + holder.startStationBg.visibility = View.GONE + holder.endStationBg.visibility = View.GONE + if (currentPosition == startStationIndex) { + if (line.isLeaving) { + // 灰色 + holder.middleStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + holder.itemView.background = null + } else { + // 彩色 + holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg) + val startColorTemp = argbEvaluator.evaluate(0f, startColor, endColor) as Int + val endColorTemp = + argbEvaluator.evaluate(100f / totalHeight, startColor, endColor) as Int + val orientation = GradientDrawable.Orientation.TOP_BOTTOM + val temp01 = GradientDrawable( + orientation, intArrayOf( + startColorTemp, + endColorTemp + ) + ) + holder.middleStationBg.background = temp01 + } + } else if (currentPosition < startStationIndex) { + // 灰色 + holder.middleStationBg.setBackgroundResource(R.color.common_4DFFFFFF) + holder.itemView.background = null + } else { + var dex = 0f + if (startStationIndex == 0) { + val firstItemData = mData[0] + if (!firstItemData.isLeaving) { + dex = halfHeight + } + } else { + val checkIndex = mData.get(startStationIndex) + if (!checkIndex.isLeaving) { + dex = heightItem + } + } + // 彩色 + holder.itemView.background = null + val index = (currentPosition - startStationIndex - 1) * 100 + val startFraction = (dex + index) / totalHeight + val endFraction = (dex + index + 100) / totalHeight + CallerLogger.d( + TAG, + "位置:$currentPosition 当前站${startStationIndex} 开始百分比:${startFraction} 结束百分比:${endFraction}" + ) + val startColorTemp = + argbEvaluator.evaluate(startFraction, startColor, endColor) as Int + val endColorTemp = + argbEvaluator.evaluate(endFraction, startColor, endColor) as Int + val orientation = GradientDrawable.Orientation.TOP_BOTTOM + val temp01 = GradientDrawable( + orientation, intArrayOf( + startColorTemp, + endColorTemp + ) + ) + holder.middleStationBg.background = temp01 + } + } + } + if (currentPosition == startStationIndex + 1) { + val preLine = mData[currentPosition - 1] + if (preLine.isLeaving) { + holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg) + } else { + holder.itemView.background = null + } + } + + } + + override fun getItemCount(): Int { + return mData.size + } + + fun setDataList(dataList: List) { + this.mData.clear() + this.mData.addAll(dataList) + totalHeight = 33 + (dataList.size - 2) * heightItem + notifyItemRangeChanged(0, dataList.size, true) + } + + fun notifyChange(){ + if (TaskRunningModel.currentIndex == 0) { + totalHeight = 33 + (mData.size - 2) * heightItem + } else { + totalHeight = + (halfHeight + (mData.size - 1 - TaskRunningModel.currentIndex) * heightItem).toFloat() + } + notifyItemRangeChanged(0, mData.size, true) + } + class TaskRunningViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + val actvStationName: AppCompatTextView = itemView.findViewById(R.id.actv_station_name)//站点名称 + val acivStationHead: AppCompatImageView = + itemView.findViewById(R.id.aciv_station_head)//普通站点标识 不是起始和终点坐标 + val acivStationHeadBig: AppCompatImageView = + itemView.findViewById(R.id.aciv_station_head_big)//起始和终点坐标标识 + val middleStationBg: View = itemView.findViewById(R.id.bg_pass_bg) //贯通背景调 + val endStationBg: View = itemView.findViewById(R.id.bg_pass_head_bg) //终点的背景 + val startStationBg: View = itemView.findViewById(R.id.bg_pass_bottom_bg) //起点坐标的背景 + + } + +} \ No newline at end of file diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningModel.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningModel.kt new file mode 100644 index 0000000000..5d42f5512a --- /dev/null +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningModel.kt @@ -0,0 +1,253 @@ +package com.mogo.och.biz.routing.ui.runing.other + +import androidx.lifecycle.ViewModel +import com.mogo.commons.AbsMogoApplication +import com.mogo.commons.module.status.MogoStatusManager +import com.mogo.eagle.core.data.BaseData +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager +import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON +import com.mogo.eagle.core.utilcode.util.GsonUtils +import com.mogo.eagle.core.utilcode.util.NetworkUtils +import com.mogo.och.biz.routing.bean.ContrailBean +import com.mogo.och.biz.routing.bean.EndGrayContrailTaskReq +import com.mogo.och.biz.routing.bean.EndGrayTaskFeedbackType +import com.mogo.och.biz.routing.bean.GrayLineBean +import com.mogo.och.biz.routing.bean.StartGrayAndQueryContrailRsp +import com.mogo.och.biz.routing.net.RoutingServiceManager +import com.mogo.och.bridge.autopilot.autopilot.IOchAutopilotStatusListener +import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotStatusListenerManager +import com.mogo.och.bridge.autopilot.autopilot.bean.ArrivedStation +import com.mogo.och.bridge.autopilot.line.ILineCallback +import com.mogo.och.bridge.autopilot.line.LineManager +import com.mogo.och.common.module.constant.OchCommonConst +import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager +import com.mogo.och.common.module.network.OchCommonServiceCallback +import com.mogo.och.data.bean.BusStationBean + +/** + * @author XuXinChao + * @description BadCase录包管理页面 + * @since: 2022/12/15 + */ +class TaskRunningModel : ViewModel() { + + private val TAG = M_OCHCOMMON + TaskRunningModel::class.java.simpleName + + private var viewCallback: SwtichLineViewCallback? = null + + private val content = AbsMogoApplication.getApp() + + private var _data: StartGrayAndQueryContrailRsp? = null + val data: StartGrayAndQueryContrailRsp? + get() = _data + + private var currentGrayLineBean: GrayLineBean? = null + private var currentContrailBean: ContrailBean? = null + private var stationList: MutableList? = null + private var currentGrayId: Long? = null + + companion object { + var currentIndex = -1 + } + + + override fun onCleared() { + } + + fun setDistanceCallback(viewCallback: SwtichLineViewCallback) { + this.viewCallback = viewCallback + } + + fun setNewData(data: StartGrayAndQueryContrailRsp) { + this._data = data + this.currentGrayLineBean = data.grayLineBean + this.currentContrailBean = data.contrail + this.currentGrayId = data.taskId + this.stationList = data.stationList + currentIndex = 0 + MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, true) + //添加到站监听 + OchAutoPilotStatusListenerManager.addListener(TAG, mMogoAutopilotStatusListener) + LineManager.addListener(TAG, lineCallback) + } + + //MAP到站监听 + private val mMogoAutopilotStatusListener: IOchAutopilotStatusListener = + object : IOchAutopilotStatusListener { + + override fun onAutopilotArriveAtStation(arrivalNotification: ArrivedStation?) { + CallerLogger.i( + TAG, + "onAutopilotArriveAtStation = ${arrivalNotification.toString()}" + ) + OchChainLogManager.writeChainLogRouting( + "MAP到站通知", + "[MAP到站通知] 上报到站,location=${arrivalNotification?.endLocation}" + ) + viewCallback?.onArrivedStation() + } + } + + private val lineCallback: ILineCallback = object : ILineCallback { + override fun arrivedStationSuccessBySearch() { + OchChainLogManager.writeChainLogRouting( + "[自车定位围栏]", + "\"[自车定位围栏] 并查询底盘触发到站, endSiteId=${currentGrayLineBean?.endSite?.siteId}, endSiteName=${currentGrayLineBean?.endSite?.siteName}, lineId=${currentGrayLineBean?.lineId},围栏范围:${OchCommonConst.ARRIVE_AT_START_STATION_DISTANCE}米 没有过站、速度基本为零且在15m内\"" + ) + viewCallback?.onArrivedStation() + } + } + + fun leaveStation() { + stationList?.let { + if (it.isNotEmpty()) { + if (currentIndex + 1 >= it.size) { + this.viewCallback?.showCompleteTask() + return + } + val startStation = it[currentIndex] + val endStation = it[currentIndex + 1] + startStation.isLeaving = true + startStation.drivingStatus = 2 + LineManager.setStartAndEndStation(startStation, endStation) + this.viewCallback?.notifyItemChange(currentIndex) + this.viewCallback?.showArriverStationAndCompleteTask() + } + } + + + } + + interface SwtichLineViewCallback { + // 到站 + fun onArrivedStation() + + // 结束服务成功 + fun onSubmitEndTaskSuccess() + + // 结束服务失败 + fun onSubmitEndTaskFailed(s: String) + + // 站点到站和结束任务 + fun showCompleteTask() + + // + fun showArriverStationAndCompleteTask() + + fun notifyItemChange(currentIndex: Int) + } + + + fun arriveStation() { + stationList?.let { + val startStation = it[currentIndex] + startStation.isLeaving = false + startStation.drivingStatus = 1 + } + currentIndex += 1 + LineManager.setStartAndEndStation(null,null) + this.viewCallback?.onArrivedStation() + } + + /** + * 结束灰度任务 + */ + fun endGrayTask(grayId: Long, type: EndGrayTaskFeedbackType, occurrenceTime: Long) { + OchChainLogManager.writeChainLogRouting( + "[结束灰度任务]", + "[结束灰度任务] 准备发送请求,grayId=$grayId, type=${type.type}, typeName=${type.name}" + ) + val submit = EndGrayContrailTaskReq(grayId, type.type, occurrenceTime) + RoutingServiceManager.endGrayTask( + content, + submit, + object : OchCommonServiceCallback { + override fun onSuccess(data: BaseData?) { + CallerLogger.d( + TAG, + "endGrayTask onSuccess: data=${ + GsonUtils.toJson( + data + ) + }" + ) + OchChainLogManager.writeChainLogRouting( + "[结束灰度任务]", + "[结束灰度任务] 请求success,grayId=$grayId, type=${type.type}, typeName=${type.name}" + ) + clearData() + viewCallback?.onSubmitEndTaskSuccess() + } + + override fun onFail(code: Int, msg: String?) { + CallerLogger.d( + TAG, + "endGrayTask onFail: code=$code, msg=$msg" + ) + OchChainLogManager.writeChainLogRouting( + "[结束灰度任务]", + "[结束灰度任务] 请求fail, code=$code, msg=$msg, grayId=$grayId, type=${type.type}, typeName=${type.name}" + ) + viewCallback?.onSubmitEndTaskFailed(msg ?: "endGrayTask onFail") + } + + override fun onError() { + super.onError() + var hintStr = "" + if (!NetworkUtils.isConnected(content)) { + hintStr = "网络出现异常,请稍后重试" + } else { + hintStr = "上报结束任务异常, 请稍后重试" + } + CallerLogger.d( + TAG, + "endGrayTask onError, msg=$hintStr" + ) + OchChainLogManager.writeChainLogRouting( + "[结束灰度任务]", + "[结束灰度任务] 请求error, msg=$hintStr, grayId=$grayId, type=${type.type}, typeName=${type.name}" + ) + viewCallback?.onSubmitEndTaskFailed(hintStr) + } + }) + } + + private fun clearData() { + _data = null + this.currentGrayLineBean = null + this.currentContrailBean = null + this.currentGrayId = null + LineManager.setLineInfo(null) + LineManager.setContraiInfo(null) + LineManager.setStartAndEndStation(null, null) + + CallerEagleBaseFunctionCall4OchManager.updateOrderStatus(false) + + // 设置灰度路线任务执行状态,切换模式时判断使用 + MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, false) + + // 移除到站监听 + OchAutoPilotStatusListenerManager.removeListener(TAG) + LineManager.removeListener(TAG) + cancelAutopilot() + } + + /** + * 结束自动驾驶 + * */ + private fun cancelAutopilot() { + try { + CallerAutoPilotControlManager.cancelAutoPilot() + OchChainLogManager.writeChainLogRouting("[取消自驾]", "[取消自驾] 调用成功") + CallerLogger.d(TAG, "结束自动驾驶") + } catch (e: Exception) { + e.printStackTrace() + } + } + + +} + diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt new file mode 100644 index 0000000000..126876604a --- /dev/null +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/other/TaskRunningView.kt @@ -0,0 +1,233 @@ +package com.mogo.och.biz.routing.ui.runing.other + +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.lifecycle.ViewModelProvider +import androidx.lifecycle.findViewTreeViewModelStoreOwner +import com.mogo.eagle.core.utilcode.kotlin.onClick +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON +import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.och.biz.R +import com.mogo.och.biz.routing.RoutingServiceManager +import com.mogo.och.biz.routing.bean.EndGrayTaskFeedbackType +import com.mogo.och.biz.routing.bean.StartGrayAndQueryContrailRsp +import com.mogo.och.biz.routing.ui.RoutingSwitchModel +import com.mogo.och.biz.routing.ui.errorpoint.ReportErrorPointView +import com.mogo.och.bridge.autopilot.line.LineManager +import com.mogo.och.common.module.map.AmapNaviToDestinationModel +import com.mogo.och.common.module.wigets.dialog.CommonDialogStatus +import com.mogo.och.common.module.wigets.CommonSlideView +import com.mogo.och.common.module.wigets.WrapContentLinearLayoutManager +import kotlinx.android.synthetic.main.biz_other_running.view.aciv_task_leave_station_slide_bg +import kotlinx.android.synthetic.main.biz_other_running.view.actv_arriver_station +import kotlinx.android.synthetic.main.biz_other_running.view.actv_complete_task +import kotlinx.android.synthetic.main.biz_other_running.view.actv_running_task_last_station +import kotlinx.android.synthetic.main.biz_other_running.view.actv_submit_task +import kotlinx.android.synthetic.main.biz_other_running.view.bus_task_running_line_name +import kotlinx.android.synthetic.main.biz_other_running.view.loading_arrive_station +import kotlinx.android.synthetic.main.biz_other_running.view.rl_running_task_station_list + + +class TaskRunningView : ConstraintLayout, TaskRunningModel.SwtichLineViewCallback { + + + constructor(context: Context) : super(context) + + constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet) + + constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super( + context, + attributeSet, + defStyleAttr + ) + + constructor( + context: Context, + attributeSet: AttributeSet, + defStyleAttr: Int, + defStyleRes: Int + ) : super(context, attributeSet, defStyleAttr, defStyleRes) + + + companion object { + const val TAG = M_OCHCOMMON + "TaskRunningView" + } + + private var viewModel: TaskRunningModel? = null + + private var swtichViewModel: RoutingSwitchModel?=null + + + private lateinit var mAdapter: TaskRunningAdapter + + private lateinit var linearLayoutManager: WrapContentLinearLayoutManager + + private var closeRouting: CommonDialogStatus?=null + + + init { + LayoutInflater.from(context).inflate(R.layout.biz_other_running, this, true) + initView() + } + + private fun initView() { + linearLayoutManager = WrapContentLinearLayoutManager(context) + rl_running_task_station_list.setLayoutManager(linearLayoutManager) + mAdapter = TaskRunningAdapter(context, mutableListOf()) + rl_running_task_station_list.setAdapter(mAdapter) + // 滑动出发 + aciv_task_leave_station_slide_bg.setSlideListener(object : CommonSlideView.SlideListener { + override fun slideEnd() { + if (TaskRunningModel.currentIndex == mAdapter.mData.size-1) { + aciv_task_leave_station_slide_bg.setTextValue("单程结束") + aciv_task_leave_station_slide_bg.reset() + viewModel?.data?.taskId?.let { + showFeedbackDialog(it) + } + } else { + aciv_task_leave_station_slide_bg.setTextValue("滑动出发") + viewModel?.leaveStation() + } + + } + }) + + // 到站 + actv_arriver_station.onClick { + loading_arrive_station.visibility = VISIBLE + viewModel?.arriveStation() + } + + // 结束任务 + actv_complete_task.onClick { + viewModel?.data?.taskId?.let { + showFeedbackDialog(it) + } + } + + actv_submit_task.onClick { + CallerLogger.d(TAG,"启动自驾参数:${LineManager.initAutopilotControlParameters()}") + viewModel?.data?.taskId?.let { + ReportErrorPointView.showDialog(context,it) + } + } + + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + viewModel = findViewTreeViewModelStoreOwner()?.let { + ViewModelProvider(it).get(TaskRunningModel::class.java) + } + + swtichViewModel = findViewTreeViewModelStoreOwner()?.let { + ViewModelProvider(it).get(RoutingSwitchModel::class.java) + } + + viewModel?.setDistanceCallback(this) + } + + private fun showFeedbackDialog(grayId: Long) { + val occurrenceTime = System.currentTimeMillis() + if(closeRouting==null) { + closeRouting = CommonDialogStatus + .Builder() + .title("路线验证结束") + .tips("请点击按钮反馈验证结果") + .showClose(true) + .cancelTextColor(R.color.biz_routing_FF4E41) + .cancelStr("线路不可用") + .confirmStr("线路可用") + .status(CommonDialogStatus.Status.success) + .build(context) + }else{ + if(closeRouting?.isShowing==true){ + return + } + } + closeRouting?.setClickListener(object : CommonDialogStatus.ClickListener { + override fun confirm() { + swtichViewModel?.showLoading() + viewModel?.endGrayTask(grayId, EndGrayTaskFeedbackType.USABLE_YES, occurrenceTime) + } + + override fun cancel() { + swtichViewModel?.showLoading() + viewModel?.endGrayTask( + grayId, + EndGrayTaskFeedbackType.USABLE_NO, + occurrenceTime + ) + } + }) + closeRouting?.show() + } + + fun showLeaveStationView() { + aciv_task_leave_station_slide_bg.visibility = VISIBLE + actv_arriver_station.visibility = GONE + actv_complete_task.visibility = GONE + } + + override fun showArriverStationAndCompleteTask() { + aciv_task_leave_station_slide_bg.visibility = INVISIBLE + actv_arriver_station.visibility = VISIBLE + actv_complete_task.visibility = VISIBLE + } + + fun setData(data: StartGrayAndQueryContrailRsp) { + viewModel?.setNewData(data) + bus_task_running_line_name.setText(data.grayLineBean.lineName) + actv_running_task_last_station.text = "往${data.stationList.last().name ?: ""}" + mAdapter.setDataList(data.stationList) + showLeaveStationView() + } + + /** + * 到达目的地 + */ + override fun onArrivedStation() { + // + showLeaveStationView() + loading_arrive_station.visibility = GONE + notifyItemChange(0) + if (TaskRunningModel.currentIndex == mAdapter.mData.size-1) { + aciv_task_leave_station_slide_bg.setTextValue("单程结束") + } else { + aciv_task_leave_station_slide_bg.setTextValue("滑动出发") + } + } + + /** + * 服务完成 + */ + override fun onSubmitEndTaskSuccess() { + ToastUtils.showLong("结束任务成功") + RoutingServiceManager.invokeCallback(false) + // 移除高德导航计算距离 + AmapNaviToDestinationModel.getInstance(context).destroyAmaNavi() + swtichViewModel?.showRoutingSelectView() + } + + /** + * 服务完成失败 + */ + override fun onSubmitEndTaskFailed(errorStr: String) { + ToastUtils.showShort(errorStr) + viewModel?.data?.let { + swtichViewModel?.showRoutingRunning(it) + } + } + + override fun showCompleteTask() { + aciv_task_leave_station_slide_bg.setTextValue("单程结束") + } + + override fun notifyItemChange(currentIndex: Int) { + mAdapter.notifyChange() + } +} diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningModel.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningModel.kt similarity index 97% rename from OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningModel.kt rename to OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningModel.kt index c61abb90d1..a39b9a672a 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningModel.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningModel.kt @@ -31,9 +31,9 @@ import com.mogo.och.common.module.network.OchCommonServiceCallback * @description BadCase录包管理页面 * @since: 2022/12/15 */ -class RoutingRunningModel : ViewModel(), IDistanceListener { +class TaxiRunningModel : ViewModel(), IDistanceListener { - private val TAG = RoutingRunningModel::class.java.simpleName + private val TAG = TaxiRunningModel::class.java.simpleName private var viewCallback: RoutingRuningCallback? = null @@ -98,6 +98,9 @@ class RoutingRunningModel : ViewModel(), IDistanceListener { this.currentGrayLineBean = data.grayLineBean this.currentContrailBean = data.contrail this.currentGrayId = data.taskId + if(data.stationList.size>=2) { + LineManager.setStartAndEndStation(data.stationList[0], data.stationList[1]) + } MogoStatusManager.getInstance().setTaxiUnmanedDriverLineRoutingPerformTask(TAG, true) //添加到站监听 OchAutoPilotStatusListenerManager.addListener(TAG, mMogoAutopilotStatusListener) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningView.kt similarity index 97% rename from OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningView.kt rename to OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningView.kt index b6ed435e33..3f2e3b80d9 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/RoutingRunningView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/routing/ui/runing/taxi/TaxiRunningView.kt @@ -26,6 +26,7 @@ import com.mogo.och.common.module.map.MapMakerManager import com.mogo.och.common.module.wigets.dialog.CommonDialogStatus import com.mogo.och.biz.routing.ui.errorpoint.ReportErrorPointView import com.mogo.och.biz.routing.ui.utils.TimeDistanceUtils +import com.mogo.och.bridge.autopilot.line.LineManager import com.mogo.och.common.module.constant.OchCommonConst import kotlinx.android.synthetic.main.biz_taxi_running.view.actv_end_routing import kotlinx.android.synthetic.main.biz_taxi_running.view.actv_current_itinerary_end_name @@ -37,7 +38,7 @@ import kotlinx.android.synthetic.main.biz_taxi_running.view.goutp_show_routing_i import kotlinx.android.synthetic.main.biz_taxi_running.view.include_empty import kotlinx.android.synthetic.main.biz_taxi_running.view.naviToStart -class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCallback, +class TaxiRunningView: ConstraintLayout, TaxiRunningModel.RoutingRuningCallback, ICommonNaviChangedCallback { @@ -54,7 +55,7 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal const val TAG = "RoutingRunningView" } - private var viewModel: RoutingRunningModel?=null + private var viewModel: TaxiRunningModel?=null private var swtichViewModel: RoutingSwitchModel?=null private var closeRouting: CommonDialogStatus?=null @@ -190,7 +191,7 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal override fun onAttachedToWindow() { super.onAttachedToWindow() viewModel = findViewTreeViewModelStoreOwner()?.let { - ViewModelProvider(it).get(RoutingRunningModel::class.java) + ViewModelProvider(it).get(TaxiRunningModel::class.java) } swtichViewModel = findViewTreeViewModelStoreOwner()?.let { ViewModelProvider(it).get(RoutingSwitchModel::class.java) diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_end.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_end.png new file mode 100644 index 0000000000000000000000000000000000000000..e54309848ce50051cb99d8ce19ff62b2b1dd20e2 GIT binary patch literal 1798 zcmWlZ2{hZ;9>+7S);z_a3xktVty0w1QA_I;vG?Va|7u?oirR{#$xxlHhIZP{)P!QR zRM9qNETz_{k!Pzlc2ZG^h(~O(>-+nhd(S=hch3F&e&6rC=cZgCI?BnY%HVJ~IcFz= zJGL6^&F}Z`MVgfgakzcCS1yD0*w&@j`T8oPTMR`kqWYyk{04fW5R6<#4ND;x4ivG3 z7*@C?Y@&W&5z7Wps}P7=M}uY%vyb4ZVvx4$LF|KFx}f9vK-3C)bsjM+2X&Yreb>W{ z13P!_#Y04h7Z*1E0BOI4G+qPP5%)pZp$*c=1F%8c@vv`&DVrXFeAv7WJW+%-fRJYq z(`v|P61~8JZ+t^-*)aYU5VeHrl|nl2p|fS~ly8tPAHq`orw6{=17lUJKS9<_5Hx}S z!w7Z9le&eXV<p$-lY|JS)S(?y2TX5H zlV%Y@D`d-tF0i0j2^uz!o+<_~(=cbk#fVJ{MBPROThrcL)awhJu<3E`BY659s969+ zEu(~1m@Ap8Ua2sv1%qc$A0Fa1fMtfylmH{EW1Q7N)^a0u5xfoF*ebU|RP%5o3uq^! z9REN*GO@-TSs(6^^wf%)i-gQPVZqO%_ipoVkvr*$0xHz&=hWsEEAc?aF}pCMK&wWu zOU&t5?P!{7E1jvXTq-Y{FDqEc`%{o{d*pHQ_^)J6tXEr1JU<%l4*GYar~g;v3J2CG z09xmJ+84VjX6kFiA9JSjp9^ww#hLd;e^22)c_d7W>$@K{K)*gpOA^Ih<3@&#h6fIY zL#<&E{2-@Kfq@eNJ|q6b4nJa-XPe278acF)|p8M;KHp zl|mtrNJOHk2_C<9g58plL7|XIuO6nJz~T0{ITLI^C-&X$yL6=hb!qW&SLFl>2Hn!e z29(u4_;)FA36y&KA~GVPIXZjRdu@zNp{zCV7JMhG)UGGxEG%#H5*Kpl@}7qnKPB}y z=A_c))qhHYapmEYvyTsZYla_dY9L&mW6(@iPij9aBCt~wyN|K@nOmd1@x{1psXH?- z<9k%H=bz3iIk06Gw|3uMM~eTbt#o_!^qsfJpJVp^ye>%gmAAjRLx5nQ|J{+c-8i)_7ZrmgnuFrA zm)9tSmtitc>bk?HTt0t@k2X1whIF>dhMI?(o7t^YD}mhbR2qw{urkt2o1a*@)ke0Y zRA#;GHU2RE+?>WzIvQgie*kbjRRb0OWw9RU#k7(>9y6v3mZsY-7+Bvm+t@LP_nR)P zRS*b>)fawLdp}`BwGw3mkz27^bv*&C%s27;`cIrGwY3jhviFR`;PkA?66-MVy!Mn= z*>Mk!J^Ti`1|1$SHqx}-jouF6ReDFp4AlQ)T(2{Dm37)R_F@Pso{(Z(GYXYeO=F2g zzCMa@*01MOJ4ZA1GqfIdR0XJz?bZ+0muD`?t?8c+?`2s3b@P~f$+pIu-7SGh#$`#9 zrX7h{9>{fDWbt@MaYg_gq94uUr2qGUXoQBOA5d%Wygyj3Zu*_Z+hyW!`n6a1G@DK2 zhxQEV3Bf{ey!`%i8@0R(4lmaEZ4CwD8`Ec=_=FtGS#E87FqagjEb3!c|;1UT8}3l{DjYSb$ER$rLt#z>TU9U|Dh)##~E zTbjr^lpN$+Vy^3)b&~HKNMS7}hwLVg-=Tg`DSIB(_;cu~=w@M6UyPKQYyw{K`y{Cs z7guPBS=RD-f*Hj#$(016Ft)tnEO27dugTUi=jv69zSx$a;82xvz39(XrFNV8BGcfx eDvKoUmUR9v*%qJYKbvEp1 zFyX&s(Lc$*XC%x2NX~sHdFhVik8_gMza*!8l)QaI^7A>6?8fIH1wh7{SCU5_O8z?| z(e_>9)g`Iozf#LzOP#nU_4kZa`CqAPx1@fam3(kr^793$;{Q^M-btOgEA{`3!u|US z|MyECcqF;+k<`pjQqw<3E_w?xYS&ZA{f|Kgp1mhI_dUq!>$fEPzerB`B)RpOvz#mW1U z6@MkSJ(E0fPqO^4)rRGVfqvF03GxeO_}tnW%<=j2OCWdz1UGNq+z$jRR`dWtSy@?d zuniD!aNN9ER#s^jz8I+QtEY=&h{pNa)9rc94gxF}7@Mo#@16c--h{NGPT}Khv;X|R zpVGSKv*M0wsZ4im-oCWERhAPquJ1N((P5hzuV);gkPz~NQ=>J)-$c9@EKIo_UG4oaJizH|(88{7m$pad)r7F*`sj(MIlS`IVttUaH)?%N zh{hpX_Jn8iREpF(K58T$SiaxwQsIS){tFDt>)T!kNZfqiu%?k=^YoIkbA692>QBz= moKUzrsONb1)N2xV?6>t#t8-tuXb&&|7(8A5T-G@yGywp2U@QIr literal 0 HcmV?d00001 diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_past.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_past.png new file mode 100644 index 0000000000000000000000000000000000000000..7e70dbce5792f4de7d024a58c5fa6a441280c88d GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^av;pY3?xs=ZJr3E)B}7%T!C~^X?0Oabx~P$VQF=7 zX$_dH1_~CJS2r{?fMiRnv(0Uu0G0BT1o;IsJo|iee@|;!unotG_c0ZbK=DRT7sn8Z z%gGGQE6;hUP2@2+5L&^;azxzWXK%WK1Jj{YYi4H7gnx1t|4p2v7A|1#tY^yD!6Wql z0TbId;}Z)S8UYg6+3!rkU~aV7s3 t{1(@>xp0`<*v9a%w4i*%BW_zeMuSkHY0)`0eL%-Bc)I$ztaD0e0ss$pT`vFt literal 0 HcmV?d00001 diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_start.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_runnint_task_start.png new file mode 100644 index 0000000000000000000000000000000000000000..dac86db75d5d5d39e3188578a36bc1813a8db743 GIT binary patch literal 1606 zcmW-g3sll~8^>9;7vH9>Wh&3#HtWp!+PXPQ+iKP{O`VKmiaGK<N2r6=wn}EEq&pE&Ioac9*%kTS~-*Ytz7v{VM zS%X5MoFl?RqHT7&{Wv<183!sIx#OF+uzDJ}3u2zkqJ*z!^Uys5uiiq76oz=9`Wu!8;gS)q=zyZ)8J6u$2l#MD2~~1v zlJfK>kPq2sm9YXQ7SCvl)I*mDSNT3vaO7sDe3>pY)(Z^P6Z+gfT@gnc^jJ+CR_$$6#lBSH zr$x{|1uWb1hUgM=i%eTB)ZP_nyEIF`3@;sds>$c7J5UrOuJ)`{-jFDuO0oHoY*Xu8EJwPFHXAr7-b9=E zS}61r@IlYIKWelr6RsMwO@6pMdeei+FYa9*}Ry{mVLvRKk#xs zc3g5?Bo5?H2To3RjMRN<`-PD|M&n{o7#$rGr?fF^W5x!P$?W|H zdaI4{atfu`MpjlE&F%upgMOKd?j+WDJi-4Um49oyh-wui>|-^&eW?%UW(7*wT2oJ7e8% zi_g%jD_44VHCbB7;*GK3Kqe?$caQTN_Bl9}oULfW`}m!q=7!XSq1TwE+sNg&HCp-!%*%8qj?p2cfAig9hDK2j8#UJ&-v)evyi=xH9w-5io zF?Mw%Cy4Wa=)=A=63EOBs8U)!Y#zH&7J5O~Uo)Z6Ih*YwLj`1~svC~TVxCd?=>_Ps zE~t$jj-HOEW3LFrS3~Yy`*VQWO(Na9caKEcc_Cwp_C;^%#Hk-BxSQd4_fcc;$;OTY z*pw#c|2fp;WS3iNYK|ZH^TNoHSJt}ix6)CVwS`}5_vfe)q^bq!%nx1ra_>(Uyw~Oz z&(PyXCZ&!!q}XHky&ijASLKzWoEo zFyX&s(Lc$*XC%x2NX~sHdFhVik8_gMza*!8l)QaI^7A>6?8fIH1wh7{SCU5_O8z?| z(e_>9)g`Iozf#LzOP#nU_4kZa`CqAPx1@fam3(kr^793$;{Q^M-btOgEA{`3!u|US z|MyECcqF;+k<`pjQqw<3E_w?xYS&ZA{f|Kgp1mhI_dUq!>$fEPzerB`B)RpOvz#mW1U z6@MkSJ(E0fPqO^4)rRGVfqvF03GxeO_}tnW%<=j2OCWdz1UGNq+z$jRR`dWtSy@?d zuniD!aNN9ER#s^jz8I+QtEY=&h{pNa)9rc94gxF}7@Mo#@16c--h{NGPT}Khv;X|R zpVGSKv*M0wsZ4im-oCWERhAPquJ1N((P5hzuV);gkPz~NQ=>J)-$c9@EKIo_UG4oaJizH|(88{7m$pad)r7F*`sj(MIlS`IVttUaH)?%N zh{hpX_Jn8iREpF(K58T$SiaxwQsIS){tFDt>)T!kNZfqiu%?k=^YoIkbA692>QBz= moKUzrsONb1)N2xV?6>t#t8-tuXb&&|7(8A5T-G@yGywp2U@QIr literal 0 HcmV?d00001 diff --git a/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_switch_line_adapter_point_pass.png b/OCH/common/biz/src/main/res/routing/drawable-nodpi/bus_switch_line_adapter_point_pass.png new file mode 100644 index 0000000000000000000000000000000000000000..7e70dbce5792f4de7d024a58c5fa6a441280c88d GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^av;pY3?xs=ZJr3E)B}7%T!C~^X?0Oabx~P$VQF=7 zX$_dH1_~CJS2r{?fMiRnv(0Uu0G0BT1o;IsJo|iee@|;!unotG_c0ZbK=DRT7sn8Z z%gGGQE6;hUP2@2+5L&^;azxzWXK%WK1Jj{YYi4H7gnx1t|4p2v7A|1#tY^yD!6Wql z0TbId;}Z)S8UYg6+3!rkU~aV7s3 t{1(@>xp0`<*v9a%w4i*%BW_zeMuSkHY0)`0eL%-Bc)I$ztaD0e0ss$pT`vFt literal 0 HcmV?d00001 diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_arrive_station_selector.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_arrive_station_selector.xml new file mode 100644 index 0000000000..67b7a651be --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_arrive_station_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_complete_selector.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_complete_selector.xml new file mode 100644 index 0000000000..67b7a651be --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_running_task_complete_selector.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_normal.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_normal.xml new file mode 100644 index 0000000000..5121d1a6be --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_normal.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selected.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selected.xml new file mode 100644 index 0000000000..c236e4a6e4 --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selected.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selector.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selector.xml new file mode 100644 index 0000000000..6f1e2e2037 --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_line_selector.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_normal.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_normal.xml new file mode 100644 index 0000000000..5121d1a6be --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_normal.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_selected.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_selected.xml new file mode 100644 index 0000000000..7b95fb492d --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_switch_task_selected.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/drawable/bus_task_current_station_bg.xml b/OCH/common/biz/src/main/res/routing/drawable/bus_task_current_station_bg.xml new file mode 100644 index 0000000000..b0886cc9d4 --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/drawable/bus_task_current_station_bg.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/layout/biz_other_running.xml b/OCH/common/biz/src/main/res/routing/layout/biz_other_running.xml new file mode 100644 index 0000000000..78f9577445 --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/layout/biz_other_running.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/layout/biz_other_running_item.xml b/OCH/common/biz/src/main/res/routing/layout/biz_other_running_item.xml new file mode 100644 index 0000000000..a91872fcb4 --- /dev/null +++ b/OCH/common/biz/src/main/res/routing/layout/biz_other_running_item.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OCH/common/biz/src/main/res/routing/layout/biz_taxi_switch.xml b/OCH/common/biz/src/main/res/routing/layout/biz_taxi_switch.xml index 3585ef935e..cbffd4673e 100644 --- a/OCH/common/biz/src/main/res/routing/layout/biz_taxi_switch.xml +++ b/OCH/common/biz/src/main/res/routing/layout/biz_taxi_switch.xml @@ -15,8 +15,16 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> - + + + + 您确认要结束任务吗? + \ No newline at end of file diff --git a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/line/LineManager.kt b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/line/LineManager.kt index 5823b3048a..b0c72ad338 100644 --- a/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/line/LineManager.kt +++ b/OCH/common/bridge/src/main/java/com/mogo/och/bridge/autopilot/line/LineManager.kt @@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener import com.mogo.eagle.core.function.call.map.CallerMapGlobalTrajectoryDrawManager import com.mogo.eagle.core.function.call.och.CallerEagleBaseFunctionCall4OchManager 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.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON @@ -387,8 +388,8 @@ object LineManager : CallerBase() { parameters = AutopilotControlParameters() parameters?.routeID = lineInfo.lineId.toInt() parameters?.routeName = lineInfo.lineName - parameters?.startName = start.name - parameters?.endName = end.name + parameters?.startName = start.name?:"" + parameters?.endName = end.name?:"" parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon) parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon) if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ @@ -418,85 +419,78 @@ object LineManager : CallerBase() { ) } - val (wayLatLons, blackLatLons) = contrai.getWayBlackLatLons() - - parameters?.wayLatLons = wayLatLons - parameters?.blackLatLons = blackLatLons - + if(endStation?.passPoints?.isNotEmpty() == true && + endStation?.blackPoints?.isNotEmpty() == true){ + val (wayLatLons, blackLatLons) = endStation!!.getWayBlackLatLons() + parameters?.wayLatLons = wayLatLons + parameters?.blackLatLons = blackLatLons + CallerLogger.d(TAG,"从站点获取经停点和禁行点") + }else{ + val (wayLatLons, blackLatLons) = contrai.getWayBlackLatLons() + parameters?.wayLatLons = wayLatLons + parameters?.blackLatLons = blackLatLons + CallerLogger.d(TAG,"从轨迹获取经停点和禁行点") + } } + CallerLogger.d(TAG,"${parameters?.wayLatLons}\n${parameters?.blackLatLons}") if (parameters == null) { ToastUtils.showShort("未设置起始或终点站点") } return parameters } - fun getWayBlackLatLons( - passPoints: MutableList?, - blackPoints: MutableList? - ): Pair, MutableList> { - val wayLatLons = mutableListOf() - // 途经点 - if (!passPoints.isNullOrEmpty()) { - for (mogoLatLng in passPoints) { - wayLatLons.add( - AutoPilotLonLat( - mogoLatLng.lat, - mogoLatLng.lon, - when (mogoLatLng.pointType) { - 1 -> {//途径点 - false - } + fun initAutopilotControlParametersFromContrai(): AutopilotControlParameters? { + var parameters: AutopilotControlParameters? = null + getStationsWithLine { start, end, lineInfo -> + this.autopilotId = "${lineInfo.lineId}_${start.siteId}_${end.siteId}_${lineInfo.orderId}" + this.teleOrderId = lineInfo.genAutopilotId() + } + getStationsWithLineAndContrai { start, end, lineInfo, contrai -> + parameters = AutopilotControlParameters() + parameters?.routeID = lineInfo.lineId.toInt() + parameters?.routeName = lineInfo.lineName + parameters?.startName = start.name?:"" + parameters?.endName = end.name?:"" + parameters?.startLatLon = AutoPilotLonLat(start.lat, start.lon) + parameters?.endLatLon = AutoPilotLonLat(end.lat, end.lon) + if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + parameters?.vehicleType = 9 + }else{ + parameters?.vehicleType = 10 + } + parameters?.orderId = this.teleOrderId + parameters?.firstStationFlag = autopilotFlag + parameters?.firstAutopilotFlag = teleIsFirstStartAutopilot - 2 -> {//禁行点 - false - } - - 3 -> {//站点 - true - } - - else -> { - false - } - } - ) + if (parameters?.autoPilotLine == null) { + parameters?.autoPilotLine = AutoPilotLine( + lineInfo.lineId, + lineInfo.lineName, + contrai.csvFileUrl, + contrai.csvFileMd5, + contrai.txtFileUrl, + contrai.txtFileMd5, + contrai.contrailSaveTime, + "", + "", + "", + "", + "", + 0L ) } + val (wayLatLons, blackLatLons) = contrai.getWayBlackLatLons() + parameters?.wayLatLons = wayLatLons + parameters?.blackLatLons = blackLatLons + CallerLogger.d(TAG,"从轨迹获取经停点和禁行点") } - val blackLatLons = mutableListOf() - // 黑名单点 - if (!blackPoints.isNullOrEmpty()) { - for (mogoLatLng in blackPoints) { - blackLatLons.add( - AutoPilotLonLat( - mogoLatLng.lat, - mogoLatLng.lat, - when (mogoLatLng.pointType) { - 1 -> {//途径点 - false - } - - 2 -> {//禁行点 - false - } - - 3 -> {//站点 - true - } - - else -> { - false - } - } - ) - ) - } + if (parameters == null) { + ToastUtils.showShort("未设置起始或终点站点") } - return Pair(wayLatLons,blackLatLons) + return parameters } - // 启动自动驾驶 fun startAutopilot() { @@ -583,7 +577,7 @@ object LineManager : CallerBase() { private fun triggerUnableStartAPReasonEvent() { getStationsWithLine { start, end, line -> OchAutopilotAnalytics.triggerUnableStartAPReasonEvent( - start.name, end.name,line.lineId.toString() , "", + start.name?:"", end.name?:"",line.lineId.toString() , "", OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason ) } @@ -599,8 +593,8 @@ object LineManager : CallerBase() { OchAutopilotAnalytics.triggerStartAutopilotEvent( isFirstStartAutopilot, send, - start.name, - end.name, + start.name?:"", + end.name?:"", lineInfo.lineId.toInt(), "", System.currentTimeMillis(), diff --git a/OCH/common/common/src/main/res/values/strings.xml b/OCH/common/common/src/main/res/values/strings.xml index 73e44a4822..2605487c1d 100644 --- a/OCH/common/common/src/main/res/values/strings.xml +++ b/OCH/common/common/src/main/res/values/strings.xml @@ -41,6 +41,10 @@ 返回 + 滑动出发 + 到站 + 结束 + 请等待升级完成后再选择任务 diff --git a/OCH/common/data/src/main/java/com/mogo/och/data/bean/BusStationBean.kt b/OCH/common/data/src/main/java/com/mogo/och/data/bean/BusStationBean.kt index 53ea4f8222..bf1998a74e 100644 --- a/OCH/common/data/src/main/java/com/mogo/och/data/bean/BusStationBean.kt +++ b/OCH/common/data/src/main/java/com/mogo/och/data/bean/BusStationBean.kt @@ -1,191 +1,84 @@ -package com.mogo.och.data.bean; +package com.mogo.och.data.bean -import com.google.gson.annotations.SerializedName; -import com.mogo.eagle.core.data.map.MogoLocation; - -import org.jetbrains.annotations.NotNull; - -import java.util.List; -import java.util.Objects; +import com.google.gson.annotations.SerializedName +import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters.AutoPilotLonLat +import com.mogo.eagle.core.data.map.MogoLocation +import java.util.Objects /** * 单个网约车小巴车站信息 * * @author tongchenfei */ -public class BusStationBean { - private int siteId; - @SerializedName(value = "name",alternate = {"siteName"}) - private String name; - private String nameKr; - private int seq; - private double gcjLon; //高德 - private double gcjLat; //高德 - @SerializedName(value = "lon",alternate = {"wgs84Lon"}) - private double lon; //高精坐标 - @SerializedName(value = "lat",alternate = {"wgs84Lat"}) - private double lat; //高精坐标 - private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站 - private boolean leaving;// 为出发false 出发true - private String introduction;// 站点简介 - private boolean isPlayTts; - private int pointType; // 1:途径点 2:禁行点 3:站点 - private List videoList; +open class BusStationBean { + var siteId: Int = 0 - public String getNameKr() { - return nameKr; + @JvmField + @SerializedName(value = "name", alternate = ["siteName"]) + var name: String? = null + var nameKr: String? = null + var seq: Int = 0 + @JvmField + var gcjLon: Double = 0.0 //高德 + @JvmField + var gcjLat: Double = 0.0 //高德 + + @SerializedName(value = "lon", alternate = ["wgs84Lon"]) + var lon: Double = 0.0 //高精坐标 + + @SerializedName(value = "lat", alternate = ["wgs84Lat"]) + var lat: Double = 0.0 //高精坐标 + @JvmField + var drivingStatus: Int = 0 //行驶信息,0初始值;1已经过;2当前站;3未到站 + var isLeaving: Boolean = false // 为出发false 出发true + var introduction: String? = null // 站点简介 + var isPlayTts: Boolean = false + var pointType: Int = 0 // 1:途径点 2:禁行点 3:站点 + var videoList: List? = null + + var passPoints: List? = null // 用于算路的经停点 + var blackPoints: List? = null // 用于算路的黑名單點 + + + override fun equals(o: Any?): Boolean { + if (this === o) return true + if (o == null || javaClass != o.javaClass) return false + + val that = o as BusStationBean + return siteId == that.siteId && seq == that.seq && java.lang.Double.compare( + gcjLon, + that.gcjLon + ) == 0 && java.lang.Double.compare( + gcjLat, + that.gcjLat + ) == 0 && java.lang.Double.compare(lon, that.lon) == 0 && java.lang.Double.compare( + lat, + that.lat + ) == 0 && drivingStatus == that.drivingStatus && isLeaving == that.isLeaving && isPlayTts == that.isPlayTts && pointType == that.pointType && name == that.name + && nameKr == that.nameKr + && introduction == that.introduction + && videoList == that.videoList } - public void setNameKr(String nameKr) { - this.nameKr = nameKr; + override fun hashCode(): Int { + var result = siteId + result = 31 * result + Objects.hashCode(name) + result = 31 * result + Objects.hashCode(nameKr) + result = 31 * result + seq + result = 31 * result + java.lang.Double.hashCode(gcjLon) + result = 31 * result + java.lang.Double.hashCode(gcjLat) + result = 31 * result + java.lang.Double.hashCode(lon) + result = 31 * result + java.lang.Double.hashCode(lat) + result = 31 * result + drivingStatus + result = 31 * result + java.lang.Boolean.hashCode(isLeaving) + result = 31 * result + Objects.hashCode(introduction) + result = 31 * result + java.lang.Boolean.hashCode(isPlayTts) + result = 31 * result + pointType + result = 31 * result + Objects.hashCode(videoList) + return result } - 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; - } - - public String getIntroduction() { - return introduction; - } - - public void setIntroduction(String introduction) { - this.introduction = introduction; - } - - public boolean isPlayTts() { - return isPlayTts; - } - - public void setPlayTts(boolean playTts) { - isPlayTts = playTts; - } - - public List getVideoList() { - return videoList; - } - - public void setVideoList(List videoList) { - this.videoList = videoList; - } - - public int getPointType() { - return pointType; - } - - public void setPointType(int pointType) { - this.pointType = pointType; - } - - @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(gcjLon, that.gcjLon) == 0 - && Double.compare(gcjLat, that.gcjLat) == 0 - && Double.compare(lon, that.lon) == 0 - && Double.compare(lat, that.lat) == 0 - && drivingStatus == that.drivingStatus - && leaving == that.leaving && isPlayTts == that.isPlayTts - && pointType == that.pointType - && Objects.equals(name, that.name) - && Objects.equals(nameKr, that.nameKr) - && Objects.equals(introduction, that.introduction) - && Objects.equals(videoList, that.videoList); - } - - @Override - public int hashCode() { - int result = siteId; - result = 31 * result + Objects.hashCode(name); - result = 31 * result + Objects.hashCode(nameKr); - result = 31 * result + seq; - result = 31 * result + Double.hashCode(gcjLon); - result = 31 * result + Double.hashCode(gcjLat); - result = 31 * result + Double.hashCode(lon); - result = 31 * result + Double.hashCode(lat); - result = 31 * result + drivingStatus; - result = 31 * result + Boolean.hashCode(leaving); - result = 31 * result + Objects.hashCode(introduction); - result = 31 * result + Boolean.hashCode(isPlayTts); - result = 31 * result + pointType; - result = 31 * result + Objects.hashCode(videoList); - return result; - } - - @Override - public String toString() { + override fun toString(): String { return "BusStationBean{" + "siteId=" + siteId + ", name='" + name + '\'' + @@ -196,19 +89,81 @@ public class BusStationBean { ", lon=" + lon + ", lat=" + lat + ", drivingStatus=" + drivingStatus + - ", leaving=" + leaving + + ", leaving=" + isLeaving + ", introduction='" + introduction + '\'' + ", isPlayTts=" + isPlayTts + ", pointType=" + pointType + ", videoList=" + videoList + - '}'; + '}' } - @NotNull - public MogoLocation toMogoLocation() { - MogoLocation result = new MogoLocation(); - result.setLatitude(gcjLat); - result.setLongitude(gcjLon); - return result; + fun toMogoLocation(): MogoLocation { + val result = MogoLocation() + result.latitude = gcjLat + result.longitude = gcjLon + return result + } + + fun getWayBlackLatLons( + ): Pair, MutableList> { + val wayLatLons = mutableListOf() + // 途经点 + if (!passPoints.isNullOrEmpty()) { + for (mogoLatLng in passPoints!!) { + wayLatLons.add( + AutoPilotLonLat( + mogoLatLng.lat, + mogoLatLng.lon, + when (mogoLatLng.pointType) { + 1 -> {//途径点 + false + } + + 2 -> {//禁行点 + false + } + + 3 -> {//站点 + true + } + + else -> { + false + } + } + ) + ) + } + } + val blackLatLons = mutableListOf() + // 黑名单点 + if (!blackPoints.isNullOrEmpty()) { + for (mogoLatLng in blackPoints!!) { + blackLatLons.add( + AutoPilotLonLat( + mogoLatLng.lat, + mogoLatLng.lon, + when (mogoLatLng.pointType) { + 1 -> {//途径点 + false + } + + 2 -> {//禁行点 + false + } + + 3 -> {//站点 + true + } + + else -> { + false + } + } + ) + ) + } + } + return Pair(wayLatLons,blackLatLons) } } diff --git a/OCH/common/data/src/main/java/com/mogo/och/data/bean/ContraiInfo.kt b/OCH/common/data/src/main/java/com/mogo/och/data/bean/ContraiInfo.kt index 59ed5743d6..9778e146e9 100644 --- a/OCH/common/data/src/main/java/com/mogo/och/data/bean/ContraiInfo.kt +++ b/OCH/common/data/src/main/java/com/mogo/och/data/bean/ContraiInfo.kt @@ -75,7 +75,7 @@ data class ContraiInfo( blackLatLons.add( AutoPilotLonLat( mogoLatLng.lat, - mogoLatLng.lat, + mogoLatLng.lon, when (mogoLatLng.pointType) { 1 -> {//途径点 false diff --git a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/ThirdDeviceData.kt b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/ThirdDeviceData.kt index b885b237c2..e7797e40af 100644 --- a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/ThirdDeviceData.kt +++ b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/ThirdDeviceData.kt @@ -82,8 +82,8 @@ object ThirdDeviceData { LedScreenManager.sendTripInfo2Led( LedScreenManager.LEAVE_STATION, lineInfo.lineName, - start.name, - end.name, + start.name?:"", + end.name?:"", LineModel.isLastStation() == true ) } @@ -100,8 +100,8 @@ object ThirdDeviceData { LedScreenManager.sendTripInfo2Led( LedScreenManager.ARRIVE_STATION, lineInfo.lineName, - start.name, - end.name, + start.name?:"", + end.name?:"", LineModel.isLastStation(end) ) } diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/ThirdDeviceData.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/ThirdDeviceData.kt index c446c75c33..89a1424b06 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/ThirdDeviceData.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/ThirdDeviceData.kt @@ -89,8 +89,8 @@ object ThirdDeviceData { LedScreenManager.sendTripInfo2Led( LedScreenManager.LEAVE_STATION, lineInfo.lineName, - start.name, - end.name, + start.name?:"", + end.name?:"", LineModel.isLastStation() == true ) } @@ -109,8 +109,8 @@ object ThirdDeviceData { LedScreenManager.sendTripInfo2Led( LedScreenManager.ARRIVE_STATION, lineInfo.lineName, - start.name, - end.name, + start.name?:"", + end.name?:"", LineModel.isLastStation(end) ) } diff --git a/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/BusPassengerRouteFragment.java b/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/BusPassengerRouteFragment.java index 171ccfc774..0c81a59595 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/BusPassengerRouteFragment.java +++ b/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/BusPassengerRouteFragment.java @@ -204,7 +204,7 @@ public class BusPassengerRouteFragment extends * @param isArrived 是否到站并离开,true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex */ public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived); + updateArrivedStation(stations.get(currentStationIndex).name,currentStationIndex,isArrived); mStationsList.clear(); mStationsList.addAll(stations); mAdapter.notifyDataSetChanged(); @@ -225,7 +225,7 @@ public class BusPassengerRouteFragment extends private void updateWayPointList(List stations,int currentStationIndex) { List mLineStationsList = new ArrayList<>(); for (int i = 0; i< stations.size(); i++) {//站点集合 - LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon + LatLng latLng = new LatLng(stations.get(i).gcjLat, stations.get(i).gcjLon);// lat,lon mLineStationsList.add(latLng); } diff --git a/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/adapter/BusPassengerLineStationsAdapter.java b/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/adapter/BusPassengerLineStationsAdapter.java index 162ebe88b5..0136edb3ea 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/adapter/BusPassengerLineStationsAdapter.java +++ b/OCH/shuttle/passenger_weaknet/src/main/java/jinlv/com/mogo/och/shuttle/weaknet/passenger/ui/adapter/BusPassengerLineStationsAdapter.java @@ -48,14 +48,14 @@ public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter