|
|
@ -4,12 +4,14 @@ using System.ComponentModel.DataAnnotations; |
|
|
|
using System.Linq; |
|
|
|
using Magicodes.ExporterAndImporter.Excel; |
|
|
|
using Microsoft.AspNetCore.SignalR; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.OpenApi.Extensions; |
|
|
|
using SettleAccount.Domain.BQ; |
|
|
|
using SettleAccount.Job.SignalR; |
|
|
|
using Shouldly; |
|
|
|
using TaskJob.EventArgs; |
|
|
|
using TaskJob.Interfaces; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.BlobStoring; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
@ -27,6 +29,10 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
/// </summary>
|
|
|
|
public class PubSaSeCompareExportService : SaSeCompareExportBaseService, ITransientDependency, IExportJob |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// PUB结算仓储
|
|
|
|
/// </summary>
|
|
|
|
//private readonly INormalEfCoreRepository<PUB_SA, Guid> _pubSaRepository;
|
|
|
|
/// <summary>
|
|
|
|
/// DbContext
|
|
|
|
/// </summary>
|
|
|
@ -47,11 +53,18 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
IHubContext<PageHub> hubContext, |
|
|
|
SettleAccountDbContext settleAccountDbContext, |
|
|
|
IBlobContainer<MyFileContainer> fileContainer, |
|
|
|
IObjectMapper objectMapper) : base(hubContext, settleAccountDbContext) |
|
|
|
IObjectMapper objectMapper, |
|
|
|
INormalEfCoreRepository<PUB_SA, Guid> pubSaRepository |
|
|
|
|
|
|
|
) : base(hubContext, settleAccountDbContext |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
{ |
|
|
|
_settleAccountDbContext = settleAccountDbContext; |
|
|
|
_fileContainer = fileContainer; |
|
|
|
_objectMapper = objectMapper; |
|
|
|
//_pubSaRepository = pubSaRepository;
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -156,6 +169,16 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
result.ShouldNotBeNull(); |
|
|
|
_fileContainer.SaveAsync(filename, result.Result, true); |
|
|
|
|
|
|
|
//比对完成后更新状态
|
|
|
|
var pubSaEntityList = _settleAccountDbContext.Set<PUB_SA>().Where(t => t.Version == version&&t.BusinessType== businessType).ToList(); |
|
|
|
foreach(var item in pubSaEntityList) |
|
|
|
{ |
|
|
|
item.State = "2"; |
|
|
|
} |
|
|
|
|
|
|
|
_settleAccountDbContext.SaveChanges(); |
|
|
|
|
|
|
|
|
|
|
|
Notify(); |
|
|
|
return id.ToString(); |
|
|
|
} |
|
|
|