package com.bonus.material.warehouse.service.impl;

import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.warehouse.mapper.WhTeamReceiveDetailMapper;
import com.bonus.material.warehouse.domain.WhTeamReceiveDetail;
import com.bonus.material.warehouse.service.IWhTeamReceiveDetailService;

/**
 * 二级库接收详情Service业务层处理
 * 
 * @author xsheng
 * @date 2024-09-27
 */
@Service
public class WhTeamReceiveDetailServiceImpl implements IWhTeamReceiveDetailService 
{
    @Autowired
    private WhTeamReceiveDetailMapper whTeamReceiveDetailMapper;

    /**
     * 查询二级库接收详情
     * 
     * @param id 二级库接收详情主键
     * @return 二级库接收详情
     */
    @Override
    public WhTeamReceiveDetail selectWhTeamReceiveDetailById(Long id)
    {
        return whTeamReceiveDetailMapper.selectWhTeamReceiveDetailById(id);
    }

    /**
     * 查询二级库接收详情列表
     * 
     * @param whTeamReceiveDetail 二级库接收详情
     * @return 二级库接收详情
     */
    @Override
    public List<WhTeamReceiveDetail> selectWhTeamReceiveDetailList(WhTeamReceiveDetail whTeamReceiveDetail)
    {
        return whTeamReceiveDetailMapper.selectWhTeamReceiveDetailList(whTeamReceiveDetail);
    }

    /**
     * 新增二级库接收详情
     * 
     * @param whTeamReceiveDetail 二级库接收详情
     * @return 结果
     */
    @Override
    public int insertWhTeamReceiveDetail(WhTeamReceiveDetail whTeamReceiveDetail)
    {
        whTeamReceiveDetail.setCreateTime(DateUtils.getNowDate());
        return whTeamReceiveDetailMapper.insertWhTeamReceiveDetail(whTeamReceiveDetail);
    }

    /**
     * 修改二级库接收详情
     * 
     * @param whTeamReceiveDetail 二级库接收详情
     * @return 结果
     */
    @Override
    public int updateWhTeamReceiveDetail(WhTeamReceiveDetail whTeamReceiveDetail)
    {
        whTeamReceiveDetail.setUpdateTime(DateUtils.getNowDate());
        return whTeamReceiveDetailMapper.updateWhTeamReceiveDetail(whTeamReceiveDetail);
    }

    /**
     * 批量删除二级库接收详情
     * 
     * @param ids 需要删除的二级库接收详情主键
     * @return 结果
     */
    @Override
    public int deleteWhTeamReceiveDetailByIds(Long[] ids)
    {
        return whTeamReceiveDetailMapper.deleteWhTeamReceiveDetailByIds(ids);
    }

    /**
     * 删除二级库接收详情信息
     * 
     * @param id 二级库接收详情主键
     * @return 结果
     */
    @Override
    public int deleteWhTeamReceiveDetailById(Long id)
    {
        return whTeamReceiveDetailMapper.deleteWhTeamReceiveDetailById(id);
    }
}
