riku
2021-10-09 01ac08186355e85cab4a7c6f4403180184894f23
src/main/kotlin/com/flightfeather/uav/domain/entity/ExpandFun.kt
@@ -3,6 +3,7 @@
import com.flightfeather.uav.common.utils.DateUtil
import com.flightfeather.uav.common.utils.GsonUtils
import com.flightfeather.uav.socket.bean.AirData
import com.flightfeather.uav.socket.eunm.FactorType
/**
 * 数据库表实体扩展方法
@@ -15,9 +16,11 @@
    list.add("纬度")
    val values = GsonUtils.parserJsonToArrayBeans(factors, AirData::class.java)
    values.forEach {
        val name = it.factorName ?: ""
        list.add(name)
        list.add("$name(物理量)")
        if (FactorType.outputFactor(it.factorName)) {
            val name = it.factorName ?: ""
            list.add(name)
//            list.add("$name(物理量)")
        }
    }
    return list.toTypedArray()
}
@@ -38,8 +41,10 @@
    }
    val values = GsonUtils.parserJsonToArrayBeans(factors, AirData::class.java)
    values.forEach {
        row.add(it.factorData ?: -1.0)
        row.add(it.physicalQuantity ?: -1.0)
        if (FactorType.outputFactor(it.factorName)) {
            row.add(it.factorData ?: -1.0)
//            row.add(it.physicalQuantity ?: -1.0)
        }
    }
    return row.toTypedArray()
}