|
|
|
@ -367,7 +367,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
if (input.ctnInputs != null)
|
|
|
|
|
{
|
|
|
|
@ -877,9 +877,13 @@ namespace Myshipping.Application
|
|
|
|
|
/// 调用运踪接口
|
|
|
|
|
/// </summary>
|
|
|
|
|
[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;
|
|
|
|
|
if (key == null)
|
|
|
|
|
{
|
|
|
|
@ -889,16 +893,20 @@ namespace Myshipping.Application
|
|
|
|
|
var url = _cache.GetAllDictData().Result;
|
|
|
|
|
BillTraceDto billdto = new BillTraceDto();
|
|
|
|
|
List<BillTraceList> billTraceList = new List<BillTraceList>();
|
|
|
|
|
foreach (var item in dto)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation("调用运踪接口提单号:" + item.MBLNO + " 调用运踪接口");
|
|
|
|
|
billTraceList.Add(new BillTraceList
|
|
|
|
|
{
|
|
|
|
|
BusinessId = BusinessId,
|
|
|
|
|
MBLNO = MBLNO,
|
|
|
|
|
YARD = YARD == "" ? null : YARD,
|
|
|
|
|
YardCode = YARDID == "" ? null : YARDID,
|
|
|
|
|
CARRIER = CARRIER == "" ? null : CARRIER,
|
|
|
|
|
CARRIERID = CARRIERID == "" ? null : CARRIERID,
|
|
|
|
|
isBook = isbook
|
|
|
|
|
BusinessId = item.BusinessId,
|
|
|
|
|
MBLNO = item.MBLNO,
|
|
|
|
|
YARD = item.YARD == "" ? null : item.YARD,
|
|
|
|
|
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.Key = key.Account;
|
|
|
|
|
billdto.PWD = key.Password;
|
|
|
|
@ -907,7 +915,9 @@ namespace Myshipping.Application
|
|
|
|
|
var json = billdto.ToJsonString();
|
|
|
|
|
_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>();
|
|
|
|
|
_logger.LogInformation("调用运踪接口提单号:" + MBLNO + " 调用运踪接口返回" + html.ToJsonString());
|
|
|
|
|
_logger.LogInformation("调用运踪接口返回" + html.ToJsonString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|