feiyu02
2024-12-16 b3e273990fda27b68dfcf2c7f9d78311a5279885
src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRep.kt
@@ -48,37 +48,6 @@
                }
            }
        }
//        var result = listOf<BaseRealTimeData>()
//        when (deviceType) {
//            UWDeviceType.VEHICLE -> {
//                result = realTimeDataVehicleMapper.selectByExample(Example(RealTimeDataVehicle::class.java).apply {
//                    getSecondDataExample(this, deviceCode, sTime, eTime)
//                })
//            }
//            UWDeviceType.UAV -> {
//                result = realTimeDataUavMapper.selectByExample(Example(RealTimeDataUav::class.java).apply {
//                    getSecondDataExample(this, deviceCode, sTime, eTime)
//                })
//            }
//            UWDeviceType.GRID -> {
//                // 网格化监测秒级值
//                result = if (type == null || type == 0) {
//                    realTimeDataGridMapper.selectByExample(Example(RealTimeDataGrid::class.java).apply {
//                        getSecondDataExample(this, deviceCode, sTime, eTime)
//                    })
//                }
//                // 网格化监测分钟值
//                else {
//                    realTimeDataGridMinMapper.selectByExample(Example(RealTimeDataGridMin::class.java).apply {
//                        getSecondDataExample(this, deviceCode, sTime, eTime)
//                    })
//                }
//            }
//            else -> Unit
//        }
//        return result
    }
    fun fetchData(mission: Mission) =
@@ -87,13 +56,6 @@
    fun saveData(deviceType: UWDeviceType?, data: List<BaseRealTimeData>, type: Int? = 0): Int {
        return delegate.insertByDeviceType(deviceType, type, data)
//        return when (deviceType) {
//            UWDeviceType.UAV -> realTimeDataUavMapper.insertList(data as List<RealTimeDataUav>)
//            UWDeviceType.VEHICLE -> realTimeDataVehicleMapper.insertList(data as List<RealTimeDataVehicle>)
//            UWDeviceType.GRID -> realTimeDataGridMapper.insertList(data as List<RealTimeDataGrid>)
//            UWDeviceType.BOAT -> 0
//            else -> 0
//        }
    }
    fun deleteData(mission: Mission, type: Int? = 0): Int {