package com.ruoyi.kaohe.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.kaohe.mapper.KhEmployeeMapper;
import com.ruoyi.kaohe.domain.KhEmployee;
import com.ruoyi.kaohe.service.IKhEmployeeService;

/**
 * 职工信息Service业务层处理
 * 
 * @author hs
 * @date 2025-06-17
 */
@Service
public class KhEmployeeServiceImpl implements IKhEmployeeService 
{
    @Autowired
    private KhEmployeeMapper khEmployeeMapper;

    /**
     * 查询职工信息
     * 
     * @param id 职工信息主键
     * @return 职工信息
     */
    @Override
    public KhEmployee selectKhEmployeeById(Long id)
    {
        return khEmployeeMapper.selectKhEmployeeById(id);
    }

    /**
     * 查询职工信息列表
     * 
     * @param khEmployee 职工信息
     * @return 职工信息
     */
    @Override
    public List<KhEmployee> selectKhEmployeeList(KhEmployee khEmployee)
    {
        return khEmployeeMapper.selectKhEmployeeList(khEmployee);
    }

    /**
     * 新增职工信息
     * 
     * @param khEmployee 职工信息
     * @return 结果
     */
    @Override
    public int insertKhEmployee(KhEmployee khEmployee)
    {
        khEmployee.setCreateTime(DateUtils.getNowDate());
        return khEmployeeMapper.insertKhEmployee(khEmployee);
    }

    /**
     * 修改职工信息
     * 
     * @param khEmployee 职工信息
     * @return 结果
     */
    @Override
    public int updateKhEmployee(KhEmployee khEmployee)
    {
        khEmployee.setUpdateTime(DateUtils.getNowDate());
        return khEmployeeMapper.updateKhEmployee(khEmployee);
    }

    /**
     * 批量删除职工信息
     * 
     * @param ids 需要删除的职工信息主键
     * @return 结果
     */
    @Override
    public int deleteKhEmployeeByIds(Long[] ids)
    {
        return khEmployeeMapper.deleteKhEmployeeByIds(ids);
    }

    /**
     * 删除职工信息信息
     * 
     * @param id 职工信息主键
     * @return 结果
     */
    @Override
    public int deleteKhEmployeeById(Long id)
    {
        return khEmployeeMapper.deleteKhEmployeeById(id);
    }
}
