package com.yifu.cloud.plus.v1.batch.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.batch.entity.TElectronicArchiveDetail;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveAttachmentDeleteRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveBatchDownloadRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.ArchiveSelectedExportRequestVO;
import com.yifu.cloud.plus.v1.batch.vo.TElectronicArchiveDetailSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 电子档案明细表
 *
 * @author huych
 * @date 2025-12-17 11:03:37
 */
public interface TElectronicArchiveDetailService extends IService<TElectronicArchiveDetail> {
    /**
     * 电子档案明细表简单分页查询
     * @param tElectronicArchiveDetail 电子档案明细表
     * @return
     */
    IPage<TElectronicArchiveDetail> getTElectronicArchiveDetailPage(Page<TElectronicArchiveDetail> page, TElectronicArchiveDetailSearchVo tElectronicArchiveDetail);

	/**
	 * 通过id查询电子档案明细表
	 * @param id id
	 * @return
	 */
	R<TElectronicArchiveDetail> getDetailInfoById(String id);

	/**
	 * 批量下载电子档案
	 * @param requestList 下载请求列表
	 * @param response HTTP响应
	 */
	void batchDownloadArchives(List<ArchiveBatchDownloadRequestVO> requestList, HttpServletResponse response);

	/**
	 * 删除电子档案附件
	 * @param request 删除请求
	 * @return 删除结果
	 */
	R<String> deleteArchiveAttachments(ArchiveAttachmentDeleteRequestVO request);

	/**
	 * 勾选导出电子档案
	 * @param requestList 导出请求列表
	 * @param response HTTP响应
	 */
	void selectedExportArchives(List<ArchiveSelectedExportRequestVO> requestList, HttpServletResponse response);

	/**
	 * 根据查询条件导出电子档案
	 * @param searchVo 查询条件
	 * @param response HTTP响应
	 */
	void exportArchivesByCondition(TElectronicArchiveDetailSearchVo searchVo, HttpServletResponse response);

	/**
	 * 删除电子档案明细表
	 * @param id 明细ID
	 * @return 删除结果
	 */
	R<String> deleteArchiveDetail(String id);

}
