package com.ruoyi.orderManagement.finance.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.orderManagement.finance.domain.FTmsaccbillsitems;
import com.ruoyi.orderManagement.finance.mapper.FTmsaccbillsitemsMapper;
import com.ruoyi.orderManagement.finance.service.IFTmsaccbillsitemsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 财务明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-14
 */
@Service
public class FTmsaccbillsitemsServiceImpl implements IFTmsaccbillsitemsService
{
    @Autowired
    private FTmsaccbillsitemsMapper fTmsaccbillsitemsMapper;

    /**
     * 查询财务明细
     * 
     * @param id 财务明细ID
     * @return 财务明细
     */
    @Override
    public FTmsaccbillsitems selectFTmsaccbillsitemsById(Long id)
    {
        return fTmsaccbillsitemsMapper.selectFTmsaccbillsitemsById(id);
    }

    /**
     * 查询财务明细列表
     * 
     * @param fTmsaccbillsitems 财务明细
     * @return 财务明细
     */
    @Override
    public List<FTmsaccbillsitems> selectFTmsaccbillsitemsList(FTmsaccbillsitems fTmsaccbillsitems)
    {
        return fTmsaccbillsitemsMapper.selectFTmsaccbillsitemsList(fTmsaccbillsitems);
    }

    /**
     * 新增财务明细
     * 
     * @param fTmsaccbillsitems 财务明细
     * @return 结果
     */
    @Override
    public int insertFTmsaccbillsitems(FTmsaccbillsitems fTmsaccbillsitems)
    {
        fTmsaccbillsitems.setCreateTime(DateUtils.getNowDate());
        return fTmsaccbillsitemsMapper.insertFTmsaccbillsitems(fTmsaccbillsitems);
    }

    /**
     * 修改财务明细
     * 
     * @param fTmsaccbillsitems 财务明细
     * @return 结果
     */
    @Override
    public int updateFTmsaccbillsitems(FTmsaccbillsitems fTmsaccbillsitems)
    {
        fTmsaccbillsitems.setUpdateTime(DateUtils.getNowDate());
        return fTmsaccbillsitemsMapper.updateFTmsaccbillsitems(fTmsaccbillsitems);
    }

    /**
     * 批量删除财务明细
     * 
     * @param ids 需要删除的财务明细ID
     * @return 结果
     */
    @Override
    public int deleteFTmsaccbillsitemsByIds(Long[] ids)
    {
        return fTmsaccbillsitemsMapper.deleteFTmsaccbillsitemsByIds(ids);
    }

    /**
     * 删除财务明细信息
     * 
     * @param id 财务明细ID
     * @return 结果
     */
    @Override
    public int deleteFTmsaccbillsitemsById(Long id)
    {
        return fTmsaccbillsitemsMapper.deleteFTmsaccbillsitemsById(id);
    }
}
