| | |
| | | package com.flightfeather.uav.biz.dataprocess |
| | | |
| | | import com.flightfeather.uav.domain.mapper.RealTimeDataMapper |
| | | import com.flightfeather.uav.domain.repository.SceneInfoRep |
| | | import com.flightfeather.uav.lightshare.bean.AreaVo |
| | | import com.flightfeather.uav.lightshare.service.RealTimeDataService |
| | | import org.junit.Test |
| | | import org.junit.runner.RunWith |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.boot.test.context.SpringBootTest |
| | | import org.springframework.test.context.junit4.SpringRunner |
| | | import org.springframework.web.context.ContextLoader |
| | | import java.time.LocalDateTime |
| | | import java.time.format.DateTimeFormatter |
| | | import java.util.* |
| | |
| | | val dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") |
| | | val s = sTime.format(dateFormatter) |
| | | val e = eTime.format(dateFormatter) |
| | | val data = realTimeDataService.getSecondData(deviceCode, s, e, 0, 1, 30000).data |
| | | val data = realTimeDataService.getSecondData(null, deviceCode, s, e, 0, 1, 30000).data |
| | | data?.let { |
| | | process.process(it) |
| | | } |
| | |
| | | process.outPutDailyVariation() |
| | | process.done() |
| | | } |
| | | |
| | | @Test |
| | | fun foo2() { |
| | | ContextLoader.getCurrentWebApplicationContext()?.getBean(SceneInfoRep::class.java)?.run { |
| | | val res = this.findByArea(AreaVo().apply { sceneTypeId = "20" }) |
| | | res.forEach { println(it?.name) } |
| | | } |
| | | } |
| | | } |