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.PdmReportPlanWeekMapper;
import com.ruoyi.powerdistribution.domain.PdmReportPlanWeek;
import com.ruoyi.powerdistribution.service.IPdmReportPlanWeekService;

/**
 * 工作计划完成情况周统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-29
 */
@Service
public class PdmReportPlanWeekServiceImpl implements IPdmReportPlanWeekService
{
    @Autowired
    private PdmReportPlanWeekMapper pdmReportPlanWeekMapper;

    /**
     * 查询工作计划完成情况周统计
     *
     * @param id 工作计划完成情况周统计主键
     * @return 工作计划完成情况周统计
     */
    @Override
    public PdmReportPlanWeek selectPdmReportPlanWeekById(Long id)
    {
        return pdmReportPlanWeekMapper.selectPdmReportPlanWeekById(id);
    }

    /**
     * 查询工作计划完成情况周统计列表
     *
     * @param pdmReportPlanWeek 工作计划完成情况周统计
     * @return 工作计划完成情况周统计
     */
    @Override
    public List<PdmReportPlanWeek> selectPdmReportPlanWeekList(PdmReportPlanWeek pdmReportPlanWeek)
    {
        return pdmReportPlanWeekMapper.selectPdmReportPlanWeekList(pdmReportPlanWeek);
    }

    /**
     * 新增工作计划完成情况周统计
     *
     * @param pdmReportPlanWeek 工作计划完成情况周统计
     * @return 结果
     */
    @Override
    public int insertPdmReportPlanWeek(PdmReportPlanWeek pdmReportPlanWeek)
    {
        pdmReportPlanWeek.setCreateTime(DateUtils.getNowDate());
        return pdmReportPlanWeekMapper.insertPdmReportPlanWeek(pdmReportPlanWeek);
    }

    /**
     * 修改工作计划完成情况周统计
     *
     * @param pdmReportPlanWeek 工作计划完成情况周统计
     * @return 结果
     */
    @Override
    public int updatePdmReportPlanWeek(PdmReportPlanWeek pdmReportPlanWeek)
    {
        pdmReportPlanWeek.setUpdateTime(DateUtils.getNowDate());
        return pdmReportPlanWeekMapper.updatePdmReportPlanWeek(pdmReportPlanWeek);
    }

    /**
     * 批量删除工作计划完成情况周统计
     *
     * @param ids 需要删除的工作计划完成情况周统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanWeekByIds(Long[] ids)
    {
        return pdmReportPlanWeekMapper.deletePdmReportPlanWeekByIds(ids);
    }

    /**
     * 删除工作计划完成情况周统计信息
     *
     * @param id 工作计划完成情况周统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanWeekById(Long id)
    {
        return pdmReportPlanWeekMapper.deletePdmReportPlanWeekById(id);
    }
}
