| | |
| | | return null |
| | | } |
| | | |
| | | fun setFactorData(type: FactorType, value: Double?) { |
| | | if (values == null) throw IllegalStateException(this.javaClass.name + ": 监测数据数组为null") |
| | | for (d in values!!) { |
| | | if (d.factorName == type.name) { |
| | | d.factorData = value |
| | | } |
| | | } |
| | | } |
| | | |
| | | fun toRowContent(): Array<Any> { |
| | | val row = mutableListOf<Any>() |
| | | row.add(deviceCode ?: "") |
| | |
| | | row.add(lng ?: -1.0) |
| | | row.add(lat ?: -1.0) |
| | | values?.forEach { |
| | | if (FactorType.outputFactor(it.factorName)) { |
| | | if (FactorType.isOutputFactor(it.factorName)) { |
| | | row.add(it.factorData ?: -1.0) |
| | | // row.add(it.physicalQuantity ?: -1.0) |
| | | } |
| | |
| | | list.add("经度") |
| | | list.add("纬度") |
| | | values?.forEach { |
| | | if (FactorType.outputFactor(it.factorName)) { |
| | | if (FactorType.isOutputFactor(it.factorName)) { |
| | | val name = it.factorName ?: "" |
| | | list.add(name) |
| | | // list.add("$name(物理量)") |