|
|
@ -248,10 +248,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
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($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400"); |
|
|
|
} |
|
|
|
//if (existPriceBj != null)
|
|
|
|
//{
|
|
|
|
// throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPriceBj.BeginDate:yyyy-MM-dd}至{existPriceBj.EndDate:yyyy-MM-dd}】存在交集", "400");
|
|
|
|
//}
|
|
|
|
} |
|
|
|
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); |
|
|
|
var dto = ObjectMapper.Map<PriceListBJ, PriceListBJDto>(entity); |
|
|
@ -279,10 +279,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
var existPrice = existPriceList.Find(t => (entity.BeginDate >= t.BeginDate && entity.BeginDate < t.EndDate) || (t.BeginDate>= entity.BeginDate && t.BeginDate < entity.EndDate)); |
|
|
|
if (existPrice != null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginDate:yyyy-MM-dd}至{existPrice.EndDate:yyyy-MM-dd}】存在交集", "400"); |
|
|
|
} |
|
|
|
//if (existPrice != null)
|
|
|
|
//{
|
|
|
|
// throw new UserFriendlyException($"无法启用!此记录启用时间区间与区间【{existPrice.BeginDate:yyyy-MM-dd}至{existPrice.EndDate:yyyy-MM-dd}】存在交集", "400");
|
|
|
|
//}
|
|
|
|
} |
|
|
|
plist.Add(entity); |
|
|
|
} |
|
|
|