Browse Source

机场回调,播放地址存入通道表

pull/83/head
wanjing 10 months ago
parent
commit
977e4310f9
2 changed files with 13 additions and 14 deletions
  1. +10
    -10
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java
  2. +3
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java

+ 10
- 10
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java View File

log.info("修改inspection status 结束"); log.info("修改inspection status 结束");


// 处理通道数据 // 处理通道数据
// this.liveChannelHandle(inspection, vo);
this.liveChannelHandle(inspection, missionStatusRequest);


// 将请求id和业务id消息存入数据库,用于监听获取任务信息 // 将请求id和业务id消息存入数据库,用于监听获取任务信息
this.businessHandle(inspection, vo); this.businessHandle(inspection, vo);
* 处理通道数据 * 处理通道数据
* *
* @param inspection * @param inspection
* @param dspCallbackVo
* @param missionStatusRequest
*/ */
private void liveChannelHandle(Inspection inspection, DspCallbackRecordVo dspCallbackVo) {
private void liveChannelHandle(Inspection inspection, MissionStatusRequest missionStatusRequest) {
log.info("进入处理通道数据方法"); log.info("进入处理通道数据方法");
// 通道表新增 // 通道表新增
LiveChannel liveChannel = this.buildLiveChannel(inspection, dspCallbackVo);
LiveChannel liveChannel = this.buildLiveChannel(inspection, missionStatusRequest);
// 查验是否存在 // 查验是否存在
LiveChannel liveChannelQuery = liveChannelMapper.selectOne(new LambdaQueryWrapper<LiveChannel>() LiveChannel liveChannelQuery = liveChannelMapper.selectOne(new LambdaQueryWrapper<LiveChannel>()
.eq(LiveChannel::getInspectionId, inspection.getId()) .eq(LiveChannel::getInspectionId, inspection.getId())
} }
} }


private LiveChannel buildLiveChannel(Inspection inspection, DspCallbackRecordVo dspCallbackVo) {
private LiveChannel buildLiveChannel(Inspection inspection, MissionStatusRequest missionStatusRequest) {
LiveChannel liveChannel = new LiveChannel(); LiveChannel liveChannel = new LiveChannel();
liveChannel.setTenantId(inspection.getTenantId()); liveChannel.setTenantId(inspection.getTenantId());
liveChannel.setInspectionId(inspection.getId()); liveChannel.setInspectionId(inspection.getId());
liveChannel.setChannelCode("0"); liveChannel.setChannelCode("0");
// liveChannel.setPushUrl(dspCallbackVo.getPushUrl());
// liveChannel.setPullUrl(dspCallbackVo.getPlayUrl());
// liveChannel.setAipushUrl(dspCallbackVo.getAipushUrl());
// liveChannel.setAipullUrl(dspCallbackVo.getAiplayUrl());
// liveChannel.setPlayUrl(dspCallbackVo.getPlayUrl());
liveChannel.setAipushUrl("");
liveChannel.setAipullUrl("");
liveChannel.setPushUrl(missionStatusRequest.getPushUrl());
liveChannel.setPullUrl(missionStatusRequest.getPlayUrl());
liveChannel.setPlayUrl(missionStatusRequest.getPlayUrl());
return liveChannel; return liveChannel;
} }



+ 3
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetAirportDetailService.java View File

log.info("响应信息:{}", dataObject.toJSONString()); log.info("响应信息:{}", dataObject.toJSONString());
JSONObject wthJson = dataObject.getJSONObject("WTH"); JSONObject wthJson = dataObject.getJSONObject("WTH");
if (Objects.nonNull(wthJson)) { if (Objects.nonNull(wthJson)) {
log.info("参数信息:{}", wthJson.toJSONString());
// log.info("参数信息:{}", wthJson.toJSONString());
JSONObject parmJson = wthJson.getJSONObject("parmNew"); JSONObject parmJson = wthJson.getJSONObject("parmNew");
log.info("参数信息parmJson:{}", parmJson.toJSONString());
// log.info("参数信息parmJson:{}", parmJson.toJSONString());
vo.setWspd(parmJson.getString("WSPD") + "m/s") vo.setWspd(parmJson.getString("WSPD") + "m/s")
.setWdir(parmJson.getString("WDIRNAME")) .setWdir(parmJson.getString("WDIRNAME"))
.setHpa(parmJson.getString("Hpa") + "Mpa") .setHpa(parmJson.getString("Hpa") + "Mpa")
} }
if (Objects.nonNull(mountJson)) { if (Objects.nonNull(mountJson)) {
String strJson = mountJson.getString("mountEquipmentList"); String strJson = mountJson.getString("mountEquipmentList");

log.info("参数信息,strJson={}", strJson);
// log.info("参数信息,strJson={}", strJson);
if (StringUtils.isNotEmpty(strJson)) { if (StringUtils.isNotEmpty(strJson)) {
String mountEquipmentList = strJson; String mountEquipmentList = strJson;
if (StringUtils.isNotEmpty(mountEquipmentList)) { if (StringUtils.isNotEmpty(mountEquipmentList)) {

Loading…
Cancel
Save