From 0392c333ed3d987cb2ab3dac4e1a972cff405f21 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 25 四月 2024 17:42:08 +0800 Subject: [PATCH] 1. 新增后台任务关联模块 2. 新增自动评分后台任务; 3. 修复部分bug --- src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt index 14eccea..58db4df 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt @@ -1,17 +1,16 @@ package cn.flightfeather.supervision.domain.ds1.repository +import cn.flightfeather.supervision.domain.ds1.entity.Monitorobjectversion import cn.flightfeather.supervision.domain.ds1.entity.Task +import cn.flightfeather.supervision.domain.ds1.mapper.MonitorobjectversionMapper import cn.flightfeather.supervision.domain.ds1.mapper.TaskMapper import cn.flightfeather.supervision.lightshare.vo.AreaVo import org.springframework.stereotype.Repository -import java.time.LocalDate -import java.time.LocalDateTime import java.time.ZoneId -import java.time.format.DateTimeFormatter import java.util.* @Repository -class TaskRep(private val taskMapper: TaskMapper) { +class TaskRep(private val taskMapper: TaskMapper, private val monitorobjectversionMapper: MonitorobjectversionMapper) { private fun exampleTask(areaVo: AreaVo): Task?{ areaVo.starttime ?: return null @@ -37,4 +36,12 @@ val example = exampleTask(areaVo) ?: return emptyList() return taskMapper.select(example) } + + /** + * 鑾峰彇鎬讳换鍔″搴旂殑鐩戠鐗堟湰 + */ + fun findMonitorList(taskId: String, sceneTypeId:String?): List<Monitorobjectversion> { + val monitorList = monitorobjectversionMapper.findMonitorListByScene(taskId, sceneTypeId) + return monitorList.sortedBy { it.displayid } + } } \ No newline at end of file -- Gitblit v1.9.3