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.KhPingceMapper;
import com.ruoyi.kaohe.domain.KhPingce;
import com.ruoyi.kaohe.service.IKhPingceService;

/**
 * 考核评测Service业务层处理
 * 
 * @author hs
 * @date 2025-06-17
 */
@Service
public class KhPingceServiceImpl implements IKhPingceService 
{
    @Autowired
    private KhPingceMapper khPingceMapper;

    /**
     * 查询考核评测
     * 
     * @param id 考核评测主键
     * @return 考核评测
     */
    @Override
    public KhPingce selectKhPingceById(Long id)
    {
        return khPingceMapper.selectKhPingceById(id);
    }

    /**
     * 查询考核评测列表
     * 
     * @param khPingce 考核评测
     * @return 考核评测
     */
    @Override
    public List<KhPingce> selectKhPingceList(KhPingce khPingce)
    {
        return khPingceMapper.selectKhPingceList(khPingce);
    }

    /**
     * 新增考核评测
     * 
     * @param khPingce 考核评测
     * @return 结果
     */
    @Override
    public int insertKhPingce(KhPingce khPingce)
    {
        khPingce.setCreateTime(DateUtils.getNowDate());
        return khPingceMapper.insertKhPingce(khPingce);
    }

    /**
     * 修改考核评测
     * 
     * @param khPingce 考核评测
     * @return 结果
     */
    @Override
    public int updateKhPingce(KhPingce khPingce)
    {
        khPingce.setUpdateTime(DateUtils.getNowDate());
        return khPingceMapper.updateKhPingce(khPingce);
    }

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

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