Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
open class HadLinkDvoBean @JvmOverloads constructor(
|
||||
/**
|
||||
* 图幅号
|
||||
*/
|
||||
var mesh: String = "",
|
||||
/**
|
||||
* linkPid
|
||||
*/
|
||||
var linkPid: String = "",
|
||||
/**
|
||||
* (几何)加偏后
|
||||
*/
|
||||
var geometry: String = ""
|
||||
|
||||
) : RealmObject()
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.navinfo.omqs.bean
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.navinfo.collect.library.data.entity.HadLinkDvoBean
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.tools.FileManager
|
||||
import com.navinfo.omqs.tools.FileManager.Companion.FileDownloadStatus
|
||||
@@ -8,7 +9,6 @@ import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.Ignore
|
||||
import io.realm.annotations.PrimaryKey
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
open class TaskBean @JvmOverloads constructor(
|
||||
/**
|
||||
@@ -67,6 +67,6 @@ open class TaskBean @JvmOverloads constructor(
|
||||
var message: String = ""
|
||||
) : RealmObject() {
|
||||
fun getDownLoadUrl(): String {
|
||||
return "${Constant.SERVER_ADDRESS}devcp/download?fileStr=$id"
|
||||
return "${Constant.SERVER_ADDRESS}devcp/download?fileStr=26"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.navinfo.omqs.db
|
||||
|
||||
import com.navinfo.omqs.bean.HadLinkDvoBean
|
||||
import com.navinfo.collect.library.data.entity.HadLinkDvoBean
|
||||
import com.navinfo.omqs.bean.TaskBean
|
||||
import io.realm.annotations.RealmModule
|
||||
|
||||
@RealmModule(classes = [TaskBean::class, HadLinkDvoBean::class])
|
||||
@RealmModule(classes = [TaskBean::class])
|
||||
class MyRealmModule {
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
package com.navinfo.omqs.ui.fragment.tasklist
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.core.graphics.toColor
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.omqs.bean.TaskBean
|
||||
import com.navinfo.omqs.http.NetResult
|
||||
import com.navinfo.omqs.http.NetworkService
|
||||
@@ -19,7 +24,8 @@ import javax.inject.Inject
|
||||
|
||||
@HiltViewModel
|
||||
class TaskListViewModel @Inject constructor(
|
||||
private val networkService: NetworkService
|
||||
private val networkService: NetworkService,
|
||||
private val niMapController: NIMapController
|
||||
) : ViewModel() {
|
||||
|
||||
val liveDataTaskList = MutableLiveData<List<TaskBean>>()
|
||||
@@ -70,6 +76,11 @@ class TaskListViewModel @Inject constructor(
|
||||
for (item in taskList) {
|
||||
FileManager.checkOMDBFileInfo(item)
|
||||
}
|
||||
// niMapController.lineHandler.omdbTaskLinkLayer.setLineColor(Color.rgb(0, 255, 0).toColor())
|
||||
// taskList.forEach {
|
||||
// niMapController.lineHandler.omdbTaskLinkLayer.addLineList(it.hadLinkDvoList)
|
||||
// }
|
||||
// niMapController.lineHandler.omdbTaskLinkLayer.update()
|
||||
liveDataTaskList.postValue(taskList)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user