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.

93 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.Map.Dtos;
using DS.WMS.Core.Map.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers
{
/// <summary>
/// 船代与港口关系映射信息 模块
/// </summary>
public class RelationForwarderAndPortController : ApiController
{
private readonly IRelationForwarderAndPortService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public RelationForwarderAndPortController(IRelationForwarderAndPortService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetRelationForwarderAndPortList")]
public DataResult<List<RelationForwarderAndPortRes>> GetRelationForwarderAndPortList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("EditRelationForwarderAndPort")]
public DataResult EditRelationForwarderAndPort([FromBody] RelationForwarderAndPortReq req)
{
var res = _invokeService.EditRelationForwarderAndPort(req);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
[HttpGet]
[Route("GetRelationForwarderAndPortInfo")]
public DataResult<RelationForwarderAndPortRes> GetRelationForwarderAndPortInfo([FromQuery] string id)
{
var res = _invokeService.GetRelationForwarderAndPortInfo(id);
return res;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="req">Id</param>
/// <returns></returns>
[HttpPost]
[Route("DelRelationForwarderAndPort")]
public DataResult DelRelationForwarderAndPort([FromBody] IdModel req)
{
var res = _invokeService.DelRelationForwarderAndPort(req);
return res;
}
/// <summary>
///批量删除
/// </summary>
/// <param name="req">Id</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelRelationForwarderAndPort")]
public DataResult BatchDelRelationForwarderAndPort([FromBody] IdModel req)
{
var res = _invokeService.BatchDelRelationForwarderAndPort(req);
return res;
}
}
}