| | |
| | | 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 |
| | | |
| | | /** |
| | | * 数据库表实体扩展方法 |
| | |
| | | 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() |
| | | } |
| | |
| | | } |
| | | 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() |
| | | } |