From bf3bf9ff25ac106b556b2427cc382c8fcca63bff Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 02 七月 2024 17:38:33 +0800
Subject: [PATCH] 1. 新增走航报告自动道路识别模块

---
 src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt
index ae74aed..f90a5e6 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt
+++ b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/RealTimeDataServiceImpl.kt
@@ -1,19 +1,17 @@
 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
@@ -30,7 +28,6 @@
 import java.time.format.DateTimeFormatter
 import java.util.*
 import javax.servlet.http.HttpServletResponse
-import javax.swing.text.DateFormatter
 import kotlin.math.sqrt
 
 @Service
@@ -194,6 +191,7 @@
 
     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()
@@ -205,7 +203,7 @@
                 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
@@ -376,7 +374,7 @@
         val averageUtil = AverageUtil<RealTimeDataGridOpt, RealTimeDataGridMin>({ d ->
             minFormatter.format(d.dataTime)
         }, { list ->
-            list.avg()
+            list.avg() as RealTimeDataGridMin
         })
 
         while (total == -1 || page <= total) {

--
Gitblit v1.9.3