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.TTargetyardstickMapper;
import com.ruoyi.project.plant.domain.TTargetyardstick;
import com.ruoyi.project.plant.service.ITTargetyardstickService;

import javax.annotation.Resource;

/**
 * 目标完成判定标准Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-16
 */
@Service
public class TTargetyardstickServiceImpl implements ITTargetyardstickService
{
    @Resource
    private TTargetyardstickMapper tTargetyardstickMapper;

    /**
     * 查询目标完成判定标准
     *
     * @param id 目标完成判定标准ID
     * @return 目标完成判定标准
     */
    @Override
    public TTargetyardstick selectTTargetyardstickById(Long id)
    {
        return tTargetyardstickMapper.selectTTargetyardstickById(id);
    }

    /**
     * 查询目标完成判定标准
     *
     * @param agreementId 目标协议ID
     * @return 目标完成判定标准集合
     */
    @Override
    public List<TTargetyardstick> selectTTargetyardstickByAgreementId(Long agreementId) {
        return tTargetyardstickMapper.selectTTargetyardstickByAgreementId(agreementId);
    }

    /**
     * 查询目标完成判定标准列表
     *
     * @param tTargetyardstick 目标完成判定标准
     * @return 目标完成判定标准
     */
    @Override
    public List<TTargetyardstick> selectTTargetyardstickList(TTargetyardstick tTargetyardstick)
    {
        return tTargetyardstickMapper.selectTTargetyardstickList(tTargetyardstick);
    }

    /**
     * 新增目标完成判定标准
     *
     * @param tTargetyardstick 目标完成判定标准
     * @return 结果
     */
    @Override
    public int insertTTargetyardstick(TTargetyardstick tTargetyardstick)
    {
        return tTargetyardstickMapper.insertTTargetyardstick(tTargetyardstick);
    }

    /**
     * 修改目标完成判定标准
     *
     * @param tTargetyardstick 目标完成判定标准
     * @return 结果
     */
    @Override
    public int updateTTargetyardstick(TTargetyardstick tTargetyardstick)
    {
        return tTargetyardstickMapper.updateTTargetyardstick(tTargetyardstick);
    }

    /**
     * 批量删除目标完成判定标准
     *
     * @param ids 需要删除的目标完成判定标准ID
     * @return 结果
     */
    @Override
    public int deleteTTargetyardstickByIds(Long[] ids)
    {
        return tTargetyardstickMapper.deleteTTargetyardstickByIds(ids);
    }

    /**
     * 删除目标完成判定标准信息
     *
     * @param id 目标完成判定标准ID
     * @return 结果
     */
    @Override
    public int deleteTTargetyardstickById(Long id)
    {
        return tTargetyardstickMapper.deleteTTargetyardstickById(id);
    }
}
