| | |
| | | orderBy("index") |
| | | }) |
| | | } |
| | | |
| | | override fun getMediaFileType(sceneType: Int?): MutableMap<String?, String?> { |
| | | val res = mutableMapOf<String?, String?>() |
| | | val type = Constant.SceneType.getByValue(sceneType.toString()) |
| | | when (type) { |
| | | // 工地 |
| | | Constant.SceneType.TYPE1 -> { |
| | | val domainItems = domainitemMapper.selectByExample(Example(Domainitem::class.java).apply { |
| | | createCriteria().andEqualTo("dcguid", Constant.MEDIA_FILE_TYPE_INDUSTRY) |
| | | orderBy("index") |
| | | }) |
| | | domainItems.forEach { res[it.value] = it.text } |
| | | // 工地中的任意拍包含“常规记录”类型 |
| | | res[Constant.MediaFileType.RoutineRecord.value.toString()] = Constant.MediaFileType.RoutineRecord.des |
| | | return res |
| | | } |
| | | // 餐饮 |
| | | Constant.SceneType.TYPE5 -> { |
| | | val domainItems = domainitemMapper.selectByExample(Example(Domainitem::class.java).apply { |
| | | createCriteria().andEqualTo("dcguid", Constant.MEDIA_FILE_TYPE_RESTAURANT) |
| | | orderBy("index") |
| | | }) |
| | | domainItems.forEach { res[it.value] = it.text } |
| | | // 餐饮中的任意拍包含“常规记录”类型 |
| | | res[Constant.MediaFileType.RoutineRecord.value.toString()] = Constant.MediaFileType.RoutineRecord.des |
| | | return res |
| | | } |
| | | // 其余类型场景,使用默认的分类 |
| | | else -> { |
| | | listOf( |
| | | Constant.MediaFileType.Nameplate, |
| | | Constant.MediaFileType.MonitorDevice, |
| | | Constant.MediaFileType.RoutineRecord, |
| | | ).forEach { |
| | | res[it.value.toString()] = it.des |
| | | } |
| | | } |
| | | } |
| | | return res |
| | | } |
| | | } |