package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProcessConfigurationMapper;
import com.ruoyi.system.domain.ProcessConfiguration;
import com.ruoyi.system.service.IProcessConfigurationService;

/**
 * 补卡、请假流程配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-08
 */
@Service
public class ProcessConfigurationServiceImpl implements IProcessConfigurationService 
{
    @Autowired
    private ProcessConfigurationMapper processConfigurationMapper;

    /**
     * 查询补卡、请假流程配置
     * 
     * @param id 补卡、请假流程配置主键
     * @return 补卡、请假流程配置
     */
    @Override
    public ProcessConfiguration selectProcessConfigurationById(Long id)
    {
        return processConfigurationMapper.selectProcessConfigurationById(id);
    }

    /**
     * 查询补卡、请假流程配置列表
     * 
     * @param processConfiguration 补卡、请假流程配置
     * @return 补卡、请假流程配置
     */
    @Override
    public List<ProcessConfiguration> selectProcessConfigurationList(ProcessConfiguration processConfiguration)
    {
        return processConfigurationMapper.selectProcessConfigurationList(processConfiguration);
    }

    /**
     * 新增补卡、请假流程配置
     * 
     * @param processConfiguration 补卡、请假流程配置
     * @return 结果
     */
    @Override
    public int insertProcessConfiguration(ProcessConfiguration processConfiguration)
    {
        processConfiguration.setCreateTime(DateUtils.getNowDate());
        return processConfigurationMapper.insertProcessConfiguration(processConfiguration);
    }

    /**
     * 修改补卡、请假流程配置
     * 
     * @param processConfiguration 补卡、请假流程配置
     * @return 结果
     */
    @Override
    public int updateProcessConfiguration(ProcessConfiguration processConfiguration)
    {
        processConfiguration.setUpdateTime(DateUtils.getNowDate());
        return processConfigurationMapper.updateProcessConfiguration(processConfiguration);
    }

    /**
     * 批量删除补卡、请假流程配置
     * 
     * @param ids 需要删除的补卡、请假流程配置主键
     * @return 结果
     */
    @Override
    public int deleteProcessConfigurationByIds(Long[] ids)
    {
        return processConfigurationMapper.deleteProcessConfigurationByIds(ids);
    }

    /**
     * 删除补卡、请假流程配置信息
     * 
     * @param id 补卡、请假流程配置主键
     * @return 结果
     */
    @Override
    public int deleteProcessConfigurationById(Long id)
    {
        return processConfigurationMapper.deleteProcessConfigurationById(id);
    }
}
