package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.VehicleMapper;
import com.ruoyi.business.domain.Vehicle;
import com.ruoyi.business.service.IVehicleService;
import com.ruoyi.common.core.text.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author wms
 * @date 2022-10-13
 */
@Service
public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> implements IVehicleService
{
    @Autowired
    private VehicleMapper vehicleMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param vehicleId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public Vehicle selectVehicleByVehicleId(String vehicleId)
    {
        return vehicleMapper.selectVehicleByVehicleId(vehicleId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param vehicle 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<Vehicle> selectVehicleList(Vehicle vehicle)
    {
        return vehicleMapper.selectVehicleList(vehicle);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param vehicle 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertVehicle(Vehicle vehicle)
    {
        return vehicleMapper.insertVehicle(vehicle);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param vehicle 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateVehicle(Vehicle vehicle)
    {
        return vehicleMapper.updateVehicle(vehicle);
    }

    /**
     * 更新状态为已出库
     *
     * @param vehicleIds 选择的载具码
     * @return 结果
     */
    @Override
    public int updateVehicleStsByVehicleIds(String vehicleIds)
    {
        return vehicleMapper.updateVehicleStsByVehicleIds(Convert.toStrArray(vehicleIds));
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param vehicleIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVehicleByVehicleIds(String vehicleIds)
    {
        return vehicleMapper.deleteVehicleByVehicleIds(Convert.toStrArray(vehicleIds));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param vehicleId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVehicleByVehicleId(String vehicleId)
    {
        return vehicleMapper.deleteVehicleByVehicleId(vehicleId);
    }
}
