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.

86 lines
2.2 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;
public class InternalCarController : ApiController
{
private readonly IInternalCarService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public InternalCarController(IInternalCarService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 安全人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetInternalCarList")]
public DataResult<List<InternalCarListPageModel>> GetListByPage([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 获取内部车辆信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetInternalCarInfo")]
public DataResult<InternalCarViewModel> GetInternalCarInfo([FromQuery]string id)
{
var res = _invokeService.GetInternalCarInfo(id);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditInternalCar")]
public DataResult EditInternalCar([FromBody] InternalCarInput model)
{
var res = _invokeService.EditInternalCar(model);
return res;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("DelInternalCar")]
public DataResult DelInternalCar([FromQuery]string id)
{
var res = _invokeService.DelInternalCar(id);
return res;
}
/// <summary>
/// 内部车辆预定
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("FixInternalCar")]
public DataResult FixInternalCar([FromQuery]string id)
{
var res = _invokeService.FixInternalCar(id);
return res;
}
}