feiyu02
2025-03-28 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/ProblemRep.kt
@@ -2,18 +2,31 @@
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.domain.ds1.mapper.ProblemlistMapper
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.SceneProblemSummary
import org.springframework.stereotype.Repository
@Repository
class ProblemRep(private val problemlistMapper: ProblemlistMapper) {
    fun insert(problemlist: Problemlist): Int {
        return problemlistMapper.insert(problemlist)
    }
    fun update(problemlist: Problemlist): Int {
        return problemlistMapper.updateByPrimaryKey(problemlist)
    }
    fun find(problemlist: Problemlist): List<Problemlist?> {
        return problemlistMapper.select(problemlist)
    }
    /**
     * 获取各场景的问题和整改数量统计
     */
    fun selectSceneProSummary(topTaskId: String, sceneTypeId: String?, sort: String?, sortBy: String):
            List<SceneProblemSummary> {
        return problemlistMapper.getSceneProSummary(topTaskId, sceneTypeId, sort, sortBy)
    fun selectSceneProSummary(areaVo: AreaVo): List<SceneProblemSummary> {
        return problemlistMapper.getSceneProSummary(areaVo)
    }
    fun findOne(guid: String?): Problemlist? {