package com.ruoyi.orderManagement.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.orderManagement.domain.Ftmsorderbillsfees;
import com.ruoyi.orderManagement.mapper.FtmsorderbillsfeesMapper;
import com.ruoyi.orderManagement.service.IftmsorderbillsfeesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单费用Service业务层处理
 *
 * @author ruoyi
 * @date 2021-02-22
 */
@Service
public class FtmsorderbillsfeesServiceImpl implements IftmsorderbillsfeesService {
    @Autowired
    private FtmsorderbillsfeesMapper fTmsorderbillsfeesMapper;

    /**
     * 查询车队费用
     *
     * @param fId 车队费用ID
     * @return 车队费用
     */
    @Override
    public Ftmsorderbillsfees selectFTmsorderbillsfeesById(Long fId) {
        return fTmsorderbillsfeesMapper.selectFTmsorderbillsfeesById(fId);
    }

    /**
     * 查询车队费用列表
     *
     * @param fTmsorderbillsfees 车队费用
     * @return 车队费用
     */
    @Override
    public List<Ftmsorderbillsfees> selectFTmsorderbillsfeesList(Ftmsorderbillsfees fTmsorderbillsfees) {
        return fTmsorderbillsfeesMapper.selectFTmsorderbillsfeesList(fTmsorderbillsfees);
    }

    /**
     * 新增车队费用
     *
     * @param fTmsorderbillsfees 车队费用
     * @return 结果
     */
    @Override
    public int insertFTmsorderbillsfees(Ftmsorderbillsfees fTmsorderbillsfees) {
        fTmsorderbillsfees.setCreateTime(DateUtils.getNowDate());
        return fTmsorderbillsfeesMapper.insertFTmsorderbillsfees(fTmsorderbillsfees);
    }

    /**
     * 修改车队费用
     *
     * @param fTmsorderbillsfees 车队费用
     * @return 结果
     */
    @Override
    public int updateFTmsorderbillsfees(Ftmsorderbillsfees fTmsorderbillsfees) {
        fTmsorderbillsfees.setUpdateTime(DateUtils.getNowDate());
        return fTmsorderbillsfeesMapper.updateFTmsorderbillsfees(fTmsorderbillsfees);
    }

    /**
     * 批量删除车队费用
     *
     * @param fIds 需要删除的车队费用ID
     * @return 结果
     */
    @Override
    public int deleteFTmsorderbillsfeesByIds(Long[] fIds) {
        return fTmsorderbillsfeesMapper.deleteFTmsorderbillsfeesByIds(fIds);
    }

    /**
     * 删除车队费用信息
     *
     * @param fId 车队费用ID
     * @return 结果
     */
    @Override
    public int deleteFTmsorderbillsfeesById(Long fId) {
        return fTmsorderbillsfeesMapper.deleteFTmsorderbillsfeesById(fId);
    }
}
