From 538ba7a3bbc682f4537f1dd34f93feb2cf56b08e Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 14 十月 2025 17:32:04 +0800 Subject: [PATCH] 2025.10.14 1. 新增数据统计颗粒度选项,可选秒级数据、分钟数据进行数据统计 2. 典型隐患区域统计新增按照污染溯源区域进行分类统计的功能 --- src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/DataAnalysisServiceImplTest.kt | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/DataAnalysisServiceImplTest.kt b/src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/DataAnalysisServiceImplTest.kt index c9c3b1a..e8ccfd2 100644 --- a/src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/DataAnalysisServiceImplTest.kt +++ b/src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/DataAnalysisServiceImplTest.kt @@ -1,5 +1,6 @@ package com.flightfeather.uav.lightshare.service.impl +import com.flightfeather.uav.lightshare.bean.AreaVo import com.flightfeather.uav.lightshare.service.DataAnalysisService import junit.framework.TestCase import org.junit.Test @@ -7,6 +8,9 @@ import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.junit4.SpringRunner +import java.time.LocalDateTime +import java.time.ZoneId +import java.util.* @RunWith(SpringRunner::class) @SpringBootTest @@ -14,6 +18,14 @@ @Autowired lateinit var dataAnalysisService: DataAnalysisService + + val startTime = Date.from(LocalDateTime.of(2025,7,1,0,0,0).atZone(ZoneId.systemDefault()).toInstant()) + val endTime = Date.from(LocalDateTime.of(2025, 9, 30, 23, 59, 59).atZone(ZoneId.systemDefault()).toInstant()) + val areaVo = AreaVo().apply { + provinceCode = "31" + cityCode = "3100" + districtCode = "310106" + } @Test fun testPollutionTrace() { @@ -24,4 +36,22 @@ fun fetchHistory() { dataAnalysisService.fetchHistory("SH-CN-20250723(01)") } + + @Test + fun generateMissionList() { + val res = dataAnalysisService.generateMissionList(startTime, endTime, areaVo) + println(res) + } + + @Test + fun generateMissionDetail() { + val res = dataAnalysisService.generateMissionDetail(startTime, endTime, areaVo, "MINUTE") + println(res) + } + + @Test + fun generateClueByRiskArea() { + val res = dataAnalysisService.generateClueByRiskArea(startTime, endTime, areaVo) + println(res) + } } \ No newline at end of file -- Gitblit v1.9.3