|
|
@ -367,7 +367,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var entity = input.Adapt<BookingOrder>();
|
|
|
|
var entity = input.Adapt<BookingOrder>();
|
|
|
|
entity.TOTALNO = NumberToUpper.ToUpper(entity.PKGS==null?0: entity.PKGS);
|
|
|
|
entity.TOTALNO = NumberToUpper.ToUpper(entity.PKGS == null ? 0 : entity.PKGS);
|
|
|
|
await _rep.InsertAsync(entity);
|
|
|
|
await _rep.InsertAsync(entity);
|
|
|
|
if (input.ctnInputs != null)
|
|
|
|
if (input.ctnInputs != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -877,9 +877,13 @@ namespace Myshipping.Application
|
|
|
|
/// 调用运踪接口
|
|
|
|
/// 调用运踪接口
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet("/BookingOrder/SendTrace")]
|
|
|
|
[HttpGet("/BookingOrder/SendTrace")]
|
|
|
|
public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO, string CARRIER = "", string CARRIERID = "", bool isbook = false)
|
|
|
|
public async Task SendTrace(List<BillTraceList> dto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation("调用运踪接口提单号:" + MBLNO + " 调用运踪接口");
|
|
|
|
|
|
|
|
|
|
|
|
if (dto == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah("未传入正确参数!");
|
|
|
|
|
|
|
|
}
|
|
|
|
var key = _webAccountConfig.GetAccountConfig("seae_billtraceurl", UserManager.UserId).Result;
|
|
|
|
var key = _webAccountConfig.GetAccountConfig("seae_billtraceurl", UserManager.UserId).Result;
|
|
|
|
if (key == null)
|
|
|
|
if (key == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -889,16 +893,20 @@ namespace Myshipping.Application
|
|
|
|
var url = _cache.GetAllDictData().Result;
|
|
|
|
var url = _cache.GetAllDictData().Result;
|
|
|
|
BillTraceDto billdto = new BillTraceDto();
|
|
|
|
BillTraceDto billdto = new BillTraceDto();
|
|
|
|
List<BillTraceList> billTraceList = new List<BillTraceList>();
|
|
|
|
List<BillTraceList> billTraceList = new List<BillTraceList>();
|
|
|
|
billTraceList.Add(new BillTraceList
|
|
|
|
foreach (var item in dto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BusinessId = BusinessId,
|
|
|
|
_logger.LogInformation("调用运踪接口提单号:" + item.MBLNO + " 调用运踪接口");
|
|
|
|
MBLNO = MBLNO,
|
|
|
|
billTraceList.Add(new BillTraceList
|
|
|
|
YARD = YARD == "" ? null : YARD,
|
|
|
|
{
|
|
|
|
YardCode = YARDID == "" ? null : YARDID,
|
|
|
|
BusinessId = item.BusinessId,
|
|
|
|
CARRIER = CARRIER == "" ? null : CARRIER,
|
|
|
|
MBLNO = item.MBLNO,
|
|
|
|
CARRIERID = CARRIERID == "" ? null : CARRIERID,
|
|
|
|
YARD = item.YARD == "" ? null : item.YARD,
|
|
|
|
isBook = isbook
|
|
|
|
YardCode = item.YardCode == "" ? null : item.YardCode,
|
|
|
|
});
|
|
|
|
CARRIER = item.CARRIER == "" ? null : item.CARRIER,
|
|
|
|
|
|
|
|
CARRIERID = item.CARRIERID == "" ? null : item.CARRIERID,
|
|
|
|
|
|
|
|
isBook = item.isBook
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
billdto.Children = billTraceList;
|
|
|
|
billdto.Children = billTraceList;
|
|
|
|
billdto.Key = key.Account;
|
|
|
|
billdto.Key = key.Account;
|
|
|
|
billdto.PWD = key.Password;
|
|
|
|
billdto.PWD = key.Password;
|
|
|
@ -907,7 +915,9 @@ namespace Myshipping.Application
|
|
|
|
var json = billdto.ToJsonString();
|
|
|
|
var json = billdto.ToJsonString();
|
|
|
|
_logger.LogInformation("调用运踪接口发送josn:" + json);
|
|
|
|
_logger.LogInformation("调用运踪接口发送josn:" + json);
|
|
|
|
var html = await url.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "request_seae_billtraceurl").Value.SetHttpMethod(HttpMethod.Post).SetQueries(new { msg = json }).SetRetryPolicy(3, 5000).SendAsAsync<RespCommon>();
|
|
|
|
var html = await url.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "request_seae_billtraceurl").Value.SetHttpMethod(HttpMethod.Post).SetQueries(new { msg = json }).SetRetryPolicy(3, 5000).SendAsAsync<RespCommon>();
|
|
|
|
_logger.LogInformation("调用运踪接口提单号:" + MBLNO + " 调用运踪接口返回" + html.ToJsonString());
|
|
|
|
_logger.LogInformation("调用运踪接口返回" + html.ToJsonString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|