package com.zd.laboratory.service;

import java.util.List;
import java.util.Map;

import com.zd.laboratory.domain.LabSecurityApply;
import com.zd.laboratory.domain.LabSecurityMaterialrelation;
import com.zd.laboratory.domain.vo.LabSecurityApplyVO;

import javax.servlet.http.HttpServletResponse;

/**
 * 安全准入申请Service接口
 *
 * @author zd
 * @date 2022-01-24
 */
public interface ILabSecurityApplyService
{
    /**
     * 查询安全准入申请
     *
     * @param id 安全准入申请主键
     * @return 安全准入申请
     */
    public LabSecurityApplyVO selectLabSecurityApplyById(Long id);

    /**
     * 查询安全准入申请列表
     *
     * @param labSecurityApplyVO 安全准入申请
     * @return 安全准入申请集合
     */
    public List<LabSecurityApplyVO> selectLabSecurityApplyList(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 根据日期排序查询
     * @param labSecurityApplyVO
     * @return
     */
    public List<LabSecurityApplyVO> selectLabSecurityApplyListYmd (LabSecurityApplyVO labSecurityApplyVO);

    /**
     * 新增安全准入申请
     *
     * @param labSecurityApply 安全准入申请
     * @return 结果
     */
    public int insertLabSecurityApply(LabSecurityApply labSecurityApply);

    /**
     * 修改安全准入申请
     *
     * @param labSecurityApply 安全准入申请
     * @return 结果
     */
    public int updateLabSecurityApply(LabSecurityApply labSecurityApply);

    /**
     * 批量删除安全准入申请
     *
     * @param ids 需要删除的安全准入申请主键集合
     * @return 结果
     */
    public int deleteLabSecurityApplyByIds(Long[] ids);

    /**
     * 删除安全准入申请信息
     *
     * @param id 安全准入申请主键
     * @return 结果
     */
    public int deleteLabSecurityApplyById(Long id);

    /***
     * 安全申请提交
     * @param labSecurityApplyVO
     * @return
     */
    public int materialAdd(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 安全申请修改
     * @param labSecurityApplyVO
     * @return
     */
    public int materialUpdate(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 查询用户证数信息
     * @param userId
     * @return
     */
    public List<Map<String, Object>> selectUserCertList(Long userId);

    /**
     * 实验室负责人信息
     * @param userId
     * @return
     */
    public List<Map<String, Object>> selectLabsubjectUserInfo(Long userId);

    /***
     * 根据时间分组查询
     * @return
     */
    List<LabSecurityApplyVO>  selectLabSecurityApplyListOrderBydate(LabSecurityApplyVO labSecurityApplyVO);

    /**
     * 校级详情列表统计
     * @param labSecurityApplyVO
     * @return
     */
    List<LabSecurityApplyVO> selectApplyListSchool(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 安全准入柱形图
     * @param labSecurityApply
     * @return
     */
    public List<Map<String, Object>> selectApplyListSchoolColumn(LabSecurityApply labSecurityApply);

    /**
     * 院级详情列表统计
     * @param labSecurityApplyVO
     * @return
     */
    List<LabSecurityApplyVO> selectApplyListCollege(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 安全准入院级柱形图
     * @param labSecurityApply
     * @return
     */
    public List<Map<String, Object>> selectApplyListCollegelColumn(LabSecurityApply labSecurityApply);


    /***
     * 根据文件，进行压缩，批量下载
     * @param response
     * @param files
     * @param zipName
     * @return
     */
    void downloadBatchByFile(HttpServletResponse response, Map<String, byte[]> files, String zipName);

    /***
     * 根据申请id删除附件
     * @param id
     * @return
     */
    public int deleteLabSecurityMaterialrelationByApplyId(Long id);

    /***
     * 查询审核通过未过期的申请集合
     * @param labSecurityApplyVO
     * @return
     */
    public List<LabSecurityApplyVO> selectApplyListEffective(LabSecurityApplyVO labSecurityApplyVO);

    /***
     * 校验申请时间是否有重叠
     * @param labSecurityApplyVO
     * @return
     */
    List<LabSecurityApplyVO> selectLabSecurityApplyListByTime(LabSecurityApplyVO labSecurityApplyVO);

}
