| | |
| | | import com.flightfeather.uav.lightshare.bean.DataVo |
| | | import com.flightfeather.uav.lightshare.service.RealTimeDataService |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook |
| | | import org.apache.poi.xssf.streaming.SXSSFWorkbook |
| | | import org.junit.Test |
| | | import org.junit.runner.RunWith |
| | | import org.springframework.beans.BeanUtils |
| | |
| | | val deviceCode = "0d0000000001" |
| | | |
| | | val epwModel = EPWModel() |
| | | var workbook: HSSFWorkbook? = null |
| | | var workbook: SXSSFWorkbook? = null |
| | | var out: FileOutputStream? = null |
| | | |
| | | for (i in timeSet.indices) { |
| | |
| | | var page = 1 |
| | | var totalPage = -1 |
| | | while (totalPage == -1 || page <= totalPage) { |
| | | realTimeDataService.getSecondData(deviceCode, it.first, it.second, page, 10000).apply { |
| | | realTimeDataService.getSecondData(deviceCode, it.first, it.second, page, 0, 10000).apply { |
| | | if (totalPage == -1) { |
| | | totalPage = head?.totalPage ?: 0 |
| | | } |
| | | |
| | | val dataList = data?: emptyList() |
| | | val dataList = data ?: emptyList() |
| | | |
| | | dataList.forEach { |
| | | if (it.lng == 0.0 && it.lat == 0.0) { |