package com.yunfeiyun.agmp.fms.service.impl;

import com.yunfeiyun.agmp.fms.domain.FmsTaskpatrol;
import com.yunfeiyun.agmp.fms.mapper.FmsTaskpatrolMapper;
import com.yunfeiyun.agmp.fms.domain.reqvo.FmsTaskPatrolListReqVo;
import com.yunfeiyun.agmp.fms.domain.resvo.FmsTaskPatrolListResVo;
import com.yunfeiyun.agmp.fms.service.IFmsTaskpatrolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 巡田Service业务层处理
 * 
 * @author 杨晓辉
 * @date 2023-05-23
 */
@Service
public class FmsTaskpatrolServiceImpl implements IFmsTaskpatrolService 
{
    @Autowired
    private FmsTaskpatrolMapper fmsTaskpatrolMapper;

    /**
     * 查询巡田
     * 
     * @param taskpatrolId 巡田主键
     * @return 巡田
     */
    @Override
    public FmsTaskpatrol selectFmsTaskpatrolByTaskpatrolId(String taskpatrolId)
    {
        return fmsTaskpatrolMapper.selectFmsTaskpatrolByTaskpatrolId(taskpatrolId);
    }

    /**
     * 查询巡田列表
     * 
     * @param fmsTaskPatrolListReqVo 巡田
     * @return 巡田
     */
    @Override
    public List<FmsTaskPatrolListResVo> selectFmsTaskpatrolList(FmsTaskPatrolListReqVo fmsTaskPatrolListReqVo)
    {
        return fmsTaskpatrolMapper.selectFmsTaskpatrolList(fmsTaskPatrolListReqVo);
    }

    /**
     * 新增巡田
     * 
     * @param fmsTaskpatrol 巡田
     * @return 结果
     */
    @Override
    public int insertFmsTaskpatrol(FmsTaskpatrol fmsTaskpatrol)
    {
        return fmsTaskpatrolMapper.insertFmsTaskpatrol(fmsTaskpatrol);
    }

    /**
     * 修改巡田
     * 
     * @param fmsTaskpatrol 巡田
     * @return 结果
     */
    @Override
    public int updateFmsTaskpatrol(FmsTaskpatrol fmsTaskpatrol)
    {
        return fmsTaskpatrolMapper.updateFmsTaskpatrol(fmsTaskpatrol);
    }

    /**
     * 批量删除巡田
     * 
     * @param taskpatrolIds 需要删除的巡田主键
     * @return 结果
     */
    @Override
    public int deleteFmsTaskpatrolByTaskpatrolIds(String[] taskpatrolIds)
    {
        return fmsTaskpatrolMapper.deleteFmsTaskpatrolByTaskpatrolIds(taskpatrolIds);
    }

    /**
     * 删除巡田信息
     * 
     * @param taskpatrolId 巡田主键
     * @return 结果
     */
    @Override
    public int deleteFmsTaskpatrolByTaskpatrolId(String taskpatrolId)
    {
        return fmsTaskpatrolMapper.deleteFmsTaskpatrolByTaskpatrolId(taskpatrolId);
    }
}
