package com.ruoyi.ems.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.AdmOpInspectionTaskMapper;
import com.ruoyi.ems.domain.AdmOpInspectionTask;
import com.ruoyi.ems.service.IAdmOpInspectionTaskService;

/**
 * 巡检任务Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-29
 */
@Service
public class AdmOpInspectionTaskServiceImpl implements IAdmOpInspectionTaskService
{
    @Autowired
    private AdmOpInspectionTaskMapper admOpInspectionTaskMapper;

    /**
     * 查询巡检任务
     *
     * @param id 巡检任务主键
     * @return 巡检任务
     */
    @Override
    public AdmOpInspectionTask selectAdmOpInspectionTaskById(Long id)
    {
        return admOpInspectionTaskMapper.selectAdmOpInspectionTaskById(id);
    }

    /**
     * 查询巡检任务列表
     *
     * @param admOpInspectionTask 巡检任务
     * @return 巡检任务
     */
    @Override
    public List<AdmOpInspectionTask> selectAdmOpInspectionTaskList(AdmOpInspectionTask admOpInspectionTask)
    {
        return admOpInspectionTaskMapper.selectAdmOpInspectionTaskList(admOpInspectionTask);
    }

    /**
     * 新增巡检任务
     *
     * @param admOpInspectionTask 巡检任务
     * @return 结果
     */
    @Override
    public int insertAdmOpInspectionTask(AdmOpInspectionTask admOpInspectionTask)
    {
        return admOpInspectionTaskMapper.insertAdmOpInspectionTask(admOpInspectionTask);
    }

    /**
     * 修改巡检任务
     *
     * @param admOpInspectionTask 巡检任务
     * @return 结果
     */
    @Override
    public int updateAdmOpInspectionTask(AdmOpInspectionTask admOpInspectionTask)
    {
        return admOpInspectionTaskMapper.updateAdmOpInspectionTask(admOpInspectionTask);
    }

    /**
     * 批量删除巡检任务
     *
     * @param ids 需要删除的巡检任务主键
     * @return 结果
     */
    @Override
    public int deleteAdmOpInspectionTaskByIds(Long[] ids)
    {
        return admOpInspectionTaskMapper.deleteAdmOpInspectionTaskByIds(ids);
    }

    /**
     * 删除巡检任务信息
     *
     * @param id 巡检任务主键
     * @return 结果
     */
    @Override
    public int deleteAdmOpInspectionTaskById(Long id)
    {
        return admOpInspectionTaskMapper.deleteAdmOpInspectionTaskById(id);
    }
}
