From 2b4b2645a66587e999934bd107ef6a32d5753172 Mon Sep 17 00:00:00 2001
From: squallzhjch <zhangjingchao@navinfo.com>
Date: Thu, 27 Jul 2023 11:16:36 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1?=
 =?UTF-8?q?=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../omqs/http/taskdownload/TaskDownloadManager.kt    |  6 ++++++
 .../omqs/http/taskdownload/TaskDownloadScope.kt      | 12 ++++++++----
 .../navinfo/omqs/ui/activity/map/MainViewModel.kt    |  2 +-
 .../omqs/ui/fragment/tasklist/TaskListAdapter.kt     |  4 ++++
 .../main/java/com/navinfo/omqs/ui/widget/SignUtil.kt | 11 +++++++++++
 5 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadManager.kt b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadManager.kt
index e3d31ba4..0c90394a 100644
--- a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadManager.kt
+++ b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadManager.kt
@@ -83,6 +83,12 @@ class TaskDownloadManager constructor(
      * 只有等待中的任务和正在下载中的任务才可以进行暂停操作
      */
     fun pause(id: Int) {
+        if (scopeMap.containsKey(id)) {
+            val downloadScope = scopeMap[id]
+            downloadScope?.let {
+                downloadScope.pause()
+            }
+        }
         if (taskScopeMap.containsKey(id)) {
             val downloadScope = taskScopeMap[id]
             downloadScope?.let {
diff --git a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
index f628ed7d..16f873a4 100644
--- a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
+++ b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
@@ -60,7 +60,11 @@ class TaskDownloadScope(
     fun pause() {
         downloadJob?.cancel("pause")
         launch {
-            change(FileDownloadStatus.PAUSE)
+            if (taskBean.fileSize == 0L) {
+                change(FileDownloadStatus.NONE)
+            } else {
+                change(FileDownloadStatus.PAUSE)
+            }
         }
 
     }
@@ -123,7 +127,7 @@ class TaskDownloadScope(
     /**
      * 导入数据
      */
-    private suspend fun importData(file: File? = null, taskId: Int?=0) {
+    private suspend fun importData(file: File? = null, taskId: Int? = 0) {
         try {
             Log.e("jingo", "importData SSS")
             change(FileDownloadStatus.IMPORTING)
@@ -135,7 +139,7 @@ class TaskDownloadScope(
                     fileNew
                 )
             if (taskId != null) {
-                importOMDBHelper.importOmdbZipFile(importOMDBHelper.omdbFile,taskId).collect {
+                importOMDBHelper.importOmdbZipFile(importOMDBHelper.omdbFile, taskId).collect {
                     Log.e("jingo", "数据安装 $it")
                     if (it == "finish") {
                         change(FileDownloadStatus.DONE)
@@ -183,7 +187,7 @@ class TaskDownloadScope(
                 startPosition = 0
             }
             if (fileTemp.length() > 0 && taskBean.fileSize > 0 && fileTemp.length() == taskBean.fileSize) {
-                importData(fileTemp,taskBean.id)
+                importData(fileTemp, taskBean.id)
                 return
             }
 
diff --git a/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt b/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
index bd112775..88fd2b3e 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
@@ -449,7 +449,7 @@ class MainViewModel @Inject constructor(
             )
 
             if(itemList.size == 1){
-
+                SignUtil.getSignNameText(itemList[0])
             }
         }
     }
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/tasklist/TaskListAdapter.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/tasklist/TaskListAdapter.kt
index 9d450b60..9f017d33 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/tasklist/TaskListAdapter.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/tasklist/TaskListAdapter.kt
@@ -306,7 +306,11 @@ class TaskListAdapter(
             binding.taskProgressText.text =
                 "$progress%"
             binding.taskDownloadBtn.setProgress(progress)
+        } else {
+            binding.taskDownloadBtn.setProgress(0)
+            binding.taskProgressText.text = ""
         }
+
         when (taskBean.status) {
             FileDownloadStatus.NONE -> {
                 if (binding.taskProgressText.visibility == View.VISIBLE) binding.taskProgressText.visibility =
diff --git a/app/src/main/java/com/navinfo/omqs/ui/widget/SignUtil.kt b/app/src/main/java/com/navinfo/omqs/ui/widget/SignUtil.kt
index 3be3da98..7be5686c 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/widget/SignUtil.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/widget/SignUtil.kt
@@ -80,6 +80,8 @@ class SignUtil {
                 2008 -> "种别"
                 //道路方向
                 2010 -> "方向"
+                //车道边界类型
+                2013 -> "车道边界类型"
                 //常规线限速
                 2019 -> "线限速"
                 //车道数
@@ -404,7 +406,16 @@ class SignUtil {
             return stringBuffer.toString()
         }
 
+        /**
+         * 获取车道边界线详细信息
+         */
+        fun getLaneBoundaryInfo(data:RenderEntity){
 
+        }
+
+        /**
+         * 获取道路名列表
+         */
         fun getRoadNameList(data: RenderEntity): MutableList<RoadNameBean> {
             val list = mutableListOf<RoadNameBean>()
             if (data.code == 2011) {

From 485c2b4b790745575d6842b704725197c1bba184 Mon Sep 17 00:00:00 2001
From: squallzhjch <zhangjingchao@navinfo.com>
Date: Thu, 27 Jul 2023 17:15:51 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=BB=E7=BA=BF?=
 =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=B8=8B=E8=BD=BD=E7=9A=84=E6=8C=89=E9=92=AE?=
 =?UTF-8?q?=E7=8A=B6=E6=80=81=20=E4=BF=AE=E6=94=B9=E8=AF=A6=E7=BB=86?=
 =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=9D=A2=E6=9D=BF=E5=BF=AB=E6=8D=B7=E8=BF=9B?=
 =?UTF-8?q?=E5=85=A5=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../OfflineMapDownloadManager.kt              |   1 -
 .../OfflineMapDownloadScope.kt                |  23 +-
 .../http/taskdownload/TaskDownloadScope.kt    |   4 -
 .../omqs/ui/activity/login/LoginViewModel.kt  |   1 +
 .../omqs/ui/activity/map/MainViewModel.kt     |   2 +-
 .../EvaluationResultViewModel.kt              | 273 +++++++++---------
 .../offlinemap/OfflineMapCityListAdapter.kt   |  23 +-
 .../offlinemap/OfflineMapCityListFragment.kt  |  17 ++
 .../offlinemap/OfflineMapStateListFragment.kt |  12 +
 .../OfflineMapStateListViewModel.kt           |   7 +-
 .../signMoreInfo/SignMoreInfoFragment.kt      |  32 +-
 .../navinfo/omqs/ui/other/BaseViewHolder.kt   |   1 +
 .../collect/library/map/NIMapView.java        |   9 +-
 13 files changed, 243 insertions(+), 162 deletions(-)

diff --git a/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadManager.kt b/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadManager.kt
index 8b6fbdf2..9920da8f 100644
--- a/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadManager.kt
+++ b/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadManager.kt
@@ -79,7 +79,6 @@ class OfflineMapDownloadManager(
             }
             launchNext(id)
         }
-
     }
 
     /**
diff --git a/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadScope.kt b/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadScope.kt
index 5a251f8c..b89f9db4 100644
--- a/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadScope.kt
+++ b/app/src/main/java/com/navinfo/omqs/http/offlinemapdownload/OfflineMapDownloadScope.kt
@@ -34,7 +34,7 @@ class OfflineMapDownloadScope(
     /**
      * 管理观察者,同时只有一个就行了
      */
-    private val observer = Observer<Any> {}
+//    private val observer = Observer<Any> {}
 //    private var lifecycleOwner: LifecycleOwner? = null
 
     /**
@@ -58,7 +58,13 @@ class OfflineMapDownloadScope(
      */
     fun pause() {
         downloadJob?.cancel("pause")
-        change(FileDownloadStatus.PAUSE)
+        launch {
+            if (cityBean.fileSize == 0L) {
+                change(FileDownloadStatus.NONE)
+            } else {
+                change(FileDownloadStatus.PAUSE)
+            }
+        }
     }
 
     /**
@@ -99,7 +105,6 @@ class OfflineMapDownloadScope(
      * 添加下载任务观察者
      */
     fun observer(owner: LifecycleOwner, ob: Observer<OfflineMapCityBean>) {
-        removeObserver()
 //        this.lifecycleOwner = owner
         downloadData.observe(owner, ob)
     }
@@ -167,11 +172,15 @@ class OfflineMapDownloadScope(
         }
     }
 
+
     fun removeObserver() {
-        downloadData.observeForever(observer)
-//        lifecycleOwner?.let {
-        downloadData.removeObserver(observer)
-//            null
+//        downloadData.observeForever(observer)
+////        lifecycleOwner?.let {
+//        downloadData.removeObserver(observer)
+////            null
+////        }
+//        if (lifecycleOwner != null) {
+//            downloadData.removeObservers(lifecycleOwner!!)
 //        }
     }
 }
\ No newline at end of file
diff --git a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
index 16f873a4..5e45f2d6 100644
--- a/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
+++ b/app/src/main/java/com/navinfo/omqs/http/taskdownload/TaskDownloadScope.kt
@@ -248,10 +248,6 @@ class TaskDownloadScope(
 ////            null
 ////        }
         if (lifecycleOwner != null) {
-            Log.e(
-                "jingo",
-                "移除的上一个监听者 ${lifecycleOwner.hashCode()} ${(lifecycleOwner as BaseViewHolder).tag}"
-            )
             downloadData.removeObservers(lifecycleOwner!!)
         }
     }
diff --git a/app/src/main/java/com/navinfo/omqs/ui/activity/login/LoginViewModel.kt b/app/src/main/java/com/navinfo/omqs/ui/activity/login/LoginViewModel.kt
index 628e0263..f167d595 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/activity/login/LoginViewModel.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/activity/login/LoginViewModel.kt
@@ -362,6 +362,7 @@ class LoginViewModel @Inject constructor(
             .directory(userFolder)
             .name("OMQS.realm")
             .encryptionKey(password)
+            .allowQueriesOnUiThread(true)
 //            .modules(Realm.getDefaultModule(), MyRealmModule())
             .schemaVersion(2)
             .build()
diff --git a/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt b/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
index 7e16d74b..a3860287 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/activity/map/MainViewModel.kt
@@ -174,7 +174,7 @@ class MainViewModel @Inject constructor(
      */
     private var bSelectPauseTrace = false
 
-    private var linkIdCache = ""
+    var linkIdCache = ""
 
     private var lastNiLocaion: NiLocation? = null
 
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/evaluationresult/EvaluationResultViewModel.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/evaluationresult/EvaluationResultViewModel.kt
index 1c57cb41..570552df 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/evaluationresult/EvaluationResultViewModel.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/evaluationresult/EvaluationResultViewModel.kt
@@ -444,10 +444,11 @@ class EvaluationResultViewModel @Inject constructor(
      */
 
     fun initData(id: String) {
-
-        viewModelScope.launch(Dispatchers.IO) {
+        Log.e("jingo", "捕捉到的要素 id = $id")
+        viewModelScope.launch(Dispatchers.Main) {
 
             val realm = Realm.getDefaultInstance()
+
             val objects = realm.where(QsRecordBean::class.java).equalTo("id", id).findFirst()
             Log.e("jingo", "查询数据 id= $id")
             if (objects != null) {
@@ -487,163 +488,163 @@ class EvaluationResultViewModel @Inject constructor(
                     liveDataQsRecordBean.value?.attachmentBeanList = it.attachmentBeanList
                     // 显示语音数据到界面
                     getChatMsgEntityList()
-        }
+                }
             } else {
                 liveDataToastMessage.postValue("数据读取失败")
+            }
+        }
     }
-}
-}
 
-/**
- * 查询问题类型列表
- */
+    /**
+     * 查询问题类型列表
+     */
     private suspend fun getChatMsgEntityList() {
-    val chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
-    liveDataQsRecordBean.value?.attachmentBeanList?.forEach {
-        //1 录音
-        if (it.type == 1) {
-            val chatMsgEntity = ChatMsgEntity()
-            chatMsgEntity.name = it.name
-            chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
-            chatMsgEntityList.add(chatMsgEntity)
+        val chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
+        liveDataQsRecordBean.value?.attachmentBeanList?.forEach {
+            //1 录音
+            if (it.type == 1) {
+                val chatMsgEntity = ChatMsgEntity()
+                chatMsgEntity.name = it.name
+                chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
+                chatMsgEntityList.add(chatMsgEntity)
+            }
         }
-    }
-    listDataChatMsgEntityList.postValue(chatMsgEntityList)
-}
-
-fun addChatMsgEntity(filePath: String) {
-
-    if (filePath.isNotEmpty()) {
-        var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
-        if (listDataChatMsgEntityList.value?.isEmpty() == false) {
-            chatMsgEntityList = listDataChatMsgEntityList.value!!
-        }
-        val chatMsgEntity = ChatMsgEntity()
-        chatMsgEntity.name = filePath.replace(Constant.USER_DATA_ATTACHEMNT_PATH, "").toString()
-        chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
-        chatMsgEntityList.add(chatMsgEntity)
-
-
-        var attachmentList: RealmList<AttachmentBean> = RealmList()
-
-        //赋值处理
-        if (liveDataQsRecordBean.value?.attachmentBeanList?.isEmpty() == false) {
-            attachmentList = liveDataQsRecordBean.value?.attachmentBeanList!!
-        }
-
-        val attachmentBean = AttachmentBean()
-        attachmentBean.name = chatMsgEntity.name!!
-        attachmentBean.type = 1
-        attachmentList.add(attachmentBean)
-        liveDataQsRecordBean.value?.attachmentBeanList = attachmentList
-
         listDataChatMsgEntityList.postValue(chatMsgEntityList)
     }
-}
 
-fun startSoundMetter(activity: Activity, v: View) {
+    fun addChatMsgEntity(filePath: String) {
 
-    if (mSpeakMode == null) {
-        mSpeakMode = SpeakMode(activity)
-    }
+        if (filePath.isNotEmpty()) {
+            var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
+            if (listDataChatMsgEntityList.value?.isEmpty() == false) {
+                chatMsgEntityList = listDataChatMsgEntityList.value!!
+            }
+            val chatMsgEntity = ChatMsgEntity()
+            chatMsgEntity.name = filePath.replace(Constant.USER_DATA_ATTACHEMNT_PATH, "").toString()
+            chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
+            chatMsgEntityList.add(chatMsgEntity)
 
-    //语音识别动画
-    if (pop == null) {
-        pop = PopupWindow()
-        pop!!.width = ViewGroup.LayoutParams.MATCH_PARENT
-        pop!!.height = ViewGroup.LayoutParams.WRAP_CONTENT
-        pop!!.setBackgroundDrawable(BitmapDrawable())
-        val view =
-            View.inflate(activity as Context, R.layout.cv_card_voice_rcd_hint_window, null)
-        pop!!.contentView = view
-        volume = view.findViewById(R.id.volume)
-    }
 
-    pop!!.update()
+            var attachmentList: RealmList<AttachmentBean> = RealmList()
 
-    Constant.IS_VIDEO_SPEED = true
-    //录音动画
-    if (pop != null) {
-        pop!!.showAtLocation(v, Gravity.CENTER, 0, 0)
-    }
-    volume!!.setBackgroundResource(R.drawable.pop_voice_img)
-    val animation = volume!!.background as AnimationDrawable
-    animation.start()
-
-    val name: String = DateTimeUtil.getTimeSSS().toString() + ".m4a"
-    if (mSoundMeter == null) {
-        mSoundMeter = SoundMeter()
-    }
-    mSoundMeter!!.setmListener(object : SoundMeter.OnSoundMeterListener {
-        @RequiresApi(Build.VERSION_CODES.Q)
-        override fun onSuccess(filePath: String?) {
-            if (!TextUtils.isEmpty(filePath) && File(filePath).exists()) {
-                if (File(filePath) == null || File(filePath).length() < 1600) {
-                    ToastUtils.showLong("语音时间太短,无效!")
-                    mSpeakMode!!.speakText("语音时间太短,无效")
-                    stopSoundMeter()
-                    return
-                }
+            //赋值处理
+            if (liveDataQsRecordBean.value?.attachmentBeanList?.isEmpty() == false) {
+                attachmentList = liveDataQsRecordBean.value?.attachmentBeanList!!
             }
 
-            mSpeakMode!!.speakText("结束录音")
+            val attachmentBean = AttachmentBean()
+            attachmentBean.name = chatMsgEntity.name!!
+            attachmentBean.type = 1
+            attachmentList.add(attachmentBean)
+            liveDataQsRecordBean.value?.attachmentBeanList = attachmentList
 
-            addChatMsgEntity(filePath!!)
-        }
-
-        @RequiresApi(api = Build.VERSION_CODES.Q)
-        override fun onfaild(message: String?) {
-            ToastUtils.showLong("录制失败!")
-            mSpeakMode!!.speakText("录制失败")
-            stopSoundMeter()
-        }
-    })
-
-    mSoundMeter!!.start(Constant.USER_DATA_ATTACHEMNT_PATH + name)
-    ToastUtils.showLong("开始录音")
-    mSpeakMode!!.speakText("开始录音")
-}
-
-//停止语音录制
-@RequiresApi(api = Build.VERSION_CODES.Q)
-fun stopSoundMeter() {
-    //先重置标识,防止按钮抬起时触发语音结束
-    Constant.IS_VIDEO_SPEED = false
-    if (mSoundMeter != null && mSoundMeter!!.isStartSound) {
-        mSoundMeter!!.stop()
-    }
-    pop?.let {
-        if (it.isShowing) {
-            it.dismiss()
+            listDataChatMsgEntityList.postValue(chatMsgEntityList)
+        }
+    }
+
+    fun startSoundMetter(activity: Activity, v: View) {
+
+        if (mSpeakMode == null) {
+            mSpeakMode = SpeakMode(activity)
+        }
+
+        //语音识别动画
+        if (pop == null) {
+            pop = PopupWindow()
+            pop!!.width = ViewGroup.LayoutParams.MATCH_PARENT
+            pop!!.height = ViewGroup.LayoutParams.WRAP_CONTENT
+            pop!!.setBackgroundDrawable(BitmapDrawable())
+            val view =
+                View.inflate(activity as Context, R.layout.cv_card_voice_rcd_hint_window, null)
+            pop!!.contentView = view
+            volume = view.findViewById(R.id.volume)
+        }
+
+        pop!!.update()
+
+        Constant.IS_VIDEO_SPEED = true
+        //录音动画
+        if (pop != null) {
+            pop!!.showAtLocation(v, Gravity.CENTER, 0, 0)
+        }
+        volume!!.setBackgroundResource(R.drawable.pop_voice_img)
+        val animation = volume!!.background as AnimationDrawable
+        animation.start()
+
+        val name: String = DateTimeUtil.getTimeSSS().toString() + ".m4a"
+        if (mSoundMeter == null) {
+            mSoundMeter = SoundMeter()
+        }
+        mSoundMeter!!.setmListener(object : SoundMeter.OnSoundMeterListener {
+            @RequiresApi(Build.VERSION_CODES.Q)
+            override fun onSuccess(filePath: String?) {
+                if (!TextUtils.isEmpty(filePath) && File(filePath).exists()) {
+                    if (File(filePath) == null || File(filePath).length() < 1600) {
+                        ToastUtils.showLong("语音时间太短,无效!")
+                        mSpeakMode!!.speakText("语音时间太短,无效")
+                        stopSoundMeter()
+                        return
+                    }
+                }
+
+                mSpeakMode!!.speakText("结束录音")
+
+                addChatMsgEntity(filePath!!)
+            }
+
+            @RequiresApi(api = Build.VERSION_CODES.Q)
+            override fun onfaild(message: String?) {
+                ToastUtils.showLong("录制失败!")
+                mSpeakMode!!.speakText("录制失败")
+                stopSoundMeter()
+            }
+        })
+
+        mSoundMeter!!.start(Constant.USER_DATA_ATTACHEMNT_PATH + name)
+        ToastUtils.showLong("开始录音")
+        mSpeakMode!!.speakText("开始录音")
+    }
+
+    //停止语音录制
+    @RequiresApi(api = Build.VERSION_CODES.Q)
+    fun stopSoundMeter() {
+        //先重置标识,防止按钮抬起时触发语音结束
+        Constant.IS_VIDEO_SPEED = false
+        if (mSoundMeter != null && mSoundMeter!!.isStartSound) {
+            mSoundMeter!!.stop()
+        }
+        pop?.let {
+            if (it.isShowing) {
+                it.dismiss()
+            }
         }
     }
-}
 
 
-fun savePhoto(bitmap: Bitmap) {
-    viewModelScope.launch(Dispatchers.IO) {
-        // 创建一个名为 "MyApp" 的文件夹
-        val myAppDir = File(Constant.USER_DATA_ATTACHEMNT_PATH)
+    fun savePhoto(bitmap: Bitmap) {
+        viewModelScope.launch(Dispatchers.IO) {
+            // 创建一个名为 "MyApp" 的文件夹
+            val myAppDir = File(Constant.USER_DATA_ATTACHEMNT_PATH)
             if (!myAppDir.exists()) myAppDir.mkdirs() // 确保文件夹已创建
 
-        // 创建一个名为 fileName 的文件
-        val file = File(myAppDir, "${UUID.randomUUID()}.png")
-        file.createNewFile() // 创建文件
+            // 创建一个名为 fileName 的文件
+            val file = File(myAppDir, "${UUID.randomUUID()}.png")
+            file.createNewFile() // 创建文件
 
-        // 将 Bitmap 压缩为 JPEG 格式,并将其写入文件中
-        val out = FileOutputStream(file)
-        bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)
-        out.flush()
-        out.close()
-        var picList = mutableListOf<String>()
-        if (liveDataPictureList.value == null) {
-            picList.add(file.absolutePath)
-        } else {
-            picList.addAll(liveDataPictureList.value!!)
-            picList.add(file.absolutePath)
+            // 将 Bitmap 压缩为 JPEG 格式,并将其写入文件中
+            val out = FileOutputStream(file)
+            bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)
+            out.flush()
+            out.close()
+            var picList = mutableListOf<String>()
+            if (liveDataPictureList.value == null) {
+                picList.add(file.absolutePath)
+            } else {
+                picList.addAll(liveDataPictureList.value!!)
+                picList.add(file.absolutePath)
+            }
+            liveDataPictureList.postValue(picList)
         }
-        liveDataPictureList.postValue(picList)
-    }
 
     }
 
@@ -661,5 +662,5 @@ fun savePhoto(bitmap: Bitmap) {
                 }
             }
         }
-}
+    }
 }
\ No newline at end of file
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListAdapter.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListAdapter.kt
index 9bf60d86..f6a13032 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListAdapter.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListAdapter.kt
@@ -5,6 +5,7 @@ import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
+import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.Observer
 import com.navinfo.omqs.R
 import com.navinfo.omqs.databinding.AdapterOfflineMapCityBinding
@@ -14,6 +15,7 @@ import com.navinfo.omqs.tools.FileManager
 import com.navinfo.omqs.tools.FileManager.Companion.FileDownloadStatus
 import com.navinfo.omqs.ui.other.BaseRecyclerViewAdapter
 import com.navinfo.omqs.ui.other.BaseViewHolder
+import com.navinfo.omqs.ui.other.OnLifecycleStateListener
 import javax.inject.Inject
 
 /**
@@ -68,7 +70,26 @@ class OfflineMapCityListAdapter(
 
         changeViews(binding, cityBean)
         downloadManager.addTask(cityBean)
-        downloadManager.observer(cityBean.id, holder, DownloadObserver(cityBean.id, holder))
+
+        holder.addObserver(object : OnLifecycleStateListener {
+            override fun onState(tag: String, state: Lifecycle.State) {
+                when (state) {
+                    Lifecycle.State.STARTED -> {
+                        downloadManager.observer(
+                            cityBean.id,
+                            holder,
+                            DownloadObserver(cityBean.id, holder)
+                        )
+                    }
+                    Lifecycle.State.DESTROYED -> {
+                        downloadManager.removeObserver(cityBean.id)
+                    }
+                    else -> {}
+                }
+            }
+        })
+
+
         binding.offlineMapDownloadBtn.tag = position
         binding.offlineMapDownloadBtn.setOnClickListener(downloadBtnClick)
         binding.offlineMapCityName.text = cityBean.name
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListFragment.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListFragment.kt
index 5d64468d..2e0a88d4 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListFragment.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapCityListFragment.kt
@@ -51,6 +51,23 @@ class OfflineMapCityListFragment : Fragment() {
         viewModel.cityListLiveData.observe(viewLifecycleOwner) {
             adapter.refreshData(it)
         }
+    }
+
+
+    override fun onStart() {
+        super.onStart()
+    }
+
+    override fun onStop() {
+        super.onStop()
+    }
+
+    override fun onPause() {
+        super.onPause()
+    }
+
+    override fun onResume() {
+        super.onResume()
         viewModel.getCityList()
     }
 
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListFragment.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListFragment.kt
index 41c3b337..8d29ebea 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListFragment.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListFragment.kt
@@ -54,6 +54,18 @@ class OfflineMapStateListFragment : Fragment() {
         }
     }
 
+    override fun onStart() {
+        super.onStart()
+    }
+
+    override fun onStop() {
+        super.onStop()
+    }
+
+    override fun onPause() {
+        super.onPause()
+    }
+
     override fun onDestroyView() {
         super.onDestroyView()
         _binding = null
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListViewModel.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListViewModel.kt
index 1490e33c..8bca9b4e 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListViewModel.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/offlinemap/OfflineMapStateListViewModel.kt
@@ -29,12 +29,7 @@ class OfflineMapStateListViewModel @Inject constructor(
     fun getCityList() {
         viewModelScope.launch(Dispatchers.IO) {
             val list = roomDatabase.getOfflineMapDao().getOfflineMapListWithOutNone()
-            if (cityListLiveData.value != null) {
-                if (cityListLiveData.value!!.size != list.size)
-                    cityListLiveData.postValue(list)
-            }else{
-                cityListLiveData.postValue(list)
-            }
+            cityListLiveData.postValue(list)
         }
     }
 }
\ No newline at end of file
diff --git a/app/src/main/java/com/navinfo/omqs/ui/fragment/signMoreInfo/SignMoreInfoFragment.kt b/app/src/main/java/com/navinfo/omqs/ui/fragment/signMoreInfo/SignMoreInfoFragment.kt
index 471f39fb..3a77f5c8 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/fragment/signMoreInfo/SignMoreInfoFragment.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/fragment/signMoreInfo/SignMoreInfoFragment.kt
@@ -5,8 +5,11 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import androidx.fragment.app.activityViewModels
+import androidx.navigation.findNavController
 import androidx.recyclerview.widget.LinearLayoutManager
+import com.navinfo.collect.library.data.entity.RenderEntity
 import com.navinfo.omqs.R
+import com.navinfo.omqs.bean.SignBean
 import com.navinfo.omqs.databinding.FragmentSignInfoBinding
 import com.navinfo.omqs.ui.activity.map.MainViewModel
 import com.navinfo.omqs.ui.fragment.BaseFragment
@@ -53,7 +56,7 @@ class SignMoreInfoFragment : BaseFragment() {
                     adapter.refreshData(SignUtil.getRoadNameList(it))
                 }
                 //常规点限速
-                4002->{
+                4002 -> {
                     val adapter = ElectronicEyeInfoAdapter()
                     binding.signInfoRecyclerview.adapter = adapter
                     adapter.refreshData(SignUtil.getSpeedLimitMoreInfoText(it))
@@ -91,6 +94,33 @@ class SignMoreInfoFragment : BaseFragment() {
                     .commit()
             }
         }
+        binding.signInfoTitle.setOnClickListener {
+            activity?.run {
+                val rightController = findNavController(R.id.main_activity_right_fragment)
+                rightController.currentDestination?.let {
+                    if (it.id == R.id.RightEmptyFragment) {
+                        val bundle = Bundle()
+                        val element = viewModel.liveDataSignMoreInfo.value
+                        if (element != null) {
+                            val signBean = SignBean(
+                                iconId = SignUtil.getSignIcon(element),
+                                iconText = SignUtil.getSignIconText(element),
+                                linkId = element.properties[RenderEntity.Companion.LinkTable.linkPid]
+                                    ?: "",
+                                name = SignUtil.getSignNameText(element),
+                                bottomRightText = SignUtil.getSignBottomRightText(element),
+                                renderEntity = element,
+                                isMoreInfo = SignUtil.isMoreInfo(element),
+                                index = SignUtil.getRoadInfoIndex(element)
+                            )
+                            bundle.putParcelable("SignBean", signBean)
+                            bundle.putBoolean("AutoSave", false)
+                            rightController.navigate(R.id.EvaluationResultFragment, bundle)
+                        }
+                    }
+                }
+            }
+        }
     }
 
     override fun onDestroyView() {
diff --git a/app/src/main/java/com/navinfo/omqs/ui/other/BaseViewHolder.kt b/app/src/main/java/com/navinfo/omqs/ui/other/BaseViewHolder.kt
index 7127a482..35e78452 100644
--- a/app/src/main/java/com/navinfo/omqs/ui/other/BaseViewHolder.kt
+++ b/app/src/main/java/com/navinfo/omqs/ui/other/BaseViewHolder.kt
@@ -1,5 +1,6 @@
 package com.navinfo.omqs.ui.other
 
+import android.util.Log
 import android.view.View
 import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.LifecycleOwner
diff --git a/collect-library/src/main/java/com/navinfo/collect/library/map/NIMapView.java b/collect-library/src/main/java/com/navinfo/collect/library/map/NIMapView.java
index b98aa4a3..e8531989 100644
--- a/collect-library/src/main/java/com/navinfo/collect/library/map/NIMapView.java
+++ b/collect-library/src/main/java/com/navinfo/collect/library/map/NIMapView.java
@@ -604,11 +604,10 @@ public final class NIMapView extends RelativeLayout {
         BASE(0)/*底图图层组*/,
         VECTOR_TILE(1)/*矢量瓦片组*/,
         VECTOR(2)/*高亮组*/,
-        OPERATE_LINE(3)/*操作图层组*/,
-        OPERATE_MARKER(4)/*操作图层组*/,
-        NAVIGATION(5)/*定位导航组*/,
-        LABEL(6)/*图标,文字图层*/;
-
+        NAVIGATION(3)/*定位导航组*/,
+        LABEL(4)/*图标,文字图层*/,
+        OPERATE_LINE(5)/*操作图层组*/,
+        OPERATE_MARKER(6)/*操作图层组*/;
         int groupIndex;
 
         LAYER_GROUPS(int groupIndex) {