| | |
| | | package com.flightfeather.uav.lightshare.service.impl |
| | | |
| | | import com.flightfeather.uav.common.exception.ResponseErrorException |
| | | import com.flightfeather.uav.common.exception.BizException |
| | | import com.flightfeather.uav.common.scaleMap |
| | | import com.flightfeather.uav.common.utils.DateUtil |
| | | import com.flightfeather.uav.common.utils.ExcelUtil |
| | | import com.flightfeather.uav.common.utils.FileExchange |
| | | import com.flightfeather.uav.common.utils.GsonUtils |
| | | import com.flightfeather.uav.dataprocess.AverageUtil |
| | | import com.flightfeather.uav.biz.dataprocess.AverageUtil |
| | | import com.flightfeather.uav.domain.entity.* |
| | | import com.flightfeather.uav.domain.mapper.* |
| | | import com.flightfeather.uav.lightshare.bean.* |
| | | import com.flightfeather.uav.lightshare.service.RealTimeDataService |
| | | import com.flightfeather.uav.model.epw.EPWDataPrep |
| | | import com.flightfeather.uav.repository.AirDataRepository |
| | | import com.flightfeather.uav.socket.bean.AirData |
| | | import com.flightfeather.uav.socket.eunm.UWDeviceType |
| | | import com.github.pagehelper.PageHelper |
| | | import org.apache.poi.xssf.streaming.SXSSFWorkbook |
| | |
| | | import java.time.format.DateTimeFormatter |
| | | import java.util.* |
| | | import javax.servlet.http.HttpServletResponse |
| | | import javax.swing.text.DateFormatter |
| | | import kotlin.math.sqrt |
| | | |
| | | @Service |
| | |
| | | |
| | | override fun importJinanData(code: String, file: MultipartFile): DataImportResult { |
| | | val f = ByteArrayInputStream(file.bytes) |
| | | // val result = fileExchange.exchangeVehicleData(code, f) |
| | | val result = fileExchange.exchangeJinanData(code, f) |
| | | if (result.isNotEmpty()) { |
| | | val first = result.first() |
| | |
| | | deviceType = UWDeviceType.getType(code)?.value |
| | | deviceCode = code |
| | | } |
| | | missionMapper.selectOne(mission)?.run { throw ResponseErrorException("该设备该时段任务已存在,无法重复导入") } |
| | | missionMapper.selectOne(mission)?.run { throw BizException("该设备该时段任务已存在,无法重复导入") } |
| | | mission.apply { |
| | | startTime = first.dataTime |
| | | endTime = last.dataTime |