Browse Source

更新版本

master
zhaoxinyu 10 months ago
parent
commit
86b80d530c
  1. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

24
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -518,10 +518,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//红冲发票提交QAD //红冲发票提交QAD
if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum))
{
await SubmitToQadHongChongAsync(invoiceGrp.ParentInvbillNum,_detail).ConfigureAwait(false);
}
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false);
foreach (var itm in tedsaInvs1) foreach (var itm in tedsaInvs1)
{ {
@ -587,18 +584,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
LINE = (i + 1).ToString() LINE = (i + 1).ToString()
}); });
} }
tedSaInvs.FirstOrDefault().InvoiceTaxAmount += invoiceGrp.TaxDiff; var invbefore = invoiceGrp.RealAmt + invoiceGrp.TaxDiff;//
//红冲发票提交QAD var invafter = tedSaInvs.Sum(p => p.InvoiceTaxAmount);
if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum)) var invdiff = invbefore - invafter;
{
await SubmitToQadHongChongAsync(invoiceGrp.ParentInvbillNum).ConfigureAwait(false); tedSaInvs.FirstOrDefault().InvoiceTaxAmount += invdiff;
}
//await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false); //await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false);
//await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); //await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false);
//invoiceGrp.State = SettleBillState.已提交QAD; //invoiceGrp.State = SettleBillState.已提交QAD;
////构建发票同步Qad状态表数据 ////构建发票同步Qad状态表数据
//await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false); //await BindInvoiceSyncQadAsync(teaTaskSub, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum, invoiceGrp.ClientCode).ConfigureAwait(false);
await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false); await _exChangeCenterDbContext.BulkInsertAsync(new List<TEA_TASK_SUB>() { teaTaskSub }).ConfigureAwait(false);
foreach (var itm in tedSaInvs)
{
itm.InvoiceQuatity = -itm.InvoiceQuatity;
itm.InvoiceNetAmount = -itm.InvoiceNetAmount;
itm.InvoiceTaxAmount = -itm.InvoiceTaxAmount;
}
await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false); await _exChangeCenterDbContext.BulkInsertAsync(tedSaInvs).ConfigureAwait(false);
invoiceGrp.State = SettleBillState.QAD; invoiceGrp.State = SettleBillState.QAD;
await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp }); await _repository.DbContext.BulkUpdateAsync(new List<INVOICE_GRP>() { invoiceGrp });

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -221,28 +221,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async Task<string> BalanceSumByVersionExport(RequestDto input) public async Task<string> BalanceSumByVersionExport(RequestDto input)
{ {
var entities = await _balanceSumRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount, true).ConfigureAwait(false); var entities = await _balanceSumRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount, true).ConfigureAwait(false);
IExporter _excel = new ExcelExporter(); IExporter _excel = new ExcelExporter();
byte[] result = null; byte[] result = null;
result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false); result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false);
result.ShouldNotBeNull(); result.ShouldNotBeNull();
var fileName = $"库存余额_期间_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; var fileName = $"库存余额_期间_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx";
await _fileContainer.SaveAsync(fileName, result, true).ConfigureAwait(false); await _fileContainer.SaveAsync(fileName, result, true).ConfigureAwait(false);
return fileName; return fileName;
} }
/// <summary> /// <summary>
/// 1.库存余额查询 /// 1.库存余额查询
/// </summary> /// </summary>

Loading…
Cancel
Save