//如果调用DSP失败就直接失败! | //如果调用DSP失败就直接失败! | ||||
log.error("调用DSP数据失败:{}",e.getMessage()); | log.error("调用DSP数据失败:{}",e.getMessage()); | ||||
thMissionUpdate.setStatus(TaskStatusEnum.FAIL.getCode()); | thMissionUpdate.setStatus(TaskStatusEnum.FAIL.getCode()); | ||||
thMissionMapper.updateById(thMissionUpdate); | |||||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(),"任务分析失败!"); | throw new ServiceException(HttpStatus.BAD_REQUEST.value(),"任务分析失败!"); | ||||
} | } | ||||
return thMissionMapper.updateById(thMissionUpdate) > 0; | return thMissionMapper.updateById(thMissionUpdate) > 0; | ||||
}else { | }else { | ||||
log.error("dsp实时调用失败:{}", responseJson); | log.error("dsp实时调用失败:{}", responseJson); | ||||
thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); | thMissionUpdate.setAnalyseStatus(AiAnalyseStatusEnum.FAILED.getCode()); | ||||
result=false; | |||||
thMissionMapper.updateById(thMissionUpdate); | thMissionMapper.updateById(thMissionUpdate); | ||||
} | } | ||||
return result; | return result; |
.like(ObjectUtil.isNotEmpty(query.getMissionName()), Question::getMissionName, query.getMissionName()) | .like(ObjectUtil.isNotEmpty(query.getMissionName()), Question::getMissionName, query.getMissionName()) | ||||
.between((ObjectUtil.isNotEmpty(query.getStartTime()) && ObjectUtil.isNotEmpty(query.getEndTime())), Question::getCreateTime, query.getStartTime(), query.getEndTime()) | .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.getType()), Question::getType, query.getType()) | ||||
.eq(ObjectUtil.isNotEmpty(query.getStatus()), Question::getStatus, query.getStatus()) | |||||
.eq(Question::getStatus, QuestionStatusEnum.CONFIRM.getCode()) | |||||
//.eq(Question::getTenantId, ShiroUtils.getTenantId()) | //.eq(Question::getTenantId, ShiroUtils.getTenantId()) | ||||
.eq(Question::getMark, MarkTypeEnum.VALID.getCode()).orderByDesc(Question::getCreateTime)); | .eq(Question::getMark, MarkTypeEnum.VALID.getCode()).orderByDesc(Question::getCreateTime)); | ||||
} | } |
<select id="analyze" resultType="com.tuoheng.admin.entity.vo.QuestionCountVO"> | <select id="analyze" resultType="com.tuoheng.admin.entity.vo.QuestionCountVO"> | ||||
select q.status,count(q.id) as quantity | select q.status,count(q.id) as quantity | ||||
from th_question q | from th_question q | ||||
left join th_question_type qt on q.type=qt.id | |||||
where q.mission_id=#{missionId} and q.tenant_id=#{tenantId} | |||||
where q.mission_id=#{missionId} | |||||
group by q.status; | group by q.status; | ||||
</select> | </select> | ||||
<select id="analyzeType" resultType="com.tuoheng.admin.entity.vo.QuestionTypeCountVO"> | <select id="analyzeType" resultType="com.tuoheng.admin.entity.vo.QuestionTypeCountVO"> |