package com.ruoyi.order.service.impl;

import java.util.List;
import java.util.UUID;

import cn.hutool.core.lang.func.LambdaUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.asset.domain.TbAssetInformation;
import com.ruoyi.asset.mapper.TbAssetInformationMapper;
import com.ruoyi.order.domain.dto.OrderTypeEnum;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TbOrderMapper;
import com.ruoyi.order.domain.TbOrder;
import com.ruoyi.order.service.ITbOrderService;

import javax.annotation.Resource;

/**
 * 资产单据Service业务层处理
 * 
 * @author 原动力
 * @date 2023-05-24
 */
@Service
public class TbOrderServiceImpl implements ITbOrderService 
{
    @Resource
    private TbOrderMapper tbOrderMapper;

    /**
     * 查询资产单据
     * 
     * @param id 资产单据主键
     * @return 资产单据
     */
    @Override
    public TbOrder selectTbOrderById(Long id)
    {
        return tbOrderMapper.selectTbOrderById(id);
    }

    /**
     * 查询资产单据列表
     * 
     * @param tbOrder 资产单据
     * @return 资产单据
     */
    @Override
    public List<TbOrder> selectTbOrderList(TbOrder tbOrder)
    {
        return tbOrderMapper.selectTbOrderList(tbOrder);
    }

    /**
     * 新增资产单据
     * 
     * @param tbOrder 资产单据
     * @return 结果
     */
    @Override
    public int insertTbOrder(TbOrder tbOrder)
    {
        return tbOrderMapper.insertTbOrder(tbOrder);
    }

    /**
     * 修改资产单据
     * 
     * @param tbOrder 资产单据
     * @return 结果
     */
    @Override
    public int updateTbOrder(TbOrder tbOrder)
    {
        return tbOrderMapper.updateTbOrder(tbOrder);
    }

    /**
     * 批量删除资产单据
     * 
     * @param ids 需要删除的资产单据主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderByIds(Long[] ids)
    {
        return tbOrderMapper.deleteTbOrderByIds(ids);
    }

    /**
     * 删除资产单据信息
     * 
     * @param id 资产单据主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderById(Long id)
    {
        return tbOrderMapper.deleteTbOrderById(id);
    }
}
