jianghaiqing 5 months ago
commit 090809167d

@ -46,12 +46,6 @@ namespace Myshipping.Application.EDI
return new KeyValuePair<bool, string>(false, "客户订舱信息未找到");
}
var order = await repOrder.AsQueryable().Filter(null, true).FirstAsync(o => o.Id == custOrder.BookingId);
if (order == null)
{
return new KeyValuePair<bool, string>(false, "订舱信息未找到");
}
var sysConfigList = await cache.GetAllSysConfig();
var sCfgSpiderUrl = sysConfigList.FirstOrDefault(x => x.Code == "BookingPostApiServerAddr" && x.GroupCode == "DJY_CONST");
if (sCfgSpiderUrl == null)
@ -349,15 +343,22 @@ namespace Myshipping.Application.EDI
var jdata = jobjRtn.GetJObjectValue("data");
if (jdata != null)
{
var bookingNo = jdata.GetStringValue("bookingNo");
if (!string.IsNullOrEmpty(bookingNo))
JObject extObj = null;
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
order.CUSTNO = bookingNo;
await repOrder.AsUpdateable(order).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
Log.Information($"回写订舱号:{bookingNo} {order.Id} {order.BOOKINGNO}");
CustomerBookingSyncHelper.SendCustomerBookingSync(order.Id, BookingOrderSyncTypeEnum.CC.ToString());
Log.Information($"回推订舱号:{bookingNo} {order.Id} {order.BOOKINGNO}");
extObj = JObject.Parse(custOrder.ExtendData);
}
else
{
extObj = new JObject();
}
var bookingNoArr = jdata.GetJArrayValue("bookingNo");
extObj["BookingNO"] = bookingNoArr;
custOrder.ExtendData = extObj.ToJsonString();
await repCustOrder.AsUpdateable(custOrder).UpdateColumns(x => new { x.ExtendData }).ExecuteCommandAsync();
Log.Information($"回写CC号 {custOrder.Id} {custOrder.BOOKINGNO}");
}
return new KeyValuePair<bool, string>(true, "发送成功");

@ -39,12 +39,6 @@ namespace Myshipping.Application.EDI
return new KeyValuePair<bool, string>(false, "客户订舱信息未找到");
}
var order = await repOrder.AsQueryable().Filter(null, true).FirstAsync(o => o.Id == custOrder.BookingId);
if (order == null)
{
return new KeyValuePair<bool, string>(false, "订舱台账信息未找到");
}
var sysConfigList = await cache.GetAllSysConfig();
var sCfgSpiderUrl = sysConfigList.FirstOrDefault(x => x.Code == "ZhongYuanApiSpiderUrl" && x.GroupCode == "DJY_CONST");
if (sCfgSpiderUrl == null)
@ -64,18 +58,6 @@ namespace Myshipping.Application.EDI
DjyCustomerContact custContact = null;
var postModel = new ZhongYuanSoApiModel();
//JObject extObj = null;
//if (!string.IsNullOrEmpty(custOrder.ExtendData))
//{
// extObj = JObject.Parse(custOrder.ExtendData);
// postModel.webAccount = extObj.GetStringValue("Account");
// postModel.webPassword = extObj.GetStringValue("Password");
//}
//else
//{
// return new KeyValuePair<bool, string>(false, "未找到订舱账号信息");
//}
postModel.webAccount = custOrder.BookingAccount;
postModel.webPassword = custOrder.BookingPassword;
@ -147,8 +129,8 @@ namespace Myshipping.Application.EDI
var mapServArr = mappService.MapCode.Split('-');
var startDay = template.StartDay.HasValue ? template.StartDay.Value : 1;
var endWeek = template.EndWeek.HasValue ? template.EndWeek.Value : 2;
//var startDay = template.StartDay.HasValue ? template.StartDay.Value : 1;
//var endWeek = template.EndWeek.HasValue ? template.EndWeek.Value : 2;
postModel.routes = new ZhongYuanSoApiRoute()
{
@ -159,35 +141,35 @@ namespace Myshipping.Application.EDI
vesselName = custOrder.VESSEL,
voyageNumber = custOrder.VOYNO,
serviceCode = custOrder.LANECODE,
sailSchedulePriority = template.Priority.Split(',').ToList(),
//sailSchedulePriority = template.Priority.Split(',').ToList(),
outboundHaulage = mapServArr[0],
inboundHaulage = mapServArr[1],
searchConditionDate = custOrder.ETD.Value.AddDays(startDay).ToString("yyyy-MM-dd"),
numberOfWeeks = endWeek,
searchConditionDate = custOrder.ETD.Value.AddDays(-2).ToString("yyyy-MM-dd"),
numberOfWeeks = 2,
etd = custOrder.ETD.Value.ToString("yyyy-MM-dd"),
};
#region 收发通及货代
//发货人
ZhongYuanSoApiPhone shipperPhone = null;
if (string.IsNullOrEmpty(template.ShipperName))
{
shipperPhone = new ZhongYuanSoApiPhone()
{
countryCode = custOrder.ShipperPhoneCountryCode,
areaCode = custOrder.ShipperPhoneCode,
number = custOrder.ShipperPhone
};
}
else
//if (string.IsNullOrEmpty(template.ShipperName))
//{
shipperPhone = new ZhongYuanSoApiPhone()
{
shipperPhone = new ZhongYuanSoApiPhone()
{
countryCode = template.ShipperPhoneCountryCode,
areaCode = template.ShipperPhoneCode,
number = template.ShipperPhone
};
}
countryCode = custOrder.ShipperPhoneCountryCode,
areaCode = custOrder.ShipperPhoneCode,
number = custOrder.ShipperPhone
};
//}
//else
//{
// shipperPhone = new ZhongYuanSoApiPhone()
// {
// countryCode = template.ShipperPhoneCountryCode,
// areaCode = template.ShipperPhoneCode,
// number = template.ShipperPhone
// };
//}
shipperPhone.countryCode = shipperPhone.countryCode == null ? "" : shipperPhone.countryCode;
shipperPhone.areaCode = shipperPhone.areaCode == null ? "" : shipperPhone.areaCode;
@ -196,37 +178,37 @@ namespace Myshipping.Application.EDI
postModel.shipperInfo = new ZhongYuanSoApiSFT()
{
firstName = string.IsNullOrEmpty(template.ShipperName) ? custOrder.ShipperFirstName : template.ShipperFirstName,
lastName = string.IsNullOrEmpty(template.ShipperLastName) ? custOrder.ShipperLastName : template.ShipperLastName,
country = string.IsNullOrEmpty(template.ShipperCountry) ? custOrder.ShipperCountry : template.ShipperCountry,
state = string.IsNullOrEmpty(template.ShipperProvince) ? custOrder.ShipperProvince : template.ShipperProvince,
city = string.IsNullOrEmpty(template.ShipperCity) ? custOrder.ShipperCity : template.ShipperCity,
partyName = string.IsNullOrEmpty(template.ShipperName) ? custOrder.ShipperName : template.ShipperName,
addressDes = string.IsNullOrEmpty(template.ShipperAddress) ? custOrder.ShipperAddress : template.ShipperAddress,
firstName = custOrder.ShipperFirstName,
lastName = custOrder.ShipperLastName,
country = custOrder.ShipperCountry,
state = custOrder.ShipperProvince,
city = custOrder.ShipperCity,
partyName = custOrder.ShipperName,
addressDes = custOrder.ShipperAddress,
phone = shipperPhone,
postalCode = string.IsNullOrEmpty(template.ShipperPostCode) ? custOrder.ShipperPostCode : template.ShipperPostCode
postalCode = custOrder.ShipperPostCode
};
//收货人
ZhongYuanSoApiPhone consigneePhone = null;
if (string.IsNullOrEmpty(template.ConsigneeName))
{
consigneePhone = new ZhongYuanSoApiPhone()
{
countryCode = custOrder.ConsigneePhoneCountryCode,
areaCode = custOrder.ConsigneePhoneCode,
number = custOrder.ConsigneePhone
};
}
else
//if (string.IsNullOrEmpty(template.ConsigneeName))
//{
consigneePhone = new ZhongYuanSoApiPhone()
{
consigneePhone = new ZhongYuanSoApiPhone()
{
countryCode = template.ConsigneePhoneCountryCode,
areaCode = template.ConsigneePhoneCode,
number = template.ConsigneePhone
};
}
countryCode = custOrder.ConsigneePhoneCountryCode,
areaCode = custOrder.ConsigneePhoneCode,
number = custOrder.ConsigneePhone
};
//}
//else
//{
// consigneePhone = new ZhongYuanSoApiPhone()
// {
// countryCode = template.ConsigneePhoneCountryCode,
// areaCode = template.ConsigneePhoneCode,
// number = template.ConsigneePhone
// };
//}
consigneePhone.countryCode = consigneePhone.countryCode == null ? "" : consigneePhone.countryCode;
consigneePhone.areaCode = consigneePhone.areaCode == null ? "" : consigneePhone.areaCode;
@ -234,37 +216,37 @@ namespace Myshipping.Application.EDI
postModel.consigneeInfo = new ZhongYuanSoApiSFT()
{
firstName = string.IsNullOrEmpty(template.ConsigneeFirstName) ? custOrder.ConsigneeFirstName : template.ConsigneeFirstName,
lastName = string.IsNullOrEmpty(template.ConsigneeLastName) ? custOrder.ConsigneeLastName : template.ConsigneeLastName,
country = string.IsNullOrEmpty(template.ConsigneeCountry) ? custOrder.ConsigneeCountry : template.ConsigneeCountry,
state = string.IsNullOrEmpty(template.ConsigneeProvince) ? custOrder.ConsigneeProvince : template.ConsigneeProvince,
city = string.IsNullOrEmpty(template.ConsigneeCity) ? custOrder.ConsigneeCity : template.ConsigneeCity,
partyName = string.IsNullOrEmpty(template.ConsigneeName) ? custOrder.ConsigneeName : template.ConsigneeName,
addressDes = string.IsNullOrEmpty(template.ConsigneeAddress) ? custOrder.ConsigneeAddress : template.ConsigneeAddress,
firstName = custOrder.ConsigneeFirstName,
lastName = custOrder.ConsigneeLastName,
country = custOrder.ConsigneeCountry,
state = custOrder.ConsigneeProvince,
city = custOrder.ConsigneeCity,
partyName = custOrder.ConsigneeName,
addressDes = custOrder.ConsigneeAddress,
phone = consigneePhone,
postalCode = string.IsNullOrEmpty(template.ConsigneePostCode) ? custOrder.ConsigneePostCode : template.ConsigneePostCode
postalCode = custOrder.ConsigneePostCode
};
//通知人
ZhongYuanSoApiPhone notifyPhone = null;
if (string.IsNullOrEmpty(template.NotifypartName))
{
notifyPhone = new ZhongYuanSoApiPhone()
{
countryCode = custOrder.NotifypartPhoneCountryCode,
areaCode = custOrder.NotifypartPhoneCode,
number = custOrder.NotifypartPhone
};
}
else
//if (string.IsNullOrEmpty(template.NotifypartName))
//{
notifyPhone = new ZhongYuanSoApiPhone()
{
notifyPhone = new ZhongYuanSoApiPhone()
{
countryCode = template.NotifypartPhoneCountryCode,
areaCode = template.NotifypartPhoneCode,
number = template.NotifypartPhone
};
}
countryCode = custOrder.NotifypartPhoneCountryCode,
areaCode = custOrder.NotifypartPhoneCode,
number = custOrder.NotifypartPhone
};
//}
//else
//{
// notifyPhone = new ZhongYuanSoApiPhone()
// {
// countryCode = template.NotifypartPhoneCountryCode,
// areaCode = template.NotifypartPhoneCode,
// number = template.NotifypartPhone
// };
//}
notifyPhone.countryCode = notifyPhone.countryCode == null ? "" : notifyPhone.countryCode;
notifyPhone.areaCode = notifyPhone.areaCode == null ? "" : notifyPhone.areaCode;
@ -272,54 +254,53 @@ namespace Myshipping.Application.EDI
postModel.notifyInfo = new ZhongYuanSoApiSFT()
{
firstName = string.IsNullOrEmpty(template.NotifypartFirstName) ? custOrder.NotifypartFirstName : template.NotifypartFirstName,
lastName = string.IsNullOrEmpty(template.NotifypartLastName) ? custOrder.NotifypartLastName : template.NotifypartLastName,
country = string.IsNullOrEmpty(template.NotifypartCountry) ? custOrder.NotifypartCountry : template.NotifypartCountry,
state = string.IsNullOrEmpty(template.NotifypartProvince) ? custOrder.NotifypartProvince : template.NotifypartProvince,
city = string.IsNullOrEmpty(template.NotifypartCity) ? custOrder.NotifypartCity : template.NotifypartCity,
partyName = string.IsNullOrEmpty(template.NotifypartName) ? custOrder.NotifypartName : template.NotifypartName,
addressDes = string.IsNullOrEmpty(template.NotifypartAddress) ? custOrder.NotifypartAddress : template.NotifypartAddress,
firstName = custOrder.NotifypartFirstName,
lastName = custOrder.NotifypartLastName,
country = custOrder.NotifypartCountry,
state = custOrder.NotifypartProvince,
city = custOrder.NotifypartCity,
partyName = custOrder.NotifypartName,
addressDes = custOrder.NotifypartAddress,
phone = notifyPhone,
postalCode = string.IsNullOrEmpty(template.NotifypartPostCode) ? custOrder.NotifypartPostCode : template.NotifypartPostCode
postalCode = custOrder.NotifypartPostCode
};
//货代
ZhongYuanSoApiPhone forwarderPhone = null;
if (string.IsNullOrEmpty(template.BookingName))
{
forwarderPhone = new ZhongYuanSoApiPhone()
{
countryCode = custOrder.BookingPhoneCountryCode,
areaCode = custOrder.BookingPhoneCode,
number = custOrder.BookingPhone
};
}
else
//if (string.IsNullOrEmpty(template.BookingName))
//{
forwarderPhone = new ZhongYuanSoApiPhone()
{
forwarderPhone = new ZhongYuanSoApiPhone()
{
countryCode = template.BookingPhoneCountryCode,
areaCode = template.BookingPhoneCode,
number = template.BookingPhone
};
}
countryCode = custOrder.BookingPhoneCountryCode,
areaCode = custOrder.BookingPhoneCode,
number = custOrder.BookingPhone
};
//}
//else
//{
// forwarderPhone = new ZhongYuanSoApiPhone()
// {
// countryCode = template.BookingPhoneCountryCode,
// areaCode = template.BookingPhoneCode,
// number = template.BookingPhone
// };
//}
forwarderPhone.countryCode = forwarderPhone.countryCode == null ? "" : forwarderPhone.countryCode;
forwarderPhone.areaCode = forwarderPhone.areaCode == null ? "" : forwarderPhone.areaCode;
forwarderPhone.number = forwarderPhone.number == null ? "" : forwarderPhone.number;
postModel.forwarderInfo = new ZhongYuanSoApiSFT()
{
firstName = string.IsNullOrEmpty(template.BookingFirstName) ? custOrder.BookingFirstName : template.BookingFirstName,
lastName = string.IsNullOrEmpty(template.BookingLastName) ? custOrder.BookingLastName : template.BookingLastName,
country = string.IsNullOrEmpty(template.BookingCountry) ? custOrder.BookingCountry : template.BookingCountry,
state = string.IsNullOrEmpty(template.BookingProvince) ? custOrder.BookingProvince : template.BookingProvince,
city = string.IsNullOrEmpty(template.BookingCity) ? custOrder.BookingCity : template.BookingCity,
partyName = string.IsNullOrEmpty(template.BookingName) ? custOrder.BookingName : template.BookingName,
addressDes = string.IsNullOrEmpty(template.BookingAddress) ? custOrder.BookingAddress : template.BookingAddress,
firstName = custOrder.BookingFirstName,
lastName = custOrder.BookingLastName,
country = custOrder.BookingCountry,
state = custOrder.BookingProvince,
city = custOrder.BookingCity,
partyName = custOrder.BookingName,
addressDes = custOrder.BookingAddress,
phone = forwarderPhone,
postalCode = string.IsNullOrEmpty(template.BookingPostCode) ? custOrder.BookingPostCode : template.BookingPostCode
postalCode = custOrder.BookingPostCode,
};
#endregion
@ -365,13 +346,13 @@ namespace Myshipping.Application.EDI
postModel.truckingContacts = new ZhongYuanSoApiTruckingContacts()
{
isDoorAdvised = template.NotifyNext
isDoorAdvised = true
};
postModel.rateInfos = new ZhongYuanSoApiRateInfo()
{
paymentMethod = mapFrt.MapCode,
serviceContractNum = template.ContractNO
serviceContractNum = custOrder.CONTRACTNO
};
@ -386,10 +367,10 @@ namespace Myshipping.Application.EDI
{
bcMail = custContact.Email;
}
else
{
bcMail = template.BcReceiveEmail;
}
//else
//{
// bcMail = template.BcReceiveEmail;
//}
if (djyBookMail != null)
{
@ -413,14 +394,23 @@ namespace Myshipping.Application.EDI
var jdata = jobjRtn.GetJObjectValue("data");
if (jdata != null)
{
JObject extObj = null;
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
extObj = JObject.Parse(custOrder.ExtendData);
}
else
{
extObj = new JObject();
}
var bookingNo = jdata.GetStringValue("bookingNo");
if (!string.IsNullOrEmpty(bookingNo))
{
order.CUSTNO = bookingNo;
await repOrder.AsUpdateable(order).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
Log.Information($"回写CC号{bookingNo} {order.Id} {order.BOOKINGNO}");
CustomerBookingSyncHelper.SendCustomerBookingSync(order.Id, BookingOrderSyncTypeEnum.CC.ToString());
Log.Information($"回推CC号{bookingNo} {order.Id} {order.BOOKINGNO}");
extObj["BookingNO"] = bookingNo;
custOrder.ExtendData = extObj.ToJsonString();
await repCustOrder.AsUpdateable(custOrder).UpdateColumns(x => new { x.ExtendData }).ExecuteCommandAsync();
Log.Information($"回写CC号{bookingNo} {custOrder.Id} {custOrder.BOOKINGNO}");
}
}
@ -589,10 +579,10 @@ namespace Myshipping.Application.EDI
/// </summary>
public string serviceCode { get; set; }
/// <summary>
/// 船期选择优先级
/// </summary>
public List<string> sailSchedulePriority { get; set; }
///// <summary>
///// 船期选择优先级
///// </summary>
//public List<string> sailSchedulePriority { get; set; }
/// <summary>
/// 出发地运输条款

@ -17,6 +17,7 @@ using Myshipping.Application.ConfigOption;
using Myshipping.Application.EDI;
using Myshipping.Application.Entity;
using Myshipping.Application.Enum;
using Myshipping.Application.Helper;
using Myshipping.Application.Service.BookingOrder.Dto;
using Myshipping.Core;
using Myshipping.Core.Entity;
@ -988,6 +989,13 @@ namespace Myshipping.Application
throw Oops.Bah("订舱API的KEY和密钥未配置请联系管理员");
}
var custOrder = await _rep.AsQueryable().FirstAsync(x => x.Id == custOrdId);
var ctns = await _repCtn.AsQueryable().Where(x => x.BILLID == custOrdId).ToListAsync();
var mappingPortLoad = await _cache.GetAllMappingPortLoad();
var mappingPort = await _cache.GetAllMappingPort();
var mappingCtn = await _cache.GetAllMappingCtn();
var mappingService = await _cache.GetAllMappingService();
#region EMC
if (carr == "EMC")
{
@ -998,12 +1006,6 @@ namespace Myshipping.Application
}
apiUrl += "v1/emc/ship/query";
var custOrder = await _rep.AsQueryable().FirstAsync(x => x.Id == custOrdId);
var ctns = await _repCtn.AsQueryable().Where(x => x.BILLID == custOrdId).ToListAsync();
var mappingCtn = await _cache.GetAllMappingCtn();
var mappingPortLoad = await _cache.GetAllMappingPortLoad();
var mappingPort = await _cache.GetAllMappingPort();
//收货地
var mapPlaceReceipt = mappingPortLoad.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "EMC" && x.Code == custOrder.PLACERECEIPTCODE);
@ -1086,17 +1088,72 @@ namespace Myshipping.Application
#endregion
#region COSCO
//else if (carr == "COSCO")
//{
// var apiUrl = sCfgSpiderUrl.Value;
// if (!apiUrl.EndsWith("/"))
// {
// apiUrl += "/";
// }
// apiUrl += "v1/cosco/ship/schedule";
else if (carr == "COSCO")
{
var apiUrl = sCfgSpiderUrl.Value;
if (!apiUrl.EndsWith("/"))
{
apiUrl += "/";
}
apiUrl += "v1/cosco/ship/schedule";
//起运港
var mapPortLoad = mappingPortLoad.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "COSCO" && x.Code == custOrder.PORTLOADCODE);
if (mapPortLoad == null)
{
throw Oops.Bah($"未找到起运港映射信息:{custOrder.PORTLOADCODE}");
}
//}
//目的地
var mapDestination = mappingPort.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "COSCO" && x.Code == custOrder.DESTINATIONCODE);
if (mapDestination == null)
{
throw Oops.Bah($"未找到目的地映射信息:{custOrder.DESTINATIONCODE}");
}
//运输方式
var mapService = mappingService.FirstOrDefault(x => x.Module == "DjyCustBooking" && x.CarrierCode == "COSCO" && x.Code == custOrder.SERVICE);
string[] arrService = null;
if (mapService == null)
{
arrService = custOrder.SERVICE.Split('-');
}
else
{
arrService = mapService.MapCode.Split('-');
}
var postModel = new
{
userKey = sCfgUserKey.Value,
userSecret = sCfgUserSecret.Value,
webAccount = custOrder.BookingAccount,
webPassword = custOrder.BookingPassword,
numberOfWeeks = 2,
searchConditionDate = custOrder.ETD.Value.AddDays(-2).ToString("yyyy-MM-dd"),
originName = mapPortLoad.MapName,
destinationName = mapDestination.MapName,
cargoNature = "BOTH",
outboundHaulage = arrService[0],
inboundHaulage = arrService[1]
};
_logger.LogInformation($"发送查询API数据给爬虫{apiUrl}{postModel.ToJsonString()}");
var rtnQuery = await apiUrl.SetBody(postModel)
.PostAsStringAsync();
_logger.LogInformation($"爬虫返回:{rtnQuery}");
var jobjRtnQuery = JObject.Parse(rtnQuery);
if (jobjRtnQuery.GetIntValue("code") != 200)
{
throw Oops.Bah($"查询船期数据出错:{jobjRtnQuery.GetStringValue("msg")}");
}
else
{
var jarrVessel = jobjRtnQuery.GetJArrayValue("data");
return jarrVessel;
}
}
#endregion
else
{
@ -1105,26 +1162,6 @@ namespace Myshipping.Application
}
/// <summary>
/// 保存船期数据EMC
/// </summary>
/// <returns></returns>
[HttpPost("/BookingCustomerOrder/SaveShipInfoEMC")]
public async Task SaveShipInfoEMC(SaveShipInfoEMCDto dto)
{
_logger.LogInformation($"保存船期数据EMC{dto.ToJsonString()}");
var custOrder = await _rep.AsQueryable().FirstAsync(x => x.Id == dto.Id);
JObject jobjExt = new JObject();
if (!string.IsNullOrEmpty(custOrder.ExtendData))
{
jobjExt = JObject.Parse(custOrder.ExtendData);
}
jobjExt["shipInfo"] = dto.ShipData;
custOrder.ExtendData = jobjExt.ToString();
await _rep.AsUpdateable(custOrder).UpdateColumns(x => new { x.ExtendData }).ExecuteCommandAsync();
}
#region 客户订舱模板
/// <summary>
/// 客户订舱模板列表
@ -2399,6 +2436,32 @@ namespace Myshipping.Application
await _repFile.InsertAsync(file);
}
//订舱编号回写
JObject extObj = null;
if (!string.IsNullOrEmpty(model.ExtendData))
{
extObj = JObject.Parse(model.ExtendData);
if (model.CARRIERID == "COSCO")
{
var bookingNO = extObj.GetStringValue("BookingNO");
bkOrder.CUSTNO = bookingNO;
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync((long)id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bookingNO}");
}
else if (model.CARRIERID == "EMC")
{
var bookingNOArr = extObj.GetJArrayValue("BookingNO");
if (bookingNOArr.Count == 1)
{
bkOrder.CUSTNO = bookingNOArr.First().ToString();
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync((long)id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bkOrder.CUSTNO}");
}
}
}
}

Loading…
Cancel
Save