package com.yanzhu.manage.service.impl;

import java.util.List;

import com.yanzhu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;

/**
 * 分包单位班组Service业务层处理
 * 
 * @author JiangYuqi
 * @date 2024-08-25
 */
@Service
public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSubdeptsGroupService 
{
    @Autowired
    private ProProjectInfoSubdeptsGroupMapper proProjectInfoSubdeptsGroupMapper;

    /**
     * 查询分包单位班组
     * 
     * @param id 分包单位班组主键
     * @return 分包单位班组
     */
    @Override
    public ProProjectInfoSubdeptsGroup selectProProjectInfoSubdeptsGroupById(Long id)
    {
        return proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(id);
    }

    /**
     * 查询分包单位班组列表
     * 
     * @param proProjectInfoSubdeptsGroup 分包单位班组
     * @return 分包单位班组
     */
    @Override
    public List<ProProjectInfoSubdeptsGroup> selectProProjectInfoSubdeptsGroupList(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
    {
        return proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup);
    }

    /**
     * 新增分包单位班组
     * 
     * @param proProjectInfoSubdeptsGroup 分包单位班组
     * @return 结果
     */
    @Override
    public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
    {
        proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
        return proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
    }

    /**
     * 修改分包单位班组
     * 
     * @param proProjectInfoSubdeptsGroup 分包单位班组
     * @return 结果
     */
    @Override
    public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
    {
        proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
        return proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
    }

    /**
     * 批量删除分包单位班组
     * 
     * @param ids 需要删除的分包单位班组主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoSubdeptsGroupByIds(Long[] ids)
    {
        return proProjectInfoSubdeptsGroupMapper.deleteProProjectInfoSubdeptsGroupByIds(ids);
    }

    /**
     * 删除分包单位班组信息
     * 
     * @param id 分包单位班组主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoSubdeptsGroupById(Long id)
    {
        return proProjectInfoSubdeptsGroupMapper.deleteProProjectInfoSubdeptsGroupById(id);
    }
}
