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.TypePutInStorageDetailsMapper;
import com.bonus.material.ma.domain.TypePutInStorageDetails;
import com.bonus.material.ma.service.ITypePutInStorageDetailsService;

/**
 * 盘点入库详情Service业务层处理
 * 
 * @author xsheng
 * @date 2024-09-27
 */
@Service
public class TypePutInStorageDetailsServiceImpl implements ITypePutInStorageDetailsService 
{
    @Autowired
    private TypePutInStorageDetailsMapper typePutInStorageDetailsMapper;

    /**
     * 查询盘点入库详情
     * 
     * @param ID 盘点入库详情主键
     * @return 盘点入库详情
     */
    @Override
    public TypePutInStorageDetails selectTypePutInStorageDetailsByID(Long ID)
    {
        return typePutInStorageDetailsMapper.selectTypePutInStorageDetailsByID(ID);
    }

    /**
     * 查询盘点入库详情列表
     * 
     * @param typePutInStorageDetails 盘点入库详情
     * @return 盘点入库详情
     */
    @Override
    public List<TypePutInStorageDetails> selectTypePutInStorageDetailsList(TypePutInStorageDetails typePutInStorageDetails)
    {
        return typePutInStorageDetailsMapper.selectTypePutInStorageDetailsList(typePutInStorageDetails);
    }

    /**
     * 新增盘点入库详情
     * 
     * @param typePutInStorageDetails 盘点入库详情
     * @return 结果
     */
    @Override
    public int insertTypePutInStorageDetails(TypePutInStorageDetails typePutInStorageDetails)
    {
        typePutInStorageDetails.setCreateTime(DateUtils.getNowDate());
        return typePutInStorageDetailsMapper.insertTypePutInStorageDetails(typePutInStorageDetails);
    }

    /**
     * 修改盘点入库详情
     * 
     * @param typePutInStorageDetails 盘点入库详情
     * @return 结果
     */
    @Override
    public int updateTypePutInStorageDetails(TypePutInStorageDetails typePutInStorageDetails)
    {
        typePutInStorageDetails.setUpdateTime(DateUtils.getNowDate());
        return typePutInStorageDetailsMapper.updateTypePutInStorageDetails(typePutInStorageDetails);
    }

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

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