Kaynağa Gözat

优化作业票工作进度页按钮显示逻辑;修复还钥匙暂存数据的逻辑,防止保存失败;修改首页登录方式提示语

Frankensteinly 7 ay önce
ebeveyn
işleme
76e2a19812

+ 6 - 7
app/src/main/java/com/grkj/iscs/util/SPUtils.kt

@@ -8,7 +8,6 @@ import com.grkj.iscs.model.vo.card.CardInfoRespVO
 import com.grkj.iscs.model.vo.system.SystemAttributePageRespVO
 import com.grkj.iscs.model.vo.ticket.LockPointUpdateReqVO
 import com.grkj.iscs.util.log.LogUtil
-import java.util.Collections
 
 object SPUtils {
 
@@ -130,7 +129,7 @@ object SPUtils {
         val sp = context.getSharedPreferences(SP_DATA, Context.MODE_PRIVATE)
         val listJson = sp.getString(KEY_DATA_UPDATE_LOCK_POINT, null)
         if (listJson.isNullOrEmpty()) {
-            return Collections.emptyList()
+            return mutableListOf()
         }
         try {
             val tempList: MutableList<LockPointUpdateReqVO> = Gson().fromJson(
@@ -140,7 +139,7 @@ object SPUtils {
             return tempList
         } catch (e: Exception) {
             LogUtil.e("${e.message}")
-            return Collections.emptyList()
+            return mutableListOf()
         }
     }
 
@@ -164,7 +163,7 @@ object SPUtils {
         val sp = context.getSharedPreferences(SP_DATA, Context.MODE_PRIVATE)
         val listJson = sp.getString(KEY_DATA_UPDATE_KEY_RETURN, null)
         if (listJson.isNullOrEmpty()) {
-            return Collections.emptyList()
+            return mutableListOf()
         }
         try {
             val tempList: MutableList<UpdateKeyReturnBO> =
@@ -172,7 +171,7 @@ object SPUtils {
             return tempList
         } catch (e: Exception) {
             LogUtil.e("${e.message}")
-            return Collections.emptyList()
+            return mutableListOf()
         }
     }
 
@@ -194,7 +193,7 @@ object SPUtils {
         val sp = context.getSharedPreferences(SP_ATTRIBUTE, Context.MODE_PRIVATE)
         val listJson = sp.getString(KEY_SYSTEM_ATTRIBUTE, null)
         if (listJson.isNullOrEmpty()) {
-            return Collections.emptyList()
+            return mutableListOf()
         }
         try {
             val tempList: MutableList<SystemAttributePageRespVO.Record> = Gson().fromJson(
@@ -204,7 +203,7 @@ object SPUtils {
             return tempList
         } catch (e: Exception) {
             LogUtil.e("${e.message}")
-            return Collections.emptyList()
+            return mutableListOf()
         }
     }
 

+ 5 - 1
app/src/main/java/com/grkj/iscs/view/fragment/JobProgressFragment.kt

@@ -193,7 +193,9 @@ class JobProgressFragment(val goBack: () -> Unit) :
         when (mStep) {
             4 -> {
                 mBinding?.cbAction?.setText(getString(R.string.go_locking))
-                if (!mPointList.all { it.pointStatus == "1" }) {
+                if (mPointList.all { it.pointStatus == "1" }) {
+                    mBinding?.cbAction?.visibility = View.GONE
+                } else {
                     mBinding?.cbAction?.visibility = View.VISIBLE
                 }
             }
@@ -202,6 +204,8 @@ class JobProgressFragment(val goBack: () -> Unit) :
                     mBinding?.cbAction?.visibility = View.VISIBLE
                     mBinding?.cbAction?.setIcon(R.mipmap.ticket_unlocked)
                     mBinding?.cbAction?.setText(getString(R.string.go_unlocking))
+                } else {
+                    mBinding?.cbAction?.visibility = View.GONE
                 }
             }
             else -> {

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -277,5 +277,5 @@
     <string name="start_to_send_ticket">开始下发工作票······</string>
     <string name="sending_ticket">工作票下发中······</string>
     <string name="send_ticket_fail">作业票下发失败</string>
-    <string name="login_method_tip">● 您可以通过指纹和工卡进行快速登录</string>
+    <string name="login_method_tip">● 您可以通过指纹或刷卡直接进行登录</string>
 </resources>