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.PdmReportPlanDayMapper;
import com.ruoyi.powerdistribution.domain.PdmReportPlanDay;
import com.ruoyi.powerdistribution.service.IPdmReportPlanDayService;

/**
 * 工作计划日统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class PdmReportPlanDayServiceImpl implements IPdmReportPlanDayService
{
    @Autowired
    private PdmReportPlanDayMapper pdmReportPlanDayMapper;

    /**
     * 查询工作计划日统计
     *
     * @param id 工作计划日统计主键
     * @return 工作计划日统计
     */
    @Override
    public PdmReportPlanDay selectPdmReportPlanDayById(Long id)
    {
        return pdmReportPlanDayMapper.selectPdmReportPlanDayById(id);
    }

    /**
     * 查询工作计划日统计列表
     *
     * @param pdmReportPlanDay 工作计划日统计
     * @return 工作计划日统计
     */
    @Override
    public List<PdmReportPlanDay> selectPdmReportPlanDayList(PdmReportPlanDay pdmReportPlanDay)
    {
        return pdmReportPlanDayMapper.selectPdmReportPlanDayList(pdmReportPlanDay);
    }

    /**
     * 新增工作计划日统计
     *
     * @param pdmReportPlanDay 工作计划日统计
     * @return 结果
     */
    @Override
    public int insertPdmReportPlanDay(PdmReportPlanDay pdmReportPlanDay)
    {
        pdmReportPlanDay.setCreateTime(DateUtils.getNowDate());
        return pdmReportPlanDayMapper.insertPdmReportPlanDay(pdmReportPlanDay);
    }

    /**
     * 修改工作计划日统计
     *
     * @param pdmReportPlanDay 工作计划日统计
     * @return 结果
     */
    @Override
    public int updatePdmReportPlanDay(PdmReportPlanDay pdmReportPlanDay)
    {
        pdmReportPlanDay.setUpdateTime(DateUtils.getNowDate());
        return pdmReportPlanDayMapper.updatePdmReportPlanDay(pdmReportPlanDay);
    }

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

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