package com.wms_main.controller.wms;

import com.wms_main.model.dto.query.VehicleQuery;
import com.wms_main.model.dto.response.wms.WmsApiResponse;
import com.wms_main.model.vo.wms.PageVo;
import com.wms_main.model.vo.wms.VehicleVo;
import com.wms_main.service.controller.IVehicleControllerService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 载具控制类
 */
@RestController
@ResponseBody
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/wms/vehicle")
public class VehicleController {
    private final IVehicleControllerService vehicleControllerService;

    /**
     * 查询载具信息
     * @param vehicleQuery 查询参数
     * @return 查询结果
     */
    @PostMapping("/queryVehicleInfoByPage")
    public WmsApiResponse<PageVo<VehicleVo>> queryVehicleInfoByPage(@RequestBody VehicleQuery vehicleQuery) {
        return vehicleControllerService.queryVehicleInfoByPage(vehicleQuery);
    }
}
