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.KhItemsMapper;
import com.ruoyi.kaohe.domain.KhItems;
import com.ruoyi.kaohe.service.IKhItemsService;

/**
 * 考核项Service业务层处理
 * 
 * @author hs
 * @date 2025-06-17
 */
@Service
public class KhItemsServiceImpl implements IKhItemsService 
{
    @Autowired
    private KhItemsMapper khItemsMapper;

    /**
     * 查询考核项
     * 
     * @param id 考核项主键
     * @return 考核项
     */
    @Override
    public KhItems selectKhItemsById(Long id)
    {
        return khItemsMapper.selectKhItemsById(id);
    }

    /**
     * 查询考核项列表
     * 
     * @param khItems 考核项
     * @return 考核项
     */
    @Override
    public List<KhItems> selectKhItemsList(KhItems khItems)
    {
        return khItemsMapper.selectKhItemsList(khItems);
    }

    /**
     * 新增考核项
     * 
     * @param khItems 考核项
     * @return 结果
     */
    @Override
    public int insertKhItems(KhItems khItems)
    {
        khItems.setCreateTime(DateUtils.getNowDate());
        return khItemsMapper.insertKhItems(khItems);
    }

    /**
     * 修改考核项
     * 
     * @param khItems 考核项
     * @return 结果
     */
    @Override
    public int updateKhItems(KhItems khItems)
    {
        khItems.setUpdateTime(DateUtils.getNowDate());
        return khItemsMapper.updateKhItems(khItems);
    }

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

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