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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.reliability.mapper.TDeviceInventoryPartsMapper;
import com.ruoyi.project.reliability.domain.TDeviceInventoryParts;
import com.ruoyi.project.reliability.service.ITDeviceInventoryPartsService;

/**
 * 关键部件库存清单Service业务层处理
 *
 * @author ruoyi
 * @date 2022-07-07
 */
@Service
public class TDeviceInventoryPartsServiceImpl implements ITDeviceInventoryPartsService
{
    @Autowired
    private TDeviceInventoryPartsMapper tDeviceInventoryPartsMapper;

    /**
     * 查询关键部件库存清单
     *
     * @param id 关键部件库存清单ID
     * @return 关键部件库存清单
     */
    @Override
    public TDeviceInventoryParts selectTDeviceInventoryPartsById(Long id)
    {
        return tDeviceInventoryPartsMapper.selectTDeviceInventoryPartsById(id);
    }

    /**
     * 查询关键部件库存清单列表
     *
     * @param tDeviceInventoryParts 关键部件库存清单
     * @return 关键部件库存清单
     */
    @Override
    public List<TDeviceInventoryParts> selectTDeviceInventoryPartsList(TDeviceInventoryParts tDeviceInventoryParts)
    {
        return tDeviceInventoryPartsMapper.selectTDeviceInventoryPartsList(tDeviceInventoryParts);
    }

    /**
     * 新增关键部件库存清单
     *
     * @param tDeviceInventoryParts 关键部件库存清单
     * @return 结果
     */
    @Override
    public int insertTDeviceInventoryParts(TDeviceInventoryParts tDeviceInventoryParts)
    {
        return tDeviceInventoryPartsMapper.insertTDeviceInventoryParts(tDeviceInventoryParts);
    }

    /**
     * 修改关键部件库存清单
     *
     * @param tDeviceInventoryParts 关键部件库存清单
     * @return 结果
     */
    @Override
    public int updateTDeviceInventoryParts(TDeviceInventoryParts tDeviceInventoryParts)
    {
        return tDeviceInventoryPartsMapper.updateTDeviceInventoryParts(tDeviceInventoryParts);
    }

    /**
     * 批量删除关键部件库存清单
     *
     * @param ids 需要删除的关键部件库存清单ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceInventoryPartsByIds(Long[] ids)
    {
        return tDeviceInventoryPartsMapper.deleteTDeviceInventoryPartsByIds(ids);
    }

    /**
     * 删除关键部件库存清单信息
     *
     * @param id 关键部件库存清单ID
     * @return 结果
     */
    @Override
    public int deleteTDeviceInventoryPartsById(Long id)
    {
        return tDeviceInventoryPartsMapper.deleteTDeviceInventoryPartsById(id);
    }
}
