123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package com.yaoyicloud.controller;
- import com.yaoyicloud.annotation.EasierLog;
- import com.yaoyicloud.dto.ReportDTO;
- import com.yaoyicloud.service.ReportService;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RestController;
- import lombok.RequiredArgsConstructor;
- import lombok.extern.slf4j.Slf4j;
- import javax.servlet.http.HttpSession;
- import java.io.IOException;
- /**
- * 报告控制器
- *
- * @author snows
- * @date 2024/10/14
- */
- @RestController
- @RequiredArgsConstructor
- @Slf4j
- public class ReportController {
- private final ReportService reportService;
- /**
- * 创建Plus版本审核报告
- *
- * @param resource 请求参数
- * @return {@link Boolean } 结果
- */
- @EasierLog("创建Plus版本审核报告")
- @PostMapping("/report/create-report")
- public String createPlusVersionCheckReport(@Validated @RequestBody ReportDTO.OnCreatePlusVersionReport resource,
- HttpSession session) throws IOException {
- session.setAttribute(resource.getReportBastPath(), resource.getData());
- synchronized (this) {
- return reportService.createPlusVersionCheckReport(resource.getReportType(), resource.getData(),
- resource.getReportTempFile(), resource.getReportBastPath(), resource.getRelationId());
- }
- }
- }
|