package com.njcn.gather.aireport.testreport.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.gather.aireport.testreport.pojo.param.TestReportGroupSaveParam;
import com.njcn.gather.aireport.testreport.pojo.param.TestReportParam;
import com.njcn.gather.aireport.testreport.pojo.po.TestReportPO;
import com.njcn.gather.aireport.testreport.pojo.vo.TestReportGroupReportVO;
import com.njcn.gather.aireport.testreport.pojo.vo.TestReportLedgerImportResultVO;
import com.njcn.gather.aireport.testreport.pojo.vo.TestReportPointVO;
import com.njcn.gather.aireport.testreport.pojo.vo.TestReportVO;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface TestReportService extends IService<TestReportPO> {

    Page<TestReportVO> listTestReports(TestReportParam.QueryParam param);

    boolean addTestReport(TestReportParam.AddParam param);

    boolean updateTestReport(TestReportParam.UpdateParam param);

    boolean deleteTestReports(List<String> ids);

    TestReportVO getTestReport(String id);

    TestReportPO requireNormal(String id);

    boolean submitAudit(TestReportParam.SubmitAuditParam param);

    void exportTestReports(TestReportParam.QueryParam param);

    ResponseEntity<byte[]> previewTemplate(String id);

    TestReportLedgerImportResultVO validateLedger(String id, MultipartFile[] files);

    TestReportLedgerImportResultVO importLedger(String id, TestReportParam.LedgerImportParam param);

    ResponseEntity<byte[]> downloadLedgerTemplate();

    List<TestReportPointVO> listPoints(String id);

    boolean saveGroups(String id, TestReportGroupSaveParam param);

    List<TestReportGroupReportVO> listGroupReports(String id);

    boolean generateGroupedReports(String id);

    ResponseEntity<byte[]> downloadGroupReport(String groupReportId);
}
