@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.core.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
@@ -22,6 +23,7 @@ import java.util.Date; | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_inspection") | |||
@ToString(callSuper = true) | |||
public class Inspection extends BaseEntity { | |||
private static final long serialVersionUID = 1L; |
@@ -53,7 +53,6 @@ public class UpdateFlightStatusService { | |||
Inspection inspectionUpdate = new Inspection(); | |||
inspectionUpdate.setId(inspection.getId()); | |||
JsonResult result = startAI(missionStatusRequest); | |||
if (0 != result.getCode()) { | |||
//如果调用DSP失败就直接失败! | |||
log.info("修改任务状态业务接口:调用DSP数据失败:{}", result.getMsg()); | |||
@@ -66,13 +65,13 @@ public class UpdateFlightStatusService { | |||
log.info("dsp响应体:{}", JacksonUtil.obj2StringPretty(dspCallbackVo)); | |||
log.info("修改inspection status 开始"); | |||
log.info("inspectionUpdate id : {}", inspectionUpdate.getId()); | |||
log.info("inspectionUpdate status", InspectionStatusEnum.IN_FLIGHT.getCode()); | |||
inspectionUpdate.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); | |||
log.info("修改inspection:{}", inspectionUpdate); | |||
log.info("inspectionUpdate:{}", inspectionUpdate); | |||
Integer count = inspectionMapper.updateById(inspectionUpdate); | |||
if (count <= 0) { | |||
log.info("修改inspection status 失败"); | |||
} else { | |||
log.info("修改inspection status 成功"); | |||
} | |||
log.info("修改inspection status 结束"); | |||
@@ -78,6 +78,7 @@ public class UpdateInspectionStatusService { | |||
.eq(Inspection::getId, missionStatusRequest.getRequestId()) | |||
.eq(Inspection::getInspectionLine, missionStatusRequest.getId())); | |||
if (ObjectUtil.isEmpty(inspection)) { | |||
log.info("任务不存在"); | |||
return JsonResult.error(EditInspectionStatusCodeEnum.INSPECTION_IS_NOT_EXIST.getCode(), EditInspectionStatusCodeEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | |||
} | |||
return JsonResult.success(inspection); |