Merge branch 'refs/heads/dev_robobus-d_241028_6.7.3'
This commit is contained in:
@@ -154,12 +154,20 @@ 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?) {
|
||||
OchChainLogManager.writeChainLog("自驾信息","底盘强制失败原因:${startFailedCode}_${startFailedMessage}")
|
||||
startAutopilotFail()
|
||||
if(OchAutoPilotStatusListenerManager.autopilotState == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING){
|
||||
autopilotStateChange()
|
||||
}else {
|
||||
startAutopilotFail()
|
||||
}
|
||||
}
|
||||
|
||||
private fun startAutopilotFail(){
|
||||
|
||||
@@ -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"))
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ class MediaPlayerFragment :
|
||||
arrayListOf.addAll(list)
|
||||
UiThreadHandler.post {
|
||||
if (isNewData) {
|
||||
imageVideoRotationView.setNewMediaData(arrayListOf)
|
||||
imageVideoRotationView?.setNewMediaData(arrayListOf)
|
||||
} else {
|
||||
imageVideoRotationView.setMediaData(arrayListOf)
|
||||
imageVideoRotationView?.setMediaData(arrayListOf)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1085,12 +1085,18 @@ public class OrderModel {
|
||||
parameters.vehicleType = VEHICLE_TYPE;
|
||||
if (parameters.autoPilotLine == null) {
|
||||
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
|
||||
busRoutesResult.getLineId(), busRoutesResult.getName(),
|
||||
busRoutesResult.csvFileUrl, busRoutesResult.csvFileMd5,
|
||||
busRoutesResult.txtFileUrl, busRoutesResult.txtFileMd5,
|
||||
busRoutesResult.contrailSaveTime, busRoutesResult.carModel,
|
||||
busRoutesResult.csvFileUrlDPQP, busRoutesResult.csvFileMd5DPQP,
|
||||
busRoutesResult.txtFileUrlDPQP, busRoutesResult.txtFileMd5DPQP,
|
||||
busRoutesResult.getLineId(),
|
||||
busRoutesResult.getName(),
|
||||
busRoutesResult.csvFileUrl==null?"":busRoutesResult.csvFileUrl,
|
||||
busRoutesResult.csvFileMd5==null?"":busRoutesResult.csvFileMd5,
|
||||
busRoutesResult.txtFileUrl==null?"":busRoutesResult.txtFileUrl,
|
||||
busRoutesResult.txtFileMd5==null?"":busRoutesResult.txtFileMd5,
|
||||
busRoutesResult.contrailSaveTime,
|
||||
busRoutesResult.carModel,
|
||||
busRoutesResult.csvFileUrlDPQP,
|
||||
busRoutesResult.csvFileMd5DPQP,
|
||||
busRoutesResult.txtFileUrlDPQP,
|
||||
busRoutesResult.txtFileMd5DPQP,
|
||||
busRoutesResult.contrailSaveTimeDPQP);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,17 +129,12 @@ public class BusTrajectoryManager {
|
||||
} else {
|
||||
mAutoPilotLine.setLineId(routesResult.getLineId());
|
||||
mAutoPilotLine.setLineName(routesResult.getName());
|
||||
mAutoPilotLine.setTrajUrl(routesResult.csvFileUrl);
|
||||
mAutoPilotLine.setTrajMd5(routesResult.csvFileMd5);
|
||||
mAutoPilotLine.setStopUrl(routesResult.txtFileUrl);
|
||||
mAutoPilotLine.setStopMd5(routesResult.txtFileMd5);
|
||||
mAutoPilotLine.setTrajUrl(routesResult.csvFileUrl==null?"":routesResult.csvFileUrl);
|
||||
mAutoPilotLine.setTrajMd5(routesResult.csvFileMd5==null?"":routesResult.csvFileMd5);
|
||||
mAutoPilotLine.setStopUrl(routesResult.txtFileUrl==null?"":routesResult.txtFileUrl);
|
||||
mAutoPilotLine.setStopMd5(routesResult.txtFileMd5==null?"":routesResult.txtFileMd5);
|
||||
mAutoPilotLine.setTimestamp(routesResult.contrailSaveTime);
|
||||
mAutoPilotLine.setVehicleModel(routesResult.carModel);
|
||||
mAutoPilotLine.setTrajUrl_dpqp(routesResult.csvFileUrlDPQP);
|
||||
mAutoPilotLine.setTrajMd5_dpqp(routesResult.csvFileMd5DPQP);
|
||||
mAutoPilotLine.setStopUrl_dpqp(routesResult.txtFileUrlDPQP);
|
||||
mAutoPilotLine.setStopMd5_dpqp(routesResult.txtFileMd5DPQP);
|
||||
mAutoPilotLine.setTimestamp_dpqp(routesResult.contrailSaveTimeDPQP);
|
||||
mAutoPilotLine.setVehicleModel(routesResult.carModel==null?"":routesResult.carModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,11 +72,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_71"
|
||||
app:layout_constraintEnd_toEndOf="@+id/viewLimitingVelocity"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
app:layout_goneMarginTop="@dimen/dp_236"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewLimitingVelocity"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"/>
|
||||
|
||||
<!--消息盒子选择入口-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxButtonView
|
||||
@@ -85,7 +85,7 @@
|
||||
android:layout_height="@dimen/dp_142"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />
|
||||
<!--消息盒子打开视图-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.DriverMsgBoxListView
|
||||
|
||||
@@ -0,0 +1,601 @@
|
||||
{
|
||||
"formatVersion": 1,
|
||||
"database": {
|
||||
"version": 4,
|
||||
"identityHash": "1d1bd5c3b1770e4bc24252f26791f036",
|
||||
"entities": [
|
||||
{
|
||||
"tableName": "contrail_data_table",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `line_id` INTEGER, `csv_file_url` TEXT, `csv_file_md5` TEXT, `txt_file_url` TEXT, `txt_file_md5` TEXT, `contrail_save_time` INTEGER, `md5` TEXT)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineId",
|
||||
"columnName": "line_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "csvFileUrl",
|
||||
"columnName": "csv_file_url",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "csvFileMd5",
|
||||
"columnName": "csv_file_md5",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "txtFileUrl",
|
||||
"columnName": "txt_file_url",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "txtFileMd5",
|
||||
"columnName": "txt_file_md5",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "contrailSaveTime",
|
||||
"columnName": "contrail_save_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "md5",
|
||||
"columnName": "md5",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [
|
||||
{
|
||||
"name": "index_contrail_data_table_line_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"line_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_contrail_data_table_line_id` ON `${TABLE_NAME}` (`line_id`)"
|
||||
},
|
||||
{
|
||||
"name": "index_contrail_data_table_md5",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"md5"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_contrail_data_table_md5` ON `${TABLE_NAME}` (`md5`)"
|
||||
}
|
||||
],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "line_data_table",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `line_id` INTEGER, `line_name` TEXT, `end_station_name` TEXT, `line_get_time` INTEGER NOT NULL)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineId",
|
||||
"columnName": "line_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineName",
|
||||
"columnName": "line_name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "endStationName",
|
||||
"columnName": "end_station_name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "linegetTime",
|
||||
"columnName": "line_get_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [
|
||||
{
|
||||
"name": "index_line_data_table_line_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"line_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_line_data_table_line_id` ON `${TABLE_NAME}` (`line_id`)"
|
||||
}
|
||||
],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "site_data_table",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `site_id` INTEGER, `line_id` INTEGER, `name` TEXT, `name_kr` TEXT, `seq` INTEGER, `gcj_lon` REAL, `gcj_lat` REAL, `lon` REAL, `lat` REAL, `introduction` TEXT, `is_play_tts` INTEGER, `md5` TEXT, `videoList` TEXT)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "siteId",
|
||||
"columnName": "site_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineId",
|
||||
"columnName": "line_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "name",
|
||||
"columnName": "name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "nameKr",
|
||||
"columnName": "name_kr",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "seq",
|
||||
"columnName": "seq",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "gcjLon",
|
||||
"columnName": "gcj_lon",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "gcjLat",
|
||||
"columnName": "gcj_lat",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lon",
|
||||
"columnName": "lon",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lat",
|
||||
"columnName": "lat",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "introduction",
|
||||
"columnName": "introduction",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "isPlayTts",
|
||||
"columnName": "is_play_tts",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "md5",
|
||||
"columnName": "md5",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "videoListDB",
|
||||
"columnName": "videoList",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [
|
||||
{
|
||||
"name": "index_site_data_table_site_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"site_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_site_data_table_site_id` ON `${TABLE_NAME}` (`site_id`)"
|
||||
},
|
||||
{
|
||||
"name": "index_site_data_table_line_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"line_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_site_data_table_line_id` ON `${TABLE_NAME}` (`line_id`)"
|
||||
}
|
||||
],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "task_data_table",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task_id` INTEGER, `line_id` INTEGER, `task_data` INTEGER, `task_start_time` INTEGER, `start_time` INTEGER, `end_time` INTEGER, `task_get_time` INTEGER NOT NULL, `status` INTEGER)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskId",
|
||||
"columnName": "task_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineId",
|
||||
"columnName": "line_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskDate",
|
||||
"columnName": "task_data",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskStartTime",
|
||||
"columnName": "task_start_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "startTime",
|
||||
"columnName": "start_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "endtime",
|
||||
"columnName": "end_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskgetTime",
|
||||
"columnName": "task_get_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "status",
|
||||
"columnName": "status",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [
|
||||
{
|
||||
"name": "index_task_data_table_task_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"task_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_task_data_table_task_id` ON `${TABLE_NAME}` (`task_id`)"
|
||||
},
|
||||
{
|
||||
"name": "index_task_data_table_line_id",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"line_id"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_task_data_table_line_id` ON `${TABLE_NAME}` (`line_id`)"
|
||||
}
|
||||
],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "used_task_data_table",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `task_id` INTEGER, `line_id` INTEGER, `site_id` INTEGER, `line_name` TEXT, `name` TEXT, `name_kr` TEXT, `seq` INTEGER, `gcj_lon` REAL, `gcj_lat` REAL, `lon` REAL, `lat` REAL, `driving_status` INTEGER, `leaving` INTEGER, `arrived_time` INTEGER, `leave_time` INTEGER, `introduction` TEXT, `is_play_tts` INTEGER, `event_save_time` INTEGER NOT NULL, `videoList` TEXT)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"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": "lineName",
|
||||
"columnName": "line_name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "name",
|
||||
"columnName": "name",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "nameKr",
|
||||
"columnName": "name_kr",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "seq",
|
||||
"columnName": "seq",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "gcjLon",
|
||||
"columnName": "gcj_lon",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "gcjLat",
|
||||
"columnName": "gcj_lat",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lon",
|
||||
"columnName": "lon",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lat",
|
||||
"columnName": "lat",
|
||||
"affinity": "REAL",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "drivingStatus",
|
||||
"columnName": "driving_status",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "leaving",
|
||||
"columnName": "leaving",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "arrivedTime",
|
||||
"columnName": "arrived_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "leaveTime",
|
||||
"columnName": "leave_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "introduction",
|
||||
"columnName": "introduction",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "isPlayTts",
|
||||
"columnName": "is_play_tts",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "eventSaveTime",
|
||||
"columnName": "event_save_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "videoList",
|
||||
"columnName": "videoList",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"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, `msg_id` TEXT, `update_time` INTEGER)",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "eventType",
|
||||
"columnName": "event_type",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineId",
|
||||
"columnName": "lineId",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "lineName",
|
||||
"columnName": "lineName",
|
||||
"affinity": "TEXT",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskId",
|
||||
"columnName": "task_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "taskStartTime",
|
||||
"columnName": "task_start_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "businessTime",
|
||||
"columnName": "business_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "writeVersion",
|
||||
"columnName": "write_version",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "siteId",
|
||||
"columnName": "site_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "seq",
|
||||
"columnName": "seq",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "driverId",
|
||||
"columnName": "driver_id",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": false
|
||||
},
|
||||
{
|
||||
"fieldPath": "eventSaveTime",
|
||||
"columnName": "event_save_time",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "updateStatus",
|
||||
"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": {
|
||||
"columnNames": [
|
||||
"id"
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [
|
||||
{
|
||||
"name": "index_event_data_table_event_save_time",
|
||||
"unique": false,
|
||||
"columnNames": [
|
||||
"event_save_time"
|
||||
],
|
||||
"orders": [],
|
||||
"createSql": "CREATE INDEX IF NOT EXISTS `index_event_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, '1d1bd5c3b1770e4bc24252f26791f036')"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -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?
|
||||
)
|
||||
@@ -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!!)
|
||||
// 正在进行中的任务
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -32,6 +32,10 @@ interface IRepository {
|
||||
|
||||
fun reportCabinEvent(context: Context?, data: ShuttleEventRequest?, callback: OchCommonServiceCallback<BaseData?>?)
|
||||
|
||||
fun haveRunningTask(): Boolean{
|
||||
return false
|
||||
}
|
||||
|
||||
fun release()
|
||||
|
||||
}
|
||||
@@ -96,6 +96,10 @@ object RepositoryManager {
|
||||
repository?.queryWriteoffCount(context,taskId,siteId,callback)
|
||||
}
|
||||
|
||||
fun haveRunningTask():Boolean{
|
||||
return repository?.haveRunningTask()?:false
|
||||
}
|
||||
|
||||
|
||||
fun haveDataWaitSyn(): Boolean {
|
||||
if(ProjectUtils.isSaas()&&AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.commons.env.Project
|
||||
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.util.FileUtils
|
||||
import com.mogo.och.weaknet.repository.db.bean.ContrailDataBean
|
||||
import com.mogo.och.weaknet.repository.db.bean.EventDataBean
|
||||
import com.mogo.och.weaknet.repository.db.bean.LineDataBean
|
||||
@@ -30,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 {
|
||||
@@ -82,11 +83,16 @@ abstract class MyDataBase : RoomDatabase() {
|
||||
}
|
||||
}
|
||||
|
||||
FileUtils.createOrExistsDir(ROOT_PATH)
|
||||
|
||||
return Room.databaseBuilder(
|
||||
AbsMogoApplication.getApp()!!.applicationContext, MyDataBase::class.java, ROOT_PATH+roomName
|
||||
)
|
||||
.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 //程序外部存储跟目录
|
||||
@@ -111,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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,6 +337,14 @@ class WeaknetRepository : IRepository {
|
||||
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")
|
||||
|
||||
@@ -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}毫秒")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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(",")
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,12 @@ class StartAutoPilotStatusView @JvmOverloads constructor(
|
||||
if (isAnyOneError) R.drawable.icon_no_fsm_status_bg_error
|
||||
else R.drawable.icon_no_fsm_status_bg_normal
|
||||
)
|
||||
notifyStatus(isAnyOneError)
|
||||
if (!hasFSM.get()) {
|
||||
notifyStatus(isAnyOneError)
|
||||
Logger.d(TAG, "--- handleWithoutFSM --- do update")
|
||||
} else {
|
||||
Logger.d(TAG, "--- handleWithoutFSM --- do not update")
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifyStatus(isError: Boolean) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.iflytek.cloud.RecognizerListener
|
||||
import com.iflytek.cloud.RecognizerResult
|
||||
import com.iflytek.cloud.SpeechError
|
||||
import com.iflytek.cloud.SpeechRecognizer
|
||||
import com.mogo.commons.env.ProjectUtils
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.deva.report.CategoryInfo
|
||||
@@ -173,7 +174,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
iconDown?.setBounds(0, 0, iconDown.minimumWidth, iconDown.minimumHeight)
|
||||
iconUp?.setBounds(0, 0, iconUp.minimumWidth, iconUp.minimumHeight)
|
||||
//获取一级分类
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
if(ProjectUtils.isSaas()){
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
}
|
||||
//弹窗展示时间
|
||||
tvFaultTime.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
@@ -538,7 +541,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
|
||||
override fun getCategoriesError(msg: String) {
|
||||
super.getCategoriesError(msg)
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
if(ProjectUtils.isSaas()){
|
||||
ToastUtils.showShort("故障列表获取失败:$msg")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
@@ -546,7 +551,9 @@ class FaultReasonView @JvmOverloads constructor(
|
||||
if(visibility == View.VISIBLE){
|
||||
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||
//获取一级分类
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
if(ProjectUtils.isSaas()){
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId, 1, 0, type, 0)
|
||||
}
|
||||
//弹窗展示时间
|
||||
tvFaultTime.text =
|
||||
millis2String(System.currentTimeMillis(), TimeUtils.getHourMinSecondFormat())
|
||||
|
||||
@@ -191,6 +191,8 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
oneClickTimer?.start()
|
||||
//请求一键上报故障码
|
||||
CallerDevaToolsManager.getCategories(BadCaseConfig.tenantId,level,0,4,1)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,9 +298,11 @@ class ReportTypeView @JvmOverloads constructor(
|
||||
Log.i(TAG,"onAutopilotStatistics status = "+ it.status)
|
||||
if(it.status == AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED){
|
||||
//触发一键上报
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(!typeSelectStatus){
|
||||
showOneCLickReportView()
|
||||
if(ProjectUtils.isSaas()){
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(!typeSelectStatus){
|
||||
showOneCLickReportView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user