Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/BoXu.Zheng/BeiJinSettleAccount

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

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

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

Loading…
Cancel
Save