src/main/kotlin/com/flightfeather/uav/biz/satellite/SatelliteGridManage.kt
@@ -64,12 +64,14 @@ } /** * æåç½æ ¼ä¸ºç»åç½æ ¼ * æåç½æ ¼ä¸ºç»åç½æ ¼ï¼ææç½æ ¼åºè¯¥æ¯ç¸åè¾¹é¿çæ£æ¹å½¢ * æ ¹æ®ç¸ä¼¼ç©å½¢çåçï¼å¯ä»¥å嫿æ¯ä¾å¾å°æ¯ä¸ªç»åç½æ ¼çç»çº¬åº¦ * @param gridCellList åå§ç½æ ¼æ°ç» * @param scale æåçç³»æ°ï¼ä¾å¦ 2ï¼è¡¨ç¤ºå°åæç½æ ¼æè¾¹é¿ç 1/2 æåæ 2 * 2 ç4ä¸ªç½æ ¼ * @param groupId ç»ååçç½æ ¼æå±çç½æ ¼ç»id * @return */ fun splitGrid(gridCellList: List<GridCell>, scale: Int): List<GridCell> { fun splitGrid(gridCellList: List<GridCell?>, scale: Int, groupId:Int): List<GridCell?> { if (scale <= 0) throw IllegalArgumentException("ç½æ ¼æåçæ°éä¸è½å°äº1") // æåç³»æ°ä¸º1ï¼åè¡¨ç¤ºä¸æå if (scale == 1) return gridCellList @@ -79,7 +81,7 @@ // æ ¹æ®å½æ°[calGridVertex]çæçç½æ ¼4个顶ç¹åæ ï¼ä»¥ä¸åä¸å左西å³ä¸æ¹å为æ å // 计ç®é¦ä¸ªç½æ ¼ä¸å¿åæ ç¹åå«å4个顶ç¹çç»çº¬åº¦å·®å¼ val p = gridCellList[0] val p = gridCellList.find { it != null }!! // ï¼éè¿è¿ä¼¼å¹³é¢åæ ç³»çæ¹å¼ï¼æ ¹æ®å个åå§ç½æ ¼ç4个顶ç¹åæ ï¼åå«ç¡®å®ä»¥ä¸ä¸ç»åæ ç¹ä¹é´çç»çº¬åº¦åä½åç§»é val p1 = p.point1Lon to p.point1Lat val p2 = p.point2Lon to p.point2Lat @@ -98,48 +100,63 @@ val dxC = (p.longitude - p1.first) / scale.toBigDecimal() val dyC = (p.latitude - p1.second) / scale.toBigDecimal() // ç½æ ¼è¡å¾ªç¯ for (row in 0 until scale) { val newGridCell1 = GridCell() // ç½æ ¼ç´¢å¼ var cellIndex = 0 // ç¡®å®æ¯ä¸è¡é¦ä¸ªç»åç½æ ¼çä¸å¿åæ å4个顶ç¹åæ // å·¦ä¸è§é¡¶ç¹æ ¹æ®æå¨è¡æ°å¨åå§ç½æ ¼é¡¶ç¹åºç¡ä¸å¢å åç§»é newGridCell1.point1Lon = p1.first + dx1 * row.toBigDecimal() newGridCell1.point1Lat = p1.second + dy1 * row.toBigDecimal() // å·¦ä¸è§é¡¶ç¹æ ¹æ®æå¨è¡æ°å¨åå§ç½æ ¼é¡¶ç¹åºç¡ä¸å¢å åç§»éï¼æ¯å·¦ä¸è§é¡¶ç¹å¤ä¸ä¸ªåç§»ï¼ newGridCell1.point3Lon = p1.first + dx1 * (row + 1).toBigDecimal() newGridCell1.point3Lat = p1.second + 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.longitude = newGridCell1.point1Lon + dxC newGridCell1.latitude = newGridCell1.point1Lat + dyC // å¯¹ç½æ ¼ç»å çææç½æ ¼è¿è¡ç½æ ¼ç»å gridCellList.forEach { g -> if (g == null) return@forEach // å å ¥ç»æéå newGridCellList.add(newGridCell1) // ç½æ ¼è¡å¾ªç¯ for (row in 0 until scale) { val newGridCell1 = GridCell() // ç½æ ¼å循ç¯(ä»ç¬¬2åå¼å§) for (col in 1 until scale) { val newGridCell = GridCell() newGridCell.point1Lon = newGridCell1.point1Lon + dx2 * col.toBigDecimal() newGridCell.point1Lat = newGridCell1.point1Lat + dy2 * col.toBigDecimal() newGridCell.point2Lon = newGridCell1.point2Lon + dx2 * col.toBigDecimal() newGridCell.point2Lat = newGridCell1.point2Lat + dy2 * col.toBigDecimal() newGridCell.point3Lon = newGridCell1.point3Lon + dx3 * col.toBigDecimal() newGridCell.point3Lat = newGridCell1.point3Lat + dy3 * col.toBigDecimal() newGridCell.point4Lon = newGridCell1.point4Lon + dx3 * col.toBigDecimal() newGridCell.point4Lat = newGridCell1.point4Lat + dy3 * col.toBigDecimal() newGridCell.longitude = newGridCell.point1Lon + dxC newGridCell.latitude = newGridCell.point1Lat + dyC // ç¡®å®æ¯ä¸è¡é¦ä¸ªç»åç½æ ¼çä¸å¿åæ å4个顶ç¹åæ // å·¦ä¸è§é¡¶ç¹æ ¹æ®æå¨è¡æ°å¨åå§ç½æ ¼é¡¶ç¹åºç¡ä¸å¢å åç§»é 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.point2Lon = newGridCell1.point1Lon + dx2 newGridCell1.point2Lat = newGridCell1.point1Lat + dy2 // å³ä¸è§é¡¶ç¹å¨ç»åç½æ ¼å·¦ä¸è§çåºç¡ä¸å¢å ç¸åºçåç§»é newGridCell1.point4Lon = newGridCell1.point3Lon + dx3 newGridCell1.point4Lat = newGridCell1.point3Lat + dy3 // ä¸å¿ç¹å¨ç»åç½æ ¼å·¦ä¸è§çåºç¡ä¸å¢å åºå®åç§»é newGridCell1.longitude = newGridCell1.point1Lon + dxC newGridCell1.latitude = newGridCell1.point1Lat + dyC newGridCellList.add(newGridCell) newGridCell1.groupId = groupId newGridCell1.cellIndex = ++cellIndex newGridCell1.fatherCellIndex = g.cellIndex // å å ¥ç»æéå newGridCellList.add(newGridCell1) // ç½æ ¼å循ç¯(ä»ç¬¬2åå¼å§) for (col in 1 until scale) { val newGridCell = GridCell() newGridCell.point1Lon = newGridCell1.point1Lon + dx2 * col.toBigDecimal() newGridCell.point1Lat = newGridCell1.point1Lat + dy2 * col.toBigDecimal() newGridCell.point2Lon = newGridCell1.point2Lon + dx2 * col.toBigDecimal() newGridCell.point2Lat = newGridCell1.point2Lat + dy2 * col.toBigDecimal() newGridCell.point3Lon = newGridCell1.point3Lon + dx3 * col.toBigDecimal() newGridCell.point3Lat = newGridCell1.point3Lat + dy3 * col.toBigDecimal() newGridCell.point4Lon = newGridCell1.point4Lon + dx3 * col.toBigDecimal() newGridCell.point4Lat = newGridCell1.point4Lat + dy3 * col.toBigDecimal() newGridCell.longitude = newGridCell.point1Lon + dxC newGridCell.latitude = newGridCell.point1Lat + dyC newGridCell.groupId = groupId newGridCell.cellIndex = ++cellIndex newGridCell.fatherCellIndex = g.cellIndex newGridCellList.add(newGridCell) } } } return newGridCellList } src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java
@@ -9,10 +9,22 @@ private Integer id; /** * ç½æ ¼ç´¢å¼ */ @Column(name = "cell_index") private Integer cellIndex; /** * æå±ç½æ ¼åç»id */ @Column(name = "group_id") private Integer groupId; /** * æå±ä¸çº§ç½æ ¼çç´¢å¼id,å¦ææ²¡æå为null */ @Column(name = "father_cell_index") private Integer fatherCellIndex; /** * ç»åº¦ @@ -87,6 +99,24 @@ } /** * è·åç½æ ¼ç´¢å¼ * * @return cell_index - ç½æ ¼ç´¢å¼ */ public Integer getCellIndex() { return cellIndex; } /** * è®¾ç½®ç½æ ¼ç´¢å¼ * * @param cellIndex ç½æ ¼ç´¢å¼ */ public void setCellIndex(Integer cellIndex) { this.cellIndex = cellIndex; } /** * è·åæå±ç½æ ¼åç»id * * @return group_id - æå±ç½æ ¼åç»id @@ -105,6 +135,24 @@ } /** * è·åæå±ä¸çº§ç½æ ¼çç´¢å¼id,å¦ææ²¡æå为null * * @return father_cell_index - æå±ä¸çº§ç½æ ¼çç´¢å¼id,å¦ææ²¡æå为null */ public Integer getFatherCellIndex() { return fatherCellIndex; } /** * 设置æå±ä¸çº§ç½æ ¼çç´¢å¼id,å¦ææ²¡æå为null * * @param fatherCellIndex æå±ä¸çº§ç½æ ¼çç´¢å¼id,å¦ææ²¡æå为null */ public void setFatherCellIndex(Integer fatherCellIndex) { this.fatherCellIndex = fatherCellIndex; } /** * è·åç»åº¦ * * @return longitude - ç»åº¦ src/main/kotlin/com/flightfeather/uav/domain/entity/GridGroup.java
@@ -41,6 +41,16 @@ private Date createTime; /** * ç½æ ¼è¾¹é¿ï¼åä½ï¼ç±³ï¼ */ private Double length; /** * ç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ */ private String type; /** * @return id */ public Integer getId() { @@ -171,7 +181,7 @@ } /** * @return towm_name * @return town_name */ public String getTownName() { return townName; @@ -197,4 +207,40 @@ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * è·åç½æ ¼è¾¹é¿ï¼åä½ï¼ç±³ï¼ * * @return length - ç½æ ¼è¾¹é¿ï¼åä½ï¼ç±³ï¼ */ public Double getLength() { return length; } /** * è®¾ç½®ç½æ ¼è¾¹é¿ï¼åä½ï¼ç±³ï¼ * * @param length ç½æ ¼è¾¹é¿ï¼åä½ï¼ç±³ï¼ */ public void setLength(Double length) { this.length = length; } /** * è·åç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ * * @return type - ç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ */ public String getType() { return type; } /** * è®¾ç½®ç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ * * @param type ç½æ ¼ç±»åï¼originï¼åå§ç½æ ¼ï¼subï¼åç½æ ¼ï¼ç»åç½æ ¼ï¼ */ public void setType(String type) { this.type = type == null ? null : type.trim(); } } src/main/kotlin/com/flightfeather/uav/domain/repository/AirDataRep.kt
ÎļþÃû´Ó src/main/kotlin/com/flightfeather/uav/repository/AirDataRepository.kt ÐÞ¸Ä @@ -1,14 +1,15 @@ package com.flightfeather.uav.repository package com.flightfeather.uav.domain.repository import com.flightfeather.uav.domain.entity.RealTimeData import com.flightfeather.uav.lightshare.bean.DataVo import com.flightfeather.uav.socket.bean.AirDataPackage /** * èµ°èªçæµæ°æ®æ°æ®åºç®¡ç * @author riku * Date: 2020/6/11 */ interface AirDataRepository { interface AirDataRep { /** * åå§æ°æ®ä»¥jsonæ ¼å¼åå¨ src/main/kotlin/com/flightfeather/uav/domain/repository/ElectricRep.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ package com.flightfeather.uav.domain.repository import com.flightfeather.uav.socket.bean.ElectricMessage /** * ç¨çµéæ°æ®åºç¸å ³æä½ */ interface ElectricRep { fun saveData(electricMessage: ElectricMessage): Int } src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt
@@ -38,6 +38,14 @@ }) } fun fetchGridGroup(id: Int): GridGroup? { return gridGroupMapper.selectByPrimaryKey(id) } fun fetchGridGroup(gridGroup: GridGroup): List<GridGroup?> { return gridGroupMapper.select(gridGroup) } fun fetchGridCell(groupId: Int): List<GridCell?> { return gridCellMapper.selectByExample(Example(GridCell::class.java).apply { createCriteria().andEqualTo("groupId", groupId) src/main/kotlin/com/flightfeather/uav/domain/repository/impl/AirDataRepImpl.kt
ÎļþÃû´Ó src/main/kotlin/com/flightfeather/uav/repository/impl/AirDataRepositoryImpl.kt ÐÞ¸Ä @@ -1,10 +1,10 @@ package com.flightfeather.uav.repository.impl package com.flightfeather.uav.domain.repository.impl import com.flightfeather.uav.common.utils.GsonUtils import com.flightfeather.uav.domain.entity.* import com.flightfeather.uav.domain.mapper.* import com.flightfeather.uav.lightshare.bean.DataVo import com.flightfeather.uav.repository.AirDataRepository import com.flightfeather.uav.domain.repository.AirDataRep import com.flightfeather.uav.socket.bean.AirData import com.flightfeather.uav.socket.bean.AirDataPackage import com.flightfeather.uav.socket.eunm.FactorType @@ -16,23 +16,20 @@ import java.math.BigDecimal import java.text.SimpleDateFormat import java.time.LocalDateTime import java.time.ZoneId import java.util.* import kotlin.math.abs import kotlin.math.sqrt /** * @author riku * Date: 2020/6/11 */ @Repository class AirDataRepositoryImpl( class AirDataRepImpl( private val realTimeDataMapper: RealTimeDataMapper, private val realTimeDataVehicleMapper: RealTimeDataVehicleMapper, private val realTimeDataUavMapper: RealTimeDataUavMapper, private val realTimeDataGridMapper: RealTimeDataGridMapper, private val factorCalibrationMapper: FactorCalibrationMapper ): AirDataRepository { ): AirDataRep { // FIXME: 2021/10/25 临æ¶è½¦è½½æ°æ®ï¼ç±äºæ 人æºé¨åçæµå åæ°æ®æ æï¼å æ¤ææ¶éç¨è½¦è½½æ°æ®ä½ä¸ºå¡«å private val tmpVehicleDataList = mutableListOf<BaseRealTimeData>() src/main/kotlin/com/flightfeather/uav/domain/repository/impl/ElectricRepImpl.kt
ÎļþÃû´Ó src/main/kotlin/com/flightfeather/uav/repository/impl/ElectricDapImpl.kt ÐÞ¸Ä @@ -1,14 +1,14 @@ package com.flightfeather.uav.repository.impl package com.flightfeather.uav.domain.repository.impl import com.flightfeather.uav.domain.entity.ElectricMinuteValue import com.flightfeather.uav.domain.mapper.ElectricMinuteValueMapper import com.flightfeather.uav.repository.ElectricRepository import com.flightfeather.uav.domain.repository.ElectricRep import com.flightfeather.uav.socket.bean.ElectricMessage import org.springframework.stereotype.Repository import java.util.* @Repository class ElectricDapImpl(val electricMinuteValueMapper: ElectricMinuteValueMapper) : ElectricRepository { class ElectricRepImpl(val electricMinuteValueMapper: ElectricMinuteValueMapper) : ElectricRep { override fun saveData(electricMessage: ElectricMessage): Int { val minuteValue = ElectricMinuteValue().apply { mvStatCode = electricMessage.mn src/main/kotlin/com/flightfeather/uav/lightshare/eunm/GridType.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,14 @@ package com.flightfeather.uav.lightshare.eunm /** * 嫿饿µç½æ ¼ç±»å * @date 2025/1/21 * @author feiyu02 */ enum class GridType { // åå§ç½æ ¼ Origin(), // åç½æ ¼ï¼ç»åç½æ ¼) Sub() } src/main/kotlin/com/flightfeather/uav/lightshare/eunm/SatelliteDataType.kt
@@ -9,5 +9,7 @@ // åå§æ°æ® Original(0), // èåæ°æ® Mix(1) Mix(1), // ç»åç½æ ¼æ°æ® Sub(2), } src/main/kotlin/com/flightfeather/uav/lightshare/service/SatelliteDataCalculateService.kt
@@ -15,5 +15,10 @@ */ fun calGridVertex(groupId: Int): List<GridCell?> fun splitGrid(groupId: Int): List<GridCell?> /** * å°ç½æ ¼ç»è¿è¡ç»å * @param groupId ç½æ ¼ç»ç´¢å¼id * @param scale æåçç³»æ°ï¼ä¾å¦ 2ï¼è¡¨ç¤ºå°åæç½æ ¼æè¾¹é¿ç 1/2 æåæ 2 * 2 ç4ä¸ªç½æ ¼ */ fun splitGrid(groupId: Int, scale: Int): List<GridCell?> } src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt
@@ -6,7 +6,6 @@ import com.flightfeather.uav.common.utils.ExcelUtil import com.flightfeather.uav.common.utils.FileExchange import com.flightfeather.uav.biz.dataprocess.AverageUtil import com.flightfeather.uav.common.location.TrackSegment import com.flightfeather.uav.domain.entity.* import com.flightfeather.uav.domain.mapper.* import com.flightfeather.uav.domain.repository.MissionRep @@ -15,7 +14,7 @@ import com.flightfeather.uav.lightshare.bean.* import com.flightfeather.uav.lightshare.service.RealTimeDataService import com.flightfeather.uav.model.epw.EPWDataPrep import com.flightfeather.uav.repository.AirDataRepository import com.flightfeather.uav.domain.repository.AirDataRep import com.flightfeather.uav.socket.eunm.UWDeviceType import com.github.pagehelper.PageHelper import org.apache.poi.xssf.streaming.SXSSFWorkbook @@ -37,7 +36,7 @@ @Service class RealTimeDataServiceImpl( private val realTimeDataMapper: RealTimeDataMapper, private val airDataRepository: AirDataRepository, private val airDataRep: AirDataRep, private val realTimeDataVehicleMapper: RealTimeDataVehicleMapper, private val realTimeDataUavMapper: RealTimeDataUavMapper, private val realTimeDataGridMapper: RealTimeDataGridMapper, @@ -396,7 +395,7 @@ println("å½å页æ°ï¼$page") val dataList = res.data ?: emptyList() val result = epwDataPrep.mDataPrep2(dataList) count += airDataRepository.savePrepData2(result) count += airDataRep.savePrepData2(result) page++ } src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/SatelliteDataCalculateServiceImpl.kt
@@ -3,12 +3,13 @@ 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.GridGroup import com.flightfeather.uav.domain.repository.SatelliteGridRep import com.flightfeather.uav.lightshare.service.SatelliteDataCalculateService import org.springframework.stereotype.Service /** * * å«æç½æ ¼åæ åçæµæ°æ®äºæ¬¡è®¡ç® * @date 2025/1/15 * @author feiyu02 */ @@ -45,7 +46,14 @@ return cellList } override fun splitGrid(groupId: Int): List<GridCell?> { TODO("Not yet implemented") override fun splitGrid(groupId: Int, scale: Int): List<GridCell?> { // æ£æ¥è¯¥ç½æ ¼ä¸è¯¥ç§ç±»çç»åç½æ ¼æ¯å¦åå¨ï¼è¥ä¸åå¨ï¼åæ°å»º satelliteGridRep.fetchGridGroup(groupId) // è·åå ·ä½ç½æ ¼ä¿¡æ¯ val cellList = satelliteGridRep.fetchGridCell(groupId) // æç §ç»å®çæåç³»æ°è¿è¡æå // val subCellList = SatelliteGridManage.splitGrid(cellList, scale) return emptyList() } } src/main/kotlin/com/flightfeather/uav/repository/ElectricRepository.kt
ÎļþÒÑɾ³ý src/main/kotlin/com/flightfeather/uav/socket/processor/ElectricProcessor.kt
@@ -1,6 +1,6 @@ package com.flightfeather.uav.socket.processor import com.flightfeather.uav.repository.ElectricRepository import com.flightfeather.uav.domain.repository.ElectricRep import com.flightfeather.uav.socket.bean.BaseMessage import com.flightfeather.uav.socket.bean.ElectricMessage import com.flightfeather.uav.socket.decoder.ElectricDataDecoder @@ -20,7 +20,7 @@ } @Autowired lateinit var electricRepository: ElectricRepository lateinit var electricRep: ElectricRep @Autowired lateinit var electricDataDecoder: ElectricDataDecoder @@ -42,7 +42,7 @@ private fun saveToDataBase(message: BaseMessage, msg: String) { if (message is ElectricMessage && message.mn.isNotBlank()) { instance.electricRepository.saveData(message) instance.electricRep.saveData(message) } } } src/main/kotlin/com/flightfeather/uav/socket/processor/UnderwayProcessor.kt
@@ -1,7 +1,7 @@ package com.flightfeather.uav.socket.processor import com.flightfeather.uav.model.epw.EPWDataPrep import com.flightfeather.uav.repository.AirDataRepository import com.flightfeather.uav.domain.repository.AirDataRep import com.flightfeather.uav.socket.bean.AirDataPackage import com.flightfeather.uav.socket.decoder.AirDataDecoder import com.flightfeather.uav.socket.decoder.DataPackageDecoder @@ -30,7 +30,7 @@ } @Autowired lateinit var airDataRepository: AirDataRepository lateinit var airDataRep: AirDataRep private val airDataDecoder = AirDataDecoder.instance private val dataPackageDecoder = DataPackageDecoder() @@ -66,7 +66,7 @@ when (dataPackage.commandUnit) { AirCommandUnit.AirData.value -> { // 以jsonæ ¼å¼åå¨åå§æ°æ® instance.airDataRepository.saveAirData(dataPackage) instance.airDataRep.saveAirData(dataPackage) // è¿è¡é¢å¤çåï¼åå¨è³å¯¹åºæ°æ®è¡¨ if (!dataProcessMap.containsKey(dataPackage.deviceCode)) { // æ¯å°è®¾å¤æåç¬çæ°æ®é¢å¤ç对象 @@ -74,7 +74,7 @@ } dataProcessMap[dataPackage.deviceCode]?.run { val list = this.mDataPrep2(dataPackage)// æ°æ®å¹³æ»å¤ç instance.airDataRepository.savePrepData2(list)// æç §è®¾å¤ç±»ååå¨è³å¯¹åºæ°æ®è¡¨ instance.airDataRep.savePrepData2(list)// æç §è®¾å¤ç±»ååå¨è³å¯¹åºæ°æ®è¡¨ } } } src/main/resources/generator/generatorConfig.xml
@@ -25,9 +25,14 @@ <property name="suppressAllComments" value="true"/> </commentGenerator> <!--æ°æ®åºé¾æ¥URLï¼ç¨æ·åãå¯ç --> <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://47.100.191.150:3306/dronemonitor?serverTimezone=Asia/Shanghai" userId="remoteU1" password="eSoF8DnzfGTlhAjE"> <!-- <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://47.100.191.150:3306/dronemonitor?serverTimezone=Asia/Shanghai"--> <!-- userId="remoteU1"--> <!-- password="eSoF8DnzfGTlhAjE">--> <!-- </jdbcConnection>--> <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/dronemonitor?serverTimezone=Asia/Shanghai" userId="root" password="123456"> </jdbcConnection> <javaTypeResolver> <property name="forceBigDecimals" value="false"/> @@ -61,7 +66,7 @@ <!-- <table tableName="real_time_data_grid_opt" domainObjectName="RealTimeDataGridOpt" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> <!-- <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_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_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"/>--> src/main/resources/mapper/GridCellMapper.xml
@@ -6,7 +6,9 @@ WARNING - @mbg.generated --> <id column="id" jdbcType="INTEGER" property="id" /> <result column="cell_index" jdbcType="INTEGER" property="cellIndex" /> <result column="group_id" jdbcType="INTEGER" property="groupId" /> <result column="father_cell_index" jdbcType="INTEGER" property="fatherCellIndex" /> <result column="longitude" jdbcType="DECIMAL" property="longitude" /> <result column="latitude" jdbcType="DECIMAL" property="latitude" /> <result column="point1_lon" jdbcType="DECIMAL" property="point1Lon" /> @@ -22,7 +24,7 @@ <!-- WARNING - @mbg.generated --> id, group_id, longitude, latitude, point1_lon, point1_lat, point2_lon, point2_lat, point3_lon, point3_lat, point4_lon, point4_lat id, cell_index, group_id, father_cell_index, longitude, latitude, point1_lon, point1_lat, point2_lon, point2_lat, point3_lon, point3_lat, point4_lon, point4_lat </sql> </mapper> src/main/resources/mapper/GridGroupMapper.xml
@@ -16,12 +16,14 @@ <result column="town_code" jdbcType="VARCHAR" property="townCode" /> <result column="town_name" jdbcType="VARCHAR" property="townName" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="length" jdbcType="DOUBLE" property="length" /> <result column="type" jdbcType="VARCHAR" property="type" /> </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 town_code, town_name, create_time, length, type </sql> </mapper> src/test/kotlin/com/flightfeather/uav/Test.kt
@@ -4,10 +4,12 @@ import com.flightfeather.uav.common.utils.FileExchange import com.flightfeather.uav.common.utils.FileUtil import com.flightfeather.uav.domain.entity.Company import com.flightfeather.uav.lightshare.eunm.SatelliteDataType import com.flightfeather.uav.socket.bean.DataUnit import com.flightfeather.uav.socket.decoder.AirDataDecoder import com.flightfeather.uav.socket.eunm.AirCommandUnit import com.google.gson.Gson import org.jetbrains.kotlin.konan.util.visibleName import org.junit.Test import java.io.File import java.io.FileOutputStream @@ -127,6 +129,11 @@ @Test fun foo17() { val a = listOf(1, 2, 3) println(SatelliteDataType.Original.name) println(SatelliteDataType.Original.value) println(SatelliteDataType.Original.ordinal) println(SatelliteDataType.Original.toString()) println(SatelliteDataType.Original.visibleName) println(SatelliteDataType.Original) } } src/test/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImplTest.kt
@@ -3,7 +3,7 @@ import com.flightfeather.uav.domain.entity.RealTimeDataVehicle import com.flightfeather.uav.domain.mapper.RealTimeDataVehicleMapper import com.flightfeather.uav.lightshare.service.RealTimeDataService import com.flightfeather.uav.repository.impl.AirDataRepositoryImpl import com.flightfeather.uav.domain.repository.impl.AirDataRepImpl import org.junit.Test import org.junit.runner.RunWith @@ -24,7 +24,7 @@ lateinit var realTimeDataVehicleMapper: RealTimeDataVehicleMapper @Autowired lateinit var airDataRepository: AirDataRepositoryImpl lateinit var airDataRepository: AirDataRepImpl @Test fun outToExcel() {