|
|
@ -52,7 +52,7 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<BookingLogDetail> _bookinglogdetail;
|
|
|
|
private readonly SqlSugarRepository<BookingLogDetail> _bookinglogdetail;
|
|
|
|
private readonly SqlSugarRepository<BookingRemark> _bookingremark;
|
|
|
|
private readonly SqlSugarRepository<BookingRemark> _bookingremark;
|
|
|
|
private readonly SqlSugarRepository<BookingFile> _bookingfile;
|
|
|
|
private readonly SqlSugarRepository<BookingFile> _bookingfile;
|
|
|
|
private readonly SqlSugarRepository<DjyWebsiteAccountConfig> _webconfig;
|
|
|
|
private readonly SqlSugarRepository<DjyWebsiteAccountConfig> _repWebAcc;
|
|
|
|
private readonly SqlSugarRepository<SysDictData> _dicdata;
|
|
|
|
private readonly SqlSugarRepository<SysDictData> _dicdata;
|
|
|
|
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrint;
|
|
|
|
private readonly SqlSugarRepository<BookingPrintTemplate> _repPrint;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
@ -63,6 +63,7 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<BookingLetteryard> _repLetterYard;
|
|
|
|
private readonly SqlSugarRepository<BookingLetteryard> _repLetterYard;
|
|
|
|
private readonly SqlSugarRepository<SysUser> _repUser;
|
|
|
|
private readonly SqlSugarRepository<SysUser> _repUser;
|
|
|
|
private readonly SqlSugarRepository<BookingOrderUrl> _repOrderUrl;
|
|
|
|
private readonly SqlSugarRepository<BookingOrderUrl> _repOrderUrl;
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<BookingOrderContact> _repOrderContact;
|
|
|
|
|
|
|
|
|
|
|
|
public BookingOrderService(SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn, SqlSugarRepository<BookingCtnDetail> ctndetailrep,
|
|
|
|
public BookingOrderService(SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn, SqlSugarRepository<BookingCtnDetail> ctndetailrep,
|
|
|
|
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
|
|
|
|
SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail, SqlSugarRepository<BookingRemark> bookingremark,
|
|
|
@ -70,7 +71,7 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
|
|
|
|
SqlSugarRepository<SysDictData> dicdata, SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingStatusLogDetail> statuslogdetail,
|
|
|
|
ILogger<BookingOrderService> logger, ISysCacheService cache,
|
|
|
|
ILogger<BookingOrderService> logger, ISysCacheService cache,
|
|
|
|
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
|
|
|
|
SqlSugarRepository<BookingPrintTemplate> repPrintTemplate, SqlSugarRepository<BookingLetteryard> repLetterYard, SqlSugarRepository<SysUser> repUser,
|
|
|
|
SqlSugarRepository<BookingOrderUrl> repOrderUrl)
|
|
|
|
SqlSugarRepository<BookingOrderUrl> repOrderUrl, SqlSugarRepository<BookingOrderContact> repOrderContact)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._logger = logger;
|
|
|
|
this._logger = logger;
|
|
|
|
this._rep = rep;
|
|
|
|
this._rep = rep;
|
|
|
@ -80,7 +81,7 @@ namespace Myshipping.Application
|
|
|
|
this._bookinglogdetail = bookinglogdetail;
|
|
|
|
this._bookinglogdetail = bookinglogdetail;
|
|
|
|
this._bookingremark = bookingremark;
|
|
|
|
this._bookingremark = bookingremark;
|
|
|
|
this._bookingfile = bookingfile;
|
|
|
|
this._bookingfile = bookingfile;
|
|
|
|
this._webconfig = webconfig;
|
|
|
|
this._repWebAcc = webconfig;
|
|
|
|
this._repPrint = repPrint;
|
|
|
|
this._repPrint = repPrint;
|
|
|
|
this._dicdata = dicdata;
|
|
|
|
this._dicdata = dicdata;
|
|
|
|
this._cache = cache;
|
|
|
|
this._cache = cache;
|
|
|
@ -90,6 +91,7 @@ namespace Myshipping.Application
|
|
|
|
this._repLetterYard = repLetterYard;
|
|
|
|
this._repLetterYard = repLetterYard;
|
|
|
|
this._repUser = repUser;
|
|
|
|
this._repUser = repUser;
|
|
|
|
this._repOrderUrl = repOrderUrl;
|
|
|
|
this._repOrderUrl = repOrderUrl;
|
|
|
|
|
|
|
|
this._repOrderContact = repOrderContact;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 主表和箱信息
|
|
|
|
#region 主表和箱信息
|
|
|
@ -157,7 +159,7 @@ namespace Myshipping.Application
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.HUMIDITY), u => u.HUMIDITY == input.HUMIDITY)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.HUMIDITY), u => u.HUMIDITY == input.HUMIDITY)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TEMPMIN), u => u.TEMPMIN == input.TEMPMIN)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TEMPMIN), u => u.TEMPMIN == input.TEMPMIN)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TEMPMAX), u => u.TEMPMAX == input.TEMPMAX)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TEMPMAX), u => u.TEMPMAX == input.TEMPMAX)
|
|
|
|
.WhereIF(input.ISCONTAINERSOC!=null, u => u.ISCONTAINERSOC == input.ISCONTAINERSOC)
|
|
|
|
.WhereIF(input.ISCONTAINERSOC != null, u => u.ISCONTAINERSOC == input.ISCONTAINERSOC)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SOREMARK), u => u.SOREMARK.Contains(input.SOREMARK))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SOREMARK), u => u.SOREMARK.Contains(input.SOREMARK))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SIREMARK), u => u.SIREMARK.Contains(input.SIREMARK))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SIREMARK), u => u.SIREMARK.Contains(input.SIREMARK))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.YARDREMARK), u => u.YARDREMARK.Contains(input.YARDREMARK))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.YARDREMARK), u => u.YARDREMARK.Contains(input.YARDREMARK))
|
|
|
@ -194,7 +196,7 @@ namespace Myshipping.Application
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICEID), u => u.CUSTSERVICEID == input.CUSTSERVICEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICEID), u => u.CUSTSERVICEID == input.CUSTSERVICEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICE), u => u.CUSTSERVICE.Contains(input.CUSTSERVICE))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICE), u => u.CUSTSERVICE.Contains(input.CUSTSERVICE))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME.Contains(input.CUSTOMERNAME))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME.Contains(input.CUSTOMERNAME))
|
|
|
|
.WhereIF(input.CUSTOMERID !=null, u => u.CUSTOMERID == input.CUSTOMERID)
|
|
|
|
.WhereIF(input.CUSTOMERID != null, u => u.CUSTOMERID == input.CUSTOMERID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.FORWARDER), u => u.FORWARDER.Contains(input.FORWARDER))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.FORWARDER), u => u.FORWARDER.Contains(input.FORWARDER))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICE), u => u.CUSTSERVICE == input.CUSTSERVICE)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICE), u => u.CUSTSERVICE == input.CUSTSERVICE)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME == input.CUSTOMERNAME)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME == input.CUSTOMERNAME)
|
|
|
@ -399,11 +401,11 @@ namespace Myshipping.Application
|
|
|
|
[HttpGet("/BookingOrder/get")]
|
|
|
|
[HttpGet("/BookingOrder/get")]
|
|
|
|
public async Task<BookingOrderOutput> Get(long Id)
|
|
|
|
public async Task<BookingOrderOutput> Get(long Id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BookingOrderOutput list = new BookingOrderOutput();
|
|
|
|
BookingOrderOutput ordOut = new BookingOrderOutput();
|
|
|
|
var main = await _rep.FirstOrDefaultAsync(u => u.Id == Id);
|
|
|
|
var main = await _rep.FirstOrDefaultAsync(u => u.Id == Id);
|
|
|
|
if (main != null)
|
|
|
|
if (main != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
list = main.Adapt<BookingOrderOutput>();
|
|
|
|
ordOut = main.Adapt<BookingOrderOutput>();
|
|
|
|
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).ToListAsync();
|
|
|
|
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == Id).ToListAsync();
|
|
|
|
var ctninput = ctnlist.Adapt<List<BookingCtnDto>>();
|
|
|
|
var ctninput = ctnlist.Adapt<List<BookingCtnDto>>();
|
|
|
|
foreach (var item in ctninput)
|
|
|
|
foreach (var item in ctninput)
|
|
|
@ -411,9 +413,20 @@ namespace Myshipping.Application
|
|
|
|
var ctndetaillist = await _ctndetailrep.AsQueryable().Where(x => x.CTNID == item.Id).ToListAsync();
|
|
|
|
var ctndetaillist = await _ctndetailrep.AsQueryable().Where(x => x.CTNID == item.Id).ToListAsync();
|
|
|
|
item.ctnDetailInputs = ctndetaillist.Adapt<List<BookingCtnDetailDto>>();
|
|
|
|
item.ctnDetailInputs = ctndetaillist.Adapt<List<BookingCtnDetailDto>>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
list.ctnInputs = ctninput;
|
|
|
|
ordOut.ctnInputs = ctninput;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ordUrl = _repOrderUrl.FirstOrDefault(x => x.BookingId == Id);
|
|
|
|
|
|
|
|
if (ordUrl != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ordOut.Link = new BookingOrderUrlOutput()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LinkUrlTxxp = ordUrl.UrlTxxp,
|
|
|
|
|
|
|
|
LinkUrlVgm = ordUrl.UrlVgm,
|
|
|
|
|
|
|
|
LinkUrlVmgSi = ordUrl.UrlVgmSi,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
return ordOut;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
@ -562,7 +575,7 @@ namespace Myshipping.Application
|
|
|
|
public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO)
|
|
|
|
public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口");
|
|
|
|
_logger.LogInformation("提单号:" + MBLNO + " 调用运踪接口");
|
|
|
|
var key = _webconfig.FirstOrDefault(x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID) && x.TypeCode == "seae_billtraceurl");
|
|
|
|
var key = _repWebAcc.FirstOrDefault(x => x.TenantId == Convert.ToInt64(UserManager.TENANT_ID) && x.TypeCode == "seae_billtraceurl");
|
|
|
|
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>();
|
|
|
@ -849,7 +862,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//亿通账号
|
|
|
|
//亿通账号
|
|
|
|
var ytAcc = _webconfig.FirstOrDefault(x => x.CreatedUserId == UserManager.UserId && x.TypeCode == "YitongWeb");
|
|
|
|
var ytAcc = _repWebAcc.FirstOrDefault(x => x.CreatedUserId == UserManager.UserId && x.TypeCode == "YitongWeb");
|
|
|
|
if (ytAcc == null)
|
|
|
|
if (ytAcc == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK119);
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK119);
|
|
|
@ -939,7 +952,155 @@ namespace Myshipping.Application
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region VGM及VMG链接
|
|
|
|
#region VGM及VMG链接
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 获取VGM、VGM&SI链接
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="bookingId"></param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpGet("/BookingOrder/vgmlink")]
|
|
|
|
|
|
|
|
public async Task<string[]> VgmLink(long bookingId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var order = _rep.FirstOrDefault(x => x.Id == bookingId);
|
|
|
|
|
|
|
|
if (order == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK001);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ordUrl = _repOrderUrl.FirstOrDefault(x => x.BookingId == bookingId);
|
|
|
|
|
|
|
|
if (ordUrl == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ordUrl = new BookingOrderUrl();
|
|
|
|
|
|
|
|
ordUrl.BookingId = bookingId;
|
|
|
|
|
|
|
|
await _repOrderUrl.InsertAsync(ordUrl);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(ordUrl.UrlVgm))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new string[] { ordUrl.UrlVgm, ordUrl.UrlVgmSi };
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验船公司
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(order.CARRIERID))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK118);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断船公司是否支持
|
|
|
|
|
|
|
|
var allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "vgm_carrier_list").Select(x => x.Code).ToList();
|
|
|
|
|
|
|
|
if (!allowCarrier.Contains(order.CARRIERID))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK117);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//船公司网站账号
|
|
|
|
|
|
|
|
var carrWebAccMap = _cache.GetAllDictData().Result.FirstOrDefault(x => x.TypeCode == "carrier_web_account_mapping" && x.Code == order.CARRIERID);
|
|
|
|
|
|
|
|
var webacc = _repWebAcc.FirstOrDefault(x => x.TypeCode == carrWebAccMap.Value && x.CreatedUserId == UserManager.UserId);
|
|
|
|
|
|
|
|
if (webacc == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK125);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//场站转换
|
|
|
|
|
|
|
|
var yardset = _cache.GetAllMappingYard().Result.FirstOrDefault(y => y.Code == order.YARDID && y.Module == "BookingVgm");
|
|
|
|
|
|
|
|
if (yardset == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK120, order.YARDID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ctns = await _repCtn.Where(x => x.BILLID == bookingId).ToListAsync();
|
|
|
|
|
|
|
|
//校验箱子数据录入
|
|
|
|
|
|
|
|
if (ctns.Where(c => string.IsNullOrEmpty(c.CTNALL) || !c.CTNNUM.HasValue).Count() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK121);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//箱型映射
|
|
|
|
|
|
|
|
var ctnMapping = await _cache.GetAllMappingCtn();
|
|
|
|
|
|
|
|
ctnMapping = ctnMapping.Where(x => x.Module == "BookingVgm").ToList();
|
|
|
|
|
|
|
|
if (ctnMapping.Count == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK122);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var expCode = ctns.Select(x => x.CTNCODE).Distinct().Except(ctnMapping.Select(y => y.Code)).ToList();
|
|
|
|
|
|
|
|
if (expCode.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK123, string.Join(',', expCode));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var user = await _repUser.FirstOrDefaultAsync(x => x.Id == UserManager.UserId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//调用小票服务
|
|
|
|
|
|
|
|
var dicUrlTxxp = _cache.GetAllDictData().Result.First(x => x.TypeCode == "url_set" && x.Code == "vgm_link_service");
|
|
|
|
|
|
|
|
var postObj = new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
SystemCode = "djy_hechuan",
|
|
|
|
|
|
|
|
billOrderId = order.Id.ToString(),
|
|
|
|
|
|
|
|
sendOrderCode = order.MBLNO,
|
|
|
|
|
|
|
|
customerName = $"{UserManager.TENANT_NAME}+{UserManager.Name}", //公司名称+用户姓名
|
|
|
|
|
|
|
|
customerId = order.CUSTOMERID.ToString(),
|
|
|
|
|
|
|
|
agentName = string.IsNullOrEmpty(order.FORWARDER) ? UserManager.TENANT_NAME : order.FORWARDER,
|
|
|
|
|
|
|
|
carrierCode = order.CARRIERID,
|
|
|
|
|
|
|
|
userName = webacc.Account,
|
|
|
|
|
|
|
|
userPassword = webacc.Password,
|
|
|
|
|
|
|
|
depotCode = yardset.MapCode,
|
|
|
|
|
|
|
|
depotName = order.YARD,
|
|
|
|
|
|
|
|
linkName = UserManager.Name,
|
|
|
|
|
|
|
|
linkMobile = user.Tel,
|
|
|
|
|
|
|
|
linkEmail = user.Email,
|
|
|
|
|
|
|
|
userId = UserManager.DjyUserId,
|
|
|
|
|
|
|
|
returnUrl = "",
|
|
|
|
|
|
|
|
shipName = order.VESSEL,
|
|
|
|
|
|
|
|
voyNo = order.VOYNO,
|
|
|
|
|
|
|
|
etdstr = order.ETD.HasValue ? order.ETD.Value.ToString("yyyy-MM-dd") : string.Empty,
|
|
|
|
|
|
|
|
potrSend = order.PORTLOAD,
|
|
|
|
|
|
|
|
potrGoal = order.PORTDISCHARGE,
|
|
|
|
|
|
|
|
boxinfoStr = order.CNTRTOTAL,
|
|
|
|
|
|
|
|
vgmEndTimeStr = order.CLOSEVGMDATE.HasValue ? order.CLOSEVGMDATE.Value.ToString("yyyy-MM-dd") : string.Empty,
|
|
|
|
|
|
|
|
returnOkUrl = "",
|
|
|
|
|
|
|
|
SiReturnUrl = "",
|
|
|
|
|
|
|
|
DataInfoJson = new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
order.SHIPPER,
|
|
|
|
|
|
|
|
order.CONSIGNEE,
|
|
|
|
|
|
|
|
order.NOTIFYPARTY,
|
|
|
|
|
|
|
|
order.MARKS,
|
|
|
|
|
|
|
|
order.DESCRIPTION,
|
|
|
|
|
|
|
|
order.BLFRT,
|
|
|
|
|
|
|
|
order.SERVICE,
|
|
|
|
|
|
|
|
order.ISSUETYPE,
|
|
|
|
|
|
|
|
order.TRANSPORT,
|
|
|
|
|
|
|
|
order.TRANSPORTID,
|
|
|
|
|
|
|
|
order.DESTINATION,
|
|
|
|
|
|
|
|
order.DESTINATIONID,
|
|
|
|
|
|
|
|
order.KINDPKGS,
|
|
|
|
|
|
|
|
order.THIRDPAYADDR,
|
|
|
|
|
|
|
|
order.PORTLOAD,
|
|
|
|
|
|
|
|
order.PORTLOADID,
|
|
|
|
|
|
|
|
order.PORTDISCHARGE,
|
|
|
|
|
|
|
|
order.PORTDISCHARGEID
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string strPostObj = postObj.ToJsonString();
|
|
|
|
|
|
|
|
_logger.LogInformation($"调用VGM链接接口传递数据:{strPostObj}");
|
|
|
|
|
|
|
|
var strResp = await dicUrlTxxp.Value.SetBody(postObj).PostAsStringAsync();
|
|
|
|
|
|
|
|
_logger.LogInformation($"调用VGM链接接口返回:{strResp}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var jobjResp = JObject.Parse(strResp);
|
|
|
|
|
|
|
|
int respCode = jobjResp.GetIntValue("code");
|
|
|
|
|
|
|
|
if (respCode != 200)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Oh(BookingErrorCode.BOOK126, jobjResp.GetStringValue("message"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存url
|
|
|
|
|
|
|
|
var memoData = jobjResp.GetJObjectValue("memoData");
|
|
|
|
|
|
|
|
ordUrl.UrlVgm = memoData.GetStringValue("vgmUrl");
|
|
|
|
|
|
|
|
ordUrl.UrlVgmSi = memoData.GetStringValue("vgmAndSiUrl");
|
|
|
|
|
|
|
|
await _repOrderUrl.UpdateAsync(ordUrl);
|
|
|
|
|
|
|
|
return new string[] { ordUrl.UrlVgm, ordUrl.UrlVgmSi };
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 订舱、截单EDI
|
|
|
|
#region 订舱、截单EDI
|
|
|
|