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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.training.mapper.TWorkcertificateMapper;
import com.ruoyi.project.training.domain.TWorkcertificate;
import com.ruoyi.project.training.service.ITWorkcertificateService;

import javax.annotation.Resource;

/**
 * 作业证书一览Service业务层处理
 *
 * @author ruoyi
 * @date 2020-12-01
 */
@Service
public class TWorkcertificateServiceImpl implements ITWorkcertificateService
{
    @Resource
    private TWorkcertificateMapper tWorkcertificateMapper;

    /**
     * 查询作业证书一览
     *
     * @param id 作业证书一览ID
     * @return 作业证书一览
     */
    @Override
    public TWorkcertificate selectTWorkcertificateById(Long id)
    {
        return tWorkcertificateMapper.selectTWorkcertificateById(id);
    }

    @Override
    public TWorkcertificate selectTWorkcertificateByEmployeeid(String employeeid)
    {
        return tWorkcertificateMapper.selectTWorkcertificateByEmployeeid(employeeid);
    }

    /**
     * 查询作业证书一览列表
     *
     * @param tWorkcertificate 作业证书一览
     * @return 作业证书一览
     */
    @Override
    public List<TWorkcertificate> selectTWorkcertificateList(TWorkcertificate tWorkcertificate)
    {
        return tWorkcertificateMapper.selectTWorkcertificateList(tWorkcertificate);
    }

    /**
     * 定时任务查询作业证书一览列表
     *
     * @param tWorkcertificate 作业证书一览
     * @return 作业证书一览集合
     */
    @Override
    public List<TWorkcertificate> selectList(TWorkcertificate tWorkcertificate) {
        return tWorkcertificateMapper.selectList(tWorkcertificate);
    }

    /**
     * 新增作业证书一览
     *
     * @param tWorkcertificate 作业证书一览
     * @return 结果
     */
    @Override
    public int insertTWorkcertificate(TWorkcertificate tWorkcertificate)
    {
        return tWorkcertificateMapper.insertTWorkcertificate(tWorkcertificate);
    }

    /**
     * 修改作业证书一览
     *
     * @param tWorkcertificate 作业证书一览
     * @return 结果
     */
    @Override
    public int updateTWorkcertificate(TWorkcertificate tWorkcertificate)
    {
        return tWorkcertificateMapper.updateTWorkcertificate(tWorkcertificate);
    }


    /**
     * 根据员工编号修改作业证书一览
     *
     * @param tWorkcertificate 作业证书一览
     * @return 结果
     */
    @Override
    public int updateTWorkcertificateByEmployeeid(TWorkcertificate tWorkcertificate)
    {
        return tWorkcertificateMapper.updateTWorkcertificateByEmployeeid(tWorkcertificate);
    }



    /**
     * 批量删除作业证书一览
     *
     * @param ids 需要删除的作业证书一览ID
     * @return 结果
     */
    @Override
    public int deleteTWorkcertificateByIds(Long[] ids)
    {
        return tWorkcertificateMapper.deleteTWorkcertificateByIds(ids);
    }

    /**
     * 删除作业证书一览信息
     *
     * @param id 作业证书一览ID
     * @return 结果
     */
    @Override
    public int deleteTWorkcertificateById(Long id)
    {
        return tWorkcertificateMapper.deleteTWorkcertificateById(id);
    }
}
