package com.hw.qms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.qms.mapper.QmsCheckRuleDetailMapper;
import com.hw.qms.domain.QmsCheckRuleDetail;
import com.hw.qms.service.IQmsCheckRuleDetailService;

/**
 * 检验规则明细Service业务层处理
 *
 * @author xins
 * @date 2024-01-26
 */
@Service
public class QmsCheckRuleDetailServiceImpl implements IQmsCheckRuleDetailService
{
    @Autowired
    private QmsCheckRuleDetailMapper qmsCheckRuleDetailMapper;

    /**
     * 查询检验规则明细
     *
     * @param checkRuleId 检验规则明细主键
     * @return 检验规则明细
     */
    @Override
    public QmsCheckRuleDetail selectQmsCheckRuleDetailByCheckRuleId(Long checkRuleId)
    {
        return qmsCheckRuleDetailMapper.selectQmsCheckRuleDetailByCheckRuleId(checkRuleId);
    }

    /**
     * 查询检验规则明细列表
     *
     * @param qmsCheckRuleDetail 检验规则明细
     * @return 检验规则明细
     */
    @Override
    public List<QmsCheckRuleDetail> selectQmsCheckRuleDetailList(QmsCheckRuleDetail qmsCheckRuleDetail)
    {
        return qmsCheckRuleDetailMapper.selectQmsCheckRuleDetailList(qmsCheckRuleDetail);
    }

    /**
     * 新增检验规则明细
     *
     * @param qmsCheckRuleDetail 检验规则明细
     * @return 结果
     */
    @Override
    public int insertQmsCheckRuleDetail(QmsCheckRuleDetail qmsCheckRuleDetail)
    {
        return qmsCheckRuleDetailMapper.insertQmsCheckRuleDetail(qmsCheckRuleDetail);
    }

    /**
     * 修改检验规则明细
     *
     * @param qmsCheckRuleDetail 检验规则明细
     * @return 结果
     */
    @Override
    public int updateQmsCheckRuleDetail(QmsCheckRuleDetail qmsCheckRuleDetail)
    {
        return qmsCheckRuleDetailMapper.updateQmsCheckRuleDetail(qmsCheckRuleDetail);
    }

    /**
     * 批量删除检验规则明细
     *
     * @param checkRuleIds 需要删除的检验规则明细主键
     * @return 结果
     */
    @Override
    public int deleteQmsCheckRuleDetailByCheckRuleIds(Long[] checkRuleIds)
    {
        return qmsCheckRuleDetailMapper.deleteQmsCheckRuleDetailByCheckRuleIds(checkRuleIds);
    }

    /**
     * 删除检验规则明细信息
     *
     * @param checkRuleId 检验规则明细主键
     * @return 结果
     */
    @Override
    public int deleteQmsCheckRuleDetailByCheckRuleId(Long checkRuleId)
    {
        return qmsCheckRuleDetailMapper.deleteQmsCheckRuleDetailByCheckRuleId(checkRuleId);
    }










    /**
     * 查询检验规则明细列表,Join material
     *
     * @param qmsCheckRuleDetail 检验规则明细
     * @return 检验规则明细
     */
    @Override
    public List<QmsCheckRuleDetail> selectQmsCheckRuleDetailJoinList(QmsCheckRuleDetail qmsCheckRuleDetail)
    {
        return qmsCheckRuleDetailMapper.selectQmsCheckRuleDetailJoinList(qmsCheckRuleDetail);
    }


    /**
     * 批量删除检验规则明细
     *
     * @param checkRuleDetailList 需要删除的检验规则明细列表
     * @return 结果
     */
    @Override
    public int deleteQmsCheckRuleDetails(List<QmsCheckRuleDetail> checkRuleDetailList)
    {
        return qmsCheckRuleDetailMapper.deleteQmsCheckRuleDetails(checkRuleDetailList);
    }


}
