package com.sundot.airport.personnel.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sundot.airport.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sundot.airport.personnel.mapper.PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper;
import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail;
import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;

/**
 * 月度考核指标奖罚明细Service业务层处理
 *
 * @author ruoyi
 * @date 2026-05-07
 */
@Service
public class PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailServiceImpl extends ServiceImpl<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper, PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> implements IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService {
    @Autowired
    private PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper;

    /**
     * 查询月度考核指标奖罚明细
     *
     * @param id 月度考核指标奖罚明细主键
     * @return 月度考核指标奖罚明细
     */
    @Override
    public PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail selectPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailById(Long id) {
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.selectPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailById(id);
    }

    /**
     * 查询月度考核指标奖罚明细列表
     *
     * @param personnelMonthlyAssessmentIndicatorRewardPunishmentDetail 月度考核指标奖罚明细
     * @return 月度考核指标奖罚明细
     */
    @Override
    public List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> selectPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail personnelMonthlyAssessmentIndicatorRewardPunishmentDetail) {
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.selectPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail);
    }

    /**
     * 新增月度考核指标奖罚明细
     *
     * @param personnelMonthlyAssessmentIndicatorRewardPunishmentDetail 月度考核指标奖罚明细
     * @return 结果
     */
    @Override
    public int insertPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail personnelMonthlyAssessmentIndicatorRewardPunishmentDetail) {
        personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setCreateTime(DateUtils.getNowDate());
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.insertPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail);
    }

    /**
     * 修改月度考核指标奖罚明细
     *
     * @param personnelMonthlyAssessmentIndicatorRewardPunishmentDetail 月度考核指标奖罚明细
     * @return 结果
     */
    @Override
    public int updatePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail personnelMonthlyAssessmentIndicatorRewardPunishmentDetail) {
        personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setUpdateTime(DateUtils.getNowDate());
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.updatePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail);
    }

    /**
     * 批量删除月度考核指标奖罚明细
     *
     * @param ids 需要删除的月度考核指标奖罚明细主键
     * @return 结果
     */
    @Override
    public int deletePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailByIds(Long[] ids) {
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.deletePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailByIds(ids);
    }

    /**
     * 删除月度考核指标奖罚明细信息
     *
     * @param id 月度考核指标奖罚明细主键
     * @return 结果
     */
    @Override
    public int deletePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailById(Long id) {
        return personnelMonthlyAssessmentIndicatorRewardPunishmentDetailMapper.deletePersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailById(id);
    }
}
