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.PdmConstructorMapper;
import com.ruoyi.powerdistribution.domain.PdmConstructor;
import com.ruoyi.powerdistribution.service.IPdmConstructorService;

/**
 * 配网工程队伍施工人员信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-20
 */
@Service
public class PdmConstructorServiceImpl implements IPdmConstructorService 
{
    @Autowired
    private PdmConstructorMapper pdmConstructorMapper;

    /**
     * 查询配网工程队伍施工人员信息
     * 
     * @param id 配网工程队伍施工人员信息主键
     * @return 配网工程队伍施工人员信息
     */
    @Override
    public PdmConstructor selectPdmConstructorById(Long id)
    {
        return pdmConstructorMapper.selectPdmConstructorById(id);
    }

    /**
     * 查询配网工程队伍施工人员信息列表
     * 
     * @param pdmConstructor 配网工程队伍施工人员信息
     * @return 配网工程队伍施工人员信息
     */
    @Override
    public List<PdmConstructor> selectPdmConstructorList(PdmConstructor pdmConstructor)
    {
        return pdmConstructorMapper.selectPdmConstructorList(pdmConstructor);
    }

    /**
     * 新增配网工程队伍施工人员信息
     * 
     * @param pdmConstructor 配网工程队伍施工人员信息
     * @return 结果
     */
    @Override
    public int insertPdmConstructor(PdmConstructor pdmConstructor)
    {
        pdmConstructor.setCreateTime(DateUtils.getNowDate());
        return pdmConstructorMapper.insertPdmConstructor(pdmConstructor);
    }

    /**
     * 修改配网工程队伍施工人员信息
     * 
     * @param pdmConstructor 配网工程队伍施工人员信息
     * @return 结果
     */
    @Override
    public int updatePdmConstructor(PdmConstructor pdmConstructor)
    {
        pdmConstructor.setUpdateTime(DateUtils.getNowDate());
        return pdmConstructorMapper.updatePdmConstructor(pdmConstructor);
    }

    /**
     * 批量删除配网工程队伍施工人员信息
     * 
     * @param ids 需要删除的配网工程队伍施工人员信息主键
     * @return 结果
     */
    @Override
    public int deletePdmConstructorByIds(Long[] ids)
    {
        return pdmConstructorMapper.deletePdmConstructorByIds(ids);
    }

    /**
     * 删除配网工程队伍施工人员信息信息
     * 
     * @param id 配网工程队伍施工人员信息主键
     * @return 结果
     */
    @Override
    public int deletePdmConstructorById(Long id)
    {
        return pdmConstructorMapper.deletePdmConstructorById(id);
    }
}
