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/InspectionFragment.kt |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionFragment.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionFragment.kt
index 918bed6..9ba2f16 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionFragment.kt
@@ -15,13 +15,12 @@
 import cn.flightfeather.thirdapp.R
 import cn.flightfeather.thirdapp.activity.UploadMediaFilesActivity
 import cn.flightfeather.thirdapp.adapter.TaskListAdapter
-import cn.flightfeather.thirdapp.bean.Subtask
+import cn.flightfeather.thirdapp.bean.entity.Subtask
 import cn.flightfeather.thirdapp.bean.vo.DayTaskProgressVo
 import cn.flightfeather.thirdapp.module.base.BaseFragment
 import cn.flightfeather.thirdapp.util.DateFormatter
 import cn.flightfeather.thirdapp.util.DialogUtil
-import cn.flightfeather.thirdapp.util.slideswaphelper.PlusItemSlideCallback
-import cn.flightfeather.thirdapp.util.slideswaphelper.WItemTouchHelperPlus
+import cn.flightfeather.thirdapp.util.Domain
 import com.haibin.calendarview.Calendar
 import com.haibin.calendarview.CalendarView
 import kotlinx.android.synthetic.main.fragment_inspection2.*
@@ -47,7 +46,7 @@
     //褰撳墠閫変腑鐨勬棩鏈�
     private var curDate = Date()
 
-    lateinit var subTaskListAdapter: TaskListAdapter
+    private lateinit var subTaskListAdapter: TaskListAdapter
 
     private var loadingDialog: Dialog? = null
 
@@ -84,10 +83,10 @@
         viewModel.dayTaskList.observe(this, Observer {
             // 2019/7/29 鍦ㄦ棩鍘嗕笂娣诲姞鏍囪鐐�
             it?.let {
-                closeLoading()
                 curDayTaskList = it
                 addScheme(it)
                 refreshText(it)
+//                closeLoading()
             }
         })
 
@@ -126,7 +125,6 @@
     }
 
     private fun refreshSubTaskList(newSubTaskList: ArrayList<Subtask> = arrayListOf(), taskDate:Date) {
-        closeLoading()
         curSubTaskList.clear()
         with(curDayTaskList) breaking@{
             forEach {
@@ -153,8 +151,16 @@
                 extension3 = "0"
             })
         }
-        curSubTaskList.addAll(newSubTaskList)
+        curSubTaskList.addAll(newSubTaskList.sortedBy {
+            when (it.status) {
+                Domain.TASK_STATUS_WAITING -> 1
+                Domain.TASK_STATUS_RUNNING -> 2
+                Domain.TASK_STATUS_FINISHED -> 3
+                else -> -1
+            }
+        })
         subTaskListAdapter.notifyDataSetChanged()
+        closeLoading()
     }
     /**
      * 鍒濆鍖栨棩鍘嗘帶浠�
@@ -316,9 +322,9 @@
             }
         }
 
-        Handler().postDelayed({
-            closeLoading()
-        }, 5000)
+//        Handler().postDelayed({
+//            closeLoading()
+//        }, 10000)
     }
 
     private fun closeLoading() {

--
Gitblit v1.9.3