Browse Source

去掉问题和报告的租户

tags/v1.1.0
qiujinyang 2 years ago
parent
commit
30baf1d514
3 changed files with 17 additions and 8 deletions
  1. +15
    -6
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/MissionServiceImpl.java
  2. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java
  3. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java

+ 15
- 6
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/MissionServiceImpl.java View File

@@ -107,12 +107,20 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi
Assert.notNull(thMission, "飞行任务不能为空!");
ThMission thMissionUpdate = setStatus(missionStatusRequest, thMission,AirPortTaskStatusEnum.FLIGHT);
//开始分析
JSONObject jsonObject = startAI(missionStatusRequest);
thMissionUpdate.setRequestId(jsonObject.getJSONObject("data").getString("requestId"));
thMissionUpdate.setAipullUrl(jsonObject.getJSONObject("data").getString("aipullUrl"));
thMissionUpdate.setAipushUrl(jsonObject.getJSONObject("data").getString("aipushUrl"));
thMissionUpdate.setPlayUrl(jsonObject.getJSONObject("data").getString("playUrl"));
thMissionUpdate.setAiplayUrl(jsonObject.getJSONObject("data").getString("aiplayUrl"));
try {
JSONObject jsonObject = startAI(missionStatusRequest);
thMissionUpdate.setRequestId(jsonObject.getJSONObject("data").getString("requestId"));
thMissionUpdate.setAipullUrl(jsonObject.getJSONObject("data").getString("aipullUrl"));
thMissionUpdate.setAipushUrl(jsonObject.getJSONObject("data").getString("aipushUrl"));
thMissionUpdate.setPlayUrl(jsonObject.getJSONObject("data").getString("playUrl"));
thMissionUpdate.setAiplayUrl(jsonObject.getJSONObject("data").getString("aiplayUrl"));

}catch (ServiceException e){
//如果调用DSP失败就直接失败!
log.error("调用DSP数据失败:{}",e.getMessage());
thMissionUpdate.setStatus(TaskStatusEnum.FAIL.getCode());
throw new ServiceException(HttpStatus.BAD_REQUEST.value(),"任务分析失败!");
}
return thMissionMapper.updateById(thMissionUpdate) > 0;
}else if(AirPortTaskStatusEnum.WAIT.getCode()==missionStatusRequest.getStatus()){
//硬件停止后,停止AI分析
@@ -166,6 +174,7 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi
ThMission thMission = getRecentlyRecord(missionStatusRequest,TaskStatusEnum.FLIGHT.getCode());
Assert.notNull(thMission, "飞行任务不能为空!");
ThMission thMissionUpdate = setStatus(missionStatusRequest, thMission,AirPortTaskStatusEnum.WAIT);
thMissionUpdate.setExecutionEndTime(new Date());
boolean result=false;
if(thMissionMapper.updateById(thMissionUpdate) > 0){
//任务调用完成之后,调用发送通道,请求DSP关闭请求

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

@@ -65,7 +65,7 @@ public class QuestionServiceImpl extends BaseServiceImpl<QuestionMapper, Questio
.between((ObjectUtil.isNotEmpty(query.getStartTime()) && ObjectUtil.isNotEmpty(query.getEndTime())),Question::getCreateTime,query.getStartTime(),query.getEndTime())
.eq(ObjectUtil.isNotEmpty(query.getType()), Question::getType, query.getType())
.eq(ObjectUtil.isNotEmpty(query.getStatus()), Question::getStatus, query.getStatus())
.eq(Question::getTenantId, ShiroUtils.getTenantId())
//.eq(Question::getTenantId, ShiroUtils.getTenantId())
.eq(Question::getMark, MarkTypeEnum.VALID.getCode()).orderByDesc(Question::getCreateTime));
return pageData;
}

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

@@ -128,7 +128,7 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp
.eq(StringUtils.isNotEmpty(request.getAirportId()), Report::getAirportId, request.getAirportId())
.eq(ObjectUtil.isNotEmpty(request.getType()), Report::getType, request.getType())
.eq(Report::getMark, MarkTypeEnum.VALID.getCode())
.eq(Report::getTenantId, ShiroUtils.getTenantId())
//.eq(Report::getTenantId, ShiroUtils.getTenantId())
.orderByDesc(Report::getCreateTime));
return JsonResult.success(pageData);
}

Loading…
Cancel
Save