From cd44ff1c803eea187e0928049f1145e872cec13a Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Tue, 28 Feb 2023 14:12:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BF=87=E6=BB=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Core/Service/CommonDB/CommonDBService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Myshipping.Core/Service/CommonDB/CommonDBService.cs b/Myshipping.Core/Service/CommonDB/CommonDBService.cs index 83f3a2da..604e3e56 100644 --- a/Myshipping.Core/Service/CommonDB/CommonDBService.cs +++ b/Myshipping.Core/Service/CommonDB/CommonDBService.cs @@ -450,7 +450,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie { var list = await _sysCacheService.GetAllMappingYard(); - var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module && x.GID != dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module &&x.MapCode==dto.MapCode && x.GID != dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006); @@ -562,7 +562,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task AddOrUpdatePortload([FromBody] MappingPortLoadDto dto) { var list = await _sysCacheService.GetAllMappingPortLoad(); - var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module && x.GID != dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module&&x.CarrierCode==dto.CarrierCode && x.GID != dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006); @@ -676,7 +676,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task AddOrUpdatePort([FromBody] MappingPortDto dto) { var list = await _sysCacheService.GetAllMappingPort(); - var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module&&x.CarrierCode==dto.CarrierCode && x.GID != dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006); @@ -779,7 +779,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task AddOrUpdateMappingPackage([FromBody] MappingPackageDto dto) { var list = await _sysCacheService.GetAllMappingPackage(); - var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module &&x.CarrierCode==dto.CarrierCode && x.GID != dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module &&x.MapCode==dto.MapCode && x.GID != dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006); @@ -887,7 +887,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task AddOrUpdateMappingService([FromBody] MappingServiceDto dto) { var list = await _sysCacheService.GetAllMappingService(); - var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module&&x.MapCode==dto.MapCode && x.GID != dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006); @@ -1115,7 +1115,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie public async Task AddOrUpdateMappingFrt([FromBody] MappingFrtDto dto) { var list = await _sysCacheService.GetAllMappingFrt(); - var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module&&x.GID!=dto.GID).Count(); + var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module&&x.MapCode==dto.MapCode &&x.GID!=dto.GID).Count(); if (count > 0) { throw Oops.Bah(ErrorCode.D1006);