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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ehs.mapper.TApproveDangerMapper;
import com.ruoyi.project.ehs.domain.TApproveDanger;
import com.ruoyi.project.ehs.service.ITApproveDangerService;

import javax.annotation.Resource;

/**
 * 隐患申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-02-20
 */
@Service("approveDangerService")
public class TApproveDangerServiceImpl implements ITApproveDangerService
{
    @Resource
    private TApproveDangerMapper tApproveDangerMapper;

    /**
     * 查询隐患申请
     *
     * @param id 隐患申请ID
     * @return 隐患申请
     */
    @Override
    public TApproveDanger selectTApproveDangerById(Long id)
    {
        return tApproveDangerMapper.selectTApproveDangerById(id);
    }

    /**
     * 查询隐患申请列表
     *
     * @param tApproveDanger 隐患申请
     * @return 隐患申请
     */
    @Override
    public List<TApproveDanger> selectTApproveDangerList(TApproveDanger tApproveDanger)
    {
        return tApproveDangerMapper.selectTApproveDangerList(tApproveDanger);
    }

    /**
     * 新增隐患申请
     *
     * @param tApproveDanger 隐患申请
     * @return 结果
     */
    @Override
    public int insertTApproveDanger(TApproveDanger tApproveDanger)
    {
        return tApproveDangerMapper.insertTApproveDanger(tApproveDanger);
    }

    /**
     * 修改隐患申请
     *
     * @param tApproveDanger 隐患申请
     * @return 结果
     */
    @Override
    public int updateTApproveDanger(TApproveDanger tApproveDanger)
    {
        return tApproveDangerMapper.updateTApproveDanger(tApproveDanger);
    }

    /**
     * 批量删除隐患申请
     *
     * @param ids 需要删除的隐患申请ID
     * @return 结果
     */
    @Override
    public int deleteTApproveDangerByIds(Long[] ids)
    {
        return tApproveDangerMapper.deleteTApproveDangerByIds(ids);
    }

    /**
     * 删除隐患申请信息
     *
     * @param id 隐患申请ID
     * @return 结果
     */
    @Override
    public int deleteTApproveDangerById(Long id)
    {
        return tApproveDangerMapper.deleteTApproveDangerById(id);
    }
}
