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.

105 lines
2.8 KiB
C#

using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace DS.WMS.OpApi.Controllers;
/// <summary>
/// 场站入货通知-服务
/// </summary>
public class OpBusinessYardController : ApiController
{
private readonly IOpBusinessYardService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public OpBusinessYardController(IOpBusinessYardService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetOpBusinessYardList")]
public DataResult<List<OpBusinessYardRes>> GetOpBusinessYardList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetYardHistoryList")]
public async Task<DataResult<List<OpBusinessYardHistoryRes>>> GetYardHistoryList([FromBody] PageRequest request)
{
var res = await _invokeService.GetYardHistoryList(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditOpBusinessYard")]
public DataResult EditOpBusinessYard([FromBody] OpBusinessYardReq model)
{
var res = _invokeService.EditOpBusinessYard(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetOpBusinessYardInfo")]
public DataResult<OpBusinessYardRes> GetOpBusinessYardInfo([FromQuery] string id)
{
var res = _invokeService.GetOpBusinessYardInfo(id);
return res;
}
/// <summary>
/// 根据业务id详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetBusinessYardByKeyId")]
public DataResult<OpBusinessYardRes> GetBusinessYardByKeyId([FromQuery] string id)
{
var res = _invokeService.GetBusinessYardByKeyId(id);
return res;
}
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req">主表Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelOpBusinessYard")]
public DataResult BatchDelOpBusinessYard([FromBody] IdModel req)
{
var res = _invokeService.BatchDelOpBusinessYard(req);
return res;
}
}