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.

191 lines
5.0 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);
}
/// <summary>
/// 获取VGM、VGM SI链接
/// </summary>
/// <param name="id">业务Id</param>
/// <returns></returns>
[HttpGet]
[Route("VgmLink")]
public async Task<DataResult<string[]>> VgmLink([FromQuery] string id)
{
return await _invokeService.VgmLink(id);
}
/// <summary>
/// 发送VGM
/// </summary>
/// <param name="id">业务Id</param>
/// <returns></returns>
[HttpGet]
[Route("VgmSend")]
public async Task<DataResult<string>> VgmSend([FromQuery] string id)
{
return await _invokeService.VgmSend(id);
}
/// <summary>
/// 批量获取vgm
/// </summary>
/// <param name="ids">业务id 逗号拼接</param>
/// <returns></returns>
[HttpGet]
[Route("GetVmgDataList")]
public async Task<DataResult<List<BatchVGM>>> GetVmgDataList([FromQuery] string ids)
{
return await _invokeService.GetVmgDataList(ids);
}
/// <summary>
/// 批量保存vgm
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SaveBatchVgm")]
public async Task<DataResult<string>> SaveBatchVgm([FromBody] List<BatchVGMList> req)
{
return await _invokeService.SaveBatchVgm(req);
}
}