feiyu02
2025-08-05 176d7d8283e66ccf63878c9ab823e900df94b748
src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
@@ -5,6 +5,7 @@
import com.flightfeather.uav.lightshare.bean.DataVo
import com.flightfeather.uav.socket.bean.AirData
import com.flightfeather.uav.socket.eunm.FactorType
import java.io.Serializable
import java.math.BigDecimal
import java.time.LocalDateTime
import java.time.ZoneId
@@ -21,7 +22,7 @@
/**
 * 实时监测数据基类
 */
open class BaseRealTimeData {
open class BaseRealTimeData : Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    var id: Int? = null
@@ -277,7 +278,9 @@
    }
    return RealTimeDataGridMin().apply {
        val time = LocalDateTime.ofInstant(get(0).dataTime?.toInstant(), ZoneId.systemDefault()).withSecond(0)
        val time = LocalDateTime
            .ofInstant(get(0).dataTime?.toInstant() ?: Date().toInstant(), ZoneId.systemDefault())
            .withSecond(0)
        deviceCode = get(0).deviceCode
        dataTime = Date.from(time.atZone(ZoneId.systemDefault()).toInstant())
        createTime = dataTime