package com.ruoyi.powerdistribution.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.powerdistribution.mapper.PdmReportAppointmentDayMapper;
import com.ruoyi.powerdistribution.domain.PdmReportAppointmentDay;
import com.ruoyi.powerdistribution.service.IPdmReportAppointmentDayService;

/**
 * 履职日统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class PdmReportAppointmentDayServiceImpl implements IPdmReportAppointmentDayService
{
    @Autowired
    private PdmReportAppointmentDayMapper pdmReportAppointmentDayMapper;

    /**
     * 查询履职日统计
     *
     * @param id 履职日统计主键
     * @return 履职日统计
     */
    @Override
    public PdmReportAppointmentDay selectPdmReportAppointmentDayById(Long id)
    {
        return pdmReportAppointmentDayMapper.selectPdmReportAppointmentDayById(id);
    }

    /**
     * 查询履职日统计列表
     *
     * @param pdmReportAppointmentDay 履职日统计
     * @return 履职日统计
     */
    @Override
    public List<PdmReportAppointmentDay> selectPdmReportAppointmentDayList(PdmReportAppointmentDay pdmReportAppointmentDay)
    {
        return pdmReportAppointmentDayMapper.selectPdmReportAppointmentDayList(pdmReportAppointmentDay);
    }

    /**
     * 新增履职日统计
     *
     * @param pdmReportAppointmentDay 履职日统计
     * @return 结果
     */
    @Override
    public int insertPdmReportAppointmentDay(PdmReportAppointmentDay pdmReportAppointmentDay)
    {
        pdmReportAppointmentDay.setCreateTime(DateUtils.getNowDate());
        return pdmReportAppointmentDayMapper.insertPdmReportAppointmentDay(pdmReportAppointmentDay);
    }

    /**
     * 修改履职日统计
     *
     * @param pdmReportAppointmentDay 履职日统计
     * @return 结果
     */
    @Override
    public int updatePdmReportAppointmentDay(PdmReportAppointmentDay pdmReportAppointmentDay)
    {
        pdmReportAppointmentDay.setUpdateTime(DateUtils.getNowDate());
        return pdmReportAppointmentDayMapper.updatePdmReportAppointmentDay(pdmReportAppointmentDay);
    }

    /**
     * 批量删除履职日统计
     *
     * @param ids 需要删除的履职日统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportAppointmentDayByIds(Long[] ids)
    {
        return pdmReportAppointmentDayMapper.deletePdmReportAppointmentDayByIds(ids);
    }

    /**
     * 删除履职日统计信息
     *
     * @param id 履职日统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportAppointmentDayById(Long id)
    {
        return pdmReportAppointmentDayMapper.deletePdmReportAppointmentDayById(id);
    }
}
