增加路口要素按任务link渲染
This commit is contained in:
parent
96316fe1bb
commit
af4baf80b5
@ -9,17 +9,15 @@ import com.blankj.utilcode.util.FileIOUtils
|
||||
import com.blankj.utilcode.util.ZipUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.navinfo.collect.library.data.entity.ReferenceEntity
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.bean.ImportConfig
|
||||
import com.navinfo.omqs.db.deep.ListList
|
||||
import com.navinfo.omqs.db.deep.LinkList
|
||||
import com.navinfo.omqs.hilt.OMDBDataBaseHiltFactory
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import io.realm.Realm
|
||||
import io.realm.RealmQuery
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.flow
|
||||
@ -194,18 +192,12 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
//遍历判断只显示与任务Link相关的任务数据
|
||||
if(currentConfig.checkLinkId){
|
||||
if(renderEntity.properties.containsKey("linkPid")&&renderEntity.properties["linkPid"]!=null){
|
||||
task.hadLinkDvoList.forEach{
|
||||
if(it.linkPid==renderEntity.properties["linkPid"]){
|
||||
renderEntity.enable = 1
|
||||
Log.e("qj","${renderEntity.name}==包括任务link")
|
||||
return@forEach
|
||||
}
|
||||
}
|
||||
}else if(renderEntity.table == "OMDB_RESTRICTION" && renderEntity.properties.containsKey("linkIn")){
|
||||
if (renderEntity.properties["linkIn"] != null) {
|
||||
|
||||
var currentLinkPid = renderEntity.properties["linkIn"]
|
||||
if(renderEntity.properties.containsKey("linkPid")){
|
||||
|
||||
var currentLinkPid = renderEntity.properties["linkPid"]
|
||||
|
||||
if(!currentLinkPid.isNullOrEmpty()&¤tLinkPid!="null"){
|
||||
|
||||
task.hadLinkDvoList.forEach{
|
||||
if(it.linkPid==renderEntity.properties["linkPid"]){
|
||||
@ -215,29 +207,51 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(renderEntity.table == "OMDB_INTERSECTION" &&renderEntity.properties.containsKey("type")&& renderEntity.properties.containsKey("linkList")){
|
||||
if (renderEntity.properties["type"]!=null&&renderEntity.properties["linkList"] != null) {
|
||||
|
||||
val type = renderEntity.properties["type"]
|
||||
}else if(renderEntity.table == "OMDB_RESTRICTION" && renderEntity.properties.containsKey("linkIn")){
|
||||
|
||||
if(type=="1"){
|
||||
if (renderEntity.properties["linkIn"] != null) {
|
||||
|
||||
if (renderEntity.properties["linkList"] != null) {
|
||||
var currentLinkPid = renderEntity.properties["linkIn"]
|
||||
|
||||
val list: List<ListList> = gson.fromJson(renderEntity.properties["linkList"], object : TypeToken<List<ListList>>() {}.type)
|
||||
if(!currentLinkPid.isNullOrEmpty()&¤tLinkPid!="null"){
|
||||
|
||||
if (list != null) {
|
||||
m@for (link in list){
|
||||
for(hadLink in task.hadLinkDvoList){
|
||||
if (link.featureType == 1 && hadLink.linkPid == link.linkPid) {
|
||||
renderEntity.enable = 1
|
||||
Log.e("qj", "${renderEntity.name}==包括任务link")
|
||||
break@m
|
||||
}
|
||||
task.hadLinkDvoList.forEach{
|
||||
if(it.linkPid==currentLinkPid){
|
||||
renderEntity.enable = 1
|
||||
Log.e("qj","${renderEntity.name}==包括任务link")
|
||||
return@forEach
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(renderEntity.table == "OMDB_INTERSECTION" && renderEntity.properties.containsKey("linkList")){
|
||||
|
||||
if (renderEntity.properties["linkList"] != null) {
|
||||
|
||||
Log.e("qj", "linkList==开始${renderEntity.name}==${renderEntity.properties["linkList"]}}")
|
||||
|
||||
val linkList = renderEntity.properties["linkList"]
|
||||
|
||||
if (!linkList.isNullOrEmpty()&&linkList!="null") {
|
||||
|
||||
Log.e("qj", "linkList==${renderEntity.name}==${renderEntity.properties["linkList"]}}")
|
||||
|
||||
val list: List<LinkList> = gson.fromJson(linkList, object : TypeToken<List<LinkList>>() {}.type)
|
||||
|
||||
if (list != null) {
|
||||
m@for (link in list){
|
||||
for(hadLink in task.hadLinkDvoList){
|
||||
if (hadLink.linkPid == link.linkPid) {
|
||||
renderEntity.enable = 1
|
||||
Log.e("qj", "${renderEntity.name}==包括任务link==${renderEntity.geometry}")
|
||||
break@m
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
Log.e("qj", "linkList==$linkList}")
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.navinfo.omqs.db.deep
|
||||
|
||||
data class ListList(
|
||||
data class LinkList(
|
||||
var featureType: Int = -1,
|
||||
var linkPid: String = ""
|
||||
)
|
@ -1956,15 +1956,15 @@
|
||||
</m>
|
||||
<!-- 路口 -->
|
||||
<m v="OMDB_INTERSECTION">
|
||||
<!-- <m k="type" v="node">-->
|
||||
<!-- <symbol src="assets:symbols/dot_blue_dark.svg"></symbol>-->
|
||||
<!-- </m>-->
|
||||
<!-- <m k="intersectionPid">-->
|
||||
<!-- <symbol src="assets:symbols/dot_magenta.svg"></symbol>-->
|
||||
<!-- </m>-->
|
||||
<m k="geometry">
|
||||
<symbol src="@typesrc"></symbol>
|
||||
<m k="type" v="node">
|
||||
<symbol src="assets:symbols/dot_blue_dark.svg"></symbol>
|
||||
</m>
|
||||
<m k="intersectionPid">
|
||||
<symbol src="assets:symbols/dot_magenta.svg"></symbol>
|
||||
</m>
|
||||
<!-- <m k="geometry">
|
||||
<symbol src="@typesrc"></symbol>
|
||||
</m>-->
|
||||
</m>
|
||||
|
||||
<!--车道中心线-->
|
||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
||||
Subproject commit 58f231037c44ccc1c82d00818c402a2894ca4e09
|
||||
Subproject commit 8717b07ebff4dd61226abb19474be6567a736ad8
|
Loading…
x
Reference in New Issue
Block a user