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.KhKhrwResultMapper;
import com.ruoyi.kaohe.domain.KhKhrwResult;
import com.ruoyi.kaohe.service.IKhKhrwResultService;

/**
 * 考核结果Service业务层处理
 * 
 * @author hs
 * @date 2025-07-05
 */
@Service
public class KhKhrwResultServiceImpl implements IKhKhrwResultService 
{
    @Autowired
    private KhKhrwResultMapper khKhrwResultMapper;

    /**
     * 查询考核结果
     * 
     * @param id 考核结果主键
     * @return 考核结果
     */
    @Override
    public KhKhrwResult selectKhKhrwResultById(Long id)
    {
        return khKhrwResultMapper.selectKhKhrwResultById(id);
    }

    /**
     * 查询考核结果列表
     * 
     * @param khKhrwResult 考核结果
     * @return 考核结果
     */
    @Override
    public List<KhKhrwResult> selectKhKhrwResultList(KhKhrwResult khKhrwResult)
    {
        return khKhrwResultMapper.selectKhKhrwResultList(khKhrwResult);
    }

    /**
     * 新增考核结果
     * 
     * @param khKhrwResult 考核结果
     * @return 结果
     */
    @Override
    public int insertKhKhrwResult(KhKhrwResult khKhrwResult)
    {
        khKhrwResult.setCreateTime(DateUtils.getNowDate());
        return khKhrwResultMapper.insertKhKhrwResult(khKhrwResult);
    }

    /**
     * 修改考核结果
     * 
     * @param khKhrwResult 考核结果
     * @return 结果
     */
    @Override
    public int updateKhKhrwResult(KhKhrwResult khKhrwResult)
    {
        khKhrwResult.setUpdateTime(DateUtils.getNowDate());
        return khKhrwResultMapper.updateKhKhrwResult(khKhrwResult);
    }

    /**
     * 批量删除考核结果
     * 
     * @param ids 需要删除的考核结果主键
     * @return 结果
     */
    @Override
    public int deleteKhKhrwResultByIds(Long[] ids)
    {
        return khKhrwResultMapper.deleteKhKhrwResultByIds(ids);
    }

    /**
     * 删除考核结果信息
     * 
     * @param id 考核结果主键
     * @return 结果
     */
    @Override
    public int deleteKhKhrwResultById(Long id)
    {
        return khKhrwResultMapper.deleteKhKhrwResultById(id);
    }
}
