From 979d9cff22806f213b420452ab4a68fcbaf021b6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 31 五月 2021 17:43:49 +0800
Subject: [PATCH] 1. 修复多项可能引起空指针崩溃的bug; 2. 新建子任务时默认执行人员从全体人员改为当前用户; 3. 新建子任务时默认执行时间强制固定为总任务对应的时段内,确保子任务执行时间不会超出总任务范围。
---
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
index 59f991a..82a55a5 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
@@ -51,6 +51,7 @@
//褰撳墠閫夋嫨鐨勬媿鐓х被鍨�
private var currentType = MediaFileType.RoutineRecord
+ private var currentTypeName = currentType.des
lateinit var viewModel: MenuCameraViewModel
@@ -94,7 +95,9 @@
val oldFile = File(it)
val cal = Calendar.getInstance().apply { time = subTask?.executionstarttime }
scene?.run {
- val path = "FlightFeather/Photo/" + districtname + "/"+ cal.get(Calendar.YEAR) + "骞�" + (cal.get(Calendar.MONTH) + 1) + "鏈�/"+ (cal.get(Calendar.MONTH) + 1) + "鏈�" + cal.get(Calendar.DAY_OF_MONTH) + "鏃�/"+ name + "/浠绘剰鎷嶇収/"
+ val path = "FlightFeather/Photo/" + districtname + "/" + cal.get(Calendar.YEAR) + "骞�" + (cal.get(Calendar.MONTH) + 1) + "鏈�/" +
+ (cal.get(Calendar.MONTH) + 1) + "鏈�" + cal.get(Calendar.DAY_OF_MONTH) + "鏃�/" + name + "/浠绘剰鎷嶇収/" + currentTypeName + "/"
+
val fileName = UUIDGenerator.generateUUID(4) + ".jpg"
val newFile = File(Environment.getExternalStorageDirectory(), path + fileName)
if (!newFile.parentFile.exists()) {
@@ -154,6 +157,7 @@
addOnItemTouchListener(RecyclerItemClickListener(this@MenuCameraActivity, this, object : RecyclerItemClickListener.OnItemClickListener {
override fun onItemClick(view: View?, position: Int) {
currentType = type
+ currentTypeName = title.text.toString()
//鎷嶇収
if (dataList[position].guid == null) {
PhotoUtil.pickPhoto2(this@MenuCameraActivity, TAKE_PHOTO, 9)
--
Gitblit v1.9.3