package com.qmth.sop.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.sop.business.bean.result.TBViolationResult;
import com.qmth.sop.business.entity.TBViolation;
import com.qmth.sop.common.enums.ViolationStatusEnum;
import com.qmth.sop.common.enums.ViolationTypeEnum;

import java.util.Map;

/**
 * sop违规登记表 服务类
 *
 * @author: shudonghui
 * @date: 2023-08-09 10:33:08
 * @version: 1.0
 * @email: shudonghui@qmth.com.cn
 * @Company: www.qmth.com.cn
 */
public interface TBViolationService extends IService<TBViolation>{

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

    /**
    * 新增修改sop违规登记表
    *
    * @param tBViolation
    */
    Boolean saveTBViolation(TBViolation tBViolation);


    /**
    * 删除sop违规登记表
    *
    * @param id
    */
    Boolean delete(Long id);



    TBViolationResult getByCode(String code);
}