package com.ruoyi.warehouseBusiness.service.impl;


import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.warehouseBusiness.domain.TWarehousebillsfees;
import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsfeesMapper;
import com.ruoyi.warehouseBusiness.service.ITWarehousebillsfeesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 仓库费用明细Service业务层处理
 *
 * @author ruoyi
 * @date 2020-12-11
 */
@Service
public class TWarehousebillsfeesServiceImpl implements ITWarehousebillsfeesService {
    @Autowired
    private TWarehousebillsfeesMapper tWarehousebillsfeesMapper;

    /**
     * 查询仓库费用明细
     *
     * @param fId 仓库费用明细ID
     * @return 仓库费用明细
     */
    @Override
    public TWarehousebillsfees selectTWarehousebillsfeesById(Long fId) {
        return tWarehousebillsfeesMapper.selectTWarehousebillsfeesById(fId);
    }

    /**
     * 查询仓库费用明细列表
     *
     * @param tWarehousebillsfees 仓库费用明细
     * @return 仓库费用明细
     */
    @Override
    public List<TWarehousebillsfees> selectTWarehousebillsfeesList(TWarehousebillsfees tWarehousebillsfees) {
        return tWarehousebillsfeesMapper.selectTWarehousebillsfeesList(tWarehousebillsfees);
    }

    /**
     * 新增仓库费用明细
     *
     * @param tWarehousebillsfees 仓库费用明细
     * @return 结果
     */
    @Override
    public int insertTWarehousebillsfees(TWarehousebillsfees tWarehousebillsfees) {
        tWarehousebillsfees.setCreateTime(DateUtils.getNowDate());
        return tWarehousebillsfeesMapper.insertTWarehousebillsfees(tWarehousebillsfees);
    }

    /**
     * 修改仓库费用明细
     *
     * @param tWarehousebillsfees 仓库费用明细
     * @return 结果
     */
    @Override
    public int updateTWarehousebillsfees(TWarehousebillsfees tWarehousebillsfees) {
        tWarehousebillsfees.setUpdateTime(DateUtils.getNowDate());
        return tWarehousebillsfeesMapper.updateTWarehousebillsfees(tWarehousebillsfees);
    }

    /**
     * 批量删除仓库费用明细
     *
     * @param fIds 需要删除的仓库费用明细ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsfeesByIds(Long[] fIds) {
        return tWarehousebillsfeesMapper.deleteTWarehousebillsfeesByIds(fIds);
    }

    /**
     * 删除仓库费用明细信息
     *
     * @param fId 仓库费用明细ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsfeesById(Long fId) {
        return tWarehousebillsfeesMapper.deleteTWarehousebillsfeesById(fId);
    }
}
