package com.patzn.lims.frame.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patzn.lims.core.web.IBaseService;
import com.patzn.lims.frame.entity.LmsQcSubPlanAttachment;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * <p>
 * 内部质控计划子表附件表 服务类
 * </p>
 *
 * @author patzn
 * @since 2018-07-09
 */
public interface ILmsQcSubPlanAttachmentService extends IBaseService<LmsQcSubPlanAttachment> {


    Page<LmsQcSubPlanAttachment> page(Page<LmsQcSubPlanAttachment> page, LmsQcSubPlanAttachment lmsQcSubPlanAttachment);


    List<LmsQcSubPlanAttachment> list(LmsQcSubPlanAttachment lmsQcSubPlanAttachment);


    int getCountByPlanId(Long id);


    /**
     * <p>
     * 附件上传
     * </p>
     *
     * @param planId
     * @param file
     * @return
     */
    boolean save(Long planId, MultipartFile file);


    void download(Long id, HttpServletResponse response);


    void downloadBatch(Long[] attachmentIds, HttpServletResponse response);
}
