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.PdmScoreRankWorkerMapper;
import com.ruoyi.powerdistribution.domain.PdmScoreRankWorker;
import com.ruoyi.powerdistribution.service.IPdmScoreRankWorkerService;

/**
 * 作业人员积分排名Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class PdmScoreRankWorkerServiceImpl implements IPdmScoreRankWorkerService
{
    @Autowired
    private PdmScoreRankWorkerMapper pdmScoreRankWorkerMapper;

    /**
     * 查询作业人员积分排名
     *
     * @param id 作业人员积分排名主键
     * @return 作业人员积分排名
     */
    @Override
    public PdmScoreRankWorker selectPdmScoreRankWorkerById(Long id)
    {
        return pdmScoreRankWorkerMapper.selectPdmScoreRankWorkerById(id);
    }

    /**
     * 查询作业人员积分排名列表
     *
     * @param pdmScoreRankWorker 作业人员积分排名
     * @return 作业人员积分排名
     */
    @Override
    public List<PdmScoreRankWorker> selectPdmScoreRankWorkerList(PdmScoreRankWorker pdmScoreRankWorker)
    {
        return pdmScoreRankWorkerMapper.selectPdmScoreRankWorkerList(pdmScoreRankWorker);
    }

    /**
     * 新增作业人员积分排名
     *
     * @param pdmScoreRankWorker 作业人员积分排名
     * @return 结果
     */
    @Override
    public int insertPdmScoreRankWorker(PdmScoreRankWorker pdmScoreRankWorker)
    {
        pdmScoreRankWorker.setCreateTime(DateUtils.getNowDate());
        return pdmScoreRankWorkerMapper.insertPdmScoreRankWorker(pdmScoreRankWorker);
    }

    /**
     * 修改作业人员积分排名
     *
     * @param pdmScoreRankWorker 作业人员积分排名
     * @return 结果
     */
    @Override
    public int updatePdmScoreRankWorker(PdmScoreRankWorker pdmScoreRankWorker)
    {
        pdmScoreRankWorker.setUpdateTime(DateUtils.getNowDate());
        return pdmScoreRankWorkerMapper.updatePdmScoreRankWorker(pdmScoreRankWorker);
    }

    /**
     * 批量删除作业人员积分排名
     *
     * @param ids 需要删除的作业人员积分排名主键
     * @return 结果
     */
    @Override
    public int deletePdmScoreRankWorkerByIds(Long[] ids)
    {
        return pdmScoreRankWorkerMapper.deletePdmScoreRankWorkerByIds(ids);
    }

    /**
     * 删除作业人员积分排名信息
     *
     * @param id 作业人员积分排名主键
     * @return 结果
     */
    @Override
    public int deletePdmScoreRankWorkerById(Long id)
    {
        return pdmScoreRankWorkerMapper.deletePdmScoreRankWorkerById(id);
    }
}
