package com.tuoheng.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Report;
import com.tuoheng.admin.entity.request.ReportRequest;
import com.tuoheng.admin.entity.vo.ReportInfoVO;
import com.tuoheng.admin.entity.vo.ReportVO;
import com.tuoheng.common.common.IBaseService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.utils.JsonResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 巡检报告表 服务类
 *
 * @author WangHaoran
 * @since 2021-09-29
 */
public interface IReportService extends IBaseService<Report> {

    /**
     * 生成报告
     *
     * @param missionId 任务Id
     * @return
     */
    JsonResult generateReport(Integer missionId);

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    JsonResult<IPage<Report>> queryPage(ReportRequest request);

    /**
     * 查看报告 详情
     *
     * @param reportId
     * @return
     */
    ReportInfoVO detail(Integer reportId);


    /**
     * 导出报告word并下载
     *
     * @param reportId 报告ID
     * @return
     */
    String exportReportWord(Integer reportId, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 导出处理报告word并下载
     *
     * @param reportId 报告ID
     * @return
     */
    String exportReportHandleWord(Integer reportId, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
