From 65d254249f7e73ac43516fd61a7e123fc5b5f2ff Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 12 Nov 2024 16:03:49 +0800 Subject: [PATCH 01/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E4=B9=98=E5=AE=A2?= =?UTF-8?q?=E5=B1=8F=E5=B9=BF=E5=91=8A=E4=BF=AE=E5=A4=8D]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/common/module/wigets/media/MediaPlayerFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaPlayerFragment.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaPlayerFragment.kt index 0c3ba2dc4f..e4f2d06745 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaPlayerFragment.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaPlayerFragment.kt @@ -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) } } } From 04ce74a69c73ee9b985c2bd64141965b1bfaa0b6 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 12 Nov 2024 19:20:17 +0800 Subject: [PATCH 02/23] [6.7.3] [fix] [mogo dir create] --- .../main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt index 590ba5a8ab..a765107464 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt @@ -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 @@ -82,6 +83,8 @@ abstract class MyDataBase : RoomDatabase() { } } + FileUtils.createOrExistsDir(ROOT_PATH) + return Room.databaseBuilder( AbsMogoApplication.getApp()!!.applicationContext, MyDataBase::class.java, ROOT_PATH+roomName ) From d26c761e681191cef7ffc0b4f8d0e4d5c6870a9b Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 13 Nov 2024 10:37:13 +0800 Subject: [PATCH 03/23] =?UTF-8?q?[6.7.3]=20[fix]=20[offline=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E7=A9=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/offline/model/OrderModel.java | 18 ++++++++++++------ .../och/offline/util/BusTrajectoryManager.java | 15 +++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java index 7f04703625..ca3026abb2 100644 --- a/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java +++ b/OCH/offline/driver/src/main/java/com/mogo/och/offline/model/OrderModel.java @@ -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); } diff --git a/OCH/offline/driver/src/main/java/com/mogo/och/offline/util/BusTrajectoryManager.java b/OCH/offline/driver/src/main/java/com/mogo/och/offline/util/BusTrajectoryManager.java index 4370689618..39005ec077 100644 --- a/OCH/offline/driver/src/main/java/com/mogo/och/offline/util/BusTrajectoryManager.java +++ b/OCH/offline/driver/src/main/java/com/mogo/och/offline/util/BusTrajectoryManager.java @@ -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); } } } From 0f4eb095466e0b21604b1cc72c2b99b9db0af7aa Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 13 Nov 2024 10:53:30 +0800 Subject: [PATCH 04/23] =?UTF-8?q?[6.7.3]=20[fix]=20[offline=20UI=E5=B1=95?= =?UTF-8?q?=E7=A4=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../driver/src/main/res/layout/offline_base_fragment.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OCH/offline/driver/src/main/res/layout/offline_base_fragment.xml b/OCH/offline/driver/src/main/res/layout/offline_base_fragment.xml index 34c7b6a068..64b4c69814 100644 --- a/OCH/offline/driver/src/main/res/layout/offline_base_fragment.xml +++ b/OCH/offline/driver/src/main/res/layout/offline_base_fragment.xml @@ -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"/> Date: Wed, 13 Nov 2024 11:21:58 +0800 Subject: [PATCH 05/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/layout/shuttle_weak_base_fragment.xml | 2 +- OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml | 2 +- .../src/main/res/layout/unmanned_taxi_base_fragment.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/res/layout/shuttle_weak_base_fragment.xml b/OCH/shuttle/driver_weaknet/src/main/res/layout/shuttle_weak_base_fragment.xml index c06ce1320a..ca6121f7c8 100644 --- a/OCH/shuttle/driver_weaknet/src/main/res/layout/shuttle_weak_base_fragment.xml +++ b/OCH/shuttle/driver_weaknet/src/main/res/layout/shuttle_weak_base_fragment.xml @@ -7,7 +7,7 @@ diff --git a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml index 0122d3af7d..a71da62b6f 100644 --- a/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml +++ b/OCH/taxi/driver/src/main/res/layout/taxi_base_fragment.xml @@ -7,7 +7,7 @@ diff --git a/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml b/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml index da0470911f..85d7e6d4f1 100644 --- a/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml +++ b/OCH/taxi/unmanned-driver/src/main/res/layout/unmanned_taxi_base_fragment.xml @@ -8,7 +8,7 @@ From 74546bf626ad541578eb934cc3a5920eb276fa14 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 13 Nov 2024 16:31:15 +0800 Subject: [PATCH 06/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E8=87=AA=E9=A9=BE?= =?UTF-8?q?=E4=B8=AD=E5=90=AF=E5=8A=A8=E8=87=AA=E9=A9=BE=E7=9A=84=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E6=83=85=E5=86=B5=E3=80=81=E6=97=A5=E5=BF=97=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E4=B8=8A=E6=8A=A5=20UI=E4=BF=AE=E5=A4=8D]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/module/wigets/autopilot/AutopilotStateModel.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt index 80a50bbcdc..10ddb920c9 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt @@ -159,7 +159,11 @@ class AutopilotStateModel : ViewModel(), IOchAutopilotStatusListener, ILineCall 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(){ From e22821e7c8ec05fdb1e3339fd0ceb62053a2f175 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 14 Nov 2024 11:09:03 +0800 Subject: [PATCH 07/23] =?UTF-8?q?[6.7.3]=20[fix]=20[taxi=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=87=8D=E8=AF=95=E9=80=BB=E8=BE=91]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt index fc0bc0cee0..6f7aec6b0c 100644 --- a/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt +++ b/OCH/taxi/unmanned-driver/src/main/java/com/mogo/och/unmanned/taxi/ui/task/TaxiTaskModel.kt @@ -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) + } + } } }) } From 8016638ac6de0f9aaa59d2052b9720146fb82c0d Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 14 Nov 2024 11:24:08 +0800 Subject: [PATCH 08/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=89=88=E6=9C=AC=E4=B8=8D=E5=85=BC=E5=AE=B9=20?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E9=87=8D=E5=BB=BA=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt index a765107464..06a27df739 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt @@ -90,6 +90,7 @@ abstract class MyDataBase : RoomDatabase() { ) .addMigrations(Migration1_2(1,2)) .addMigrations(Migration2_3(2,3)) + .fallbackToDestructiveMigration() .build() } val ROOT_PATH = Environment.getExternalStorageDirectory().absolutePath + File.separator + "Mogo" + File.separator + "APP_cache" + File.separator //程序外部存储跟目录 From 52f1a15b06479fdce05847339cbdaee81c6e29e3 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 14 Nov 2024 18:54:38 +0800 Subject: [PATCH 09/23] =?UTF-8?q?[6.7.3]=20[fix]=20[event=20=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E6=8E=A5=E5=8F=A3=E6=8C=89=E7=85=A7=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/weaknet/model/EventModel.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt index 7827658f17..5faf76a06d 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt @@ -55,6 +55,9 @@ object EventModel : EventDb.EventCallback { private fun updateEvent(){ + if(isUpdating.get()){ + return + } isUpdating.set(true) createDefault.onNext(isUpdating.get()) ThreadUtils.getSinglePool().submit { From 7b942cde7440bf545459aacc2bfc3b0cf3107f02 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 14 Nov 2024 18:58:18 +0800 Subject: [PATCH 10/23] =?UTF-8?q?[6.7.3]=20[fix]=20[writeversion=20?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=90=8E=20?= =?UTF-8?q?=E5=86=8D=E5=86=99=E5=85=A5=E4=B8=8A=E6=8A=A5=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/weaknet/model/EventModel.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt index 5faf76a06d..ae731df66f 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt @@ -75,6 +75,7 @@ object EventModel : EventDb.EventCallback { override fun onSuccess(data: BaseData?) { waitUpdateEvent.forEach { it.updateStatus = EventDataBean.updated + it.writeVersion = System.currentTimeMillis() } OchChainLogManager.writeChainLogDb("上报event成功","$transformDb2Net ${Thread.currentThread().name}") EventDb.saveUpdateSuccess(waitUpdateEvent) From 56315a27e2e8d73eb68fbe68f531be8b5dd00a73 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 14 Nov 2024 19:42:56 +0800 Subject: [PATCH 11/23] =?UTF-8?q?[6.7.3][=E8=BF=90=E8=90=A5=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF]=20=E4=BF=AE=E6=AD=A3=E7=BB=BF=E6=B3=A2=E9=80=9A?= =?UTF-8?q?=E8=A1=8C=E5=BC=80=E5=85=B3=E7=8A=B6=E6=80=81=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 3d5ed6d25d..f6e84b1335 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -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(",") // } } -} \ No newline at end of file +} From 412452d5ac761641e10d973d79fc45be6b30a323 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 10:33:56 +0800 Subject: [PATCH 12/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E6=B7=BB=E5=8A=A0=20m?= =?UTF-8?q?sgId=E5=92=8Cupdate=5Ftime]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/weaknet/model/EventModel.kt | 3 ++- .../och/weaknet/repository/db/MyDataBase.kt | 20 ++++++++++++++++++- .../repository/db/bean/EventDataBean.kt | 8 +++++++- .../repository/db/repository/EventDb.kt | 5 +++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt index ae731df66f..daa2818b82 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/EventModel.kt @@ -56,6 +56,7 @@ object EventModel : EventDb.EventCallback { private fun updateEvent(){ if(isUpdating.get()){ + OchChainLogManager.writeChainLogDb("上报event","正在上传 等待下一次轮训 ${Thread.currentThread().name}") return } isUpdating.set(true) @@ -75,7 +76,7 @@ object EventModel : EventDb.EventCallback { override fun onSuccess(data: BaseData?) { waitUpdateEvent.forEach { it.updateStatus = EventDataBean.updated - it.writeVersion = System.currentTimeMillis() + it.upDateTime = System.currentTimeMillis() } OchChainLogManager.writeChainLogDb("上报event成功","$transformDb2Net ${Thread.currentThread().name}") EventDb.saveUpdateSuccess(waitUpdateEvent) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt index 06a27df739..3d6e448dc8 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/MyDataBase.kt @@ -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,8 @@ 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() } @@ -115,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") + } + } } diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt index 9481b8222c..427697e63c 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt @@ -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 { diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/EventDb.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/EventDb.kt index a689f5d744..c375fe910a 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/EventDb.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/EventDb.kt @@ -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() From ac73ef625bd9a6a21bbd851bf3acbfe89079f9ce Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 10:38:08 +0800 Subject: [PATCH 13/23] =?UTF-8?q?[6.7.3]=20[fix]=20[media=20sn=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=80=BB=E8=BE=91]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/common/module/wigets/media/MediaDataSourceManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaDataSourceManager.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaDataSourceManager.kt index 24d297a733..62e247f538 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaDataSourceManager.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/media/MediaDataSourceManager.kt @@ -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) { MediaPlayLogger.printInfoLog("getMediaDataFromMis:准备发送请求,driverSn=$driverSn") mNetworkService - ?.queryMediaDataFromMis(sn = driverSn, screenType = "2",) + ?.queryMediaDataFromMis(sn = LoginLanPassengerSocket.driverSn, screenType = "2",) ?.transformTry() ?.subscribe(OchCommonSubscribeImpl(context, callback, "getMediaDataFromMis")) } From 4d89031d225feea5342eb2b20be8b8392b45c5cc Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 11:07:07 +0800 Subject: [PATCH 14/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E5=89=8D=E5=8F=B0?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=98=AF=E5=90=A6=E6=9C=89=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1=E3=80=81loading=20=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E5=A4=84=E7=90=86]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../4.json | 601 ++++++++++++++++++ .../com/mogo/och/weaknet/model/OrderModel.kt | 4 + .../och/weaknet/repository/IRepository.kt | 4 + .../weaknet/repository/RepositoryManager.kt | 4 + .../repository/impl/WeaknetRepository.kt | 8 + .../och/weaknet/ui/bizswitch/SwitchBizView.kt | 14 +- .../weaknet/ui/bizswitch/SwtichBizeModel.kt | 6 + .../src/main/res/values/strings.xml | 1 + 8 files changed, 641 insertions(+), 1 deletion(-) create mode 100644 OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json diff --git a/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json b/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json new file mode 100644 index 0000000000..1b4e1be442 --- /dev/null +++ b/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json @@ -0,0 +1,601 @@ +{ + "formatVersion": 1, + "database": { + "version": 4, + "identityHash": "ab78007616874d2ef2c8ce5b4fb27869", + "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 NOT NULL, `update_time` INTEGER NOT NULL)", + "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": true + }, + { + "fieldPath": "upDateTime", + "columnName": "update_time", + "affinity": "INTEGER", + "notNull": true + } + ], + "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, 'ab78007616874d2ef2c8ce5b4fb27869')" + ] + } +} \ No newline at end of file diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt index acc8b5caac..b78c7fff71 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/model/OrderModel.kt @@ -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() diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/IRepository.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/IRepository.kt index 63c45f2f9d..575f7f61df 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/IRepository.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/IRepository.kt @@ -32,6 +32,10 @@ interface IRepository { fun reportCabinEvent(context: Context?, data: ShuttleEventRequest?, callback: OchCommonServiceCallback?) + fun haveRunningTask(): Boolean{ + return false + } + fun release() } \ No newline at end of file diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/RepositoryManager.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/RepositoryManager.kt index 73f1a9439a..4f79fda2f0 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/RepositoryManager.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/RepositoryManager.kt @@ -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)) { diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/impl/WeaknetRepository.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/impl/WeaknetRepository.kt index 6536b6d70f..9d8daaabdb 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/impl/WeaknetRepository.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/impl/WeaknetRepository.kt @@ -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") diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwitchBizView.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwitchBizView.kt index 4c0bda28a9..6731c0d998 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwitchBizView.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwitchBizView.kt @@ -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}毫秒") diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwtichBizeModel.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwtichBizeModel.kt index 3b8eff028a..aec2d1be72 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwtichBizeModel.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/bizswitch/SwtichBizeModel.kt @@ -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) diff --git a/OCH/shuttle/driver_weaknet/src/main/res/values/strings.xml b/OCH/shuttle/driver_weaknet/src/main/res/values/strings.xml index 0d9eb141fa..f72f9d99eb 100644 --- a/OCH/shuttle/driver_weaknet/src/main/res/values/strings.xml +++ b/OCH/shuttle/driver_weaknet/src/main/res/values/strings.xml @@ -47,6 +47,7 @@ 取消 请在网络良好的区域完成任务信息同步后退出 + 请结束任务后再退出登录 暂无任务 核销%1$d人 From 68f5567d9e72695529ce72afa67e0a00ea4d71cb Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 12:14:24 +0800 Subject: [PATCH 15/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=8F=98=E6=9B=B4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../4.json | 10 +++++----- .../och/weaknet/repository/db/bean/EventDataBean.kt | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json b/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json index 1b4e1be442..83d629ad24 100644 --- a/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json +++ b/OCH/shuttle/driver_weaknet/schemas/com.mogo.och.weaknet.repository.db.MyDataBase/4.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 4, - "identityHash": "ab78007616874d2ef2c8ce5b4fb27869", + "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, `msg_id` TEXT NOT NULL, `update_time` 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", @@ -563,13 +563,13 @@ "fieldPath": "msgId", "columnName": "msg_id", "affinity": "TEXT", - "notNull": true + "notNull": false }, { "fieldPath": "upDateTime", "columnName": "update_time", "affinity": "INTEGER", - "notNull": true + "notNull": false } ], "primaryKey": { @@ -595,7 +595,7 @@ "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, 'ab78007616874d2ef2c8ce5b4fb27869')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1d1bd5c3b1770e4bc24252f26791f036')" ] } } \ No newline at end of file diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt index 427697e63c..bfd343051b 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/bean/EventDataBean.kt @@ -83,10 +83,10 @@ data class EventDataBean( var updateStatus:Int = 0, @ColumnInfo(name = "msg_id", typeAffinity = ColumnInfo.TEXT) - var msgId:String = "", + var msgId:String? = "", @ColumnInfo(name = "update_time", typeAffinity = ColumnInfo.INTEGER) - var upDateTime:Long = 0L, + var upDateTime:Long? = 0L, ) { companion object { From 260a881d86ade5000814b1767592a95feee14eca Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 12:14:45 +0800 Subject: [PATCH 16/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E8=AE=BE=E7=BD=AE=E7=8A=B6=E6=80=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/module/wigets/autopilot/AutopilotStateModel.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt index 10ddb920c9..22cc906d09 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/wigets/autopilot/AutopilotStateModel.kt @@ -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?) { From 124f3642cbe86cd1c96beedad6f8e1f95bf74293 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 14:41:04 +0800 Subject: [PATCH 17/23] =?UTF-8?q?[6.7.3]=20[fix]=20[msgid+null=20=E5=A4=84?= =?UTF-8?q?=E7=90=86]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weaknet/bean/request/ShuttleEventRequest.kt | 5 +++-- .../weaknet/bean/response/BusRoutesResponse.kt | 15 ++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/request/ShuttleEventRequest.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/request/ShuttleEventRequest.kt index 0e10757b59..c68457ddab 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/request/ShuttleEventRequest.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/request/ShuttleEventRequest.kt @@ -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? ) \ No newline at end of file diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/response/BusRoutesResponse.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/response/BusRoutesResponse.kt index 59ac0563bc..3ca25f85b0 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/response/BusRoutesResponse.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/bean/response/BusRoutesResponse.kt @@ -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>( - taskAndsite.videoList, - object : TypeToken?>() {}.type - ) - temp?.videoList = list.toMutableList() + try { + val list = GsonUtils.fromJson>( + taskAndsite.videoList, + object : TypeToken?>() {}.type + ) + temp?.videoList = list.toMutableList() + }catch (e:Exception){ + temp?.videoList = null + } + } result.add(temp!!) // 正在进行中的任务 From e66b8ec900f9719b057820d7fc738f198e222406 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 15:52:15 +0800 Subject: [PATCH 18/23] =?UTF-8?q?[6.7.3]=20[fix]=20[add=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=A4=9A=E4=BD=99=E6=93=8D=E4=BD=9C]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/weaknet/ui/writeoff/WriteOffView.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/writeoff/WriteOffView.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/writeoff/WriteOffView.kt index 22d3e2efa5..665c35d960 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/writeoff/WriteOffView.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/ui/writeoff/WriteOffView.kt @@ -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) From f5ae2824798c78b7718147854069aa44969195ee Mon Sep 17 00:00:00 2001 From: donghongyu-pc Date: Fri, 15 Nov 2024 16:13:51 +0800 Subject: [PATCH 19/23] =?UTF-8?q?[6.7.2]=201=E3=80=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E7=9A=84Pad=E5=B1=8F=E5=B9=95?= =?UTF-8?q?=E9=80=82=E9=85=8D=E5=8F=B3=E4=B8=8B=E8=A7=92=E5=B0=8F=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=98=BE=E7=A4=BA=E8=B4=B4=E8=BE=B9=20=E6=97=A7?= =?UTF-8?q?=E6=AC=BE=EF=BC=9ALenovo=20TB-J706F=20=20=20=201600*2560=20?= =?UTF-8?q?=E6=96=B0=E6=AC=BE=EF=BC=9ATB138FC=20=20=20=201536*2560?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/hmi/map/MapContainerLayout.kt | 10 ++++++++++ .../src/main/res/layout/view_map_container.xml | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt index 6d508bcc45..e24cc16dc4 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/map/MapContainerLayout.kt @@ -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() diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml index 71e98b3e88..7551ca0d15 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml @@ -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" From 1bd92600c3232d923f610248af44752fef33816e Mon Sep 17 00:00:00 2001 From: yangyakun Date: Fri, 15 Nov 2024 16:27:25 +0800 Subject: [PATCH 20/23] =?UTF-8?q?[6.7.3]=20[fix]=20[=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=20=E4=BF=9D=E7=95=99=E6=AD=A3?= =?UTF-8?q?=E5=9C=A8=E6=89=A7=E8=A1=8C=E5=92=8C=E5=B7=B2=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weaknet/repository/db/repository/TaskDb.kt | 9 ++++++++- .../hmi/ui/setting/DebugSettingView.kt | 18 ++++++++++++++++++ .../src/main/res/layout/view_debug_setting.xml | 13 ++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/TaskDb.kt b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/TaskDb.kt index c3e4d98a37..c56453a56f 100644 --- a/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/TaskDb.kt +++ b/OCH/shuttle/driver_weaknet/src/main/java/com/mogo/och/weaknet/repository/db/repository/TaskDb.kt @@ -56,8 +56,15 @@ object TaskDb : IDbRepository { taskDataDao.insert(*needAddDatas.toTypedArray()) } if (needMinusDatas.isNotEmpty()) { + val needSaveTask = mutableListOf() // 删除任务 - 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()) } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index e4c3bc988c..909a5e1e78 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index e7453824c8..cf29f61bc1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -1328,12 +1328,23 @@ +