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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.plant.mapper.TTargetagreementMapper;
import com.ruoyi.project.plant.domain.TTargetagreement;
import com.ruoyi.project.plant.service.ITTargetagreementService;

import javax.annotation.Resource;

/**
 * 目标协议Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-16
 */
@Service
public class TTargetagreementServiceImpl implements ITTargetagreementService
{
    @Resource
    private TTargetagreementMapper tTargetagreementMapper;

    /**
     * 查询目标协议
     *
     * @param id 目标协议ID
     * @return 目标协议
     */
    @Override
    public TTargetagreement selectTTargetagreementById(Long id)
    {
        return tTargetagreementMapper.selectTTargetagreementById(id);
    }

    /**
     * 查询目标协议
     *
     * @param employeeId 员工号
     * @return 目标协议
     */
    @Override
    public TTargetagreement selectTTargetagreementByEmployeeid(String employeeId) {
        return tTargetagreementMapper.selectTTargetagreementByEmployeeid(employeeId);
    }

    /**
     * 查询目标协议列表
     *
     * @param tTargetagreement 目标协议
     * @return 目标协议
     */
    @Override
    public List<TTargetagreement> selectTTargetagreementList(TTargetagreement tTargetagreement)
    {
        return tTargetagreementMapper.selectTTargetagreementList(tTargetagreement);
    }

    /**
     * 新增目标协议
     *
     * @param tTargetagreement 目标协议
     * @return 结果
     */
    @Override
    public int insertTTargetagreement(TTargetagreement tTargetagreement)
    {
        return tTargetagreementMapper.insertTTargetagreement(tTargetagreement);
    }

    /**
     * 修改目标协议
     *
     * @param tTargetagreement 目标协议
     * @return 结果
     */
    @Override
    public int updateTTargetagreement(TTargetagreement tTargetagreement)
    {
        return tTargetagreementMapper.updateTTargetagreement(tTargetagreement);
    }

    /**
     * 批量删除目标协议
     *
     * @param ids 需要删除的目标协议ID
     * @return 结果
     */
    @Override
    public int deleteTTargetagreementByIds(Long[] ids)
    {
        return tTargetagreementMapper.deleteTTargetagreementByIds(ids);
    }

    /**
     * 删除目标协议信息
     *
     * @param id 目标协议ID
     * @return 结果
     */
    @Override
    public int deleteTTargetagreementById(Long id)
    {
        return tTargetagreementMapper.deleteTTargetagreementById(id);
    }

    /**
     * 查询目标协议
     *
     * @param queryParams 检索条件
     * @return 目标协议
     */
    @Override
    public TTargetagreement selectTTargetagreementByEmployeeidAndYear(TTargetagreement queryParams) {
        return tTargetagreementMapper.selectTTargetagreementByEmployeeidAndYear(queryParams);
    }
}
