|
|
|
|
|
|
|
|
package com.tuoheng.admin.controller; |
|
|
package com.tuoheng.admin.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
import com.tuoheng.admin.dto.InspectionDto; |
|
|
import com.tuoheng.admin.dto.InspectionDto; |
|
|
import com.tuoheng.admin.entity.FlightData; |
|
|
import com.tuoheng.admin.entity.FlightData; |
|
|
import com.tuoheng.admin.query.InspectionFileQuery; |
|
|
|
|
|
import com.tuoheng.admin.request.inspection.*; |
|
|
|
|
|
|
|
|
import com.tuoheng.admin.request.inspection.AddInspectionRequest; |
|
|
|
|
|
import com.tuoheng.admin.request.inspection.EditInspectionRequest; |
|
|
|
|
|
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest; |
|
|
import com.tuoheng.admin.service.inspection.IInspectionService; |
|
|
import com.tuoheng.admin.service.inspection.IInspectionService; |
|
|
import com.tuoheng.common.core.common.OperationEnum; |
|
|
|
|
|
import com.tuoheng.common.core.utils.JsonResult; |
|
|
import com.tuoheng.common.core.utils.JsonResult; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 巡检任务前端控制器 |
|
|
* 巡检任务前端控制器 |
|
|
* |
|
|
* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据机场id查询任务 |
|
|
* 根据机场id查询任务 |
|
|
|
|
|
* |
|
|
* @param dto |
|
|
* @param dto |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/listByAirportId") |
|
|
@GetMapping("/listByAirportId") |
|
|
public JsonResult getListByAirportId(InspectionDto dto){ |
|
|
|
|
|
|
|
|
public JsonResult getListByAirportId(InspectionDto dto) { |
|
|
return iInspectionService.getListByAirportId(dto); |
|
|
return iInspectionService.getListByAirportId(dto); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据id获取任务视频回放和直播 |
|
|
* 根据id获取任务视频回放和直播 |
|
|
|
|
|
* |
|
|
* @param id |
|
|
* @param id |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/videoById/{id}") |
|
|
@GetMapping("/videoById/{id}") |
|
|
public JsonResult videoById(@PathVariable("id") String id){ |
|
|
|
|
|
|
|
|
public JsonResult videoById(@PathVariable("id") String id) { |
|
|
return iInspectionService.getVideoById(id); |
|
|
return iInspectionService.getVideoById(id); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取飞行轨迹 |
|
|
* 获取飞行轨迹 |
|
|
|
|
|
* |
|
|
* @param id |
|
|
* @param id |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/findFlightData/{id}") |
|
|
@GetMapping("/findFlightData/{id}") |
|
|
public JsonResult finFlightData(@PathVariable("id") String id){ |
|
|
|
|
|
|
|
|
public JsonResult finFlightData(@PathVariable("id") String id) { |
|
|
return iInspectionService.findFlightData(id); |
|
|
return iInspectionService.findFlightData(id); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据巡检id查询最新一条遥测数据 |
|
|
* 根据巡检id查询最新一条遥测数据 |
|
|
|
|
|
* |
|
|
* @param inspectionId |
|
|
* @param inspectionId |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/getFlightDataByInspectionId") |
|
|
@GetMapping("/getFlightDataByInspectionId") |
|
|
public FlightData getFlightDataByInspectionId(@RequestParam("inspectionId") String inspectionId){ |
|
|
|
|
|
|
|
|
public FlightData getFlightDataByInspectionId(@RequestParam("inspectionId") String inspectionId) { |
|
|
return iInspectionService.getFlightDataByInspectionId(inspectionId); |
|
|
return iInspectionService.getFlightDataByInspectionId(inspectionId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 被硬件调用,存任务状态 |
|
|
|
|
|
*/ |
|
|
|
|
|
@PutMapping("/status") |
|
|
|
|
|
public JsonResult updateStatus(@RequestBody @Valid MissionStatusRequest missionStatusRequest) { |
|
|
|
|
|
log.info("被硬件调用,存任务状态:{}", JSONObject.toJSONString(missionStatusRequest)); |
|
|
|
|
|
return iInspectionService.updateStatus(missionStatusRequest); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 被硬件调用,存飞行轨迹 |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping("/track") |
|
|
|
|
|
public OperationEnum track(@RequestBody @Valid InspectionRequest inspectionRequest) { |
|
|
|
|
|
log.info("被硬件调用,存飞行轨迹:{}", JSONObject.toJSONString(inspectionRequest)); |
|
|
|
|
|
return iInspectionService.track(inspectionRequest); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 重新提交巡检任务 |
|
|
* 重新提交巡检任务 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 立即执行 |
|
|
* 立即执行 |
|
|
|
|
|
* |
|
|
* @param id |
|
|
* @param id |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 根据用户id获取最新的五条任务信息 |
|
|
* 根据用户id获取最新的五条任务信息 |
|
|
|
|
|
* |
|
|
* @param |
|
|
* @param |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/getNewInspectionList") |
|
|
@GetMapping("/getNewInspectionList") |
|
|
public JsonResult getNewInspectionList(){ |
|
|
|
|
|
|
|
|
public JsonResult getNewInspectionList() { |
|
|
return iInspectionService.getNewInspectionList(); |
|
|
return iInspectionService.getNewInspectionList(); |
|
|
} |
|
|
} |
|
|
|
|
|
|