package com.zbf.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbf.system.domain.TransferOrder;
import com.zbf.system.mapper.TransferOrderMapper;
import com.zbf.system.service.ITransferOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 调拨单
 Service业务层处理
 *
 * @author tony
 * @date 2024-11-03
 */
@Service
public class TransferOrderServiceImpl extends ServiceImpl<TransferOrderMapper, TransferOrder> implements ITransferOrderService //修改
{
    @Autowired
    private TransferOrderMapper transferOrderMapper;

    /**
     * 查询调拨单

     *
     * @param id 调拨单
    主键
     * @return 调拨单

     */
    @Override
    public TransferOrder selectTransferOrderById(Long id)
    {
        return transferOrderMapper.selectTransferOrderById(id);
    }

    /**
     * 查询调拨单
     列表
     *
     * @param transferOrder 调拨单

     * @return 调拨单

     */
    @Override
    public List<TransferOrder> selectTransferOrderList(TransferOrder transferOrder)
    {
        return transferOrderMapper.selectTransferOrderList(transferOrder);
    }

    /**
     * 新增调拨单

     *
     * @param transferOrder 调拨单

     * @return 结果
     */
    @Override
    public int insertTransferOrder(TransferOrder transferOrder)
    {
        return transferOrderMapper.insertTransferOrder(transferOrder);
    }

    /**
     * 修改调拨单

     *
     * @param transferOrder 调拨单

     * @return 结果
     */
    @Override
    public int updateTransferOrder(TransferOrder transferOrder)
    {
        return transferOrderMapper.updateTransferOrder(transferOrder);
    }

    /**
     * 批量删除调拨单

     *
     * @param ids 需要删除的调拨单
    主键
     * @return 结果
     */
    @Override
    public int deleteTransferOrderByIds(Long[] ids)
    {
        return transferOrderMapper.deleteTransferOrderByIds(ids);
    }

    /**
     * 删除调拨单
     信息
     *
     * @param id 调拨单
    主键
     * @return 结果
     */
    @Override
    public int deleteTransferOrderById(Long id)
    {
        return transferOrderMapper.deleteTransferOrderById(id);
    }


    /**
     * 批量禁用
     *
     * @param id 调拨单
    主键
     * @return 结果
     */
    @Override
    public int disabledTransferOrderByIds(Long[] ids) {
        return transferOrderMapper.disabledTransferOrderByIds(ids);
    }

    /**
     * 批量启用
     *
     * @param id 调拨单
    主键
     * @return 结果
     */
    @Override
    public int enableTransferOrderByIds(Long[] ids) {
        return transferOrderMapper.enableTransferOrderByIds(ids);
    }

    /**
     * 修改状态
     *
     * @param transferOrder 工序管理主键
     * @return 结果
     */
    @Override
    public int updateStatus(TransferOrder transferOrder) {
        return transferOrderMapper.updateTransferOrder(transferOrder);
    }

}
