zhangxiaofeng 2 weeks ago
commit 0128b84f4a

@ -484,11 +484,11 @@ namespace Myshipping.Application.EDI.VOLTA
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.SHIPPER, 75, headData.MBLNO, "发货人", 6, "-", false);
error += formatlengthError("txt", headData.SHIPPER, 65, headData.MBLNO, "发货人", 6, "-", false);
}
else
{
error += formatlengthError("txt", headData.SHIPPER, 75, headData.MBLNO, "发货人", 6, "*", false);
error += formatlengthError("txt", headData.SHIPPER, 65, headData.MBLNO, "发货人", 6, "*", false);
}
}
}
@ -510,11 +510,11 @@ namespace Myshipping.Application.EDI.VOLTA
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.CONSIGNEE, 75, headData.MBLNO, "收货人", 6, "--", false);
error += formatlengthError("txt", headData.CONSIGNEE, 65, headData.MBLNO, "收货人", 6, "--", false);
}
else
{
error += formatlengthError("txt", headData.CONSIGNEE, 75, headData.MBLNO, "收货人", 6, "**", false);
error += formatlengthError("txt", headData.CONSIGNEE, 65, headData.MBLNO, "收货人", 6, "**", false);
}
}
}
@ -536,18 +536,18 @@ namespace Myshipping.Application.EDI.VOLTA
{
if (headData.CARRIEREDICODE == "HLCU")
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 75, headData.MBLNO, "通知人", 6, "---", false);
error += formatlengthError("txt", headData.NOTIFYPARTY, 65, headData.MBLNO, "通知人", 6, "---", false);
}
else
{
error += formatlengthError("txt", headData.NOTIFYPARTY, 75, headData.MBLNO, "通知人", 6, "***", false);
error += formatlengthError("txt", headData.NOTIFYPARTY, 65, headData.MBLNO, "通知人", 6, "***", false);
}
}
}
if (!string.IsNullOrEmpty(headData.NOTIFYPARTY2))
{
error += formatlengthError("txt", headData.NOTIFYPARTY2, 75, headData.MBLNO, "第二通知人", 5, "", false);
error += formatlengthError("txt", headData.NOTIFYPARTY2, 65, headData.MBLNO, "第二通知人", 6, "", false);
}
var ctnlist = headData.CTNLIST;
@ -936,7 +936,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.SHIPPER);
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
@ -949,7 +949,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.CONSIGNEE);
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
@ -961,7 +961,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", bill.NOTIFYPARTY);
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (ShippingList.Count != 0 && Shipping.Length > 0)
{
@ -973,7 +973,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = formatEdiStr("txt", !string.IsNullOrWhiteSpace(bill.NOTIFYPARTY2) ? bill.NOTIFYPARTY2 : "");
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (!string.IsNullOrWhiteSpace(Shipping))
{
@ -986,7 +986,7 @@ namespace Myshipping.Application.EDI.VOLTA
}
Shipping = bill.AMSCONSIGNEE;
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (!string.IsNullOrWhiteSpace(Shipping))
{
@ -997,7 +997,7 @@ namespace Myshipping.Application.EDI.VOLTA
Shipping = bill.AMSNOTIFYPARTY;
ShippingList = formatlengthStr(Shipping, 75);
ShippingList = formatlengthStr(Shipping, 65);
if (!string.IsNullOrWhiteSpace(Shipping))
{

@ -11020,8 +11020,18 @@ namespace Myshipping.Application
//如果当前是主票
if (dto.CUSTNO.Equals(dto.HBLNO, StringComparison.OrdinalIgnoreCase))
{
var allOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => dto.HBLNO == x.HBLNO && (x.SPLIT_OR_MERGE_FLAG != null && x.SPLIT_OR_MERGE_FLAG == 2)
List<BookingOrder> allOrderList = new List<BookingOrder>();
if(!string.IsNullOrWhiteSpace(oddCode) && oddCode.Equals("SIReceipt",StringComparison.OrdinalIgnoreCase))
{
allOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == item.Id
&& x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
}
else
{
allOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => dto.HBLNO == x.HBLNO && (x.SPLIT_OR_MERGE_FLAG != null && x.SPLIT_OR_MERGE_FLAG == 2)
&& x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
}
if (allOrderList.Count > 0)
{

@ -226,14 +226,36 @@ namespace Myshipping.Application
{
entity.Id = m.Id;
bool isNoSyncContact = false;
_logger.LogInformation($"外部同步大简云往来单位 {UserManager.TENANT_NAME} 同步往来单位{entity.FullName}");
var paraVal = _tenantParamValue.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "DataSyncCustomerNoContact");
_logger.LogInformation($"外部同步大简云往来单位 {UserManager.TENANT_NAME} 同步往来单位{entity.FullName} 取到租户参数 {JSON.Serialize(paraVal)}");
if (paraVal != null && !string.IsNullOrWhiteSpace(paraVal.ItemCode))
{
if (paraVal.ItemCode.Equals("ENABLE"))
{
isNoSyncContact = true;
_logger.LogInformation($"外部同步大简云往来单位 {UserManager.TENANT_NAME} 同步往来单位{entity.FullName} 判定不同步联系人");
}
}
await _djycustomer.AsUpdateable(entity).IgnoreColumns(it => new
{
it.TenantId,
it.TIDANINFO
}).ExecuteCommandAsync();
await _djycustomercontact.DeleteAsync(x => x.CustomerId == entity.Id);
if (!isNoSyncContact)
{
await _djycustomercontact.DeleteAsync(x => x.CustomerId == entity.Id);
}
if (entity.PropString.Contains("shipagency"))
{
@ -265,12 +287,16 @@ namespace Myshipping.Application
await _commonDBService.GetAllForwarder(false);
}
foreach (var item in model.ContactList)
if (!isNoSyncContact)
{
var contact = item.Adapt<DjyCustomerContact>();
contact.CustomerId = entity.Id;
contact.TenantId = UserManager.TENANT_ID;
await _djycustomercontact.InsertAsync(contact);
foreach (var item in model.ContactList)
{
var contact = item.Adapt<DjyCustomerContact>();
contact.CustomerId = entity.Id;
contact.TenantId = UserManager.TENANT_ID;
await _djycustomercontact.InsertAsync(contact);
}
}
}
return entity.Id;

@ -381,7 +381,8 @@ namespace Myshipping.Application
Id = orderInfo.Id,
MBLNO = orderInfo.MBLNO,
ctnInputs = new List<BookingCtnDto>(),
ChangedFields = new List<string>()
ChangedFields = new List<string>(),
OddCode = "SIReceipt"
};
if (!string.IsNullOrEmpty(siSubmitted.ISSUETYPE))

Loading…
Cancel
Save