增加室内整理工具更新信息逻辑

This commit is contained in:
qiji4215
2023-07-17 14:49:21 +08:00
parent 1253cc10be
commit 6210f41b69
15 changed files with 155 additions and 99 deletions

View File

@@ -101,7 +101,16 @@ class NetworkServiceImpl @Inject constructor(
//在IO线程中运行
withContext(Dispatchers.IO) {
return@withContext try {
val result = netApi.retrofitUpdateServerInfo(url,indoorConnectionInfoBean)
val map: MutableMap<String, String> = HashMap()
map["username"] = indoorConnectionInfoBean.username
map["uname"] = indoorConnectionInfoBean.uname
map["userid"] = indoorConnectionInfoBean.userid
map["plate"] = indoorConnectionInfoBean.plate
map["token"] = indoorConnectionInfoBean.token
map["baseurl"] = indoorConnectionInfoBean.baseurl
map["platform"] = indoorConnectionInfoBean.platform
val result = netApi.retrofitUpdateServerInfo(url,map)
if (result.isSuccessful) {
if (result.code() == 200) {
NetResult.Success(result.body())

View File

@@ -78,9 +78,9 @@ interface RetrofitNetworkServiceAPI {
/**
* 登录接口
*/
@Headers("Content-Type: application/json")
@FormUrlEncoded
@POST
suspend fun retrofitUpdateServerInfo(@Url url: String,@Body indoorConnectionInfoBean: IndoorConnectionInfoBean): Response<QRCodeBean>
suspend fun retrofitUpdateServerInfo(@Url url: String,@FieldMap map: Map<String,String>): Response<QRCodeBean>
@Headers("Content-Type: application/json")
@POST("/devcp/uploadSceneProblem")

View File

@@ -176,6 +176,19 @@ class TaskUploadScope(
} else if (it.problemType == "遗漏") {
problemType = 2
}
var roadClassfcation = 0
var roadFunctionGrade = 0
var dataLevel = 0
if(hadLinkDvoBean.linkInfo!=null){
roadClassfcation = hadLinkDvoBean.linkInfo!!.kind
roadFunctionGrade = hadLinkDvoBean.linkInfo!!.functionLevel
dataLevel = hadLinkDvoBean.linkInfo!!.dataLevel
}
var evaluationWay = 2
val evaluationInfo = EvaluationInfo(
evaluationTaskId = taskBean.id.toString(),
@@ -193,11 +206,11 @@ class TaskUploadScope(
evaluatorName = it.checkUserId,
evaluationDate = it.checkTime,
evaluationWay = evaluationWay,
roadClassfcation = 1,
roadFunctionGrade = 3,
roadClassfcation = roadClassfcation,
roadFunctionGrade = roadFunctionGrade,
noEvaluationreason = "",
linkLength = s.toDouble(),
dataLevel = 3,
dataLevel = dataLevel,
linstringLength = 0.0,
)