浏览代码

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
wanjing 1年前
父节点
当前提交
09779e6bad
共有 4 个文件被更改,包括 8 次插入26 次删除
  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 查看文件

@@ -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(), "当前任务不存在");
}

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateFlightStatusService.java 查看文件

@@ -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);

// 处理通道数据

+ 2
- 18
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateInspectionStatusService.java 查看文件

@@ -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;

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

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionFileMapper.xml 查看文件

@@ -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>

正在加载...
取消
保存