|
|
|
@ -622,6 +622,8 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
addList.Add(new BusinessOrderContact()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = seaExport.Id,
|
|
|
|
|
CustomerId = seaExport.CustomerId,
|
|
|
|
|
CustomerName = seaExport.CustomerName,
|
|
|
|
|
CustomerType = "controller",
|
|
|
|
|
CustomerTypeName="委托单位",
|
|
|
|
|
Name = defaultContact.ShortName,
|
|
|
|
@ -641,6 +643,8 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
addList.Add(new BusinessOrderContact()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = seaExport.Id,
|
|
|
|
|
CustomerId = seaExport.TruckerId,
|
|
|
|
|
CustomerName = seaExport.Trucker,
|
|
|
|
|
CustomerType = "truck",
|
|
|
|
|
CustomerTypeName = "车队",
|
|
|
|
|
Name = defaultContact.ShortName,
|
|
|
|
@ -660,6 +664,8 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
addList.Add(new BusinessOrderContact()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = seaExport.Id,
|
|
|
|
|
CustomerId = seaExport.YardId,
|
|
|
|
|
CustomerName = seaExport.Yard,
|
|
|
|
|
CustomerType = "yard",
|
|
|
|
|
CustomerTypeName = "场站",
|
|
|
|
|
Name = defaultContact.ShortName,
|
|
|
|
@ -669,7 +675,27 @@ public partial class SeaExportService : ISeaExportService
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (seaExport.ForwarderId != 0)
|
|
|
|
|
{
|
|
|
|
|
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.ForwarderId && x.IsOperator == true).First();
|
|
|
|
|
if (defaultContact.IsNotNull())
|
|
|
|
|
{
|
|
|
|
|
if (!contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "booking" && x.Name == defaultContact.ShortName).Any())
|
|
|
|
|
{
|
|
|
|
|
addList.Add(new BusinessOrderContact()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = seaExport.Id,
|
|
|
|
|
CustomerId = seaExport.ForwarderId,
|
|
|
|
|
CustomerName = seaExport.Forwarder,
|
|
|
|
|
CustomerType = "booking",
|
|
|
|
|
CustomerTypeName = "订舱公司",
|
|
|
|
|
Name = defaultContact.ShortName,
|
|
|
|
|
Tel = defaultContact.Tel,
|
|
|
|
|
Email = defaultContact.Email,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (addList.Count > 0)
|
|
|
|
|
sqlSugarScope.Insertable(addList).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|