Bladeren bron

添加只有完成的任务才能导出报告限制

tags/V1.0.1^2
wanjing 1 jaar geleden
bovenliggende
commit
08de546aab
1 gewijzigde bestanden met toevoegingen van 5 en 0 verwijderingen
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/ExportReportService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airData/report/ExportReportService.java Bestand weergeven

import com.tuoheng.admin.entity.domain.AirDataType; import com.tuoheng.admin.entity.domain.AirDataType;
import com.tuoheng.admin.entity.domain.Inspection; import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.request.report.ExportReportRequest; import com.tuoheng.admin.entity.request.report.ExportReportRequest;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.MarkEnum; import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.AirDataExportMapper; import com.tuoheng.admin.mapper.AirDataExportMapper;
import com.tuoheng.admin.mapper.AirDataMapper; import com.tuoheng.admin.mapper.AirDataMapper;
log.info("导出报告,任务不存在,inspectionId={}", request.getInspectionId()); log.info("导出报告,任务不存在,inspectionId={}", request.getInspectionId());
throw new ServiceException("任务不存在"); throw new ServiceException("任务不存在");
} }
if (InspectionStatusEnum.FLIGHT_COMPLETED.getCode() != inspection.getStatus()) {
log.info("导出报告,只有完成的任务才能导出报告,inspectionId={}", request.getInspectionId());
throw new ServiceException("只有完成的任务才能导出报告");
}
return JsonResult.success(inspection); return JsonResult.success(inspection);
} }



Laden…
Annuleren
Opslaan