Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_air_monitor into develop

tags/V1.0.1^2
wanjing 1 year ago
parent
commit
3481d96551
5 changed files with 40 additions and 11 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryAirportMsgByIdService.java
  2. +1
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineCompleteService.java
  3. +17
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java
  4. +0
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/user/query/QueryUserPageListService.java
  5. +21
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryAirportMsgByIdService.java View File

Object obj = redisUtils.get(inspectionId); Object obj = redisUtils.get(inspectionId);
FlightData flightData = null; FlightData flightData = null;
if (ObjectUtil.isNull(obj)) { if (ObjectUtil.isNull(obj)) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
return JsonResult.success("当前任务状态不是飞行中,无数据信息");
} else { } else {
flightData = (FlightData) obj; flightData = (FlightData) obj;
} }

+ 1
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineCompleteService.java View File

@Autowired @Autowired
private BusinessMapper businessMapper; private BusinessMapper businessMapper;


@Autowired
private DeliverStreamingService deliverStreamingService;



@Autowired @Autowired
@Qualifier("restTemplate") @Qualifier("restTemplate")
} }
} }
} finally { } finally {
// 释放小程序选择的通道
deliverStreamingService.deliver(channel.getChannelCode());
} }
} }
} }

+ 17
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java View File

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.domain.Inspection; import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.domain.LiveChannel;
import com.tuoheng.admin.entity.domain.Report; import com.tuoheng.admin.entity.domain.Report;
import com.tuoheng.admin.enums.TaskStatusEnum; import com.tuoheng.admin.enums.TaskStatusEnum;
import com.tuoheng.admin.mapper.InspectionMapper; import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.LiveChannelMapper;
import com.tuoheng.admin.mapper.ReportMapper; import com.tuoheng.admin.mapper.ReportMapper;
import com.tuoheng.admin.entity.request.inspection.UpdateTaskByCodeRequest; import com.tuoheng.admin.entity.request.inspection.UpdateTaskByCodeRequest;
import com.tuoheng.common.core.exception.ServiceException; import com.tuoheng.common.core.exception.ServiceException;
@Autowired @Autowired
private ReportMapper reportMapper; private ReportMapper reportMapper;


@Autowired
private LiveChannelMapper liveChannelMapper;

@Autowired @Autowired
private OnlineIdentifService onlineIdentifService; private OnlineIdentifService onlineIdentifService;


@Autowired @Autowired
private OffLineCompleteService offLineCompleteService; private OffLineCompleteService offLineCompleteService;


@Autowired
private DeliverStreamingService deliverStreamingService;

/** /**
* 修改任务(修改任务状态和飞手信息) * 修改任务(修改任务状态和飞手信息)
* *
log.info("修改任务状态和飞手信息业务接口:直播状态,飞行完成修改状态为待关闭"); log.info("修改任务状态和飞手信息业务接口:直播状态,飞行完成修改状态为待关闭");
onlineCompleteService.handle(inspection); onlineCompleteService.handle(inspection);
} }
//成功 超时 失败
if(4 == inspection.getAnalyseStatus() || 5 == inspection.getAnalyseStatus() || 6 == inspection.getAnalyseStatus()){
LiveChannel liveChannel = liveChannelMapper.selectOne(Wrappers.<LiveChannel>lambdaQuery()
.eq(LiveChannel::getInspectionId, inspection.getId())
.eq(LiveChannel::getMark, 1));
//释放小程序选择的通道
if(null != liveChannel)
deliverStreamingService.deliver(liveChannel.getChannelCode());
}
return JsonResult.success(); return JsonResult.success();
} }



+ 0
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/system/user/query/QueryUserPageListService.java View File

} }
} }
} }
//对list排序
userPageListVoList = userPageListVoList.stream().sorted(Comparator.comparing(UserPageListVo::getCreateTime).reversed()).collect(Collectors.toList());
return userPageListVoList; return userPageListVoList;
} }



+ 21
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java View File

import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.entity.domain.Business;
import com.tuoheng.admin.entity.domain.FlightData;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.domain.QuestionType;
import com.tuoheng.admin.entity.domain.*;
import com.tuoheng.admin.enums.*; import com.tuoheng.admin.enums.*;
import com.tuoheng.admin.mapper.*; import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.entity.request.third.DspCallbackRequest; import com.tuoheng.admin.entity.request.third.DspCallbackRequest;
import com.tuoheng.admin.entity.request.third.QuestionFile; import com.tuoheng.admin.entity.request.third.QuestionFile;
import com.tuoheng.admin.service.inspection.update.flyer.DeliverStreamingService;
import com.tuoheng.common.core.config.common.CommonConfig; import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.exception.ServiceException; import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.*; import com.tuoheng.common.core.utils.*;
@Autowired @Autowired
private QuestionTypeMapper questionTypeMapper; private QuestionTypeMapper questionTypeMapper;


@Autowired
private LiveChannelMapper liveChannelMapper;

@Autowired
private DeliverStreamingService deliverStreamingService;

/** /**
* 保存DSP回调数据 * 保存DSP回调数据
* *
log.info("任务不存在"); log.info("任务不存在");
throw new ServiceException(0, "巡检任务不存在"); throw new ServiceException(0, "巡检任务不存在");
} }
// 巡检任务ID
String inspectionId = inspection.getId();
log.info("巡检任务查询成功,分析状态为:{}", dspCallbackRequest.getAnalyseStatus()); log.info("巡检任务查询成功,分析状态为:{}", dspCallbackRequest.getAnalyseStatus());
// 分析状态处理: 5:waiting(等待)、10:running(分析中)、15:success(分析完成)、20:timeout(成功超时)、25:failed(分析失败) // 分析状态处理: 5:waiting(等待)、10:running(分析中)、15:success(分析完成)、20:timeout(成功超时)、25:failed(分析失败)
if (dspCallbackRequest.getAnalyseStatus().equals(5)) { if (dspCallbackRequest.getAnalyseStatus().equals(5)) {
log.info("飞行坐标大小:{}", flightDataList.size()); log.info("飞行坐标大小:{}", flightDataList.size());
} }
} }
//释放通道
if (4 == inspection.getAnalyseStatus() || 5 == inspection.getAnalyseStatus() || 6 == inspection.getAnalyseStatus()) {

LiveChannel liveChannel = liveChannelMapper.selectOne(Wrappers.<LiveChannel>lambdaQuery()
.eq(LiveChannel::getInspectionId, inspectionId)
.eq(LiveChannel::getMark, 1));
// 释放小程序选择的通道
if(null != liveChannel)
deliverStreamingService.deliver(liveChannel.getChannelCode());
}

return JsonResult.success(); return JsonResult.success();
} }



Loading…
Cancel
Save