mahao 1 year ago
parent
commit
0b05edd1a3
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -262,7 +262,7 @@ public class PriceListAppService : SettleAccountApplicationBase<PriceList>
.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));
var existsPrice = existsPriceList.Find(t => (entity.BeginTime >= t.BeginTime && entity.BeginTime < t.EndTime) || (t.BeginTime >= entity.BeginTime && t.BeginTime < entity.EndTime));
if (existsPrice != null)
{
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existsPrice.BeginTime:yyyy-MM-dd}至{existsPrice.EndTime:yyyy-MM-dd}】存在交集", "400");

Loading…
Cancel
Save