package com.hw.wms.service.impl;

import java.util.List;
import com.hw.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.wms.mapper.WmsBaseContainerMapper;
import com.hw.wms.domain.WmsBaseContainer;
import com.hw.wms.service.IWmsBaseContainerService;

/**
 * 料箱信息Service业务层处理
 * 
 * @author xs
 * @date 2023-12-20
 */
@Service
public class WmsBaseContainerServiceImpl implements IWmsBaseContainerService 
{
    @Autowired
    private WmsBaseContainerMapper wmsBaseContainerMapper;

    /**
     * 查询料箱信息
     * 
     * @param baseContainerId 料箱信息主键
     * @return 料箱信息
     */
    @Override
    public WmsBaseContainer selectWmsBaseContainerByBaseContainerId(Long baseContainerId)
    {
        return wmsBaseContainerMapper.selectWmsBaseContainerByBaseContainerId(baseContainerId);
    }

    /**
     * 查询料箱信息列表
     * 
     * @param wmsBaseContainer 料箱信息
     * @return 料箱信息
     */
    @Override
    public List<WmsBaseContainer> selectWmsBaseContainerList(WmsBaseContainer wmsBaseContainer)
    {
        return wmsBaseContainerMapper.selectWmsBaseContainerList(wmsBaseContainer);
    }

    /**
     * 新增料箱信息
     * 
     * @param wmsBaseContainer 料箱信息
     * @return 结果
     */
    @Override
    public int insertWmsBaseContainer(WmsBaseContainer wmsBaseContainer)
    {
        wmsBaseContainer.setCreateTime(DateUtils.getNowDate());
        return wmsBaseContainerMapper.insertWmsBaseContainer(wmsBaseContainer);
    }

    /**
     * 修改料箱信息
     * 
     * @param wmsBaseContainer 料箱信息
     * @return 结果
     */
    @Override
    public int updateWmsBaseContainer(WmsBaseContainer wmsBaseContainer)
    {
        wmsBaseContainer.setUpdateTime(DateUtils.getNowDate());
        return wmsBaseContainerMapper.updateWmsBaseContainer(wmsBaseContainer);
    }

    /**
     * 批量删除料箱信息
     * 
     * @param baseContainerIds 需要删除的料箱信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBaseContainerByBaseContainerIds(Long[] baseContainerIds)
    {
        return wmsBaseContainerMapper.deleteWmsBaseContainerByBaseContainerIds(baseContainerIds);
    }

    /**
     * 删除料箱信息信息
     * 
     * @param baseContainerId 料箱信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBaseContainerByBaseContainerId(Long baseContainerId)
    {
        return wmsBaseContainerMapper.deleteWmsBaseContainerByBaseContainerId(baseContainerId);
    }
}
