package com.ningdatech.pmapi.meeting.controller;

import com.ningdatech.pmapi.meeting.manage.ExpertExportManage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * MeetingExportController
 * </p>
 *
 * @author WendyYang
 * @since 2023/7/24
 **/
@Api(tags = "会议信息导出")
@RestController
@AllArgsConstructor
@RequestMapping("/api/v1/meeting/export")
public class MeetingExportController {


    private final ExpertExportManage expertExportManage;


    @GetMapping("/expertFeeTable/{meetingId}")
    @ApiOperation("专家费用单导出")
    public void exportFeeForExpert(@PathVariable Long meetingId, HttpServletResponse response) {
        expertExportManage.exportFeeForExpert(meetingId, response);
    }

    @GetMapping("/expertReviewTable/{meetingId}")
    @ApiOperation("专家评审单导出")
    public void exportExpertReviewTable(@PathVariable Long meetingId, HttpServletResponse response) {
        expertExportManage.expertReviewTable(meetingId, response);
    }

    @GetMapping("/laborFeeAuditTable/{meetingId}")
    @ApiOperation("劳务费发放单导出")
    public void exportLaborFeeAuditTable(@PathVariable Long meetingId, HttpServletResponse response) {
        expertExportManage.laborFeeAuditTable(meetingId, response);
    }

    @GetMapping("/expertInviteTable/{meetingId}")
    @ApiOperation("专家抽取表导出")
    public void exportExpertInviteTable(@PathVariable Long meetingId, HttpServletResponse response) {
        expertExportManage.expertInviteTable(meetingId, response);
    }

}
