Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
09779e6bad
4 changed files with 8 additions and 26 deletions
  1. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/UpdateFlyerService.java
  2. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java
  3. +2
    -18
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml

+ 2
- 4
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.tuoheng.admin.entity.Inspection; import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.enums.TaskStatusEnum; import com.tuoheng.admin.enums.TaskStatusEnum;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper; import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.request.inspection.UpdateTaskByCodeRequest; 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.exception.ServiceException;
import com.tuoheng.common.core.utils.JacksonUtil; import com.tuoheng.common.core.utils.JacksonUtil;
import com.tuoheng.common.core.utils.JsonResult; import com.tuoheng.common.core.utils.JsonResult;
} }
// 检查任务是否存在 // 检查任务是否存在
Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() 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) { if (inspection == null) {
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "当前任务不存在"); throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "当前任务不存在");
} }

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

import com.tuoheng.admin.entity.Business; import com.tuoheng.admin.entity.Business;
import com.tuoheng.admin.entity.Inspection; import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.entity.LiveChannel; import com.tuoheng.admin.entity.LiveChannel;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.MarkTypeEnum; import com.tuoheng.admin.enums.MarkTypeEnum;
import com.tuoheng.admin.enums.TaskStatusEnum; import com.tuoheng.admin.enums.TaskStatusEnum;
import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum; import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum;
if (0 != result.getCode()) { if (0 != result.getCode()) {
//如果调用DSP失败就直接失败! //如果调用DSP失败就直接失败!
log.info("修改任务状态业务接口:调用DSP数据失败:{}", result.getMsg()); log.info("修改任务状态业务接口:调用DSP数据失败:{}", result.getMsg());

inspectionUpdate.setStatus(TaskStatusEnum.FAIL.getCode());
inspectionUpdate.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode());
inspectionMapper.updateById(inspectionUpdate); inspectionMapper.updateById(inspectionUpdate);
return result; return result;
} }
DspCallbackVo dspCallbackVo = JSON.toJavaObject(jsonObject.getJSONObject("data"), DspCallbackVo.class); DspCallbackVo dspCallbackVo = JSON.toJavaObject(jsonObject.getJSONObject("data"), DspCallbackVo.class);
log.info("dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackVo)); log.info("dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackVo));


inspectionUpdate.setStatus(TaskStatusEnum.INFLIGHT.getCode());
inspectionUpdate.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode());
inspectionMapper.updateById(inspectionUpdate); inspectionMapper.updateById(inspectionUpdate);


// 处理通道数据 // 处理通道数据

+ 2
- 18
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java View File

package com.tuoheng.admin.service.inspection.update.status; package com.tuoheng.admin.service.inspection.update.status;


import cn.hutool.core.util.ObjectUtil; 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.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.AirPortTaskStatusEnum;
import com.tuoheng.admin.enums.MarkTypeEnum; 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.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.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.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


import java.util.List;

/** /**
* 修改任务状态业务层处理 * 修改任务状态业务层处理
* *

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml View File

left join th_inspection ti on tif.inspection_id = ti.id left join th_inspection ti on tif.inspection_id = ti.id
<where> <where>
<if test="1 == 1"> and tif.mark = 1 </if> <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.questionCode != null and request.questionCode != ''"> and tif.question_Code = #{request.questionCode} </if>
<if test="request.status != null"> <if test="request.status != null">
<choose> <choose>

Loading…
Cancel
Save