package com.ruoyi.project.reliability.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.reliability.mapper.TDeviceNagetiveFactorMapper;
import com.ruoyi.project.reliability.domain.TDeviceNagetiveFactor;
import com.ruoyi.project.reliability.service.ITDeviceNagetiveFactorService;

/**
 * 不良因素清单Service业务层处理
 *
 * @author ruoyi
 * @date 2022-07-07
 */
@Service
public class TDeviceNagetiveFactorServiceImpl implements ITDeviceNagetiveFactorService
{
    @Autowired
    private TDeviceNagetiveFactorMapper tDeviceNagetiveFactorMapper;

    /**
     * 查询不良因素清单
     *
     * @param id 不良因素清单ID
     * @return 不良因素清单
     */
    @Override
    public TDeviceNagetiveFactor selectTDeviceNagetiveFactorById(Long id)
    {
        return tDeviceNagetiveFactorMapper.selectTDeviceNagetiveFactorById(id);
    }

    /**
     * 查询不良因素清单列表
     *
     * @param tDeviceNagetiveFactor 不良因素清单
     * @return 不良因素清单
     */
    @Override
    public List<TDeviceNagetiveFactor> selectTDeviceNagetiveFactorList(TDeviceNagetiveFactor tDeviceNagetiveFactor)
    {
        return tDeviceNagetiveFactorMapper.selectTDeviceNagetiveFactorList(tDeviceNagetiveFactor);
    }

    /**
     * 新增不良因素清单
     *
     * @param tDeviceNagetiveFactor 不良因素清单
     * @return 结果
     */
    @Override
    public int insertTDeviceNagetiveFactor(TDeviceNagetiveFactor tDeviceNagetiveFactor)
    {
        return tDeviceNagetiveFactorMapper.insertTDeviceNagetiveFactor(tDeviceNagetiveFactor);
    }

    /**
     * 修改不良因素清单
     *
     * @param tDeviceNagetiveFactor 不良因素清单
     * @return 结果
     */
    @Override
    public int updateTDeviceNagetiveFactor(TDeviceNagetiveFactor tDeviceNagetiveFactor)
    {
        return tDeviceNagetiveFactorMapper.updateTDeviceNagetiveFactor(tDeviceNagetiveFactor);
    }

    /**
     * 批量删除不良因素清单
     *
     * @param ids 需要删除的不良因素清单ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceNagetiveFactorByIds(Long[] ids)
    {
        return tDeviceNagetiveFactorMapper.deleteTDeviceNagetiveFactorByIds(ids);
    }

    /**
     * 删除不良因素清单信息
     *
     * @param id 不良因素清单ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceNagetiveFactorById(Long id)
    {
        return tDeviceNagetiveFactorMapper.deleteTDeviceNagetiveFactorById(id);
    }
}
