package com.zd.laboratory.mapper;

import com.zd.laboratory.domain.LabGradeManageRule;
import com.zd.laboratory.domain.LabGradeManageRuleUser;
import com.zd.system.api.laboratory.domain.vo.LabGradeManageWorkDetailVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 分级管控规则Mapper接口
 *
 * @author liubo
 * @date 2022-02-10
 */
public interface LabGradeManageRuleMapper
{
    /**
     * 查询分级管控规则
     *
     * @param id 分级管控规则主键
     * @return 分级管控规则
     */
    public LabGradeManageRule selectLabGradeManageRuledById(Long id);

    /**
     * 查询分级管控规则列表
     *
     * @param labGradeManageRule 分级管控规则
     * @return 分级管控规则集合
     */
    public List<LabGradeManageRule> selectLabGradeManageRuledList(LabGradeManageRule labGradeManageRule);

    /**
     * 新增分级管控规则
     *
     * @param labGradeManageRule 分级管控规则
     * @return 结果
     */
    public int insertLabGradeManageRuled(LabGradeManageRule labGradeManageRule);

    /**
     * 修改分级管控规则
     *
     * @param labGradeManageRule 分级管控规则
     * @return 结果
     */
    public int updateLabGradeManageRuled(LabGradeManageRule labGradeManageRule);

    /**
     * 删除分级管控规则
     *
     * @param id 分级管控规则主键
     * @return 结果
     */
    public int deleteLabGradeManageRuledById(Long id);

    /**
     * 批量删除分级管控规则
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLabGradeManageRuledByIds(Long[] ids);

    int deleteByGradeManageId(Long gradeManageId);

    @Deprecated
    List<LabGradeManageWorkDetailVO> selectMyLabGradeManageWorkDetailByType3(@Param("subId") Long subId, @Param("userId") Long userId);

    @Deprecated
    List<LabGradeManageWorkDetailVO> selectMyLabGradeManageWorkDetailByType1(
            @Param("list") List<Long> ruleUserIds, @Param("userId") Long userId, @Param("subId")Long subId);

    @Deprecated
    List<LabGradeManageWorkDetailVO> selectMyLabGradeManageWorkDetailByType2(LabGradeManageRuleUser labGradeManageRuleUser);

    List<LabGradeManageWorkDetailVO> selectMyLabGradeManageWorkDetailByType(@Param("type") Integer type,
                                                                            @Param("manageIds") List<Long> manageIds,
                                                                            @Param("userId") Long userId,
                                                                            @Param("subId") Long subId);

    List<LabGradeManageWorkDetailVO> selectMyLabGradeManageWorkDetailByMessage(@Param("ruleUserId") Long ruleUserId);
}
