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.PdmReportAppointmentWeekMapper;
import com.ruoyi.powerdistribution.domain.PdmReportAppointmentWeek;
import com.ruoyi.powerdistribution.service.IPdmReportAppointmentWeekService;

/**
 * 履职周统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-29
 */
@Service
public class PdmReportAppointmentWeekServiceImpl implements IPdmReportAppointmentWeekService
{
    @Autowired
    private PdmReportAppointmentWeekMapper pdmReportAppointmentWeekMapper;

    /**
     * 查询履职周统计
     *
     * @param id 履职周统计主键
     * @return 履职周统计
     */
    @Override
    public PdmReportAppointmentWeek selectPdmReportAppointmentWeekById(Long id)
    {
        return pdmReportAppointmentWeekMapper.selectPdmReportAppointmentWeekById(id);
    }

    /**
     * 查询履职周统计列表
     *
     * @param pdmReportAppointmentWeek 履职周统计
     * @return 履职周统计
     */
    @Override
    public List<PdmReportAppointmentWeek> selectPdmReportAppointmentWeekList(PdmReportAppointmentWeek pdmReportAppointmentWeek)
    {
        return pdmReportAppointmentWeekMapper.selectPdmReportAppointmentWeekList(pdmReportAppointmentWeek);
    }

    /**
     * 新增履职周统计
     *
     * @param pdmReportAppointmentWeek 履职周统计
     * @return 结果
     */
    @Override
    public int insertPdmReportAppointmentWeek(PdmReportAppointmentWeek pdmReportAppointmentWeek)
    {
        pdmReportAppointmentWeek.setCreateTime(DateUtils.getNowDate());
        return pdmReportAppointmentWeekMapper.insertPdmReportAppointmentWeek(pdmReportAppointmentWeek);
    }

    /**
     * 修改履职周统计
     *
     * @param pdmReportAppointmentWeek 履职周统计
     * @return 结果
     */
    @Override
    public int updatePdmReportAppointmentWeek(PdmReportAppointmentWeek pdmReportAppointmentWeek)
    {
        pdmReportAppointmentWeek.setUpdateTime(DateUtils.getNowDate());
        return pdmReportAppointmentWeekMapper.updatePdmReportAppointmentWeek(pdmReportAppointmentWeek);
    }

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

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