package com.ruoyi.manage.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.manage.pojo.ManageReviewReport;
import com.ruoyi.manage.service.ManageReviewReportService;
import com.deepoove.poi.data.style.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
/**
*
* 管理评审报告 前端控制器
*
*
* @author
* @since 2024-11-12 04:44:39
*/
@Tag(name = "管理评审报告")
@RestController
@RequestMapping("/manageReviewReport")
public class ManageReviewReportController {
@Resource
private ManageReviewReportService manageReviewReportService;
@Operation(summary = "查询管理评审报告")
@GetMapping("/getPageReviewReport")
public Result> getPageReviewReport(Page page, String startTime, String endTime, String place) {
IPage ipage = manageReviewReportService.page(page,startTime,endTime,place);
return Result.success(ipage);
}
@Operation(summary = "新增管理评审报告")
@PostMapping("/addReviewReport")
public Result addReviewReport(@RequestBody ManageReviewReport manageReviewReport){
return Result.success(manageReviewReportService.save(manageReviewReport));
}
@Operation(summary = "编辑管理评审报告")
@PostMapping("/modifyReviewReport")
public Result modifyReviewReport(@RequestBody ManageReviewReport manageReviewReport){
return Result.success(manageReviewReportService.updateById(manageReviewReport));
}
@Operation(summary = "删除管理评审报告")
@DeleteMapping("/deleteReviewReport")
public Result deleteReviewReport(Integer id){
return Result.success(manageReviewReportService.removeById(id));
}
@Operation(summary = "下载管理评审报告")
@GetMapping("/exportReviewReport")
public void exportReviewReport(Integer id , HttpServletResponse response){
manageReviewReportService.exportReviewReport(id,response);
}
}