| | |
| | | import com.flightfeather.uav.common.utils.ExcelUtil |
| | | import com.flightfeather.uav.common.utils.FileExchange |
| | | import com.flightfeather.uav.biz.dataprocess.AverageUtil |
| | | import com.flightfeather.uav.biz.dataprocess.TrackSegment |
| | | import com.flightfeather.uav.domain.entity.* |
| | | import com.flightfeather.uav.domain.mapper.* |
| | | import com.flightfeather.uav.domain.repository.MissionRep |
| | | import com.flightfeather.uav.domain.repository.RealTimeDataRep |
| | | import com.flightfeather.uav.lightshare.bean.* |
| | | import com.flightfeather.uav.lightshare.service.RealTimeDataService |
| | | import com.flightfeather.uav.model.epw.EPWDataPrep |
| | |
| | | private val realTimeDataGridOptMapper: RealTimeDataGridOptMapper, |
| | | private val realTimeDataGridMinMapper: RealTimeDataGridMinMapper, |
| | | private val missionMapper: MissionMapper, |
| | | private val missionRep: MissionRep, |
| | | private val realTimeDataRep: RealTimeDataRep, |
| | | ) : RealTimeDataService { |
| | | |
| | | @Value("\${filePath}") |
| | |
| | | example.orderBy("dataTime") |
| | | } |
| | | |
| | | override fun getSegmentData(missionCode: String): List<List<DataVo>> { |
| | | val mission = missionRep.findOne(missionCode) ?: throw BizException("任务不存在") |
| | | val data = realTimeDataRep.fetchData(mission) |
| | | return TrackSegment.segmentWithRoad(data).map { it.map { b -> b.toDataVo() } } |
| | | } |
| | | |
| | | override fun importData(file: MultipartFile): BaseResponse<DataImportResult> { |
| | | val f = ByteArrayInputStream(file.bytes) |
| | | fileExchange.exchangeBoatData("0c0000000001", f).forEach { |