From a5d862051462a5fcc2717b405896a6d424002e54 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 22 十二月 2020 15:43:06 +0800
Subject: [PATCH] 1. 调整了数控实体的存储位置; 2. 新增数据表“媒体文件类型别名表”; 3. 修改任意拍模块,将图片分类改为根据场景类型动态生成,同时新增修改分类别名功能; 4. 优化子任务选择界面的任务排序方式,按照“待开始”、“执行中”、“未执行”的顺序进行排序;
---
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
index dbf4b7d..32ca2de 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
@@ -3,7 +3,6 @@
import android.app.Activity
import android.arch.lifecycle.Observer
import android.arch.lifecycle.ViewModelProviders
-import android.content.DialogInterface
import android.content.Intent
import android.net.Uri
import android.os.Bundle
@@ -20,9 +19,9 @@
import cn.flightfeather.thirdapp.activity.ProblemDetailActivity
import cn.flightfeather.thirdapp.activity.PromiseActivity
import cn.flightfeather.thirdapp.adapter.IconsPageAdapter
-import cn.flightfeather.thirdapp.bean.Mediafile
-import cn.flightfeather.thirdapp.bean.Scense
-import cn.flightfeather.thirdapp.bean.Subtask
+import cn.flightfeather.thirdapp.bean.entity.Mediafile
+import cn.flightfeather.thirdapp.bean.entity.Scense
+import cn.flightfeather.thirdapp.bean.entity.Subtask
import cn.flightfeather.thirdapp.bean.vo.ProblemlistVo
import cn.flightfeather.thirdapp.model.event.InspectionEvent
import cn.flightfeather.thirdapp.model.event.ProblemEvent
@@ -130,7 +129,7 @@
super.onCreate(savedInstanceState)
- initIconViewPager()
+// initIconViewPager()
initLocation()
ll_show_hide_detail.setOnClickListener(this)
@@ -311,6 +310,7 @@
result = result.and(it)
}
if (result) {
+ initIconViewPager()
showMenu()
refreshMenuStatus(taskStatus)
@@ -604,8 +604,8 @@
timerTaskRunning = true
}
- val lng = round(longitudeCurrent * 1000) / 1000
- val lat = round(latitudeCurrent * 1000) / 1000
+ val lng = round(longitudeCurrent * 1000000) / 1000000
+ val lat = round(latitudeCurrent * 1000000) / 1000000
viewModel.inspection.value?.apply {
if (extension1 == null) {
@@ -624,7 +624,7 @@
val l1 = LatLng(lat, lng)
val l2 = LatLng(last[1], last[0])
val distance = AMapUtils.calculateLineDistance(l1, l2)
- if (distance >= 5) {
+ if (distance >= 1 && distance < 1000 && lat != 0.0 && lng != 0.0) {
extension1 = "${extension1};${lng},${lat}"
//閬撹矾鐩戞祴鐐瑰拰閬撹矾绫诲瀷鐨勫満鏅紝鐩存帴灞曠ず杞ㄨ抗锛涘叾浣欏満鏅彧鏈夌鐞嗗憳鍜屾斂搴滈儴闂ㄥ彲浠ユ煡鐪�
if (
@@ -684,10 +684,16 @@
//寮�濮嬪鑸�
private fun startNavi() {
- val sourceLatLng = LatLng(viewModel.scene.value?.getLatitude()!!, viewModel.scene.value?.getLongitude()!!)
-
- val amapNavi = AmapNavi(this)
- amapNavi.startNavi(sourceLatLng.latitude, sourceLatLng.longitude)
+ if (viewModel.scene.value != null) {
+ val sourceLatLng = LatLng(
+ viewModel.scene.value!!.latitude,
+ viewModel.scene.value!!.longitude
+ )
+ val amapNavi = AmapNavi(this)
+ amapNavi.startNavi(sourceLatLng.latitude, sourceLatLng.longitude)
+ } else {
+ toast("瀵艰埅鐩墠涓嶅彲鐢紝璇风◢鍚庡啀璇�")
+ }
}
override fun onClick(v: View?) {
--
Gitblit v1.9.3