package com.ruoyi.project.sems.his.service.impl;

import java.util.List;

import com.ruoyi.project.sems.domain.TSpecdevYlrq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.sems.his.mapper.TSpechiYlrqMapper;
import com.ruoyi.project.sems.his.domain.TSpechiYlrq;
import com.ruoyi.project.sems.his.service.ITSpechiYlrqService;

/**
 * 特种设备压力容器台账历史Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-02
 */
@Service("tSpechiYlrqService")
public class TSpechiYlrqServiceImpl implements ITSpechiYlrqService
{
    @Autowired
    private TSpechiYlrqMapper tSpechiYlrqMapper;

    /**
     * 查询特种设备压力容器台账历史
     *
     * @param id 特种设备压力容器台账历史ID
     * @return 特种设备压力容器台账历史
     */
    @Override
    public TSpechiYlrq selectTSpechiYlrqById(Long id)
    {
        return tSpechiYlrqMapper.selectTSpechiYlrqById(id);
    }

    /**
     * 查询特种设备压力容器台账历史列表
     *
     * @param tSpechiYlrq 特种设备压力容器台账历史
     * @return 特种设备压力容器台账历史
     */
    @Override
    public List<TSpechiYlrq> selectTSpechiYlrqList(TSpechiYlrq tSpechiYlrq)
    {
        return tSpechiYlrqMapper.selectTSpechiYlrqList(tSpechiYlrq);
    }

    /**
     * 新增特种设备压力容器台账历史
     *
     * @param tSpechiYlrq 特种设备压力容器台账历史
     * @return 结果
     */
    @Override
    public int insertTSpechiYlrq(TSpechiYlrq tSpechiYlrq)
    {
        return tSpechiYlrqMapper.insertTSpechiYlrq(tSpechiYlrq);
    }

    /**
     * 使用台账对象新增特种设备压力容器台账历史
     * @param tSpecdevYlrq 特种设备压力容器台账
     * @return
     */
    @Override
    public int insertTSpechiYlrqWithDev(TSpecdevYlrq tSpecdevYlrq) {
        return tSpechiYlrqMapper.insertTSpechiYlrqByDev(tSpecdevYlrq);
    }


    /**
     * 修改特种设备压力容器台账历史
     *
     * @param tSpechiYlrq 特种设备压力容器台账历史
     * @return 结果
     */
    @Override
    public int updateTSpechiYlrq(TSpechiYlrq tSpechiYlrq)
    {
        return tSpechiYlrqMapper.updateTSpechiYlrq(tSpechiYlrq);
    }

    /**
     * 批量删除特种设备压力容器台账历史
     *
     * @param ids 需要删除的特种设备压力容器台账历史ID
     * @return 结果
     */
    @Override
    public int deleteTSpechiYlrqByIds(Long[] ids)
    {
        return tSpechiYlrqMapper.deleteTSpechiYlrqByIds(ids);
    }

    /**
     * 删除特种设备压力容器台账历史信息
     *
     * @param id 特种设备压力容器台账历史ID
     * @return 结果
     */
    @Override
    public int deleteTSpechiYlrqById(Long id)
    {
        return tSpechiYlrqMapper.deleteTSpechiYlrqById(id);
    }

    @Override
    public List<TSpechiYlrq> selectTSpechiYlrqByReform(Long devId) {
        return tSpechiYlrqMapper.selectTSpechiYlrqByReform(devId);
    }

    /**
     * 通过devId删除修改记录
     * @param devId
     * @return
     */
    @Override
    public int deleteTSpechiYlrqByDevId(Long devId) {
        return tSpechiYlrqMapper.deleteTSpechiYlrqByDevId(devId);
    }
}
