package com.ruoyi.rc.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.rc.mapper.TOpenItemMapper;
import com.ruoyi.rc.domain.TOpenItem;
import com.ruoyi.rc.service.ITOpenItemService;

/**
 * 开项Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-19
 */
@Service
public class TOpenItemServiceImpl implements ITOpenItemService 
{
    @Autowired
    private TOpenItemMapper tOpenItemMapper;

    /**
     * 查询开项
     * 
     * @param id 开项主键
     * @return 开项
     */
    @Override
    public TOpenItem selectTOpenItemById(Long id)
    {
        return tOpenItemMapper.selectTOpenItemById(id);
    }

    /**
     * 查询开项列表
     * 
     * @param tOpenItem 开项
     * @return 开项
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<TOpenItem> selectTOpenItemList(TOpenItem tOpenItem)
    {
        return tOpenItemMapper.selectTOpenItemList(tOpenItem);
    }

    /**
     * 新增开项
     * 
     * @param tOpenItem 开项
     * @return 结果
     */
    @Override
    public int insertTOpenItem(TOpenItem tOpenItem)
    {
        return tOpenItemMapper.insertTOpenItem(tOpenItem);
    }

    /**
     * 修改开项
     * 
     * @param tOpenItem 开项
     * @return 结果
     */
    @Override
    public int updateTOpenItem(TOpenItem tOpenItem)
    {
        return tOpenItemMapper.updateTOpenItem(tOpenItem);
    }

    /**
     * 批量删除开项
     * 
     * @param ids 需要删除的开项主键
     * @return 结果
     */
    @Override
    public int deleteTOpenItemByIds(Long[] ids)
    {
        return tOpenItemMapper.deleteTOpenItemByIds(ids);
    }

    /**
     * 删除开项信息
     * 
     * @param id 开项主键
     * @return 结果
     */
    @Override
    public int deleteTOpenItemById(Long id)
    {
        return tOpenItemMapper.deleteTOpenItemById(id);
    }
}
