| | |
| | | import com.flightfeather.uav.domain.mapper.MissionMapper |
| | | import com.flightfeather.uav.domain.repository.* |
| | | import com.flightfeather.uav.lightshare.bean.AreaVo |
| | | import com.flightfeather.uav.lightshare.bean.DataHead |
| | | import com.flightfeather.uav.lightshare.bean.GridDataDetailMixVo |
| | | import com.flightfeather.uav.lightshare.bean.SourceTraceMsgVo |
| | | import com.flightfeather.uav.lightshare.eunm.PollutionDegree |
| | | import com.flightfeather.uav.lightshare.eunm.SceneType |
| | | import com.flightfeather.uav.lightshare.service.DataAnalysisService |
| | | import com.flightfeather.uav.lightshare.service.SatelliteDataCalculateService |
| | | import com.flightfeather.uav.socket.eunm.FactorType |
| | | import com.flightfeather.uav.socket.sender.MsgType |
| | | import com.github.pagehelper.PageHelper |
| | | import org.springframework.stereotype.Service |
| | | import java.util.* |
| | | |
| | |
| | | * @return 历史污染溯源结果的JSON字符串,具体格式由sourceTraceRep实现决定 |
| | | * @throws BizException 当走航任务不存在时抛出 |
| | | */ |
| | | override fun fetchHistory(missionCode: String, minPer: Double?): String { |
| | | override fun fetchHistory(missionCode: String, minPer: Double?, page: Int?, perPage: Int?): Pair<DataHead, String> { |
| | | val mission = missionRep.findOne(missionCode) ?: throw BizException("走航任务不存在") |
| | | |
| | | val p = if (page != null && perPage != null) { |
| | | PageHelper.startPage<SourceTraceMsgVo>(page, perPage) |
| | | } else { |
| | | null |
| | | } |
| | | val res = sourceTraceRep.fetchList(mission.deviceCode, mission.startTime, mission.endTime, minPer = minPer ?: 0.5) |
| | | return GsonUtils.gson.toJson(res) |
| | | return DataHead(p?.pageNum ?: 1, p?.pages ?: 1) to GsonUtils.gson.toJson(res) |
| | | } |
| | | |
| | | /** |