diff --git a/Myshipping.Application/EDI/EMCSoApiHelper.cs b/Myshipping.Application/EDI/EMCSoApiHelper.cs index 3df7b7ec..7c11d83d 100644 --- a/Myshipping.Application/EDI/EMCSoApiHelper.cs +++ b/Myshipping.Application/EDI/EMCSoApiHelper.cs @@ -154,12 +154,9 @@ 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; - postModel.routes = new EMCSoApiRoute() { - searchConditionDate = custOrder.ETD.Value.AddDays(startDay).ToString("yyyy-MM-dd"), + searchConditionDate = custOrder.ETD.Value.ToString("yyyy-MM-dd"), originName = mapPlaceReceipt.MapCode, destinationName = mapDestination.MapCode, polPortName = mapPortLoad.MapCode, @@ -329,6 +326,8 @@ namespace Myshipping.Application.EDI }; #endregion + postModel.remark = custOrder.SOREMARK; + var apiUrl = sCfgSpiderUrl.Value; if (!apiUrl.EndsWith("/")) { diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs index b1cd94fe..f040fe83 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs @@ -669,11 +669,9 @@ namespace Myshipping.Application throw Oops.Bah("回推数据接收接口授权未配置"); } - - foreach (var order in orderList) { - if (order.BSSTATUS != "已录入" && order.BSSTATUS != "已驳回") + if (order.BSSTATUS == "已审核") { throw Oops.Bah($"{order.BOOKINGNO} 当前状态为{order.BSSTATUS},不能提交"); } @@ -694,6 +692,10 @@ namespace Myshipping.Application dto.Files = fileList.Where(x => x.BookingId == order.Id).ToList().Adapt>(); sendList.Add(dto); + + //2024年6月17日,因为运营端有自动审核,导致“已审核”的状态被覆盖成“已提交”,与衣国豪讨论,改为先改为“已提交”状态,后调用运营端提交 + order.BSSTATUS = "已提交"; + await _rep.AsUpdateable(order).UpdateColumns(x => new { x.BSSTATUS }).ExecuteCommandAsync(); } //构建完整url @@ -744,9 +746,10 @@ namespace Myshipping.Application var succ = item.GetBooleanValue("success"); if (succ) { - var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id); - model.BSSTATUS = "已提交"; - await _rep.UpdateAsync(model); + //2024年6月17日,因为运营端有自动审核,导致“已审核”的状态被这里覆盖成“已提交”,与衣国豪讨论,改为先改为“已提交”状态,后调用运营端提交 + //var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id); + //model.BSSTATUS = "已提交"; + //await _rep.UpdateAsync(model); //日志动态 SaveAuditLog("已提交", id); @@ -1884,7 +1887,7 @@ namespace Myshipping.Application custOrder.SignType = "Forwarder"; custOrder.BillCount = 1; - var lastOrder =await _rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).OrderByDescending(x => x.CreatedTime).FirstAsync(); + var lastOrder = await _rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).OrderByDescending(x => x.CreatedTime).FirstAsync(); custOrder.BookingAddr = lastOrder.BookingAddr; custOrder.BillSignLoc = lastOrder.BillSignLoc; custOrder.SHIPPER = lastOrder.SHIPPER;