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.

145 lines
3.7 KiB
C#

using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Interface;
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Ocsp;
namespace DS.WMS.OpApi.Controllers;
/// <summary>
/// 海运出口信息-模块
/// </summary>
public class SeaExportController : ApiController
{
private readonly ISeaExportService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public SeaExportController(ISeaExportService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetSeaExportList")]
public DataResult<List<SeaExportRes>> GetSeaExportList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("EditSeaExport")]
public DataResult EditSeaExport([FromBody] SeaExportReq req)
{
var res = _invokeService.EditSeaExport(req);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetSeaExportInfo")]
public DataResult<SeaExportRes> GetSeaExportInfo([FromQuery] string id)
{
var res = _invokeService.GetSeaExportInfo(id);
return res;
}
/// <summary>
/// 批量编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SeaExportBatchEdit")]
public DataResult SeaExportBatchEdit([FromBody] SeaExportBatchEditReq req)
{
var res = _invokeService.SeaExportBatchEdit(req);
return res;
}
/// <summary>
/// 业务单据删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("SeaExportDel")]
public DataResult SeaExportDel([FromQuery] string id)
{
var res = _invokeService.SeaExportDel(id);
return res;
}
/// <summary>
/// 业务单据批量删除
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SeaExportBatchDel")]
public DataResult SeaExportBatchDel([FromBody] IdModel req)
{
var res = _invokeService.SeaExportBatchDel(req);
return res;
}
/// <summary>
/// 获取场站数据
/// </summary>
/// <param name="id">业务Id</param>
/// <param name="isWeb">是否网站数据 默认false</param>
/// <returns></returns>
[HttpGet]
[Route("GetYardData")]
public async Task<DataResult<string>> GetYardData([FromQuery] string id, bool isWeb = false)
{
return await _invokeService.GetYardData(id, isWeb);
}
/// <summary>
/// 发起运踪订阅或者更新提单号
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SendOrUpdateTrace")]
public async Task<DataResult<string>> SendOrUpdateTrace([FromBody]List<BillTraceReq> req)
{
return await _invokeService.SendOrUpdateTrace(req);
}
/// <summary>
/// 运踪退订
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("UnsubscribeBillTrace")]
public async Task<DataResult<string>> UnsubscribeBillTrace([FromBody]List<BillTraceUnsubscribeList> req)
{
return await _invokeService.UnsubscribeBillTrace(req);
}
}