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.PdmReportIllegalWeekMapper;
import com.ruoyi.powerdistribution.domain.PdmReportIllegalWeek;
import com.ruoyi.powerdistribution.service.IPdmReportIllegalWeekService;

/**
 * 违章周统计Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-29
 */
@Service
public class PdmReportIllegalWeekServiceImpl implements IPdmReportIllegalWeekService
{
    @Autowired
    private PdmReportIllegalWeekMapper pdmReportIllegalWeekMapper;

    /**
     * 查询违章周统计
     *
     * @param id 违章周统计主键
     * @return 违章周统计
     */
    @Override
    public PdmReportIllegalWeek selectPdmReportIllegalWeekById(Long id)
    {
        return pdmReportIllegalWeekMapper.selectPdmReportIllegalWeekById(id);
    }

    /**
     * 查询违章周统计列表
     *
     * @param pdmReportIllegalWeek 违章周统计
     * @return 违章周统计
     */
    @Override
    public List<PdmReportIllegalWeek> selectPdmReportIllegalWeekList(PdmReportIllegalWeek pdmReportIllegalWeek)
    {
        return pdmReportIllegalWeekMapper.selectPdmReportIllegalWeekList(pdmReportIllegalWeek);
    }

    /**
     * 新增违章周统计
     *
     * @param pdmReportIllegalWeek 违章周统计
     * @return 结果
     */
    @Override
    public int insertPdmReportIllegalWeek(PdmReportIllegalWeek pdmReportIllegalWeek)
    {
        pdmReportIllegalWeek.setCreateTime(DateUtils.getNowDate());
        return pdmReportIllegalWeekMapper.insertPdmReportIllegalWeek(pdmReportIllegalWeek);
    }

    /**
     * 修改违章周统计
     *
     * @param pdmReportIllegalWeek 违章周统计
     * @return 结果
     */
    @Override
    public int updatePdmReportIllegalWeek(PdmReportIllegalWeek pdmReportIllegalWeek)
    {
        pdmReportIllegalWeek.setUpdateTime(DateUtils.getNowDate());
        return pdmReportIllegalWeekMapper.updatePdmReportIllegalWeek(pdmReportIllegalWeek);
    }

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

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