批量调用运踪

optimize
wet 2 years ago
parent 9b2742e749
commit ed83427593

@ -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>

@ -1949,6 +1949,21 @@
租户名称
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyTenantConfig">
<summary>
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyTenantConfig.Type">
<summary>
类型(列表显示列、查询条件自定义等)
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyTenantConfig.ConfigJson">
<summary>
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyTenantParam">
<summary>
租户参数类别表
@ -10088,6 +10103,126 @@
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="T:Myshipping.Core.Service.DjyTenantConfigService">
<summary>
公司默认值
</summary>
</member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Page(Myshipping.Core.Service.QueryDjyTenantConfigInput)">
<summary>
分页查询用户自定义配置
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Add(Myshipping.Core.Service.AddDjyTenantConfigInput)">
<summary>
增加用户自定义配置(同用户、同类型的会更新)
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Update(Myshipping.Core.Service.UpdateDjyTenantConfigInput)">
<summary>
更新用户自定义配置
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Delete(Myshipping.Core.Service.GetDjyTenantConfigInput)">
<summary>
删除用户自定义配置
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyTenantConfigService.Get(System.String)">
<summary>
获取用户自定义配置
</summary>
<param name="type"></param>
<returns></returns>
</member>
<member name="T:Myshipping.Core.Service.DjyTenantConfigInput">
<summary>
自定义配置输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantConfigInput.Type">
<summary>
类型(列表显示列、查询条件自定义等)
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantConfigInput.ConfigJson">
<summary>
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Service.AddDjyTenantConfigInput">
<summary>
自定义配置新增输入参数
</summary>
</member>
<member name="T:Myshipping.Core.Service.UpdateDjyTenantConfigInput">
<summary>
自定义配置修改输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.UpdateDjyTenantConfigInput.Id">
<summary>
主键
</summary>
</member>
<member name="T:Myshipping.Core.Service.GetDjyTenantConfigInput">
<summary>
自定义配置获取(删除)输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.GetDjyTenantConfigInput.Id">
<summary>
主键
</summary>
</member>
<member name="T:Myshipping.Core.Service.QueryDjyTenantConfigInput">
<summary>
自定义配置查询输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyTenantConfigInput.Id">
<summary>
主键
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyTenantConfigInput.Type">
<summary>
类型(列表显示列、查询条件自定义等)
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyTenantConfigInput.ConfigJson">
<summary>
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Service.DjyTenantConfigOutput">
<summary>
订舱自定义配置输出参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantConfigOutput.Id">
<summary>
主键
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantConfigOutput.Type">
<summary>
类型(列表显示列、查询条件自定义等)
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyTenantConfigOutput.ConfigJson">
<summary>
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Service.DjyTenantParamService">
<summary>
租户参数

@ -11,7 +11,7 @@ using Myshipping.Core.Entity;
namespace Myshipping.Core.Service
{
/// <summary>
/// 用户自定义配置服务
/// 公司默认值
/// </summary>
[ApiDescriptionSettings(Name = "DjyTenantConfig", Order = 1)]
public class DjyTenantConfigService : IDjyTenantConfigService, IDynamicApiController, ITransient

Loading…
Cancel
Save