Compare commits

...

2 Commits

  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs

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

@ -152,6 +152,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
else
{
hasRepeat.IsCancel = false;
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, item.LU, string.Empty, $"零件号:{item.LU},与已存在合同签订时间、价格重复", string.Empty));
}
}
@ -161,6 +163,12 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
await _settleAccountDbContext.BulkUpdateAsync<PriceList>(oldPrices).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync<PriceList>(newPriceNoRepeat).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
if (checkList.Count > 0)
{
var fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false);
return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName });
}
}
catch (Exception)
{

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

@ -143,6 +143,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
else
{
hasRepeat.IsCancel = false;
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, item.LU, string.Empty, $"零件号:{item.LU},与已存在合同签订时间、价格重复", string.Empty));
}
}
@ -152,6 +154,13 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
await _settleAccountDbContext.BulkUpdateAsync<PriceListBJ>(oldPrices).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync<PriceListBJ>(newPriceNoRepeat).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
if (checkList.Count > 0)
{
var fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false);
return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName });
}
}
catch (Exception)
{

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

@ -138,6 +138,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
else
{
hasRepeat.IsCancel = false;
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, item.LU, string.Empty, $"零件号:{item.LU},与已存在合同签订时间、价格重复", string.Empty));
}
}
@ -147,6 +149,12 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
await _settleAccountDbContext.BulkUpdateAsync<PriceListYinDu>(oldPrices).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync<PriceListYinDu>(newPriceNoRepeat).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
if (checkList.Count > 0)
{
var fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false);
return new JsonResult(new { code = ApplicationConsts.ImportFailCode, message = "导入失败", fileName });
}
}
catch (Exception)
{

Loading…
Cancel
Save