add func of configbiz and wait to finish

This commit is contained in:
zhongchao
2022-09-09 09:41:28 +08:00
parent ab64327b6c
commit 23a648483a
23 changed files with 512 additions and 49 deletions

View File

@@ -0,0 +1,45 @@
package com.mogo.module.common.enums
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.enums.isLeft
import com.mogo.eagle.core.data.enums.isRight
class EventTypeHelper {
companion object {
fun getLCW(
direction: WarningDirectionEnum,
data: ((alertContent: String, ttsContent: String) -> Unit)
) {
when {
direction.isLeft() -> {
data.invoke(
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + ""),
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "")
)
}
direction.isRight() -> {
data.invoke(
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + ""),
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType + "")
)
}
else -> {
data.invoke(
EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType),
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_LCW.poiType)
)
}
}
}
fun getCLW(
direction: WarningDirectionEnum,
data: ((alertContent: String, ttsContent: String) -> Unit)
){
data.invoke(EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_CLW.poiType + direction.desc)
,EventTypeEnum.getWarningContent(EventTypeEnum.TYPE_USECASE_ID_CLW.poiType + direction.desc))
}
}
}