增加无餐盘提醒
This commit is contained in:
Generated
+2
-2
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-12-30T02:33:30.984909200Z">
|
<DropdownSelection timestamp="2026-01-22T07:28:00.026342Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="Default" identifier="serial=192.168.1.105:5555;connection=c501a2a1" />
|
<DeviceId pluginId="Default" identifier="serial=192.168.1.128:5555;connection=c168ec92" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
|
|
||||||
private const val COLLECT_SUCCESS = "collect_success"
|
private const val COLLECT_SUCCESS = "collect_success"
|
||||||
private const val RECOGNIZE_SUCCESS = "recognize_success"
|
private const val RECOGNIZE_SUCCESS = "recognize_success"
|
||||||
|
private const val NO_PLATE_REMIND = "no_plate_remind";
|
||||||
|
|
||||||
fun goInitActivity() {
|
fun goInitActivity() {
|
||||||
instance?.goInitActivity()
|
instance?.goInitActivity()
|
||||||
@@ -142,6 +143,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
val soundMap = hashMapOf<String, Int>()
|
val soundMap = hashMapOf<String, Int>()
|
||||||
soundMap[COLLECT_SUCCESS] = R.raw.collect_success
|
soundMap[COLLECT_SUCCESS] = R.raw.collect_success
|
||||||
soundMap[RECOGNIZE_SUCCESS] = R.raw.recognize_success
|
soundMap[RECOGNIZE_SUCCESS] = R.raw.recognize_success
|
||||||
|
soundMap[NO_PLATE_REMIND] = R.raw.no_plate_remind
|
||||||
SoundPoolUtil.getInstance().loadR(this, soundMap);
|
SoundPoolUtil.getInstance().loadR(this, soundMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,12 +291,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
if (similar > faceSuccessThreshold) {
|
if (similar > faceSuccessThreshold) {
|
||||||
//大 于识别阈值,作为识别成功判断
|
//大 于识别阈值,作为识别成功判断
|
||||||
currentUserId = result?.faceEntity?.userName
|
currentUserId = result?.faceEntity?.userName
|
||||||
if (tempUserId != currentUserId) {
|
Debouncer(5000).debounce { openPlate(currentUserId) }
|
||||||
SoundPoolUtil.getInstance().play(RECOGNIZE_SUCCESS, 0)
|
|
||||||
} else {
|
|
||||||
SoundPoolUtil.getInstance().play(COLLECT_SUCCESS, 0)
|
|
||||||
}
|
|
||||||
openPlate(currentUserId)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
loadLogInfo("collectFace,recognizeUserId 人脸识别相似度为:${similar},失败次数为:${retryFailCount}")
|
loadLogInfo("collectFace,recognizeUserId 人脸识别相似度为:${similar},失败次数为:${retryFailCount}")
|
||||||
@@ -328,7 +325,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
SoundPoolUtil.getInstance().play("success", 0)
|
SoundPoolUtil.getInstance().play("success", 0)
|
||||||
}
|
}
|
||||||
// plateEnable = true
|
// plateEnable = true
|
||||||
openPlate(currentUserId)
|
Debouncer(5000).debounce { openPlate(currentUserId) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -357,16 +354,22 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
if (item == null) {
|
if (item == null) {
|
||||||
//暂无餐盘
|
//暂无餐盘
|
||||||
loadLogInfo("collectFace,openPlate: 暂无餐盘,请联系管理人员,isCollectFace=$isCollectFace")
|
loadLogInfo("collectFace,openPlate: 暂无餐盘,请联系管理人员,isCollectFace=$isCollectFace")
|
||||||
ToastUtils.showToast("暂无餐盘,请联系管理人员!")
|
//ToastUtils.showToast("暂无餐盘,请联系管理人员")
|
||||||
|
SoundPoolUtil.getInstance().play(NO_PLATE_REMIND, 0)
|
||||||
goInitActivity()
|
goInitActivity()
|
||||||
return@getPlateData
|
return@getPlateData
|
||||||
}
|
}
|
||||||
|
if (tempUserId != currentUserId) {
|
||||||
|
SoundPoolUtil.getInstance().play(RECOGNIZE_SUCCESS, 0)
|
||||||
|
} else {
|
||||||
|
SoundPoolUtil.getInstance().play(COLLECT_SUCCESS, 0)
|
||||||
|
}
|
||||||
loadLogInfo("collectFace,openPlate: item3:${item}")
|
loadLogInfo("collectFace,openPlate: item3:${item}")
|
||||||
item.faceId = userId
|
item.faceId = userId
|
||||||
item.updateTime = DateTimeUtils.getDateTimeString()
|
item.updateTime = DateTimeUtils.getDateTimeString()
|
||||||
item.plateNumber = null
|
item.plateNumber = null
|
||||||
plateEnable = false
|
plateEnable = false
|
||||||
debouncer.debounce {
|
Debouncer(5000).debounce {
|
||||||
//打开柜子
|
//打开柜子
|
||||||
PlateUtils.open(this, item.equipmentBoxCode, false)
|
PlateUtils.open(this, item.equipmentBoxCode, false)
|
||||||
}
|
}
|
||||||
@@ -376,7 +379,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val debouncer by lazy { Debouncer(3000) }
|
// private val debouncer by lazy { Debouncer(3000) }
|
||||||
|
|
||||||
private fun initArcView() {
|
private fun initArcView() {
|
||||||
//在布局结束后才做初始化操作
|
//在布局结束后才做初始化操作
|
||||||
@@ -842,6 +845,7 @@ class LoginByFaceActivity : BaseActivity<ActivityLoginFaceBinding>(),
|
|||||||
// }, 5L, 5L, TimeUnit.MILLISECONDS
|
// }, 5L, 5L, TimeUnit.MILLISECONDS
|
||||||
// )
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
private var isCollectFace = false
|
private var isCollectFace = false
|
||||||
// private fun checkFaceBlock() {
|
// private fun checkFaceBlock() {
|
||||||
// loadLogInfo("collectFace,currentUserId=${currentUserId}")
|
// loadLogInfo("collectFace,currentUserId=${currentUserId}")
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user