src/main/kotlin/com/flightfeather/uav/biz/satellite/SatelliteGridManage.kt
@@ -1,7 +1,10 @@ package com.flightfeather.uav.biz.satellite import com.flightfeather.uav.common.utils.MapUtil import com.flightfeather.uav.domain.entity.BaseRealTimeData import com.flightfeather.uav.domain.entity.GridCell import com.flightfeather.uav.domain.entity.GridData import com.flightfeather.uav.domain.entity.GridDataDetail import kotlin.math.PI import kotlin.math.sqrt @@ -87,15 +90,15 @@ val p2 = p.point2Lon to p.point2Lat val p3 = p.point3Lon to p.point3Lat val p4 = p.point4Lon to p.point4Lat // p1ãp3çç»çº¬åº¦åä½å·®å¼ val dx1 = (p3.first - p1.first) / scale.toBigDecimal() val dy1 = (p3.second - p1.second) / scale.toBigDecimal() // p1ãp4çç»çº¬åº¦åä½å·®å¼ val dx1 = (p4.first - p1.first) / scale.toBigDecimal() val dy1 = (p4.second - p1.second) / scale.toBigDecimal() // p1ãp2çç»çº¬åº¦åä½å·®å¼ val dx2 = (p2.first - p1.first) / scale.toBigDecimal() val dy2 = (p2.second - p1.second) / scale.toBigDecimal() // p3ãp4çç»çº¬åº¦åä½å·®å¼ val dx3 = (p4.first - p3.first) / scale.toBigDecimal() val dy3 = (p4.second - p3.second) / scale.toBigDecimal() // p4ãp3çç»çº¬åº¦åä½å·®å¼ val dx3 = (p3.first - p4.first) / scale.toBigDecimal() val dy3 = (p3.second - p4.second) / scale.toBigDecimal() // ä¸å¿ç¹åp1çç»çº¬åº¦åä½å·®å¼ val dxC = (p.longitude - p1.first) / scale.toBigDecimal() val dyC = (p.latitude - p1.second) / scale.toBigDecimal() @@ -116,14 +119,14 @@ newGridCell1.point1Lon = g.point1Lon + dx1 * row.toBigDecimal() newGridCell1.point1Lat = g.point1Lat + dy1 * row.toBigDecimal() // å·¦ä¸è§é¡¶ç¹æ ¹æ®æå¨è¡æ°å¨åå§ç½æ ¼é¡¶ç¹åºç¡ä¸å¢å åç§»éï¼æ¯å·¦ä¸è§é¡¶ç¹å¤ä¸ä¸ªåç§»ï¼ newGridCell1.point3Lon = g.point1Lon + dx1 * (row + 1).toBigDecimal() newGridCell1.point3Lat = g.point1Lat + dy1 * (row + 1).toBigDecimal() newGridCell1.point4Lon = g.point1Lon + dx1 * (row + 1).toBigDecimal() newGridCell1.point4Lat = g.point1Lat + dy1 * (row + 1).toBigDecimal() // å³ä¸è§é¡¶ç¹å¨ç»åç½æ ¼å·¦ä¸è§çåºç¡ä¸å¢å ç¸åºçåç§»é newGridCell1.point2Lon = newGridCell1.point1Lon + dx2 newGridCell1.point2Lat = newGridCell1.point1Lat + dy2 // å³ä¸è§é¡¶ç¹å¨ç»åç½æ ¼å·¦ä¸è§çåºç¡ä¸å¢å ç¸åºçåç§»é newGridCell1.point4Lon = newGridCell1.point3Lon + dx3 newGridCell1.point4Lat = newGridCell1.point3Lat + dy3 newGridCell1.point3Lon = newGridCell1.point4Lon + dx3 newGridCell1.point3Lat = newGridCell1.point4Lat + dy3 // ä¸å¿ç¹å¨ç»åç½æ ¼å·¦ä¸è§çåºç¡ä¸å¢å åºå®åç§»é newGridCell1.longitude = newGridCell1.point1Lon + dxC newGridCell1.latitude = newGridCell1.point1Lat + dyC @@ -160,4 +163,66 @@ return newGridCellList } /** * æåæ°æ®ï¼å°åå§å«æç½æ ¼é¥æµæ°æ®æ å°å°å¯¹åºç»åç½æ ¼ä¸ * @param subGridCellList ç»åç½æ ¼, æç § * @param subGridData ç»åç½æ ¼å¯¹åºçæ°æ®ç´¢å¼ * @param originGridDataDetailList ç»åç½æ ¼æå±ç½æ ¼çåå§ç½æ ¼æ°æ® */ fun splitData( subGridCellList: List<GridCell?>, subGridData: GridData, originGridDataDetailList: List<GridDataDetail?> ): List<GridDataDetail> { if (subGridCellList.isEmpty() || originGridDataDetailList.isEmpty()) return emptyList() val result = mutableListOf<GridDataDetail>() // å°ç»åç½æ ¼æç §ç¶ç½æ ¼idåèªèº«ç½æ ¼idè¿è¡ååºæå val _subGridCellList = subGridCellList.sortedWith(Comparator { o1, o2 -> if (o1 == null && o2 == null) { return@Comparator 0 } else if (o1 == null) { return@Comparator -1 } else if (o2 == null) { return@Comparator 1 } else { if (o1.fatherCellIndex == o2.fatherCellIndex) { return@Comparator o1.cellIndex - o2.cellIndex } else { return@Comparator o1.fatherCellIndex - o2.fatherCellIndex } } }) // å°åå§ç½æ ¼æ°æ®æç §ç½æ ¼idååºæå val _originGridDataDetailIterator = originGridDataDetailList.sortedBy { it?.cellId }.iterator() var fatherGridData = _originGridDataDetailIterator.next() // éåç»åç½æ ¼ï¼ä¸ºæ¯ä¸ªç»åç½æ ¼çæä¸æ¡ç½æ ¼æ°æ® _subGridCellList.forEach { while (fatherGridData?.cellId != it?.fatherCellIndex && _originGridDataDetailIterator.hasNext()) { fatherGridData = _originGridDataDetailIterator.next() } val subGridDataDetail = GridDataDetail().apply { dataId = subGridData.id groupId = it?.groupId cellId = it?.cellIndex pm25 = fatherGridData?.pm25 rank = fatherGridData?.rank } result.add(subGridDataDetail) } return result } /** * æ°æ®èå * @param realTimeDataList å¾ èåçèµ°èªçæµæ°æ® * @param gridData èååçæ°æ®ç»ç´¢å¼ * @param gridCellList å¾ èåçå«æç½æ ¼ */ fun dataFusion(realTimeDataList:List<BaseRealTimeData>, gridData: GridData, gridCellList: List<GridCell?>) { } } src/main/kotlin/com/flightfeather/uav/domain/entity/GridAodDetail.java
@@ -1,12 +1,11 @@ package com.flightfeather.uav.domain.entity; import javax.persistence.Column; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.*; @Table(name = "grid_aod_detail") public class GridAodDetail { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name = "aod_id") src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java
@@ -6,6 +6,7 @@ @Table(name = "grid_cell") public class GridCell { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; /** src/main/kotlin/com/flightfeather/uav/domain/entity/GridDataDetail.java
@@ -5,6 +5,7 @@ @Table(name = "grid_data_detail") public class GridDataDetail { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; /** src/main/kotlin/com/flightfeather/uav/domain/entity/GridGroup.java
@@ -6,6 +6,7 @@ @Table(name = "grid_group") public class GridGroup { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; /** @@ -49,6 +50,12 @@ * ç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ */ private String type; /** * å½ç½æ ¼ç±»åæ¯Subï¼åç½æ ¼ï¼æ¶ï¼æå±ç¶ç½æ ¼ç»çid */ @Column(name = "father_group_id") private Integer fatherGroupId; /** * @return id @@ -243,4 +250,22 @@ public void setType(String type) { this.type = type == null ? null : type.trim(); } /** * è·åå½ç½æ ¼ç±»åæ¯Subï¼åç½æ ¼ï¼æ¶ï¼æå±ç¶ç½æ ¼ç»çid * * @return father_group_id - å½ç½æ ¼ç±»åæ¯Subï¼åç½æ ¼ï¼æ¶ï¼æå±ç¶ç½æ ¼ç»çid */ public Integer getFatherGroupId() { return fatherGroupId; } /** * 设置å½ç½æ ¼ç±»åæ¯Subï¼åç½æ ¼ï¼æ¶ï¼æå±ç¶ç½æ ¼ç»çid * * @param fatherGroupId å½ç½æ ¼ç±»åæ¯Subï¼åç½æ ¼ï¼æ¶ï¼æå±ç¶ç½æ ¼ç»çid */ public void setFatherGroupId(Integer fatherGroupId) { this.fatherGroupId = fatherGroupId; } } src/main/kotlin/com/flightfeather/uav/domain/mapper/GridCellMapper.kt
@@ -3,6 +3,14 @@ import com.flightfeather.uav.domain.MyMapper import com.flightfeather.uav.domain.entity.GridCell import org.apache.ibatis.annotations.Mapper import org.apache.ibatis.annotations.Select @Mapper interface GridCellMapper : MyMapper<GridCell?> interface GridCellMapper : MyMapper<GridCell?> { /** * éç½®èªå¢id */ @Select("alter table grid_cell auto_increment = #{param1}") fun resetAutoIncrement(id: Int) } src/main/kotlin/com/flightfeather/uav/domain/mapper/GridGroupMapper.kt
@@ -3,6 +3,14 @@ import com.flightfeather.uav.domain.MyMapper import com.flightfeather.uav.domain.entity.GridGroup import org.apache.ibatis.annotations.Mapper import org.apache.ibatis.annotations.Select @Mapper interface GridGroupMapper : MyMapper<GridGroup?> interface GridGroupMapper : MyMapper<GridGroup?> { /** * éç½®èªå¢id */ @Select("alter table grid_group auto_increment = #{param1}") fun resetAutoIncrement(id: Int) } src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt
@@ -46,11 +46,35 @@ return gridGroupMapper.select(gridGroup) } fun insertGridGroup(gridGroup: GridGroup): Int { return gridGroupMapper.insert(gridGroup) } @Transactional fun deleteGridGroup(groupId: Int) { gridCellMapper.delete(GridCell().apply { this.groupId = groupId }) gridCellMapper.selectByExample( Example(GridCell::class.java).apply { orderBy("id").desc() } ).takeIf { it.isNotEmpty() }?.get(0)?.id?.let { id -> gridCellMapper.resetAutoIncrement(id + 1) } gridGroupMapper.deleteByPrimaryKey(groupId) gridGroupMapper.selectByExample( Example(GridGroup::class.java).apply { orderBy("id").desc() } ).takeIf { it.isNotEmpty() }?.get(0)?.id?.let { id -> gridGroupMapper.resetAutoIncrement(id + 1) } } fun fetchGridCell(groupId: Int): List<GridCell?> { return gridCellMapper.selectByExample(Example(GridCell::class.java).apply { createCriteria().andEqualTo("groupId", groupId) orderBy("id") }) } fun insertGridCell(gridCellList: List<GridCell?>): Int { return gridCellMapper.insertList(gridCellList) } fun fetchGridData(groupId: Int, dataTime: LocalDateTime?, type: Int?): List<GridData?> { @@ -65,6 +89,18 @@ return gridDataMapper.select(gridData) } fun fetchGridData(id: Int): GridData? { return gridDataMapper.selectByPrimaryKey(id) } fun insertGridData(gridData: GridData): Int { return gridDataMapper.insert(gridData) } fun insertGridDataDetail(gridDataDetails: List<GridDataDetail?>): Int { return gridDataDetailMapper.insertList(gridDataDetails) } fun fetchGridDataDetail(dataId: Int, groupId: Int?, cellId: Int?): List<GridDataDetail?> { return gridDataDetailMapper.selectByExample(Example(GridDataDetail::class.java).apply { createCriteria().andEqualTo("dataId", dataId) src/main/kotlin/com/flightfeather/uav/lightshare/eunm/SatelliteDataType.kt
@@ -12,4 +12,6 @@ Mix(1), // ç»åç½æ ¼æ°æ® Sub(2), // èµ°èªæ å°æ°æ® Monitor(3) } src/main/kotlin/com/flightfeather/uav/lightshare/service/SatelliteDataCalculateService.kt
@@ -1,6 +1,7 @@ package com.flightfeather.uav.lightshare.service import com.flightfeather.uav.domain.entity.GridCell import com.flightfeather.uav.domain.entity.GridDataDetail /** * @@ -21,4 +22,11 @@ * @param scale æåçç³»æ°ï¼ä¾å¦ 2ï¼è¡¨ç¤ºå°åæç½æ ¼æè¾¹é¿ç 1/2 æåæ 2 * 2 ç4ä¸ªç½æ ¼ */ fun splitGrid(groupId: Int, scale: Int): List<GridCell?> /** * å°åå§ç½æ ¼çæ°æ®æ å°å¡«å è³ç»åç½æ ¼ * @param groupId ç»åç½æ ¼ç»ç´¢å¼id * @param dataId æ°æ®ç´¢å¼id */ fun splitData(groupId: Int, dataId:Int): List<GridDataDetail?> } src/main/kotlin/com/flightfeather/uav/lightshare/service/SatelliteTelemetryService.kt
@@ -22,6 +22,8 @@ fun fetchGridGroup(areaVo: AreaVo, page: Int?, perPage: Int?): Pair<DataHead, List<GridGroup?>> fun deleteGridGroup(groupId: Int) fun fetchGridCell(groupId: Int): List<GridCell?> fun fetchGridData(groupId: Int, dataTime: LocalDateTime?, type: Int?): List<GridData?> src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt
@@ -3,10 +3,18 @@ import com.flightfeather.uav.biz.satellite.SatelliteGridManage import com.flightfeather.uav.common.exception.BizException import com.flightfeather.uav.domain.entity.GridCell import com.flightfeather.uav.domain.entity.GridData import com.flightfeather.uav.domain.entity.GridDataDetail import com.flightfeather.uav.domain.entity.GridGroup import com.flightfeather.uav.domain.repository.SatelliteGridRep import com.flightfeather.uav.lightshare.eunm.GridType import com.flightfeather.uav.lightshare.eunm.SatelliteDataType import com.flightfeather.uav.lightshare.service.SatelliteDataCalculateService import org.springframework.beans.BeanUtils import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional import java.util.Date import kotlin.math.round /** * å«æç½æ ¼åæ åçæµæ°æ®äºæ¬¡è®¡ç® @@ -47,13 +55,74 @@ } override fun splitGrid(groupId: Int, scale: Int): List<GridCell?> { // æ£æ¥è¯¥ç½æ ¼å±æ§æ¯å¦åè§ val gridGroup = satelliteGridRep.fetchGridGroup(groupId) ?: throw BizException("è¯¥ç½æ ¼ç»ä¸åå¨ï¼æ æ³è¿è¡ç½æ ¼ç»å") if (gridGroup.length == null) throw BizException("è¯¥ç½æ ¼ç»æ²¡æè®¾å®ç½æ ¼è¾¹é¿ï¼æ æ³è¿è¡ç½æ ¼ç»å") // æ£æ¥è¯¥ç½æ ¼ä¸è¯¥ç§ç±»çç»åç½æ ¼æ¯å¦åå¨ï¼è¥ä¸åå¨ï¼åæ°å»º satelliteGridRep.fetchGridGroup(groupId) val searchGridGroup = GridGroup().apply { type = GridType.Sub.name.lowercase() fatherGroupId = gridGroup.id length = round(gridGroup.length / scale) } val subGridGroupList = satelliteGridRep.fetchGridGroup(searchGridGroup) // è¥ç»åç½æ ¼è®°å½è¶ è¿1个ï¼è¯´æä¸å¡é»è¾åå¨é®é¢ï¼ç¸åè¾¹é¿çç»åç½æ ¼åºè¯¥åªæ1个 if (subGridGroupList.size > 1) { throw BizException("è¯¥ç½æ ¼ç»ä¸${searchGridGroup.length}米边é¿çç½æ ¼è®°å½è¶ è¿1ä¸ªï¼æ æ³åè¿è¡ç½æ ¼ç»åï¼å¹¶ä¸è¯·æ£æ¥çæé»è¾æ¯å¦é®é¢") } // è¥ç»åç½æ ¼è®°å½æä¸åªæ1个ï¼åæ é忬¡ç»åï¼ç´æ¥è¿åå·²æç»æ else if (subGridGroupList.size == 1) { val g = subGridGroupList.first() ?: throw BizException("è¯¥ç½æ ¼ç»ä¸çç»åç½æ ¼è®°å½å·²æåï¼æ æ³ä½¿ç¨ï¼è¯·æ£æ¥æ°æ®åºè®°å½") return satelliteGridRep.fetchGridCell(g.id) } // 彿²¡æè®°å½æ¶ï¼æ§è¡çæé»è¾ // çææ°çç»åç½æ ¼ç»è®°å½ val newGridGroup = GridGroup() BeanUtils.copyProperties(gridGroup, newGridGroup) newGridGroup.apply { id = null name += "${searchGridGroup.length.toInt()}ç±³ç»å" createTime = Date() length = searchGridGroup.length type = GridType.Sub.name.lowercase() fatherGroupId = groupId } satelliteGridRep.insertGridGroup(newGridGroup) // è·åå ·ä½ç½æ ¼ä¿¡æ¯ val cellList = satelliteGridRep.fetchGridCell(groupId) // æç §ç»å®çæåç³»æ°è¿è¡æå // val subCellList = SatelliteGridManage.splitGrid(cellList, scale) val subCellList = SatelliteGridManage.splitGrid(cellList, scale, newGridGroup.id) satelliteGridRep.insertGridCell(subCellList) return emptyList() return subCellList } @Transactional override fun splitData(groupId: Int, dataId:Int): List<GridDataDetail?> { // æ£æ¥æ¯å¦æ¯ç»åç½æ ¼ç±»å val gridGroup = satelliteGridRep.fetchGridGroup(groupId) ?: throw BizException("è¯¥ç½æ ¼ç»ä¸åå¨ï¼æ æ³è¿è¡ç»åç½æ ¼æ°æ®æ å°") if (gridGroup.type != GridType.Sub.name.lowercase()) throw BizException("è¯¥ç½æ ¼ç»ä¸æ¯ç»åç½æ ¼ç±»ååå¨ï¼æ æ³è¿è¡ç»åç½æ ¼æ°æ®æ å°") val subGridCellList = satelliteGridRep.fetchGridCell(groupId) val originGridData = satelliteGridRep.fetchGridData(dataId) val originGridDataDetailList = satelliteGridRep.fetchGridDataDetail(dataId, null, null) val subGridData = GridData().apply { this.groupId = groupId dataTime = originGridData?.dataTime type = SatelliteDataType.Sub.value.toByte() } satelliteGridRep.insertGridData(subGridData) val subGridDataDetailList = SatelliteGridManage.splitData(subGridCellList, subGridData, originGridDataDetailList) satelliteGridRep.insertGridDataDetail(subGridDataDetailList) return subGridDataDetailList } } src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImpl.kt
@@ -44,6 +44,10 @@ return DataHead(pageInfo.pageNum, pageInfo.pages) to res } override fun deleteGridGroup(groupId: Int) { satelliteGridRep.deleteGridGroup(groupId) } override fun fetchGridCell(groupId: Int): List<GridCell?> { return satelliteGridRep.fetchGridCell(groupId) } src/main/resources/application-test.yml
@@ -7,13 +7,13 @@ # password: cn.FLIGHTFEATHER # è¿ç¨æå¡å¨ url: jdbc:mysql://47.100.191.150:3306/dronemonitor?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false username: remoteU1 password: eSoF8DnzfGTlhAjE # url: jdbc:mysql://114.215.109.124:3306/dronemonitor?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false # url: jdbc:mysql://47.100.191.150:3306/dronemonitor?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false # username: remoteU1 # password: feiyu2024 # password: eSoF8DnzfGTlhAjE url: jdbc:mysql://114.215.109.124:3306/dronemonitor?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false username: remoteU1 password: feiyu2024 springfox: documentation: src/main/resources/generator/generatorConfig.xml
@@ -67,7 +67,7 @@ <!-- <table tableName="scene_info" domainObjectName="SceneInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> <!-- <table tableName="segment_info" domainObjectName="SegmentInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> <table tableName="grid_group" domainObjectName="GridGroup" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/> <table tableName="grid_cell" domainObjectName="GridCell" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/> <!-- <table tableName="grid_cell" domainObjectName="GridCell" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> <!-- <table tableName="grid_data" domainObjectName="GridData" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> <!-- <table tableName="grid_data_detail" domainObjectName="GridDataDetail" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> </context> src/main/resources/mapper/GridGroupMapper.xml
@@ -18,12 +18,13 @@ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="length" jdbcType="DOUBLE" property="length" /> <result column="type" jdbcType="VARCHAR" property="type" /> <result column="father_group_id" jdbcType="INTEGER" property="fatherGroupId" /> </resultMap> <sql id="Base_Column_List"> <!-- WARNING - @mbg.generated --> id, name, province_code, province_name, city_code, city_name, district_code, district_name, town_code, town_name, create_time, length, type town_code, town_name, create_time, length, type, father_group_id </sql> </mapper> src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImplTest.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,29 @@ package com.flightfeather.uav.lightshare.service.impl import com.flightfeather.uav.lightshare.service.SatelliteDataCalculateService import org.junit.Test import org.junit.runner.RunWith import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.junit4.SpringRunner @RunWith(SpringRunner::class) @SpringBootTest class SatelliteDataCalculateServiceImplTest { @Autowired lateinit var satelliteDataCalculateService: SatelliteDataCalculateService @Test fun splitGrid() { val res = satelliteDataCalculateService.splitGrid(1, 4) // println(res) } @Test fun splitData() { val res = satelliteDataCalculateService.splitData(4, 25) // println(res) } } src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteTelemetryServiceImplTest.kt
@@ -27,4 +27,9 @@ fun calGridVertex() { satelliteTelemetryService.calGridVertex(1) } @Test fun deleteGridGroup() { satelliteTelemetryService.deleteGridGroup(2) } } src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/ThirdPartyServiceImplTest.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ package com.flightfeather.uav.lightshare.service.impl import com.flightfeather.uav.lightshare.eunm.ThirdPartyLabel import com.flightfeather.uav.lightshare.service.ThirdPartyService import org.junit.Test import org.junit.runner.RunWith import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest import org.springframework.test.context.junit4.SpringRunner @RunWith(SpringRunner::class) @SpringBootTest class ThirdPartyServiceImplTest { @Autowired lateinit var thirdPartyService: ThirdPartyService @Test fun fetchMissionData() { thirdPartyService.fetchMissionData(ThirdPartyLabel.ShenXin.value, "20240914") } }