You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.6 KiB
C#
100 lines
2.6 KiB
C#
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;
|
|
/// <summary>
|
|
/// 临时车辆管理
|
|
/// </summary>
|
|
public class TemporaryCarController : ApiController
|
|
{
|
|
private readonly ITemporaryCarService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public TemporaryCarController(ITemporaryCarService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 安全人员列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetTemporaryCarList")]
|
|
public DataResult<List<TemporaryCarListPageModel>> GetListByPage([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取内部车辆信息
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetTemporaryCarInfo")]
|
|
public DataResult<TemporaryCarViewModel> GetTemporaryCarInfo([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.GetTemporaryCarInfo(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditTemporaryCar")]
|
|
public DataResult EditTemporaryCar([FromBody] TemporaryCarInput model)
|
|
{
|
|
var res = _invokeService.EditTemporaryCar(model);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("DelTemporaryCar")]
|
|
public DataResult DelTemporaryCar([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.DelTemporaryCar(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 临时车辆预约
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("ReserveTemporaryCar")]
|
|
public DataResult ReserveTemporaryCar([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.ReserveTemporaryCar(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 取消预约
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("CancelReserve")]
|
|
public DataResult CancelReserve([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.CancelReserve(id);
|
|
return res;
|
|
}
|
|
} |