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.TApproveAccidentMapper;
import com.ruoyi.project.ehs.domain.TApproveAccident;
import com.ruoyi.project.ehs.service.ITApproveAccidentService;

/**
 * 事件申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-03-01
 */
@Service
public class TApproveAccidentServiceImpl implements ITApproveAccidentService
{
    @Autowired
    private TApproveAccidentMapper tApproveAccidentMapper;

    /**
     * 查询事件申请
     *
     * @param id 事件申请ID
     * @return 事件申请
     */
    @Override
    public TApproveAccident selectTApproveAccidentById(Long id)
    {
        return tApproveAccidentMapper.selectTApproveAccidentById(id);
    }

    /**
     * 查询事件申请列表
     *
     * @param tApproveAccident 事件申请
     * @return 事件申请
     */
    @Override
    public List<TApproveAccident> selectTApproveAccidentList(TApproveAccident tApproveAccident)
    {
        return tApproveAccidentMapper.selectTApproveAccidentList(tApproveAccident);
    }

    /**
     * 新增事件申请
     *
     * @param tApproveAccident 事件申请
     * @return 结果
     */
    @Override
    public int insertTApproveAccident(TApproveAccident tApproveAccident)
    {
        return tApproveAccidentMapper.insertTApproveAccident(tApproveAccident);
    }

    /**
     * 修改事件申请
     *
     * @param tApproveAccident 事件申请
     * @return 结果
     */
    @Override
    public int updateTApproveAccident(TApproveAccident tApproveAccident)
    {
        return tApproveAccidentMapper.updateTApproveAccident(tApproveAccident);
    }

    /**
     * 批量删除事件申请
     *
     * @param ids 需要删除的事件申请ID
     * @return 结果
     */
    @Override
    public int deleteTApproveAccidentByIds(Long[] ids)
    {
        return tApproveAccidentMapper.deleteTApproveAccidentByIds(ids);
    }

    /**
     * 删除事件申请信息
     *
     * @param id 事件申请ID
     * @return 结果
     */
    @Override
    public int deleteTApproveAccidentById(Long id)
    {
        return tApproveAccidentMapper.deleteTApproveAccidentById(id);
    }
}
