[fea]
[减少moudle]
This commit is contained in:
yangyakun
2024-09-26 11:23:26 +08:00
parent a16229e858
commit 66e31ad59f
11 changed files with 28 additions and 55 deletions

View File

@@ -9,23 +9,18 @@ project.dependencies {
implementation project.project(':OCH:sweeper:driver') implementation project.project(':OCH:sweeper:driver')
} else if (isCurrentDriver("B1")) { } else if (isCurrentDriver("B1")) {
implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:offline:driver')
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:shuttle:driver_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet')
implementation project.project(':OCH:bus:driver')
} else if (isCurrentPassenger("B1")) { } else if (isCurrentPassenger("B1")) {
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
implementation project.project(':OCH:shuttle:passenger_weaknet') implementation project.project(':OCH:shuttle:passenger_weaknet')
} else if (isCurrentBaiLing("B1")) { } else if (isCurrentBaiLing("B1")) {
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:bus:driver')
implementation project.project(':OCH:shuttle:driver_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet')
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
implementation project.project(':OCH:shuttle:passenger_weaknet') implementation project.project(':OCH:shuttle:passenger_weaknet')
} else if (isCurrentDriver("M1")) { } else if (isCurrentDriver("M1")) {
implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:charter:driver')
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:shuttle:driver_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet')
} else if (isCurrentPassenger("M1")) { } else if (isCurrentPassenger("M1")) {
implementation project.project(':OCH:charter:passenger') implementation project.project(':OCH:charter:passenger')
@@ -33,9 +28,7 @@ project.dependencies {
implementation project.project(':OCH:shuttle:passenger_weaknet') implementation project.project(':OCH:shuttle:passenger_weaknet')
} else if (isCurrentDriver("B2")) { } else if (isCurrentDriver("B2")) {
implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:offline:driver')
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:shuttle:driver_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet')
implementation project.project(':OCH:bus:driver')
} else if (isCurrentPassenger("B2")) { } else if (isCurrentPassenger("B2")) {
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
@@ -50,9 +43,7 @@ project.dependencies {
implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:offline:driver')
implementation project.project(':OCH:taxi:unmanned-driver') implementation project.project(':OCH:taxi:unmanned-driver')
implementation project.project(':OCH:taxi:driver') implementation project.project(':OCH:taxi:driver')
implementation project.project(':OCH:bus:driver')
implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:charter:driver')
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:sweeper:driver') implementation project.project(':OCH:sweeper:driver')
} else if (isCurrentPassenger("ALL")) { } else if (isCurrentPassenger("ALL")) {
implementation project.project(':OCH:taxi:unmanned-passenger') implementation project.project(':OCH:taxi:unmanned-passenger')
@@ -64,11 +55,9 @@ project.dependencies {
implementation project.project(':OCH:shuttle:driver_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet')
} else { } else {
implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:offline:driver')
implementation project.project(':OCH:bus:driver')
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:charter:driver')
implementation project.project(':OCH:charter:passenger') implementation project.project(':OCH:charter:passenger')
implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
implementation project.project(':OCH:sweeper:driver') implementation project.project(':OCH:sweeper:driver')
implementation project.project(':OCH:taxi:driver') implementation project.project(':OCH:taxi:driver')

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:id="@+id/no_line_data_view">
<TextView
android:id="@+id/tv_write_off_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/shuttle_driver_cad6ff"
android:textSize="30dp"
android:layout_marginStart="@dimen/dp_68"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:text="@string/shuttle_write_off_count_default"/>
</merge>

View File

@@ -41,8 +41,6 @@
<string name="offline_mode">离线\n模式</string> <string name="offline_mode">离线\n模式</string>
<string name="bus_no_task_tip">暂无任务</string> <string name="bus_no_task_tip">暂无任务</string>
<string name="shuttle_write_off_count">本站核销成功:%1$d人</string>
<string name="shuttle_write_off_count_default">本站核销成功0人</string>

View File

@@ -49,7 +49,7 @@ class BusRepository: IRepository {
} }
// 线路信息 // 线路信息
if (lineInfo == null && busRoutesResult.name != null) { if (lineInfo == null && busRoutesResult.name != null) {
lineInfo = LineInfo(busRoutesResult.lineId.toLong(), taskAndsite.name) lineInfo = LineInfo(busRoutesResult.lineId.toLong(), busRoutesResult.name)
} }
lineInfo?.multiMap?.put("taskInfo", LineModel.getTaskTime()) lineInfo?.multiMap?.put("taskInfo", LineModel.getTaskTime())
} }
@@ -121,7 +121,7 @@ class BusRepository: IRepository {
} }
override fun endTask(taskId: Long): Observable<Boolean>? { override fun endTask(taskId: Long): Observable<Boolean>? {
return ShuttleServiceManager.endTask(taskId) return BusServiceManager.endTask(taskId)
} }

View File

@@ -50,7 +50,7 @@ class BusSaasRepository: IRepository {
} }
// 线路信息 // 线路信息
if (lineInfo == null && busRoutesResult.name != null) { if (lineInfo == null && busRoutesResult.name != null) {
lineInfo = LineInfo(busRoutesResult.lineId.toLong(), taskAndsite.name) lineInfo = LineInfo(busRoutesResult.lineId.toLong(), busRoutesResult.name)
} }
lineInfo?.multiMap?.put("taskInfo", LineModel.getTaskTime()) lineInfo?.multiMap?.put("taskInfo", LineModel.getTaskTime())
} }
@@ -122,7 +122,7 @@ class BusSaasRepository: IRepository {
} }
override fun endTask(taskId: Long): Observable<Boolean>? { override fun endTask(taskId: Long): Observable<Boolean>? {
return ShuttleServiceManager.endTask(taskId) return BusShuttleServiceManager.endTask(taskId)
} }

View File

@@ -47,7 +47,7 @@ class ShuttleRepository: IRepository {
} }
// 线路信息 // 线路信息
if (lineInfo == null && busRoutesResult.name != null) { if (lineInfo == null && busRoutesResult.name != null) {
lineInfo = LineInfo(busRoutesResult.lineId.toLong(), taskAndsite.name) lineInfo = LineInfo(busRoutesResult.lineId.toLong(), busRoutesResult.name)
} }
lineInfo?.multiMap?.put("taskInfo",LineModel.getTaskTime()) lineInfo?.multiMap?.put("taskInfo",LineModel.getTaskTime())
} }

View File

@@ -23,7 +23,7 @@ import com.mogo.och.shuttle.weaknet.R
import com.mogo.och.weaknet.ui.bizswitch.SwitchBizView import com.mogo.och.weaknet.ui.bizswitch.SwitchBizView
import com.mogo.och.weaknet.ui.taskrunned.RunningTaskManager import com.mogo.och.weaknet.ui.taskrunned.RunningTaskManager
import kotlinx.android.synthetic.main.shuttle_weak_base_fragment.boneContainerView import kotlinx.android.synthetic.main.shuttle_weak_base_fragment.boneContainerView
import kotlinx.android.synthetic.main.shuttle_weak_base_fragment.mapBizView import kotlinx.android.synthetic.main.shuttle_weak_base_fragment.mapContainerLayout
import me.jessyan.autosize.utils.AutoSizeUtils import me.jessyan.autosize.utils.AutoSizeUtils
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.Subscribe
@@ -73,7 +73,7 @@ class ShuttleFragment : MvpFragment<ShuttleFragment?, BusPresenter?>() {
override fun initViews(savedInstanceState: Bundle?) { override fun initViews(savedInstanceState: Bundle?) {
super.initViews(savedInstanceState) super.initViews(savedInstanceState)
mapBizView!!.onCreate(savedInstanceState) mapContainerLayout?.onCreate(savedInstanceState)
} }
override fun createPresenter(): BusPresenter { override fun createPresenter(): BusPresenter {
@@ -82,7 +82,7 @@ class ShuttleFragment : MvpFragment<ShuttleFragment?, BusPresenter?>() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
mapBizView!!.onResume() mapContainerLayout?.onResume()
} }
override fun onCreateView( override fun onCreateView(
@@ -95,21 +95,21 @@ class ShuttleFragment : MvpFragment<ShuttleFragment?, BusPresenter?>() {
override fun onSaveInstanceState(outState: Bundle) { override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState) super.onSaveInstanceState(outState)
mapBizView!!.onSaveInstanceState(outState) mapContainerLayout?.onSaveInstanceState(outState)
} }
override fun onLowMemory() { override fun onLowMemory() {
super.onLowMemory() super.onLowMemory()
mapBizView!!.onLowMemory() mapContainerLayout?.onLowMemory()
} }
override fun onPause() { override fun onPause() {
super.onPause() super.onPause()
mapBizView!!.onPause() mapContainerLayout?.onPause()
} }
override fun onDestroyView() { override fun onDestroyView() {
mapBizView!!.onDestroy() mapContainerLayout?.onDestroy()
if (mPresenter != null) { if (mPresenter != null) {
mPresenter!!.onDestroy(this) mPresenter!!.onDestroy(this)
} }

View File

@@ -112,7 +112,7 @@ class TaskRunningView: ConstraintLayout, TaskRunningModel.SwtichLineViewCallback
bus_task_running_line_name.text = lineInfo.lineName bus_task_running_line_name.text = lineInfo.lineName
} }
actv_running_task_time.text = "班次:${LineModel.getTaskTime()}" actv_running_task_time.text = "班次:${LineModel.getTaskTime()}"
LineModel.stationList?.takeIf { it.size>2 }?.let { LineModel.stationList?.takeIf { it.size>=2 }?.let {
actv_running_task_last_station.text = "${it.last().name ?: ""}" actv_running_task_last_station.text = "${it.last().name ?: ""}"
mAdapter.setDataList(it,LineModel.startStationIndex) mAdapter.setDataList(it,LineModel.startStationIndex)
CallerLogger.d(TAG,"BusLineModel.startStationIndex:${LineModel.startStationIndex}___$it") CallerLogger.d(TAG,"BusLineModel.startStationIndex:${LineModel.startStationIndex}___$it")

View File

@@ -5,10 +5,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.mogo.och.weaknet.view.BizMapView <com.mogo.eagle.core.function.hmi.map.MapContainerLayout
android:id="@+id/mapBizView" android:id="@+id/mapContainerLayout"
android:layout_width="match_parent" android:layout_width="1560dp"
android:layout_height="match_parent"/> android:layout_height="1534dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger <com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugViewTrigger
android:layout_width="@dimen/dp_400" android:layout_width="@dimen/dp_400"

View File

@@ -8,12 +8,16 @@
<TextView <TextView
android:id="@+id/bus_task_running_line_name" android:id="@+id/bus_task_running_line_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="@dimen/dp_45" android:textSize="@dimen/dp_45"
android:layout_marginLeft="@dimen/dp_54" android:layout_marginStart="@dimen/dp_54"
android:singleLine="true"
android:ellipsize="end"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/actv_running_task_time"
android:layout_marginEnd="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_37" android:layout_marginTop="@dimen/dp_37"
android:textColor="@color/white" android:textColor="@color/white"
android:text="@string/bus_switch_line_title"/> android:text="@string/bus_switch_line_title"/>

View File

@@ -58,7 +58,7 @@ include ':test:crashreport'
include ':test:crashreport-apmbyte' include ':test:crashreport-apmbyte'
//OCH 业务模块 //OCH 业务模块
include ':OCH:bus:driver' //include ':OCH:bus:driver'
include ':OCH:bus:passenger' include ':OCH:bus:passenger'
include ':OCH:taxi:driver' include ':OCH:taxi:driver'
@@ -78,7 +78,7 @@ include ':OCH:sweeper:driver'
include ':OCH:charter:driver' include ':OCH:charter:driver'
include ':OCH:charter:passenger' include ':OCH:charter:passenger'
include ':OCH:shuttle:driver' //include ':OCH:shuttle:driver'
include ':OCH:shuttle:passenger' include ':OCH:shuttle:passenger'