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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.sems.mapper.TReportPatrolMapper;
import com.ruoyi.project.sems.domain.TReportPatrol;
import com.ruoyi.project.sems.service.ITReportPatrolService;

import javax.annotation.Resource;

/**
 * 月度检查巡检记录Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-01
 */
@Service
public class TReportPatrolServiceImpl implements ITReportPatrolService
{
    @Resource
    private TReportPatrolMapper tReportPatrolMapper;

    /**
     * 查询月度检查巡检记录
     *
     * @param id 月度检查巡检记录ID
     * @return 月度检查巡检记录
     */
    @Override
    public TReportPatrol selectTReportPatrolById(Long id)
    {
        return tReportPatrolMapper.selectTReportPatrolById(id);
    }

    /**
     * 查询月度检查巡检记录
     *
     * @param reportId 月度检查ID
     * @return 月度检查巡检记录
     */
    @Override
    public List<TReportPatrol> selectTReportPatrolByMonthId(Long reportId) {
        return tReportPatrolMapper.selectTReportPatrolByMonthId(reportId);
    }

    /**
     * 查询月度检查巡检记录列表
     *
     * @param tReportPatrol 月度检查巡检记录
     * @return 月度检查巡检记录
     */
    @Override
    public List<TReportPatrol> selectTReportPatrolList(TReportPatrol tReportPatrol)
    {
        return tReportPatrolMapper.selectTReportPatrolList(tReportPatrol);
    }

    /**
     * 新增月度检查巡检记录
     *
     * @param tReportPatrol 月度检查巡检记录
     * @return 结果
     */
    @Override
    public int insertTReportPatrol(TReportPatrol tReportPatrol)
    {
        return tReportPatrolMapper.insertTReportPatrol(tReportPatrol);
    }

    /**
     * 修改月度检查巡检记录
     *
     * @param tReportPatrol 月度检查巡检记录
     * @return 结果
     */
    @Override
    public int updateTReportPatrol(TReportPatrol tReportPatrol)
    {
        return tReportPatrolMapper.updateTReportPatrol(tReportPatrol);
    }

    /**
     * 批量删除月度检查巡检记录
     *
     * @param ids 需要删除的月度检查巡检记录ID
     * @return 结果
     */
    @Override
    public int deleteTReportPatrolByIds(Long[] ids)
    {
        return tReportPatrolMapper.deleteTReportPatrolByIds(ids);
    }

    /**
     * 删除月度检查巡检记录信息
     *
     * @param id 月度检查巡检记录ID
     * @return 结果
     */
    @Override
    public int deleteTReportPatrolById(Long id)
    {
        return tReportPatrolMapper.deleteTReportPatrolById(id);
    }
}
