@@ -4,10 +4,8 @@ import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.enums.TaskStatusEnum; | |||
import com.tuoheng.admin.mapper.InspectionFileMapper; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.request.inspection.UpdateTaskByCodeRequest; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.common.core.exception.ServiceException; | |||
import com.tuoheng.common.core.utils.JacksonUtil; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
@@ -112,8 +110,8 @@ public class UpdateFlyerService { | |||
} | |||
// 检查任务是否存在 | |||
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() | |||
.eq(Inspection::getCode, request.getTaskCode()) | |||
.eq(Inspection::getMark, 1)); | |||
.eq(Inspection::getCode, request.getTaskCode()) | |||
.eq(Inspection::getMark, 1)); | |||
if (inspection == null) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "当前任务不存在"); | |||
} |
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.entity.Business; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.entity.LiveChannel; | |||
import com.tuoheng.admin.enums.InspectionStatusEnum; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.TaskStatusEnum; | |||
import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum; | |||
@@ -56,8 +57,7 @@ public class UpdateFlightStatusService { | |||
if (0 != result.getCode()) { | |||
//如果调用DSP失败就直接失败! | |||
log.info("修改任务状态业务接口:调用DSP数据失败:{}", result.getMsg()); | |||
inspectionUpdate.setStatus(TaskStatusEnum.FAIL.getCode()); | |||
inspectionUpdate.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode()); | |||
inspectionMapper.updateById(inspectionUpdate); | |||
return result; | |||
} | |||
@@ -65,7 +65,7 @@ public class UpdateFlightStatusService { | |||
DspCallbackVo dspCallbackVo = JSON.toJavaObject(jsonObject.getJSONObject("data"), DspCallbackVo.class); | |||
log.info("dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackVo)); | |||
inspectionUpdate.setStatus(TaskStatusEnum.INFLIGHT.getCode()); | |||
inspectionUpdate.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); | |||
inspectionMapper.updateById(inspectionUpdate); | |||
// 处理通道数据 |
@@ -1,34 +1,18 @@ | |||
package com.tuoheng.admin.service.inspection.update.status; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.alibaba.fastjson.JSON; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.conver.InspectionConverMapper; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.enums.AirPortTaskStatusEnum; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.TaskStatusEnum; | |||
import com.tuoheng.admin.enums.code.dept.AddDeptCodeEnum; | |||
import com.tuoheng.admin.enums.code.inspection.EditInspectionCodeEnum; | |||
import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum; | |||
import com.tuoheng.admin.mapper.*; | |||
import com.tuoheng.admin.request.inspection.EditInspectionRequest; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.request.inspection.MissionStatusRequest; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.admin.vo.DspCallbackVo; | |||
import com.tuoheng.common.core.utils.DateUtils; | |||
import com.tuoheng.common.core.utils.JacksonUtil; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import com.tuoheng.common.core.utils.StringUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.http.HttpStatus; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
/** | |||
* 修改任务状态业务层处理 | |||
* |
@@ -188,7 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
left join th_inspection ti on tif.inspection_id = ti.id | |||
<where> | |||
<if test="1 == 1"> and tif.mark = 1 </if> | |||
<if test="request.key != null and request.key != 0"> and (ti.code like concat('%', #{request.key}, '%') or ti.name like concat('%', #{request.key}, '%')) </if> | |||
<if test="request.key != null and request.key != ''"> and (ti.code like concat('%', #{request.key}, '%') or ti.name like concat('%', #{request.key}, '%')) </if> | |||
<if test="request.questionCode != null and request.questionCode != ''"> and tif.question_Code = #{request.questionCode} </if> | |||
<if test="request.status != null"> | |||
<choose> |