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.PdmReportPlanNextWeekMapper;
import com.ruoyi.powerdistribution.domain.PdmReportPlanNextWeek;
import com.ruoyi.powerdistribution.service.IPdmReportPlanNextWeekService;

/**
 * 下周工作计划统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-29
 */
@Service
public class PdmReportPlanNextWeekServiceImpl implements IPdmReportPlanNextWeekService
{
    @Autowired
    private PdmReportPlanNextWeekMapper pdmReportPlanNextWeekMapper;

    /**
     * 查询下周工作计划统计
     *
     * @param id 下周工作计划统计主键
     * @return 下周工作计划统计
     */
    @Override
    public PdmReportPlanNextWeek selectPdmReportPlanNextWeekById(Long id)
    {
        return pdmReportPlanNextWeekMapper.selectPdmReportPlanNextWeekById(id);
    }

    /**
     * 查询下周工作计划统计列表
     *
     * @param pdmReportPlanNextWeek 下周工作计划统计
     * @return 下周工作计划统计
     */
    @Override
    public List<PdmReportPlanNextWeek> selectPdmReportPlanNextWeekList(PdmReportPlanNextWeek pdmReportPlanNextWeek)
    {
        return pdmReportPlanNextWeekMapper.selectPdmReportPlanNextWeekList(pdmReportPlanNextWeek);
    }

    /**
     * 新增下周工作计划统计
     *
     * @param pdmReportPlanNextWeek 下周工作计划统计
     * @return 结果
     */
    @Override
    public int insertPdmReportPlanNextWeek(PdmReportPlanNextWeek pdmReportPlanNextWeek)
    {
        pdmReportPlanNextWeek.setCreateTime(DateUtils.getNowDate());
        return pdmReportPlanNextWeekMapper.insertPdmReportPlanNextWeek(pdmReportPlanNextWeek);
    }

    /**
     * 修改下周工作计划统计
     *
     * @param pdmReportPlanNextWeek 下周工作计划统计
     * @return 结果
     */
    @Override
    public int updatePdmReportPlanNextWeek(PdmReportPlanNextWeek pdmReportPlanNextWeek)
    {
        pdmReportPlanNextWeek.setUpdateTime(DateUtils.getNowDate());
        return pdmReportPlanNextWeekMapper.updatePdmReportPlanNextWeek(pdmReportPlanNextWeek);
    }

    /**
     * 批量删除下周工作计划统计
     *
     * @param ids 需要删除的下周工作计划统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanNextWeekByIds(Long[] ids)
    {
        return pdmReportPlanNextWeekMapper.deletePdmReportPlanNextWeekByIds(ids);
    }

    /**
     * 删除下周工作计划统计信息
     *
     * @param id 下周工作计划统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanNextWeekById(Long id)
    {
        return pdmReportPlanNextWeekMapper.deletePdmReportPlanNextWeekById(id);
    }
}
