From 8cf331411ea79c0d83e00657ed1374b29b09f4d7 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:46:30 +0800 Subject: [PATCH] 1. 新增走航卫星网格数据之间的融合功能 --- src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt index 3fcdb97..202983d 100644 --- a/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt +++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt @@ -28,13 +28,14 @@ private val gridAodDetailMapper: GridAodDetailMapper, ) { - fun fetchGridGroup(areaVo: AreaVo): List<GridGroup?> { + fun fetchGridGroup(areaVo: AreaVo, type: String?): List<GridGroup?> { return gridGroupMapper.selectByExample(Example(GridGroup::class.java).apply { createCriteria() .andEqualTo("provinceCode", areaVo.provinceCode).andEqualTo("provinceName", areaVo.provinceName) .andEqualTo("cityCode", areaVo.cityCode).andEqualTo("cityName", areaVo.cityName) .andEqualTo("districtCode", areaVo.districtCode).andEqualTo("districtName", areaVo.districtName) .andEqualTo("townCode", areaVo.townCode).andEqualTo("townName", areaVo.townName) + .andEqualTo("type", type) }) } @@ -66,6 +67,8 @@ } } + /*****************************************************************/ + fun fetchGridCell(groupId: Int): List<GridCell?> { return gridCellMapper.selectByExample(Example(GridCell::class.java).apply { createCriteria().andEqualTo("groupId", groupId) @@ -76,6 +79,8 @@ fun insertGridCell(gridCellList: List<GridCell?>): Int { return gridCellMapper.insertList(gridCellList) } + + /*****************************************************************/ fun fetchGridData(groupId: Int, dataTime: LocalDateTime?, type: Int?): List<GridData?> { return gridDataMapper.selectByExample(Example(GridData::class.java).apply { @@ -101,7 +106,15 @@ return gridDataDetailMapper.insertList(gridDataDetails) } - fun fetchGridDataDetail(dataId: Int, groupId: Int?, cellId: Int?): List<GridDataDetail?> { + fun updateGridDataDetail(gridDataDetails: List<GridDataDetail?>): Int { + var res = 0 + gridDataDetails.forEach { + res += gridDataDetailMapper.updateByPrimaryKey(it) + } + return res + } + + fun fetchGridDataDetail(dataId: Int? = null, groupId: Int? = null, cellId: Int? = null): List<GridDataDetail?> { return gridDataDetailMapper.selectByExample(Example(GridDataDetail::class.java).apply { createCriteria().andEqualTo("dataId", dataId) .andEqualTo("groupId", groupId) @@ -123,6 +136,7 @@ gridDataDetailMapper.updatePM25Batch(gridDataDetails) } + /*****************************************************************/ // aod 鐩稿叧鎿嶄綔 fun fetchGridAod(groupId: Int, dataTime: LocalDateTime?): List<GridAod?> { -- Gitblit v1.9.3