package com.yanzhu.manage.service.impl;

import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 分包单位工人Service业务层处理
 * 
 * @author JiangYuQi
 * @date 2024-08-25
 */
@Service
public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSubdeptsUsersService 
{
    @Autowired
    private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper;

    /**
     * 查询分包单位工人
     * 
     * @param id 分包单位工人主键
     * @return 分包单位工人
     */
    @Override
    public ProProjectInfoSubdeptsUsers selectProProjectInfoSubdeptsUsersById(Long id)
    {
        return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
    }

    /**
     * 查询分包单位工人列表
     * 
     * @param proProjectInfoSubdeptsUsers 分包单位工人
     * @return 分包单位工人
     */
    @Override
    public List<ProProjectInfoSubdeptsUsers> selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
    {
        return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
    }

    /**
     * 新增分包单位工人
     * 
     * @param proProjectInfoSubdeptsUsers 分包单位工人
     * @return 结果
     */
    @Override
    public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
    {
        proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
        return proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
    }

    /**
     * 修改分包单位工人
     * 
     * @param proProjectInfoSubdeptsUsers 分包单位工人
     * @return 结果
     */
    @Override
    public int updateProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
    {
        proProjectInfoSubdeptsUsers.setUpdateTime(DateUtils.getNowDate());
        return proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
    }

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

    /**
     * 删除分包单位工人信息
     * 
     * @param id 分包单位工人主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoSubdeptsUsersById(Long id)
    {
        return proProjectInfoSubdeptsUsersMapper.deleteProProjectInfoSubdeptsUsersById(id);
    }
}
