feiyu02
2025-07-23 517296b16b1faf07bc389809387b1937f9415746
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
@@ -10,6 +10,7 @@
import cn.flightfeather.supervision.domain.ds1.repository.MediaFileRep
import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.lightshare.service.DomainitemService
import cn.flightfeather.supervision.lightshare.service.MediafileService
import cn.flightfeather.supervision.lightshare.vo.MediaFileVo
import com.fasterxml.jackson.core.type.TypeReference
@@ -30,6 +31,7 @@
    private val inspectionRep: InspectionRep,
    private val subTaskRep: SubTaskRep,
    private val sceneRep: SceneRep,
    private val domainItemService: DomainitemService,
    @Value("\${filePath}") var filePath: String,
    @Value("\${imgPath}") var imgPath: String,
) : MediafileService {
@@ -63,8 +65,8 @@
            throw BizException("巡查记录id和巡查任务id至少填写其中一个")
        }
        sceneId ?: throw BizException("记录对应的场景不存在")
        val sceneInfo = sceneRep.findScene(sceneId = sceneId)
        val mediaFileTypeList = Constant.MediaFileType.getList(sceneInfo?.typeid).map { it.value }
        val sceneInfo = sceneRep.findScene(sceneId = sceneId) ?: throw BizException("场景不存在,获取场景图片失败")
        val mediaFileTypeList = domainItemService.getMediaFileType(sceneInfo.typeid?.toInt()).entries.map { it.key?.toInt() }
        return mediaFileRep.findList(inspectionGuid, mediaFileTypeList)
    }