package com.bonus.material.ma.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.ma.mapper.TypePutInStorageInfoMapper;
import com.bonus.material.ma.domain.TypePutInStorageInfo;
import com.bonus.material.ma.service.ITypePutInStorageInfoService;

/**
 * 盘点入库信息Service业务层处理
 * 
 * @author xsheng
 * @date 2024-09-27
 */
@Service
public class TypePutInStorageInfoServiceImpl implements ITypePutInStorageInfoService 
{
    @Autowired
    private TypePutInStorageInfoMapper typePutInStorageInfoMapper;

    /**
     * 查询盘点入库信息
     * 
     * @param ID 盘点入库信息主键
     * @return 盘点入库信息
     */
    @Override
    public TypePutInStorageInfo selectTypePutInStorageInfoByID(Long ID)
    {
        return typePutInStorageInfoMapper.selectTypePutInStorageInfoByID(ID);
    }

    /**
     * 查询盘点入库信息列表
     * 
     * @param typePutInStorageInfo 盘点入库信息
     * @return 盘点入库信息
     */
    @Override
    public List<TypePutInStorageInfo> selectTypePutInStorageInfoList(TypePutInStorageInfo typePutInStorageInfo)
    {
        return typePutInStorageInfoMapper.selectTypePutInStorageInfoList(typePutInStorageInfo);
    }

    /**
     * 新增盘点入库信息
     * 
     * @param typePutInStorageInfo 盘点入库信息
     * @return 结果
     */
    @Override
    public int insertTypePutInStorageInfo(TypePutInStorageInfo typePutInStorageInfo)
    {
        typePutInStorageInfo.setCreateTime(DateUtils.getNowDate());
        return typePutInStorageInfoMapper.insertTypePutInStorageInfo(typePutInStorageInfo);
    }

    /**
     * 修改盘点入库信息
     * 
     * @param typePutInStorageInfo 盘点入库信息
     * @return 结果
     */
    @Override
    public int updateTypePutInStorageInfo(TypePutInStorageInfo typePutInStorageInfo)
    {
        typePutInStorageInfo.setUpdateTime(DateUtils.getNowDate());
        return typePutInStorageInfoMapper.updateTypePutInStorageInfo(typePutInStorageInfo);
    }

    /**
     * 批量删除盘点入库信息
     * 
     * @param IDs 需要删除的盘点入库信息主键
     * @return 结果
     */
    @Override
    public int deleteTypePutInStorageInfoByIDs(Long[] IDs)
    {
        return typePutInStorageInfoMapper.deleteTypePutInStorageInfoByIDs(IDs);
    }

    /**
     * 删除盘点入库信息信息
     * 
     * @param ID 盘点入库信息主键
     * @return 结果
     */
    @Override
    public int deleteTypePutInStorageInfoByID(Long ID)
    {
        return typePutInStorageInfoMapper.deleteTypePutInStorageInfoByID(ID);
    }
}
