From b20f36106f52e5928d1ad830d19359d7a1f4e668 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Mon, 10 Apr 2023 12:44:45 +0800 Subject: [PATCH 1/3] 1 --- .../Service/BookingOrder/BookingOrderService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index db7c99d9..3a80a11e 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1452,7 +1452,7 @@ namespace Myshipping.Application } - return list.Union(config).OrderBy(x => x.Sort).ToList(); + return list.Union(config).Distinct().OrderBy(x => x.Sort).ToList(); } return null; From 21a50d734b6451936eeef5df55863957dc584559 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Mon, 10 Apr 2023 13:07:59 +0800 Subject: [PATCH 2/3] 1 --- .../Service/BookingOrder/BookingOrderService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index d28e8e45..7941c545 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -1431,7 +1431,7 @@ namespace Myshipping.Application }).ToListAsync(); - var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == userid).ToList().Select(config => new GoodsStatusQuery + var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == userid).ToList().DistinctBy(x=>x.StatusName).Select(config => new GoodsStatusQuery { ConfigId = config.Id, @@ -1452,7 +1452,7 @@ namespace Myshipping.Application } - return list.Union(config).Distinct().OrderBy(x => x.Sort).ToList(); + return list.Union(config).OrderBy(x => x.Sort).ToList(); } return null; From b3051bb4ff57991d5958b4b68e152c4f19427122 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Mon, 10 Apr 2023 14:10:28 +0800 Subject: [PATCH 3/3] 1 --- .../Service/DataSync/DataSyncService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Service/DataSync/DataSyncService.cs b/Myshipping.Application/Service/DataSync/DataSyncService.cs index d9ab744c..3f58422f 100644 --- a/Myshipping.Application/Service/DataSync/DataSyncService.cs +++ b/Myshipping.Application/Service/DataSync/DataSyncService.cs @@ -943,7 +943,7 @@ namespace Myshipping.Application if (model.BookingEDIExt != null) { //检索EDI扩展 - var ediExtEntity = _bookingEDIExt.FirstOrDefault(u => u.BookingId == main.Id); + var ediExtEntity = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == main.Id).FirstAsync(); if (ediExtEntity == null) { @@ -1244,7 +1244,7 @@ namespace Myshipping.Application if (item.BookingEDIExt != null) { //检索EDI扩展 - var ediExtEntity = _bookingEDIExt.FirstOrDefault(u => u.BookingId == fdmain.Id); + var ediExtEntity = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == fdmain.Id).FirstAsync(); if (ediExtEntity == null) { @@ -1359,8 +1359,8 @@ namespace Myshipping.Application if (item.BookingEDIExt != null) { //检索EDI扩展 - var ediExtEntity = _bookingEDIExt.FirstOrDefault(u => u.BookingId == fdentity.Id); - + + var ediExtEntity = await _bookingEDIExt.AsQueryable().Filter(null, true).Where(x => x.BookingId == fdentity.Id).FirstAsync(); if (ediExtEntity == null) { //写入EDI扩展