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

import java.util.List;

import com.ruoyi.project.reliability.domain.TRiskMatrixVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.reliability.mapper.TQualitativeAnalysisMapper;
import com.ruoyi.project.reliability.domain.TQualitativeAnalysis;
import com.ruoyi.project.reliability.service.ITQualitativeAnalysisService;

/**
 * 定性分析Service业务层处理
 *
 * @author ssy
 * @date 2024-03-04
 */
@Service
public class TQualitativeAnalysisServiceImpl implements ITQualitativeAnalysisService
{
    @Autowired
    private TQualitativeAnalysisMapper tQualitativeAnalysisMapper;

    /**
     * 查询定性分析
     *
     * @param id 定性分析ID
     * @return 定性分析
     */
    @Override
    public TQualitativeAnalysis selectTQualitativeAnalysisById(Long id)
    {
        return tQualitativeAnalysisMapper.selectTQualitativeAnalysisById(id);
    }

    /**
     * 查询定性分析列表
     *
     * @param tQualitativeAnalysis 定性分析
     * @return 定性分析
     */
    @Override
    public List<TQualitativeAnalysis> selectTQualitativeAnalysisList(TQualitativeAnalysis tQualitativeAnalysis)
    {
        return tQualitativeAnalysisMapper.selectTQualitativeAnalysisList(tQualitativeAnalysis);
    }

    /**
     * 新增定性分析
     *
     * @param tQualitativeAnalysis 定性分析
     * @return 结果
     */
    @Override
    public int insertTQualitativeAnalysis(TQualitativeAnalysis tQualitativeAnalysis)
    {
        return tQualitativeAnalysisMapper.insertTQualitativeAnalysis(tQualitativeAnalysis);
    }

    /**
     * 修改定性分析
     *
     * @param tQualitativeAnalysis 定性分析
     * @return 结果
     */
    @Override
    public int updateTQualitativeAnalysis(TQualitativeAnalysis tQualitativeAnalysis)
    {
        return tQualitativeAnalysisMapper.updateTQualitativeAnalysis(tQualitativeAnalysis);
    }

    /**
     * 批量删除定性分析
     *
     * @param ids 需要删除的定性分析ID
     * @return 结果
     */
    @Override
    public int deleteTQualitativeAnalysisByIds(Long[] ids)
    {
        return tQualitativeAnalysisMapper.deleteTQualitativeAnalysisByIds(ids);
    }

    /**
     * 删除定性分析信息
     *
     * @param id 定性分析ID
     * @return 结果
     */
    @Override
    public int deleteTQualitativeAnalysisById(Long id)
    {
        return tQualitativeAnalysisMapper.deleteTQualitativeAnalysisById(id);
    }

    @Override
    public TRiskMatrixVo selectTRiskMatrixVoData()
    {
        return tQualitativeAnalysisMapper.selectTRiskMatrixVoData();
    }
}
