package cn.flightfeather.supervision.business.autooutput.datasource
|
|
import cn.flightfeather.supervision.common.utils.Constant
|
import org.springframework.stereotype.Component
|
|
/**
|
* 场景类型判断
|
* 环信码自动评估中,参与评估的不同场景类型,可能部分处于现场监管,部分没有;
|
* 现场监管的场景,场景类型使用本系统(飞羽监管)的定义;
|
* 未现场监管的场景,场景类型使用(飞羽环境)系统中的定义;
|
* 场景类型的定义选择,则有数据库配置决定(可由管理用户自行修改配置);
|
*/
|
@Component
|
class AopSceneTypeCheck {
|
|
/**
|
* 场景类型判定
|
* @return 判断结果,(是否使用本系统定义,类型值)
|
*/
|
fun checkSceneType(sceneType: Int?): Pair<Boolean, Int?> {
|
// TODO: 2023/9/7 通过数据库配置表决定当前类型的最终类型定义
|
|
// FIXME: 2023/9/7 暂时写死相关配置
|
return if (sceneType.toString() == Constant.SceneType.TYPE6.value) {
|
Pair(false, Constant.SceneType.typeMap(sceneType?.toByte())!!.toInt())
|
} else {
|
Pair(true, sceneType)
|
}
|
}
|
}
|