From ecaf0c9ccaf32839c5332748fd01cc8164fae79c Mon Sep 17 00:00:00 2001 From: mahao Date: Fri, 15 Sep 2023 11:51:20 +0800 Subject: [PATCH] up --- .../Entities/Prices/PriceListAppService.cs | 8 ++++---- .../Entities/Prices/PriceListAppServiceBJ.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index f5b8d390..37101f16 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -256,16 +256,16 @@ public class PriceListAppService : SettleAccountApplicationBase entity.IsCancel = input.IsCancel; if (entity.IsCancel == false) { - var existsPriceList = _settleAccountDbContext.Set() + var existPriceList = _settleAccountDbContext.Set() .Where(t => t.LU == entity.LU) .Where(t => t.IsCancel == false) .Where(t => t.Id != entity.Id) .ToList(); - var existsPrice = existsPriceList.Find(t => (entity.BeginTime >= t.BeginTime && entity.BeginTime < t.EndTime) || (t.BeginTime >= entity.BeginTime && t.BeginTime < entity.EndTime)); - if (existsPrice != null) + var existPrice = existPriceList.Find(t => (entity.BeginTime >= t.BeginTime && entity.BeginTime < t.EndTime) || (t.BeginTime >= entity.BeginTime && t.BeginTime < entity.EndTime)); + if (existPrice != null) { - throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existsPrice.BeginTime:yyyy-MM-dd}至{existsPrice.EndTime:yyyy-MM-dd}】存在交集", "400"); + throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginTime:yyyy-MM-dd}至{existPrice.EndTime:yyyy-MM-dd}】存在交集", "400"); } } _settleAccountDbContext.Set().Update(entity); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index f4cf5dc8..3e378daf 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -214,16 +214,16 @@ public class PriceListAppServiceBJ : SettleAccountApplicationBase entity.IsCancel = input.IsCancel; if (entity.IsCancel == false) { - var existsPriceBjList = _settleAccountDbContext.Set() + var existPriceBjList = _settleAccountDbContext.Set() .Where(t => t.LU == entity.LU) .Where(t => t.IsCancel == false) .Where(t => t.Id != entity.Id) .ToList(); - var existsPriceBj = existsPriceBjList.Find(t => (entity.BeginDate >= t.BeginDate && entity.BeginDate < t.EndDate) || (t.BeginDate >= entity.BeginDate && t.BeginDate < entity.EndDate)); - if (existsPriceBj != null) + var existPriceBj = existPriceBjList.Find(t => (entity.BeginDate >= t.BeginDate && entity.BeginDate < t.EndDate) || (t.BeginDate >= entity.BeginDate && t.BeginDate < entity.EndDate)); + if (existPriceBj != null) { - throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existsPriceBj.BeginDate:yyyy-MM-dd}至{existsPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400"); + throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400"); } } _settleAccountDbContext.Set().Update(entity);