package com.qmth.sop.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.sop.business.bean.dto.DataPermissionDto;
import com.qmth.sop.business.bean.result.TBViolationResult;
import com.qmth.sop.business.entity.TBViolation;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * sop违规登记表 Mapper 接口.
 *
 * @author: shudonghui
 * @date: 2023-08-09 10:33:08
 * @version: 1.0
 * @email: shudonghui@qmth.com.cn
 * @Company: www.qmth.com.cn
 */
public interface TBViolationMapper extends BaseMapper<TBViolation> {

    /**
     * 查询列表
     *
     * @param iPage
     * @param serviceId
     * @param type
     * @param status
     * @param userId
     * @param custom
     * @param sopNo
     * @param createId
     * @param startTime
     * @param endTime
     * @param dpr
     * @return
     */
    IPage<TBViolationResult> query(IPage<Map> iPage, @Param("serviceId") Long serviceId, @Param("type") String type, @Param("status") String status, @Param("userId") Long userId, @Param("custom") String custom, @Param("sopNo") String sopNo, @Param("createId") Long createId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("dpr") DataPermissionDto dpr);

    TBViolationResult getByCode(@Param("code") String code);
}