Merge branch 'refs/heads/dev_robobus-d_241028_6.7.3' into dev_robobus-d_241028_6.8.0_yyk

# Conflicts:
#	OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json
This commit is contained in:
yangyakun
2024-11-18 09:44:59 +08:00
32 changed files with 222 additions and 187 deletions

View File

@@ -154,7 +154,11 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall
override fun startAutopilotTimeOut() {
OchChainLogManager.writeChainLog("自驾信息","启动自驾超时失败")
startAutopilotFail()
if(OchAutoPilotStatusListenerManager.autopilotState == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
autopilotStateChange()
}else {
startAutopilotFail()
}
}
override fun startAutopilotFailure(startFailedCode: String?, startFailedMessage: String?) {

View File

@@ -14,6 +14,7 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.common.module.network.OchCommonSubscribeImpl
@@ -188,7 +189,7 @@ object MediaDataSourceManager {
private fun getMediaDataFromMis(callback: OchCommonServiceCallback<MediaDataResp>) {
MediaPlayLogger.printInfoLog("getMediaDataFromMis准备发送请求driverSn=$driverSn")
mNetworkService
?.queryMediaDataFromMis(sn = driverSn, screenType = "2",)
?.queryMediaDataFromMis(sn = LoginLanPassengerSocket.driverSn, screenType = "2",)
?.transformTry()
?.subscribe(OchCommonSubscribeImpl(context, callback, "getMediaDataFromMis"))
}

View File

@@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "b0f45b39cb8086ad1700c5f46bc8ee82",
"identityHash": "1d1bd5c3b1770e4bc24252f26791f036",
"entities": [
{
"tableName": "contrail_data_table",
@@ -479,7 +479,7 @@
},
{
"tableName": "event_data_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `event_type` TEXT, `lineId` INTEGER, `lineName` TEXT, `task_id` INTEGER, `task_start_time` INTEGER, `business_time` INTEGER, `write_version` INTEGER, `site_id` INTEGER, `seq` INTEGER, `driver_id` INTEGER, `event_save_time` INTEGER NOT NULL, `update_status` INTEGER NOT NULL)",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `event_type` TEXT, `lineId` INTEGER, `lineName` TEXT, `task_id` INTEGER, `task_start_time` INTEGER, `business_time` INTEGER, `write_version` INTEGER, `site_id` INTEGER, `seq` INTEGER, `driver_id` INTEGER, `event_save_time` INTEGER NOT NULL, `update_status` INTEGER NOT NULL, `msg_id` TEXT, `update_time` INTEGER)",
"fields": [
{
"fieldPath": "id",
@@ -558,6 +558,18 @@
"columnName": "update_status",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "msgId",
"columnName": "msg_id",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "upDateTime",
"columnName": "update_time",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
@@ -578,126 +590,12 @@
}
],
"foreignKeys": []
},
{
"tableName": "writeoff_data_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `expiry_time` INTEGER, `booking_time` INTEGER, `type` INTEGER, `task_id` INTEGER, `line_id` INTEGER, `site_id` INTEGER, `remaining_times` INTEGER, `order_no` TEXT, `uid` TEXT, `seq` TEXT, `tick_size` INTEGER, `tick_name` TEXT, `event_save_time` INTEGER NOT NULL, `update_status` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "expiryTime",
"columnName": "expiry_time",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "bookingTime",
"columnName": "booking_time",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "taskId",
"columnName": "task_id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "lineId",
"columnName": "line_id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "siteId",
"columnName": "site_id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "remainingTimes",
"columnName": "remaining_times",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "orderNo",
"columnName": "order_no",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "phone",
"columnName": "seq",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "ticketSize",
"columnName": "tick_size",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "ticketName",
"columnName": "tick_name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "eventSaveTime",
"columnName": "event_save_time",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "updateStatus",
"columnName": "update_status",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_writeoff_data_table_event_save_time",
"unique": false,
"columnNames": [
"event_save_time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_writeoff_data_table_event_save_time` ON `${TABLE_NAME}` (`event_save_time`)"
}
],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b0f45b39cb8086ad1700c5f46bc8ee82')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1d1bd5c3b1770e4bc24252f26791f036')"
]
}
}

View File

@@ -17,7 +17,7 @@ data class ShuttleEventRequest(val requestId: String, val sn: String, val busine
var tempEvent: Event?=null
waitUpdateEvent.forEach {
tempEvent = Event(it.eventType,
EventData(it.taskId,it.businessTime,it.writeVersion,it.siteId,it.seq,it.driverId)
EventData(it.taskId,it.businessTime,it.writeVersion,it.siteId,it.seq,it.driverId,it.msgId)
)
eventList4Request.add(tempEvent!!)
}
@@ -35,5 +35,6 @@ data class EventData(
var writeVersion: Long?,
var siteId: Long?,
var seq: Int?,
var driverId:Long?
var driverId:Long?,
var msgId:String?
)

View File

@@ -54,11 +54,16 @@ class BusRoutesResponse : BaseData() {
temp?.seq = (taskAndsite.seq ?: 0)
temp?.siteId = if (taskAndsite.siteId == null) 0 else taskAndsite.siteId!!.toInt()
if(!taskAndsite.videoList.isNullOrEmpty()){
val list = GsonUtils.fromJson<List<SiteIntroduce>>(
taskAndsite.videoList,
object : TypeToken<List<SiteIntroduce?>?>() {}.type
)
temp?.videoList = list.toMutableList()
try {
val list = GsonUtils.fromJson<List<SiteIntroduce>>(
taskAndsite.videoList,
object : TypeToken<List<SiteIntroduce?>?>() {}.type
)
temp?.videoList = list.toMutableList()
}catch (e:Exception){
temp?.videoList = null
}
}
result.add(temp!!)
// 正在进行中的任务

View File

@@ -55,6 +55,10 @@ object EventModel : EventDb.EventCallback {
private fun updateEvent(){
if(isUpdating.get()){
OchChainLogManager.writeChainLogDb("上报event","正在上传 等待下一次轮训 ${Thread.currentThread().name}")
return
}
isUpdating.set(true)
createDefault.onNext(isUpdating.get())
ThreadUtils.getSinglePool().submit {
@@ -72,6 +76,7 @@ object EventModel : EventDb.EventCallback {
override fun onSuccess(data: BaseData?) {
waitUpdateEvent.forEach {
it.updateStatus = EventDataBean.updated
it.upDateTime = System.currentTimeMillis()
}
OchChainLogManager.writeChainLogDb("上报event成功","$transformDb2Net ${Thread.currentThread().name}")
EventDb.saveUpdateSuccess(waitUpdateEvent)

View File

@@ -457,6 +457,10 @@ object OrderModel {
ToastUtils.showShort(ResourcesUtils.getString(R.string.shuttle_logout_error))
return@execute
}
if(RepositoryManager.haveRunningTask()){
ToastUtils.showShort(ResourcesUtils.getString(R.string.shuttle_logout_error_running))
return@execute
}
MapMakerManager.removeAllMapMarkerByOwner(TAG)
BusTrajectoryManager.getInstance().stopTrajReqLoop();
LoginStatusManager.loginOut()

View File

@@ -132,6 +132,7 @@ object ThirdDeviceData {
busRoutesResult.name = lineInfo.lineName
busRoutesResult.taskId = LineModel.currentTask!!.taskId!!.toInt()
busRoutesResult.taskTime = LineModel.currentTask!!.taskStartTime!!
busRoutesResult.writeVersion = System.currentTimeMillis()
val data = BusTransferData(if (LoginStatusManager.isLogin()) 1 else 0, busRoutesResult)
val msg = TaskDetailsMsg(GsonUtils.toJson(data), BusinessType.shuttle)
d(M_BUS + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg))

View File

@@ -130,6 +130,10 @@ object RepositoryManager {
writeOffRepository?.queryWriteoffCount(context,taskId,siteId,callback)
}
fun haveRunningTask():Boolean{
return repository?.haveRunningTask()?:false
}
fun haveDataWaitSyn(): Boolean {
if(ProjectUtils.isSaas()&&AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {

View File

@@ -31,7 +31,7 @@ import java.io.File
//entities指定该数据库有哪些表多张表就逗号分隔
//version指定数据库版本号升级时需要用到
//数据库继承自RoomDatabase
@Database(entities = [ContrailDataBean::class, LineDataBean::class, SiteDataBean::class, TaskDataBean::class, TaskSiteDataBean::class, EventDataBean::class], version = 3)
@Database(entities = [ContrailDataBean::class, LineDataBean::class, SiteDataBean::class, TaskDataBean::class, TaskSiteDataBean::class, EventDataBean::class], version = 4)
abstract class MyDataBase : RoomDatabase() {
override fun getOpenHelper(): SupportSQLiteOpenHelper {
@@ -90,6 +90,9 @@ abstract class MyDataBase : RoomDatabase() {
)
.addMigrations(Migration1_2(1,2))
.addMigrations(Migration2_3(2,3))
.addMigrations(Migration3_4(3,4))
.addMigrations(Migration2_4(2,4))
.fallbackToDestructiveMigration()
.build()
}
val ROOT_PATH = Environment.getExternalStorageDirectory().absolutePath + File.separator + "Mogo" + File.separator + "APP_cache" + File.separator //程序外部存储跟目录
@@ -114,4 +117,20 @@ abstract class MyDataBase : RoomDatabase() {
database.execSQL("ALTER TABLE ${TaskSiteDataBean.usedTaskDataTable} ADD COLUMN videoList TEXT");
}
}
class Migration3_4(val startVersion:Int,val endVersion:Int): Migration(startVersion,endVersion) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("ALTER TABLE ${EventDataBean.evnetDataTable} ADD COLUMN msg_id TEXT")
database.execSQL("ALTER TABLE ${EventDataBean.evnetDataTable} ADD COLUMN update_time INTEGER")
}
}
class Migration2_4(val startVersion:Int,val endVersion:Int): Migration(startVersion,endVersion) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("ALTER TABLE ${SiteDataBean.siteDataTable} ADD COLUMN videoList TEXT");
database.execSQL("ALTER TABLE ${TaskSiteDataBean.usedTaskDataTable} ADD COLUMN videoList TEXT");
database.execSQL("ALTER TABLE ${EventDataBean.evnetDataTable} ADD COLUMN msg_id TEXT")
database.execSQL("ALTER TABLE ${EventDataBean.evnetDataTable} ADD COLUMN update_time INTEGER")
}
}
}

View File

@@ -80,7 +80,13 @@ data class EventDataBean(
val eventSaveTime: Long = System.currentTimeMillis(),
@ColumnInfo(name = "update_status", typeAffinity = ColumnInfo.INTEGER)
var updateStatus:Int = 0
var updateStatus:Int = 0,
@ColumnInfo(name = "msg_id", typeAffinity = ColumnInfo.TEXT)
var msgId:String? = "",
@ColumnInfo(name = "update_time", typeAffinity = ColumnInfo.INTEGER)
var upDateTime:Long? = 0L,
) {
companion object {

View File

@@ -1,6 +1,7 @@
package com.mogo.och.weaknet.repository.db.repository
import com.mogo.och.common.module.biz.login.LoginStatusManager
import com.mogo.och.common.module.manager.cache.OchSPManager
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.utils.DateTimeUtil
@@ -40,6 +41,7 @@ object EventDb: IDbRepository {
event.driverId = LoginStatusManager.getLoginInfo()?.driverId?:-1
event.siteId = 0L
event.seq = 0
event.msgId = "${OchSPManager.getSn()}_${DateTimeUtil.getCurrentTimeStamp()}"
BizLoopManager.runInIoThread {
eventDataDao?.insert(event)
eventCallback?.notifySyn()
@@ -65,6 +67,7 @@ object EventDb: IDbRepository {
event.siteId = siteId
event.driverId = LoginStatusManager.getLoginInfo()?.driverId?:-1
event.seq = seq
event.msgId = "${OchSPManager.getSn()}_${DateTimeUtil.getCurrentTimeStamp()}"
BizLoopManager.runInIoThread {
eventDataDao?.insert(event)
eventCallback?.notifySyn()
@@ -90,6 +93,7 @@ object EventDb: IDbRepository {
event.driverId = LoginStatusManager.getLoginInfo()?.driverId?:-1L
event.siteId = siteId
event.seq = seq
event.msgId = "${OchSPManager.getSn()}_${DateTimeUtil.getCurrentTimeStamp()}"
BizLoopManager.runInIoThread {
eventDataDao?.insert(event)
eventCallback?.notifySyn()
@@ -108,6 +112,7 @@ object EventDb: IDbRepository {
event.driverId = LoginStatusManager.getLoginInfo()?.driverId?:-1L
event.siteId = 0L
event.seq = 0
event.msgId = "${OchSPManager.getSn()}_${DateTimeUtil.getCurrentTimeStamp()}"
BizLoopManager.runInIoThread {
eventDataDao?.insert(event)
eventCallback?.notifySyn()

View File

@@ -56,8 +56,15 @@ object TaskDb : IDbRepository {
taskDataDao.insert(*needAddDatas.toTypedArray())
}
if (needMinusDatas.isNotEmpty()) {
val needSaveTask = mutableListOf<TaskDataBean>()
// 删除任务
taskDataDao.delete(*needMinusDatas.toTypedArray())
needMinusDatas.forEach {
if(it.status==TaskDataBean.useing||it.status==TaskDataBean.used){
needSaveTask.add(it)
}
}
val failneedMinusDatas = needMinusDatas-needSaveTask
taskDataDao.delete(*failneedMinusDatas.toTypedArray())
}
}
}

View File

@@ -29,6 +29,10 @@ interface ILineRepository {
fun reportCabinEvent(context: Context?, data: ShuttleEventRequest?, callback: OchCommonServiceCallback<BaseData?>?)
fun haveRunningTask(): Boolean{
return false
}
fun release()
}

View File

@@ -327,6 +327,14 @@ class WeaknetRepository : ILineRepository {
weakNetInterface?.reportCabinEvent(context,data,callback)
}
override fun haveRunningTask(): Boolean {
if(LineModel.currentTask==null){
return false
}else{
return true
}
}
override fun release() {
weakNetInterface = null
CallerLogger.d(TAG,"重置 weakNetInterface")

View File

@@ -7,10 +7,13 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.findViewTreeViewModelStoreOwner
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.utils.ResourcesUtils
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.wigets.WindowRelativeLayout
import com.mogo.och.shuttle.weaknet.R
import com.mogo.och.weaknet.repository.db.bean.LineDataBean
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.loading_biz
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.swtichLine
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.swtichTask
@@ -34,6 +37,8 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
private var viewModel: SwtichBizeModel?=null
private var queryTimeout: Disposable? = null
init {
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_switch_biz, this, true)
@@ -57,9 +62,14 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
// 展示loading页面
override fun showLoadingView(){
startLoading = System.currentTimeMillis()
CallerLogger.d(TAG,"开始展示 lading 时间:${startLoading}")
loading_biz.visibility = VISIBLE
swtichLine.visibility = GONE
swtichTask.visibility = GONE
queryTimeout = RxUtils.createSubscribe(10_1000) {
OchChainLogManager.writeChainLog("Loading超时","loading 展示了10s")
viewModel?.queryRuningTask()
}
}
@@ -78,8 +88,8 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
// 展示选择任务页面
override fun showSwitchTaskInfo() {
RxUtils.disposeSubscribe(queryTimeout)
val endLoading = System.currentTimeMillis()
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
CallerLogger.d(TAG,"展示任务 lading 展示了 ${dex}毫秒")
@@ -93,6 +103,7 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
// 展示选择线路页面
override fun showSwtichLineView() {
RxUtils.disposeSubscribe(queryTimeout)
val endLoading = System.currentTimeMillis()
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
CallerLogger.d(TAG,"展示线路 lading 展示了 ${dex}毫秒")
@@ -106,6 +117,7 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
}
// 展示正在进行的任务
override fun loadRunningTask() {
RxUtils.disposeSubscribe(queryTimeout)
val endLoading = System.currentTimeMillis()
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
CallerLogger.d(TAG,"展示运行中任务 lading 展示了 ${dex}毫秒")

View File

@@ -36,6 +36,12 @@ class SwtichBizeModel : ViewModel(), IBusLinesCallback {
}
}
fun queryRuningTask(){
ThreadUtils.getIoPool().execute {
OrderModel.queryBusRoutes()
}
}
fun loadingSwitchTask(lineInfo: LineDataBean) {
d(LineModel.TAG, "loadingSwitchTask 查询线路的任务线路信息:${lineInfo}")
viewCallback?.showSwitchTaskByLineInfo(lineInfo)

View File

@@ -6,11 +6,10 @@ import androidx.appcompat.widget.AppCompatTextView
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.findViewTreeViewModelStoreOwner
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.env.ProjectUtils
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.och.shuttle.weaknet.R
import com.mogo.och.weaknet.repository.RepositoryManager
import com.mogo.och.weaknet.ui.taskrunning.TaskRunningAdapter
class WriteOffView : AppCompatTextView, WriteOffViewModel.IwriteOffViewCallback {
@@ -41,11 +40,9 @@ class WriteOffView : AppCompatTextView, WriteOffViewModel.IwriteOffViewCallback
private fun startListenerWriteOff(){
viewModel?.setWriteOffCallback(this)
visibility = VISIBLE
}
private fun stopListenerWriteOff(){
viewModel?.setWriteOffCallback(null)
visibility = GONE
if(RepositoryManager.supportWriteOff()) {
val showText =
AbsMogoApplication.getApp().getString(R.string.shuttle_write_off_count, 0)

View File

@@ -47,6 +47,7 @@
<string name="bus_dialog_cancel">取消</string>
<string name="shuttle_logout_error">请在网络良好的区域完成任务信息同步后退出</string>
<string name="shuttle_logout_error_running">请结束任务后再退出登录</string>
<string name="bus_no_task_tip">暂无任务</string>
<string name="shuttle_write_off_count">核销%1$d人</string>

View File

@@ -53,7 +53,7 @@ class M2StatusBarView @JvmOverloads constructor(
super.onAttachedToWindow()
post {
val params: ViewGroup.LayoutParams = getLayoutParams()
params.height = AutoSizeUtils.dp2px(context,40f)
params.height = AutoSizeUtils.dp2px(context,60f)
layoutParams = params
}
//添加view控制

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,46 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
tools:ignore="MissingDefaultResource">
android:layout_height="@dimen/dp_60"
tools:ignore="MissingDefaultResource"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<!--Wifi状态-->
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
android:id="@+id/wifiStateView"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_28"
app:wifi_size="@dimen/dp_18"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40" />
android:layout_marginStart="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="@+id/iv_logon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/iv_logon"
app:wifi_size="@dimen/dp_18" />
<!--魔方连接状态 蓝牙-->
<com.mogo.och.shuttle.weaknet.passenger.ui.widget.M2BlueToothView
android:id="@+id/blueToothView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/wifiStateView"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_22"
android:src="@drawable/shuttle_p_m2_blue_tooth_open"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_32" />
android:layout_marginStart="@dimen/dp_32"
android:src="@drawable/shuttle_p_m2_blue_tooth_open"
app:layout_constraintBottom_toBottomOf="@+id/iv_logon"
app:layout_constraintStart_toEndOf="@+id/wifiStateView"
app:layout_constraintTop_toTopOf="@+id/iv_logon" />
<com.mogo.och.common.module.manager.scnner.ScannerStateView
android:id="@+id/scannerStateView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/blueToothView"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:src="@drawable/driver_connect_statis"
android:layout_gravity="center"
android:layout_marginStart="@dimen/dp_40"/>
android:layout_marginStart="@dimen/dp_40"
android:src="@drawable/driver_connect_statis"
app:layout_constraintBottom_toBottomOf="@+id/iv_logon"
app:layout_constraintStart_toEndOf="@+id/blueToothView"
app:layout_constraintTop_toTopOf="@+id/iv_logon" />
<ProgressBar
android:id="@+id/progress"
@@ -49,37 +49,36 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginEnd="@dimen/dp_7"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_power_cos"
android:maxHeight="@dimen/dp_8"
android:minHeight="@dimen/dp_8"
android:layout_marginRight="4dp"
android:background="@null"
android:progressDrawable="@drawable/shuttle_p_m2_power_seekbar_style" />
android:maxHeight="@dimen/dp_8"
android:minHeight="@dimen/dp_8"
android:progressDrawable="@drawable/shuttle_p_m2_power_seekbar_style"
app:layout_constraintBottom_toBottomOf="@+id/iv_logon"
app:layout_constraintRight_toLeftOf="@+id/tv_power_cos"
app:layout_constraintTop_toTopOf="@+id/iv_logon" />
<TextView
android:id="@+id/tv_power_cos"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textSize="@dimen/dp_18"
android:textColor="@color/shuttle_p_m2_power_tv_color"
android:layout_marginRight="@dimen/dp_40"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_40"
android:textColor="@color/shuttle_p_m2_power_tv_color"
android:textSize="@dimen/dp_18"
app:layout_constraintBottom_toBottomOf="@+id/iv_logon"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/iv_logon" />
<ImageView
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/iv_logon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_7"
android:src="@drawable/shuttle_p_m2_status_bar_logo"
android:scaleType="fitXY"
android:layout_width="@dimen/dp_94"
android:layout_height="@dimen/dp_25"
app:isUseSkin="true"/>
app:isUseSkin="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</merge>
</merge>

View File

@@ -58,6 +58,7 @@ import com.mogo.och.common.module.map.AmapNaviToDestinationModel
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjLocations
import com.mogo.och.common.module.utils.OCHThreadPoolManager
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.data.bean.LineInfo
import com.mogo.och.data.taxi.QueryCarOrderByNoRespBean
@@ -637,6 +638,9 @@ object TaxiTaskModel {
ToastUtils.showShort("到站接口请求出现异常,请稍后重试")
DebugView.printErrorMsg("[上报ArriveSite] 到站接口请求出现异常,请稍后重试")
}
RxUtils.createSubscribe {
submitArriveSite(siteId, isArriveAtEndSite,isArrivedNearestStation)
}
}
override fun onFail(code: Int, msg: String?) {
@@ -644,6 +648,11 @@ object TaxiTaskModel {
DebugView.printErrorMsg("[上报ArriveSite] failed, code=$code, msg=$msg")
d(TAG, "code=$code msg=$msg")
ToastUtils.showShort("到站接口请求出现异常,请稍后重试,code=$code msg=$msg")
if(msg?.contains("驾舱操作过快,请稍后重试")==true){
RxUtils.createSubscribe {
submitArriveSite(siteId, isArriveAtEndSite,isArrivedNearestStation)
}
}
}
})
}

View File

@@ -521,7 +521,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
}
private fun drawGreenWave(crossSpeed: V2nCrossSpeed) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch) {
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nTotalSwitch && FunctionBuildConfig.v2nGreenWave) {
handler.removeMessages(MSG_WHAT_DRAW_GREEN_WAVE)
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_GREEN_WAVE, crossSpeed))
}
@@ -587,4 +587,4 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
// val targetIds = event.exts.split(",")
// }
}
}
}

View File

@@ -12,6 +12,8 @@ import android.view.LayoutInflater
import android.view.View
import android.view.animation.AccelerateDecelerateInterpolator
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.marginBottom
import androidx.core.view.marginEnd
import androidx.core.view.marginStart
import androidx.core.view.marginTop
import com.mogo.eagle.core.data.config.FunctionBuildConfig
@@ -44,6 +46,8 @@ class MapContainerLayout @JvmOverloads constructor(
private var mapMaxHeight = 0
private var maxMarginStart = 0
private var maxMarginTop = 0
private var maxMarginEnd = 0
private var maxMarginBottom = 0
private var zoomInAnimator: ValueAnimator? = null
private var zoomOutAnimator: ValueAnimator? = null
@@ -102,6 +106,8 @@ class MapContainerLayout @JvmOverloads constructor(
mapMinHeight = overMapView.height
maxMarginStart = overMapView.marginStart
maxMarginTop = overMapView.marginTop
maxMarginEnd = overMapView.marginEnd
maxMarginBottom = overMapView.marginBottom
}
override fun onAttachedToWindow() {
@@ -164,6 +170,8 @@ class MapContainerLayout @JvmOverloads constructor(
layoutParams.height = evaluator.evaluate(it.animatedFraction, mapMinHeight, mapMaxHeight)
layoutParams.leftMargin = evaluator.evaluate(it.animatedFraction, maxMarginStart, 0)
layoutParams.topMargin = evaluator.evaluate(it.animatedFraction, maxMarginTop, 0)
layoutParams.rightMargin = evaluator.evaluate(it.animatedFraction, maxMarginEnd, 0)
layoutParams.bottomMargin = evaluator.evaluate(it.animatedFraction, maxMarginBottom, 0)
}
}
zoomInAnimator?.interpolator = AccelerateDecelerateInterpolator()
@@ -181,6 +189,8 @@ class MapContainerLayout @JvmOverloads constructor(
layoutParams.height = evaluator.evaluate(it.animatedFraction, mapMaxHeight, mapMinHeight)
layoutParams.leftMargin = evaluator.evaluate(it.animatedFraction, 0, maxMarginStart)
layoutParams.topMargin = evaluator.evaluate(it.animatedFraction, 0, maxMarginTop)
layoutParams.rightMargin = evaluator.evaluate(it.animatedFraction, 0, maxMarginEnd)
layoutParams.bottomMargin = evaluator.evaluate(it.animatedFraction, 0, maxMarginBottom)
}
}
zoomOutAnimator?.interpolator = AccelerateDecelerateInterpolator()

View File

@@ -9,6 +9,8 @@ import android.content.Intent
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Build
import android.os.Environment
import android.os.Environment.*
import android.os.Process
import android.text.Html
import android.text.TextUtils
@@ -115,6 +117,7 @@ import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.CommonUtils
import com.mogo.eagle.core.utilcode.util.DeviceUtils
import com.mogo.eagle.core.utilcode.util.FileUtils
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
@@ -140,6 +143,7 @@ import kotlinx.android.synthetic.main.view_debug_setting.view.btChangeEnv
import kotlinx.android.synthetic.main.view_debug_setting.view.btnAppReboot
import kotlinx.android.synthetic.main.view_debug_setting.view.btnBrakeThreshold
import kotlinx.android.synthetic.main.view_debug_setting.view.btnConnectServerIp
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDeleteDB
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDisconnectIpc
import kotlinx.android.synthetic.main.view_debug_setting.view.btnDrawFusion
import kotlinx.android.synthetic.main.view_debug_setting.view.btnHdVisualAdjust
@@ -315,6 +319,8 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import java.io.File
import java.io.File.*
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Timer
@@ -1375,6 +1381,18 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerAutoPilotControlManager.connectSpecifiedServer(ip)
}
}
btnDeleteDB.setOnClickListener {
try{
val ROOT_PATH = getExternalStorageDirectory().absolutePath + separator + "Mogo" + separator + "APP_cache" + separator
val dbDir = File(ROOT_PATH)
if(dbDir.exists()&&dbDir.isDirectory){
FileUtils.deleteFilesInDir(dbDir)
}
}catch (e:Exception){
}
}
//是否开启异常上报
tbReportWarning.isChecked = FunctionBuildConfig.isReportWarning

View File

@@ -1328,12 +1328,23 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<Button
android:id="@+id/btnDeleteDB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/dp_20"
android:text="删除业务数据库"
android:textSize="@dimen/dp_24"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnBrakeThreshold" />
<View
android:id="@+id/brakeThresholdDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0"
app:layout_constraintTop_toBottomOf="@id/btnBrakeThreshold" />
app:layout_constraintTop_toBottomOf="@id/btnDeleteDB" />
<Button
android:id="@+id/btnConnectServerIp"

View File

@@ -23,21 +23,21 @@
android:id="@+id/overMapView"
android:layout_width="270dp"
android:layout_height="270dp"
android:layout_marginStart="1530dp"
android:layout_marginTop="1204dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="40dp"
android:focusable="false"
android:focusableInTouchMode="false"
app:bottomPadding="160"
app:compassDrawable="@drawable/taxt_u_p_map_car_light"
app:endPointDrawable="@drawable/taxi_overmap_endpoint"
app:globalPathColor="#39BA90"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:leftPadding="70"
app:mapStyleExtraPath="over_view_style_extra.data"
app:mapStylePath="over_view_style.data"
app:resetDrawable="@null"
app:rightPadding="70"
android:focusable="false"
android:focusableInTouchMode="false"
app:roadRangeDrawable="@drawable/taxi_overmap_road_range"
app:roadTrajectoryDrawable="@drawable/taxi_orvermap_road_trajectory"
app:startPointDrawable="@drawable/taxi_overmap_startpoint"

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB