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.TPreventivemaintenanceMapper;
import com.ruoyi.project.reliability.domain.TPreventivemaintenance;
import com.ruoyi.project.reliability.service.ITPreventivemaintenanceService;

import javax.annotation.Resource;

/**
 * 预防性管理Service业务层处理
 *
 * @author ruoyi
 * @date 2020-11-27
 */
@Service
public class TPreventivemaintenanceServiceImpl implements ITPreventivemaintenanceService
{
    @Resource
    private TPreventivemaintenanceMapper tPreventivemaintenanceMapper;

    /**
     * 查询预防性管理
     *
     * @param id 预防性管理ID
     * @return 预防性管理
     */
    @Override
    public TPreventivemaintenance selectTPreventivemaintenanceById(Long id)
    {
        return tPreventivemaintenanceMapper.selectTPreventivemaintenanceById(id);
    }

    /**
     * 查询预防性管理列表
     *
     * @param tPreventivemaintenance 预防性管理
     * @return 预防性管理
     */
    @Override
    public List<TPreventivemaintenance> selectTPreventivemaintenanceList(TPreventivemaintenance tPreventivemaintenance)
    {
        return tPreventivemaintenanceMapper.selectTPreventivemaintenanceList(tPreventivemaintenance);
    }

    /**
     * 查询预防性管理列表
     *
     * @param tPreventivemaintenance 预防性管理
     * @return 预防性管理集合
     */
    @Override
    public List<TPreventivemaintenance> selectList(TPreventivemaintenance tPreventivemaintenance) {
        return tPreventivemaintenanceMapper.selectList(tPreventivemaintenance);
    }

    /**
     * 新增预防性管理
     *
     * @param tPreventivemaintenance 预防性管理
     * @return 结果
     */
    @Override
    public int insertTPreventivemaintenance(TPreventivemaintenance tPreventivemaintenance)
    {
        return tPreventivemaintenanceMapper.insertTPreventivemaintenance(tPreventivemaintenance);
    }

    /**
     * 修改预防性管理
     *
     * @param tPreventivemaintenance 预防性管理
     * @return 结果
     */
    @Override
    public int updateTPreventivemaintenance(TPreventivemaintenance tPreventivemaintenance)
    {
        return tPreventivemaintenanceMapper.updateTPreventivemaintenance(tPreventivemaintenance);
    }

    /**
     * 批量删除预防性管理
     *
     * @param ids 需要删除的预防性管理ID
     * @return 结果
     */
    @Override
    public int deleteTPreventivemaintenanceByIds(Long[] ids)
    {
        return tPreventivemaintenanceMapper.deleteTPreventivemaintenanceByIds(ids);
    }

    /**
     * 删除预防性管理信息
     *
     * @param id 预防性管理ID
     * @return 结果
     */
    @Override
    public int deleteTPreventivemaintenanceById(Long id)
    {
        return tPreventivemaintenanceMapper.deleteTPreventivemaintenanceById(id);
    }
}
