using DS.Module.Core;
using DS.WMS.Core.CarModule.Dtos;
using DS.WMS.Core.CarModule.Interface;
using DS.WMS.Core.SecurityModule.Dtos;
using DS.WMS.Core.SecurityModule.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.WebApi.Controllers;
///
/// 临时车辆管理
///
public class TemporaryCarController : ApiController
{
private readonly ITemporaryCarService _invokeService;
///
/// 构造函数
///
///
public TemporaryCarController(ITemporaryCarService invokeService)
{
_invokeService = invokeService;
}
///
/// 安全人员列表
///
///
///
[HttpPost]
[Route("GetTemporaryCarList")]
public DataResult> GetListByPage([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 获取内部车辆信息
///
///
///
[HttpGet]
[Route("GetTemporaryCarInfo")]
public DataResult GetTemporaryCarInfo([FromQuery]string id)
{
var res = _invokeService.GetTemporaryCarInfo(id);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditTemporaryCar")]
public DataResult EditTemporaryCar([FromBody] TemporaryCarInput model)
{
var res = _invokeService.EditTemporaryCar(model);
return res;
}
///
/// 删除
///
///
///
[HttpGet]
[Route("DelTemporaryCar")]
public DataResult DelTemporaryCar([FromQuery]string id)
{
var res = _invokeService.DelTemporaryCar(id);
return res;
}
///
/// 临时车辆预约
///
///
///
[HttpGet]
[Route("ReserveTemporaryCar")]
public DataResult ReserveTemporaryCar([FromQuery]string id)
{
var res = _invokeService.ReserveTemporaryCar(id);
return res;
}
///
/// 取消预约
///
///
///
[HttpGet]
[Route("CancelReserve")]
public DataResult CancelReserve([FromQuery]string id)
{
var res = _invokeService.CancelReserve(id);
return res;
}
}