package com.ruoyi.activiti.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activiti.mapper.BizEmployeReportMapper;
import com.ruoyi.activiti.domain.BizEmployeReport;
import com.ruoyi.activiti.service.IBizEmployeReportService;

/**
 * 员工花名册审批业务Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-06
 */
@Service
public class BizEmployeReportServiceImpl implements IBizEmployeReportService 
{
    @Autowired
    private BizEmployeReportMapper bizEmployeReportMapper;

    /**
     * 查询员工花名册审批业务
     * 
     * @param id 员工花名册审批业务ID
     * @return 员工花名册审批业务
     */
    @Override
    public BizEmployeReport selectBizEmployeReportById(Long id)
    {
        return bizEmployeReportMapper.selectBizEmployeReportById(id);
    }

    /**
     * 查询员工花名册审批业务
     *
     * @param employeId 员工ID
     * @return 员工花名册审批业务
     */
    @Override
    public BizEmployeReport selectBizEmployeByEmployeId(Long employeId){
        return bizEmployeReportMapper.selectBizEmployeByEmployeId(employeId);
    }

    /**
     * 查询员工花名册审批业务列表
     * 
     * @param bizEmployeReport 员工花名册审批业务
     * @return 员工花名册审批业务
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<BizEmployeReport> selectBizEmployeReportList(BizEmployeReport bizEmployeReport)
    {
        return bizEmployeReportMapper.selectBizEmployeReportList(bizEmployeReport);
    }

    /**
     * 新增员工花名册审批业务
     * 
     * @param bizEmployeReport 员工花名册审批业务
     * @return 结果
     */
    @Override
    public int insertBizEmployeReport(BizEmployeReport bizEmployeReport)
    {
        bizEmployeReport.setCreateTime(DateUtils.getNowDate());
        return bizEmployeReportMapper.insertBizEmployeReport(bizEmployeReport);
    }

    /**
     * 修改员工花名册审批业务
     * 
     * @param bizEmployeReport 员工花名册审批业务
     * @return 结果
     */
    @Override
    public int updateBizEmployeReport(BizEmployeReport bizEmployeReport)
    {
        bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
        return bizEmployeReportMapper.updateBizEmployeReport(bizEmployeReport);
    }

    /**
     * 批量删除员工花名册审批业务
     * 
     * @param ids 需要删除的员工花名册审批业务ID
     * @return 结果
     */
    @Override
    public int deleteBizEmployeReportByIds(Long[] ids)
    {
        return bizEmployeReportMapper.deleteBizEmployeReportByIds(ids);
    }

    /**
     * 删除员工花名册审批业务信息
     * 
     * @param id 员工花名册审批业务ID
     * @return 结果
     */
    @Override
    public int deleteBizEmployeReportById(Long id)
    {
        return bizEmployeReportMapper.deleteBizEmployeReportById(id);
    }
}
