Browse Source

修改DSP地址

tags/v1.1.0
qiujinyang 2 years ago
parent
commit
11c2cb98c4
4 changed files with 21 additions and 13 deletions
  1. +2
    -2
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  2. +4
    -4
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/MissionStatusRequest.java
  3. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/IThInspectionService.java
  4. +14
    -6
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java

+ 2
- 2
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

@@ -72,8 +72,8 @@ public class InspectionController {
@GetMapping("/line/track/{missionId}")
@ApiOperation(value = "获取飞行轨迹", notes = "获取飞行轨迹")
@ApiImplicitParam(name="id",value = "任务的Id,missionId")
public JsonResult<List<InspectionVO>> lineTrack(@PathVariable("missionId") Integer id) {
return JsonResult.success(inspectionService.lineTrack(id));
public JsonResult lineTrack(@PathVariable("missionId") Integer missionId) {
return JsonResult.success(inspectionService.lineTrack(missionId));
}



+ 4
- 4
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/MissionStatusRequest.java View File

@@ -21,12 +21,12 @@ public class MissionStatusRequest {
@ApiModelProperty(value = "巡检任务ID不能为空")
private Integer id;

@NotNull(message = "视频推流地址不能为空!")
@ApiModelProperty(value = "视频推流地址不能为空")
//@NotNull(message = "视频推流地址不能为空!")
@ApiModelProperty(value = "视频推流地址")
private String pushUrl;

@NotNull(message = "视频拉流地址不能为空!")
@ApiModelProperty(value = "视频拉流地址不能为空")
//@NotNull(message = "视频拉流地址不能为空!")
@ApiModelProperty(value = "视频拉流地址")
private String pullUrl;

@ApiModelProperty(value = "任务状态1待执行 2执行中")

+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/IThInspectionService.java View File

@@ -30,5 +30,5 @@ public interface IThInspectionService extends IBaseService<ThInspection> {

AirWeatherVO getWeather(Integer airportId);

List<InspectionVO> lineTrack(Integer id);
JsonResult lineTrack(Integer missionId);
}

+ 14
- 6
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ThInspectionServiceImpl.java View File

@@ -152,14 +152,22 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper,
}

@Override
public List<InspectionVO> lineTrack(Integer id) {
//解析标准srt文件里面的坐标,调用硬件接口,返回数据



public JsonResult lineTrack(Integer missionId) {

ThMission thMission = missionMapper.selectById(missionId);
Assert.notNull(thMission,"任务不能为空!");
Integer taskId=Integer.valueOf(thMission.getInspectionLine());
//解析标准srt文件里面的坐标,调用硬件接口,返回数据
String url = CommonConfig.airportUrl + "/api/airportInterface/getLocationById";
String param="id="+taskId;
String airportLine = HttpUtils.sendGet(url, param);
JsonResult jsonResult = JacksonUtil.json2pojo(airportLine, JsonResult.class);
if(ObjectUtil.isEmpty(jsonResult) || Objects.requireNonNull(jsonResult).getCode() != 0) {
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取标准航线信息失败,请重试");
}

return null;
System.out.println(jsonResult.getData().toString());
return jsonResult;
}



Loading…
Cancel
Save