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.PdmReportPlanNextDayMapper;
import com.ruoyi.powerdistribution.domain.PdmReportPlanNextDay;
import com.ruoyi.powerdistribution.service.IPdmReportPlanNextDayService;

/**
 * 明日工作计划Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class PdmReportPlanNextDayServiceImpl implements IPdmReportPlanNextDayService
{
    @Autowired
    private PdmReportPlanNextDayMapper pdmReportPlanNextDayMapper;

    /**
     * 查询明日工作计划
     *
     * @param id 明日工作计划主键
     * @return 明日工作计划
     */
    @Override
    public PdmReportPlanNextDay selectPdmReportPlanNextDayById(Long id)
    {
        return pdmReportPlanNextDayMapper.selectPdmReportPlanNextDayById(id);
    }

    /**
     * 查询明日工作计划列表
     *
     * @param pdmReportPlanNextDay 明日工作计划
     * @return 明日工作计划
     */
    @Override
    public List<PdmReportPlanNextDay> selectPdmReportPlanNextDayList(PdmReportPlanNextDay pdmReportPlanNextDay)
    {
        return pdmReportPlanNextDayMapper.selectPdmReportPlanNextDayList(pdmReportPlanNextDay);
    }

    /**
     * 新增明日工作计划
     *
     * @param pdmReportPlanNextDay 明日工作计划
     * @return 结果
     */
    @Override
    public int insertPdmReportPlanNextDay(PdmReportPlanNextDay pdmReportPlanNextDay)
    {
        pdmReportPlanNextDay.setCreateTime(DateUtils.getNowDate());
        return pdmReportPlanNextDayMapper.insertPdmReportPlanNextDay(pdmReportPlanNextDay);
    }

    /**
     * 修改明日工作计划
     *
     * @param pdmReportPlanNextDay 明日工作计划
     * @return 结果
     */
    @Override
    public int updatePdmReportPlanNextDay(PdmReportPlanNextDay pdmReportPlanNextDay)
    {
        pdmReportPlanNextDay.setUpdateTime(DateUtils.getNowDate());
        return pdmReportPlanNextDayMapper.updatePdmReportPlanNextDay(pdmReportPlanNextDay);
    }

    /**
     * 批量删除明日工作计划
     *
     * @param ids 需要删除的明日工作计划主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanNextDayByIds(Long[] ids)
    {
        return pdmReportPlanNextDayMapper.deletePdmReportPlanNextDayByIds(ids);
    }

    /**
     * 删除明日工作计划信息
     *
     * @param id 明日工作计划主键
     * @return 结果
     */
    @Override
    public int deletePdmReportPlanNextDayById(Long id)
    {
        return pdmReportPlanNextDayMapper.deletePdmReportPlanNextDayById(id);
    }
}
