Browse Source

更新版本

master
学 赵 12 months ago
parent
commit
55102ab4ea
  1. 37
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BalanceSumService .cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

37
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BalanceSumService .cs

@ -1,43 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Excel;
using NPOI.OpenXmlFormats.Spreadsheet;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using Shouldly;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.Application.Services;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Emailing;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.Entities.CodeSettings;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
{
public class BalanceSumService : ApplicationService, ITransientDependency, IExportJob
public class BalanceSumService : BASE_SERVICE, ITransientDependency, IExportJob
{
//protected readonly SettleAccountDbContext _dbcontext;
protected readonly BalanceSumDapperRepository _dapper;
public BalanceSumService(
BalanceSumDapperRepository dapper
)
{
_dapper = dapper;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
//_dbcontext = dbcontext;
public BalanceSumService( IBlobContainer<MyFileContainer> fileContainer, BalanceSumDapperRepository dapper,IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager) : base(excelImportService, snowflakeIdGenerator, commonManager)
{
_dapper = dapper;
_fileContainer = fileContainer;
}
[UnitOfWork(false)]
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var _filename = exportName.FirstOrDefault();
var year = property.Where(p => p.Name == "Year").FirstOrDefault().Value;
var list=_dapper.GetBalanceSum(year);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(list.ToList(), "余额表")
//.SeparateBySheet()
//.Append(_reversels.ToList(), "有发货无结算对比")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);
return id.ToString();
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -207,6 +207,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
var invbills=p_ls.Select(p => p.BillNum).ToList();//发票号
var invs=_dbcontext.Set<INVOICE_GRP>().Where(p => invbills.Contains(p.InvbillNum)).ToList();//所有发票
foreach (var inv in invs)
{
var pdls= p_ls.Where(p => p.BillNum == inv.InvbillNum).ToList();

Loading…
Cancel
Save