package com.zd.laboratory.mapper;

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

import com.zd.laboratory.domain.LabSecurityApply;
import com.zd.laboratory.domain.vo.LabSecurityApplyVO;
import org.apache.ibatis.annotations.Param;

/**
 * 安全准入申请Mapper接口
 *
 * @author zd
 * @date 2022-01-24
 */
public interface LabSecurityApplyMapper
{
    /**
     * 查询安全准入申请
     *
     * @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 id 安全准入申请主键
     * @return 结果
     */
    public int deleteLabSecurityApplyById(Long id);

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

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

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

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

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

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


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

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

    /***
     * 查询审核通过未过期的申请集合
     * @param labSecurityApply
     * @return
     */
    public List<LabSecurityApplyVO> selectApplyListEffective(LabSecurityApply labSecurityApply);
    /***
     * 校验申请时间是否有重叠
     * @param labSecurityApplyVO
     * @return
     */
    List<LabSecurityApplyVO> selectLabSecurityApplyListByTime(LabSecurityApplyVO labSecurityApplyVO);


    List<Map<String, Long>> selectApplyListBySubIds(@Param("subIds") List<Long> subIds);
}
