diff --git a/Myshipping.Application/EDI/EMCSoApiHelper.cs b/Myshipping.Application/EDI/EMCSoApiHelper.cs index 076deeaf..53aa2ec2 100644 --- a/Myshipping.Application/EDI/EMCSoApiHelper.cs +++ b/Myshipping.Application/EDI/EMCSoApiHelper.cs @@ -355,7 +355,7 @@ namespace Myshipping.Application.EDI } var bookingNoArr = jdata.GetJArrayValue("bookingNo"); - extObj["BookingNO"] = bookingNoArr; + extObj["CustNO"] = bookingNoArr; custOrder.ExtendData = extObj.ToJsonString(); await repCustOrder.AsUpdateable(custOrder).UpdateColumns(x => new { x.ExtendData }).ExecuteCommandAsync(); Log.Information($"回写CC号 {custOrder.Id} {custOrder.BOOKINGNO}"); diff --git a/Myshipping.Application/Event/BookingSyncSubscriber.cs b/Myshipping.Application/Event/BookingSyncSubscriber.cs index adc989b9..f2e8b444 100644 --- a/Myshipping.Application/Event/BookingSyncSubscriber.cs +++ b/Myshipping.Application/Event/BookingSyncSubscriber.cs @@ -492,7 +492,7 @@ namespace Myshipping.Application.Event //生成id并插入客户订舱数据 custOrder.Id = YitIdHelper.NextId(); custOrder.BOOKINGNO = item.GetStringValue("BookingNO"); - custOrder.BSNO = item.GetStringValue("CustOrderId"); + custOrder.BSNO = item.GetStringValue("custOrderId"); custOrder.ParentBookingNO = parentBookingNO; JObject jobjExt = null; if (!string.IsNullOrEmpty(custOrder.ExtendData)) @@ -505,6 +505,7 @@ namespace Myshipping.Application.Event } jobjExt["CustNO"] = item.GetStringValue("CustNO"); + custOrder.ExtendData = jobjExt.ToString(); await repoCutomerOrder.InsertAsync(custOrder); @@ -522,8 +523,10 @@ namespace Myshipping.Application.Event custOrder.BookingId = ord.Id; await repoCutomerOrder.AsUpdateable(custOrder).UpdateColumns(x => new { x.BookingId }).ExecuteCommandAsync(); - ord.BSNO = item.GetStringValue("OrderId"); - await repoOrder.AsUpdateable(ord).UpdateColumns(x => new { x.BSNO }).ExecuteCommandAsync(); + //订舱编号和客户端BSNO + ord.BSNO = item.GetStringValue("orderId"); + ord.CUSTNO = item.GetStringValue("custNO"); + await repoOrder.AsUpdateable(ord).UpdateColumns(x => new { x.BSNO, x.CUSTNO }).ExecuteCommandAsync(); _logger.LogInformation($"生成了订舱台账数据 {ord.Id}"); diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs index 282ed4a9..c1eae0bb 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs @@ -1658,6 +1658,7 @@ namespace Myshipping.Application } jobjExt["CustNO"] = bookNO; + model.ExtendData = jobjExt.ToString(); await _rep.InsertAsync(model); @@ -1679,6 +1680,10 @@ namespace Myshipping.Application model.BookingId = ord.Id; await _rep.AsUpdateable(model).UpdateColumns(x => new { x.BookingId }).ExecuteCommandAsync(); + //订舱编号 + ord.CUSTNO = bookNO; + await _repOrder.AsUpdateable(ord).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync(); + respDtO.OrderId = ord.Id; _logger.LogInformation($"生成了订舱台账数据 {ord.Id}"); @@ -2434,7 +2439,7 @@ namespace Myshipping.Application else if (model.CARRIERID == "EMC") { var custNOArr = extObj.GetJArrayValue("CustNO"); - if (custNOArr.Count > 0) + if (custNOArr != null && custNOArr.Count > 0) { var custNO = custNOArr.First().ToString(); _logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}"); diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index fdf6fbd2..c7416dda 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -12889,7 +12889,7 @@ namespace Myshipping.Application #region BC /// - /// 接收BC信息更新订舱 + /// 运营端接收订舱拒绝消息 /// [AllowAnonymous] [HttpPost("/BookingOrder/ReceiveBookingReject")] @@ -12897,7 +12897,7 @@ namespace Myshipping.Application public async Task ReceiveBookingReject(ReceiveBookingRejectInputDto input) { // 客户订舱:运营端发送订舱数据给客户端 - if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_DJY) + if (App.Configuration["RunType"] != CommonConst.RUN_TYPE_DJY) { return new ReceiveBcInfoResultDto(false, "非运营端,接收失败"); } diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index ed272361..aeeb19f5 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -4733,12 +4733,17 @@ - 只同步BC+文件相关字段 + 只用于同步BC及文件相关字段 - 只同步CC号 + 只用于同步CC号 + + + + + 只用于推送订舱拒绝消息 diff --git a/Myshipping.Web.Core/applicationconfig.json b/Myshipping.Web.Core/applicationconfig.json index dc0efa28..19a4fa0d 100644 --- a/Myshipping.Web.Core/applicationconfig.json +++ b/Myshipping.Web.Core/applicationconfig.json @@ -56,7 +56,7 @@ }, "Cache": { "CacheType": "RedisCache", // RedisCache - "RedisConnectionString": "60.209.125.238:36379,password=,defaultDatabase=11" + "RedisConnectionString": "127.0.0.1:6379,password=,defaultDatabase=11" }, "SnowId": { "WorkerId": "1" // 取值范围0~63,默认1