Browse Source

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

tags/V1.0.1^2
wanjing 1 year ago
parent
commit
08de546aab
1 changed files with 5 additions and 0 deletions
  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 View File

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


Loading…
Cancel
Save