From a5cdbf569067822e3232d2177b8a9aac1ed95b69 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期三, 29 五月 2024 17:32:00 +0800 Subject: [PATCH] 1. 修改自评逻辑中,问题整改的判断方式为已整改并且整改审核通过; 2. 新增评估详情获取接口; --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt | 43 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt index e80a61c..7853af7 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt @@ -8,10 +8,8 @@ import cn.flightfeather.supervision.domain.ds1.mapper.TaskMapper import cn.flightfeather.supervision.common.utils.Constant import cn.flightfeather.supervision.common.utils.DateUtil -import cn.flightfeather.supervision.lightshare.service.EvaluationService -import cn.flightfeather.supervision.lightshare.service.SubtaskService -import cn.flightfeather.supervision.lightshare.service.TaskService -import cn.flightfeather.supervision.lightshare.service.UserinfoService +import cn.flightfeather.supervision.domain.ds1.repository.TaskRep +import cn.flightfeather.supervision.lightshare.service.* import cn.flightfeather.supervision.lightshare.vo.* import org.springframework.beans.BeanUtils import org.springframework.beans.factory.annotation.Autowired @@ -21,7 +19,10 @@ import kotlin.collections.ArrayList @Service -class TaskServiceImpl(val taskMapper: TaskMapper) : TaskService { +class TaskServiceImpl( + val taskMapper: TaskMapper, + private val taskRep: TaskRep, +) : TaskService { @Autowired lateinit var subtaskService: SubtaskService @@ -725,4 +726,36 @@ return taskProgressVolist } + override fun findTask(areaVo: AreaVo): List<Task?> { + return taskRep.findTasks(areaVo) + } + + override fun findTaskProgress(areaVo: AreaVo): List<TaskProgressVo?> { + val res = mutableListOf<TaskProgressVo?>() + taskRep.findTasks(areaVo).forEach {t-> + if (t?.tguid == null) return@forEach + val pro = TaskProgressVo().apply { + tguid = t.tguid + name = t.name + levelnum = t.levelnum + provinceCode = t.provincecode + provinceName = t.provincename + cityCode = t.citycode + cityName = t.cityname + districtCode = t.districtcode + districtName = t.districtname + townCode = t.towncode + townName = t.townname + var count = 0 + taskRep.findMonitorList(t.tguid!!, areaVo.scensetypeid).forEach { + val c = if (it.extension1 != null) it.extension1!!.toInt() else 1 + count += c + } + totaltask = count + completetask = subtaskService.getSummary(t.tguid!!, areaVo.scensetypeid?.toIntOrNull()).size + } + res.add(pro) + } + return res + } } \ No newline at end of file -- Gitblit v1.9.3