| | |
| | | import cn.flightfeather.supervision.domain.ds1.repository.TaskRep |
| | | import cn.flightfeather.supervision.lightshare.service.MediafileService |
| | | import cn.flightfeather.supervision.lightshare.service.ProblemlistService |
| | | import cn.flightfeather.supervision.lightshare.service.SubtaskService |
| | | import cn.flightfeather.supervision.lightshare.service.TaskService |
| | | import cn.flightfeather.supervision.lightshare.vo.* |
| | | import com.fasterxml.jackson.core.type.TypeReference |
| | |
| | | return problemListVolistTemp1 |
| | | } |
| | | |
| | | override fun getBySceneMonth(sceneId: String, year: Int?, month: Int?): List<ProblemListVo> { |
| | | var _year = year |
| | | var _month = month |
| | | if (year == null) { |
| | | PageHelper.startPage<Problemlist>(1, 1) |
| | | val lastProblem = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { |
| | | createCriteria().andEqualTo("sguid", sceneId) |
| | | orderBy("time").desc() |
| | | }).takeIf { it.isNotEmpty() }?.get(0) |
| | | if (lastProblem == null) { |
| | | return emptyList() |
| | | } else { |
| | | val lt = LocalDateTime.ofInstant(lastProblem.time?.toInstant(), ZoneId.systemDefault()) |
| | | _year = lt.year |
| | | _month = lt.monthValue |
| | | } |
| | | } |
| | | val sT = LocalDateTime.of(_year!!, _month!!, 1, 0, 0, 0, 0) |
| | | val eT = sT.plusMonths(1).minusSeconds(1) |
| | | return problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { |
| | | createCriteria().andBetween("time", sT,eT) |
| | | .andEqualTo("sguid", sceneId) |
| | | orderBy("time").desc() |
| | | }).map { |
| | | val problemVo = ProblemListVo(); |
| | | BeanUtils.copyProperties(it, problemVo) |
| | | problemVo |
| | | } |
| | | } |
| | | |
| | | //获取某顶层任务下,某个场景下的问题整改情况 |
| | | override fun getStatisticalResultById(topTaskId: String, sceneTypeId: String): List<StatisticsVo> { |
| | | val map = problemlistMapper.getStatisticalResultById(topTaskId, sceneTypeId) |