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.PdmReportIllegalDayMapper;
import com.ruoyi.powerdistribution.domain.PdmReportIllegalDay;
import com.ruoyi.powerdistribution.service.IPdmReportIllegalDayService;

/**
 * 违章日统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class PdmReportIllegalDayServiceImpl implements IPdmReportIllegalDayService
{
    @Autowired
    private PdmReportIllegalDayMapper pdmReportIllegalDayMapper;

    /**
     * 查询违章日统计
     *
     * @param id 违章日统计主键
     * @return 违章日统计
     */
    @Override
    public PdmReportIllegalDay selectPdmReportIllegalDayById(Long id)
    {
        return pdmReportIllegalDayMapper.selectPdmReportIllegalDayById(id);
    }

    /**
     * 查询违章日统计列表
     *
     * @param pdmReportIllegalDay 违章日统计
     * @return 违章日统计
     */
    @Override
    public List<PdmReportIllegalDay> selectPdmReportIllegalDayList(PdmReportIllegalDay pdmReportIllegalDay)
    {
        return pdmReportIllegalDayMapper.selectPdmReportIllegalDayList(pdmReportIllegalDay);
    }

    /**
     * 新增违章日统计
     *
     * @param pdmReportIllegalDay 违章日统计
     * @return 结果
     */
    @Override
    public int insertPdmReportIllegalDay(PdmReportIllegalDay pdmReportIllegalDay)
    {
        pdmReportIllegalDay.setCreateTime(DateUtils.getNowDate());
        return pdmReportIllegalDayMapper.insertPdmReportIllegalDay(pdmReportIllegalDay);
    }

    /**
     * 修改违章日统计
     *
     * @param pdmReportIllegalDay 违章日统计
     * @return 结果
     */
    @Override
    public int updatePdmReportIllegalDay(PdmReportIllegalDay pdmReportIllegalDay)
    {
        pdmReportIllegalDay.setUpdateTime(DateUtils.getNowDate());
        return pdmReportIllegalDayMapper.updatePdmReportIllegalDay(pdmReportIllegalDay);
    }

    /**
     * 批量删除违章日统计
     *
     * @param ids 需要删除的违章日统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportIllegalDayByIds(Long[] ids)
    {
        return pdmReportIllegalDayMapper.deletePdmReportIllegalDayByIds(ids);
    }

    /**
     * 删除违章日统计信息
     *
     * @param id 违章日统计主键
     * @return 结果
     */
    @Override
    public int deletePdmReportIllegalDayById(Long id)
    {
        return pdmReportIllegalDayMapper.deletePdmReportIllegalDayById(id);
    }
}
