Browse Source

取消区间校验

master
zhouhongjun 1 year ago
parent
commit
bdd8c758e7
  1. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  3. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs
  4. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

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

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

16
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

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

16
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs

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

1
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

@ -133,6 +133,7 @@ namespace SettleAccount.Job.Services.Report
foreach (var item in pubSaEntityList) foreach (var item in pubSaEntityList)
{ {
item.StateOther = "2"; item.StateOther = "2";
item.State = "2";
} }
_settleAccountDbContext.SaveChanges(); _settleAccountDbContext.SaveChanges();

Loading…
Cancel
Save