package com.ruoyi.warehouseBusiness.service.impl;


import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.warehouseBusiness.domain.TWarehousebillsLog;
import com.ruoyi.warehouseBusiness.mapper.TWarehousebillsLogMapper;
import com.ruoyi.warehouseBusiness.service.ITWarehousebillsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 入出库状态Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-15
 */
@Service
public class TWarehousebillsLogServiceImpl implements ITWarehousebillsLogService
{
    @Autowired
    private TWarehousebillsLogMapper tWarehousebillsLogMapper;

    /**
     * 查询入出库状态
     * 
     * @param fId 入出库状态ID
     * @return 入出库状态
     */
    @Override
    public TWarehousebillsLog selectTWarehousebillsLogById(Long fId)
    {
        return tWarehousebillsLogMapper.selectTWarehousebillsLogById(fId);
    }

    /**
     * 查询入出库状态列表
     * 
     * @param tWarehousebillsLog 入出库状态
     * @return 入出库状态
     */
    @Override
    public List<TWarehousebillsLog> selectTWarehousebillsLogList(TWarehousebillsLog tWarehousebillsLog)
    {
        return tWarehousebillsLogMapper.selectTWarehousebillsLogList(tWarehousebillsLog);
    }

    /**
     * 新增入出库状态
     * 
     * @param tWarehousebillsLog 入出库状态
     * @return 结果
     */
    @Override
    public int insertTWarehousebillsLog(TWarehousebillsLog tWarehousebillsLog)
    {
        tWarehousebillsLog.setCreateTime(DateUtils.getNowDate());
        return tWarehousebillsLogMapper.insertTWarehousebillsLog(tWarehousebillsLog);
    }

    /**
     * 修改入出库状态
     * 
     * @param tWarehousebillsLog 入出库状态
     * @return 结果
     */
    @Override
    public int updateTWarehousebillsLog(TWarehousebillsLog tWarehousebillsLog)
    {
        tWarehousebillsLog.setUpdateTime(DateUtils.getNowDate());
        return tWarehousebillsLogMapper.updateTWarehousebillsLog(tWarehousebillsLog);
    }

    /**
     * 批量删除入出库状态
     * 
     * @param fIds 需要删除的入出库状态ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsLogByIds(Long[] fIds)
    {
        return tWarehousebillsLogMapper.deleteTWarehousebillsLogByIds(fIds);
    }

    /**
     * 删除入出库状态信息
     * 
     * @param fId 入出库状态ID
     * @return 结果
     */
    @Override
    public int deleteTWarehousebillsLogById(Long fId)
    {
        return tWarehousebillsLogMapper.deleteTWarehousebillsLogById(fId);
    }
}
