|
|
@@ -3,6 +3,7 @@ package com.grkj.iscs.util
|
|
|
import com.grkj.iscs.MyApplication
|
|
|
import com.grkj.iscs.model.Token
|
|
|
import com.grkj.iscs.model.UrlConsts
|
|
|
+import com.grkj.iscs.model.vo.LockInfoRespVO
|
|
|
import com.grkj.iscs.model.vo.card.CardInfoRespVO
|
|
|
import com.grkj.iscs.model.vo.dept.DeptListRespVO
|
|
|
import com.grkj.iscs.model.vo.key.KeyInfoRespVO
|
|
|
@@ -254,7 +255,7 @@ object NetApi {
|
|
|
*/
|
|
|
fun getKeyInfo(keyNfc: String, callBack: (KeyInfoRespVO?) -> Unit) {
|
|
|
NetHttpManager.getInstance().doRequestNet(
|
|
|
- UrlConsts.KEY_INFO,
|
|
|
+ UrlConsts.KEY_INFO_BY_NFC,
|
|
|
false,
|
|
|
mapOf("nfc" to keyNfc),
|
|
|
{ res, _, _ ->
|
|
|
@@ -264,4 +265,22 @@ object NetApi {
|
|
|
}, isGet = true, isAuth = true
|
|
|
)
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过nfc编号获取lock信息
|
|
|
+ */
|
|
|
+ fun getLockInfo(lockNfc: String, callBack: (LockInfoRespVO?) -> Unit) {
|
|
|
+ NetHttpManager.getInstance().doRequestNet(
|
|
|
+ UrlConsts.LOCK_INFO_BY_NFC,
|
|
|
+ false,
|
|
|
+ mapOf("nfc" to lockNfc),
|
|
|
+ { res, _, _ ->
|
|
|
+ res?.let {
|
|
|
+ callBack.invoke(getRefBean(it))
|
|
|
+ } ?: let {
|
|
|
+ callBack.invoke(null)
|
|
|
+ }
|
|
|
+ }, isGet = true, isAuth = true
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|