zhangxiaofeng 4 weeks ago
commit bdc44d5b9e

@ -936,12 +936,12 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.SHIPPER);
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
//2024-09-13 韩工确认最大行数6改为9
r.WriteLine("20::" + formatListStr(ShippingList, 9) + "'");
r.WriteLine("20::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
@ -949,31 +949,31 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.CONSIGNEE);
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
//2024-09-13 韩工确认最大行数6改为9
r.WriteLine("21::" + formatListStr(ShippingList, 9) + "'");
r.WriteLine("21::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
//2024-09-13 韩工确认最大行数6改为9
r.WriteLine("22::" + formatListStr(ShippingList, 9) + "'");
r.WriteLine("22::" + formatListStr(ShippingList, 6) + "'");
icount = icount + 1;
}
Shipping = formatEdiStr("txt", !string.IsNullOrWhiteSpace(bill.NOTIFYPARTY2) ? bill.NOTIFYPARTY2 : "");
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (!string.IsNullOrWhiteSpace(Shipping))
{
@ -986,7 +986,7 @@ namespace Myshipping.Application.EDI.VOLTA
}
Shipping = bill.AMSCONSIGNEE;
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (!string.IsNullOrWhiteSpace(Shipping))
{
@ -997,7 +997,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = bill.AMSNOTIFYPARTY;
ShippingList = formatlengthStr(Shipping, 35);
ShippingList = formatlengthStr(Shipping, 75);
if (!string.IsNullOrWhiteSpace(Shipping))
{

@ -220,6 +220,16 @@ namespace Myshipping.Application
/// 箱信息列表
/// </summary>
public List<TaskMessageCtnInfo> ContaList { get; set; }
/// <summary>
/// 网站的账户(网站需要登录的需要提供)
/// </summary>
public string WebUser { get; set; }
/// <summary>
/// 网站的密码(网站需要登录的需要提供)
/// </summary>
public string WebPassword { get; set; }
}
/// <summary>

@ -42,11 +42,14 @@ namespace Myshipping.Application
private readonly IBookingValueAddedService _bookingValueAddedService;
private readonly IBookingOrderService _bookingOrderService;
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
private readonly IDjyTenantParamService _djyTenantParamService;
public TaskShippingOrderCompareService(ISysCacheService cache, ILogger<TaskShippingOrderCompareService> logger,
SqlSugarRepository<BookingOrder> bookingOrderRepository, SqlSugarRepository<BookingCtn> bookingOrderContaRepository,
IBookingValueAddedService bookingValueAddedService, IBookingOrderService bookingOrderService,
SqlSugarRepository<DraftCompareFeedBackRecord> draftCompareFeedBackRecordRepository)
SqlSugarRepository<DraftCompareFeedBackRecord> draftCompareFeedBackRecordRepository, IDjyWebsiteAccountConfigService webAccountConfig,
IDjyTenantParamService djyTenantParamService)
{
_cache = cache;
_logger = logger;
@ -57,6 +60,8 @@ namespace Myshipping.Application
_bookingOrderService = bookingOrderService;
_draftCompareFeedBackRecordRepository = draftCompareFeedBackRecordRepository;
_webAccountConfig = webAccountConfig;
_djyTenantParamService = djyTenantParamService;
}
/// <summary>
/// 执行下货纸比对
@ -140,6 +145,44 @@ namespace Myshipping.Application
mainInfo.ContaList = contaList.Adapt<List<TaskMessageCtnInfo>>();
}
DjyWebsiteAccountConfig webAccountConfig = null;
var paramList = _djyTenantParamService.GetParaCodeWithValue(new[] { "ShipCompareAccountYGT",
"ShipCompareAccountLUHAI" }).GetAwaiter().GetResult();
bool isYGT = false;
bool isLuHai = false;
if (paramList.Any(p => p.ParaCode == "ShipCompareAccountYGT"))
{
var currArg = paramList.FirstOrDefault(p => p.ParaCode == "ShipCompareAccountYGT").ParaValue.Split(new char[] { ','}).ToArray();
if (currArg.Contains(mainInfo.YardCode))
{
isYGT = true;
webAccountConfig = _webAccountConfig.GetAccountConfig("YunGangTong", UserManager.UserId).GetAwaiter().GetResult();
}
}
if (paramList.Any(p => p.ParaCode == "ShipCompareAccountLUHAI"))
{
var currArg = paramList.FirstOrDefault(p => p.ParaCode == "ShipCompareAccountLUHAI").ParaValue.Split(new char[] { ',' }).ToArray();
if (currArg.Contains(mainInfo.YardCode))
{
isYGT = true;
webAccountConfig = _webAccountConfig.GetAccountConfig("LuHaiTong", UserManager.UserId).GetAwaiter().GetResult();
}
}
if (webAccountConfig != null)
{
mainInfo.WebUser = webAccountConfig.Account;
mainInfo.WebPassword = webAccountConfig.Password;
}
var msgModel = GetMessageInfo(batchNo, mainInfo);
_logger.LogInformation("批次={no} 对应请求报文完成 msg={msg}", batchNo, JSON.Serialize(msgModel));

@ -124,7 +124,7 @@
},
"ITEMCODE": true,
"SendBookingOrderMQUri": "amqp://djy_booking_new:123qwe@60.209.125.238:40101/djy_booking_new",
"ShippingOrderCompareUrl": "http://60.209.125.238:35210/api/TaskShippingOrderCompare/ExcuteShippingOrderCompare",
"ShippingOrderCompareUrl": "http://47.104.73.97:7115/api/TaskShippingOrderCompare/ExcuteShippingOrderCompare",
"GetShippingOrderCompareUrl": "http://60.209.125.238:35210/api/TaskShippingOrderCompare/CompareResult",
"BCOrDraftUserKey": "BookingOrderPlat",
"BCOrDraftUserSecret": "228b2db5952d13291f228d441018c1b6",

Loading…
Cancel
Save