package com.ruoyi.shipping.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shipping.mapper.TWarehousebillsCntritemsMapper;
import com.ruoyi.shipping.domain.TWarehousebillsCntritems;
import com.ruoyi.shipping.service.ITWarehousebillsCntritemsService;

/**
 * 凯和箱明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-08
 */
@Service
public class TWarehousebillsCntritemsServiceImpl implements ITWarehousebillsCntritemsService 
{
    @Autowired
    private TWarehousebillsCntritemsMapper tWarehousebillsCntritemsMapper;

    /**
     * 查询凯和箱明细
     * 
     * @param fId 凯和箱明细ID
     * @return 凯和箱明细
     */
    @Override
    public TWarehousebillsCntritems selectTWarehousebillsCntritemsById(Long fId)
    {
        return tWarehousebillsCntritemsMapper.selectTWarehousebillsCntritemsById(fId);
    }

    /**
     * 查询凯和箱明细列表
     * 
     * @param tWarehousebillsCntritems 凯和箱明细
     * @return 凯和箱明细
     */
    @Override
    public List<TWarehousebillsCntritems> selectTWarehousebillsCntritemsList(TWarehousebillsCntritems tWarehousebillsCntritems)
    {
        return tWarehousebillsCntritemsMapper.selectTWarehousebillsCntritemsList(tWarehousebillsCntritems);
    }

    /**
     * 新增凯和箱明细
     * 
     * @param tWarehousebillsCntritems 凯和箱明细
     * @return 结果
     */
    @Override
    public int insertTWarehousebillsCntritems(TWarehousebillsCntritems tWarehousebillsCntritems)
    {
        tWarehousebillsCntritems.setCreateTime(DateUtils.getNowDate());
        return tWarehousebillsCntritemsMapper.insertTWarehousebillsCntritems(tWarehousebillsCntritems);
    }

    /**
     * 修改凯和箱明细
     * 
     * @param tWarehousebillsCntritems 凯和箱明细
     * @return 结果
     */
    @Override
    public int updateTWarehousebillsCntritems(TWarehousebillsCntritems tWarehousebillsCntritems)
    {
        tWarehousebillsCntritems.setUpdateTime(DateUtils.getNowDate());
        return tWarehousebillsCntritemsMapper.updateTWarehousebillsCntritems(tWarehousebillsCntritems);
    }

    /**
     * 批量删除凯和箱明细
     * 
     * @param fIds 需要删除的凯和箱明细ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsCntritemsByIds(Long[] fIds)
    {
        return tWarehousebillsCntritemsMapper.deleteTWarehousebillsCntritemsByIds(fIds);
    }

    /**
     * 删除凯和箱明细信息
     * 
     * @param fId 凯和箱明细ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsCntritemsById(Long fId)
    {
        return tWarehousebillsCntritemsMapper.deleteTWarehousebillsCntritemsById(fId);
    }

    @Override
    public List<Map<String, Object>> bookingSpace() {
        return tWarehousebillsCntritemsMapper.bookingSpace();
    }
}
