|
|
@@ -63,14 +63,20 @@ public class ExecuteTaskService { |
|
|
|
return JsonResult.error(ExecuteInspectionCodeEnum.AIRPORT_RETURN_DATA_IS_NULL.getCode(), ExecuteInspectionCodeEnum.AIRPORT_RETURN_DATA_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
this.updateInspection(userId, inspection); |
|
|
|
|
|
|
|
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); |
|
|
|
if (jsonResult.getCode() != 0) { |
|
|
|
log.info("立即执行任务业务:机场接口返回结果:失败:{}", jsonResult.getMsg()); |
|
|
|
|
|
|
|
inspection.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode()); |
|
|
|
this.updateInspection(userId, inspection); |
|
|
|
|
|
|
|
this.insertInspectionHistory(userId, inspection.getTenantId(), inspection, jsonResult.getMsg()); |
|
|
|
|
|
|
|
return JsonResult.error(jsonResult.getMsg()); |
|
|
|
} else { |
|
|
|
inspection.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); |
|
|
|
this.updateInspection(userId, inspection); |
|
|
|
|
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
} |
|
|
@@ -83,6 +89,7 @@ public class ExecuteTaskService { |
|
|
|
*/ |
|
|
|
private void updateInspection(String userId, Inspection inspection) { |
|
|
|
inspection.setExecutionStatus(2); |
|
|
|
inspection.setStatus(inspection.getStatus()); |
|
|
|
inspection.setUpdateUser(userId); |
|
|
|
inspection.setUpdateTime(DateUtils.now()); |
|
|
|
inspectionMapper.update(inspection); |