Browse Source

对比完成后更新状态

master
zhouhongjun 11 months ago
parent
commit
bb1cd5b712
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
  2. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  3. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs
  4. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanHBPOSaSeCompareExportService.cs
  5. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs

@ -25,6 +25,8 @@ namespace SettleAccount.Domain.BQ
/// </summary>
[Display(Name = "状态")]
public string State { get; set; } = null!;
[Display(Name = "其他状态")]
public string StateOther { get; set; } = null!;
/// <summary>
/// 选择工厂导入
/// </summary>
@ -36,13 +38,14 @@ namespace SettleAccount.Domain.BQ
[Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; }
public BBAC_SA(Guid guid, int version, string billNum, string dNBillNum, string state) : base(guid)
public BBAC_SA(Guid guid, int version, string billNum, string dNBillNum, string state,string stateOther) : base(guid)
{
Version = version;
BillNum = billNum;
DNBillNum = dNBillNum;
State = state;
StateOther = stateOther;
}
public BBAC_SA() : base()
{

9
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs

@ -115,6 +115,15 @@ namespace SettleAccount.Job.Services.Report
result.ShouldNotBeNull();
_fileContainer.SaveAsync(filename, result.Result, true);
//比对完成后更新状态
var pubSaEntityList = _settleAccountDbContext.Set<BBAC_SA>().Where(t => t.Version == version && t.BusinessType == businessType).ToList();
foreach (var item in pubSaEntityList)
{
item.State = "2";
}
_settleAccountDbContext.SaveChanges();
Notify();
return id.ToString();
}

9
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

@ -128,6 +128,15 @@ namespace SettleAccount.Job.Services.Report
result.ShouldNotBeNull();
_fileContainer.SaveAsync(filename, result.Result, true);
//比对完成后更新状态
var pubSaEntityList = _settleAccountDbContext.Set<BBAC_SA>().Where(t => t.Version == version && t.BusinessType == businessType).ToList();
foreach (var item in pubSaEntityList)
{
item.StateOther = "2";
}
_settleAccountDbContext.SaveChanges();
Notify();
return id.ToString();
}

9
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanHBPOSaSeCompareExportService.cs

@ -114,6 +114,15 @@ namespace SettleAccount.Job.Services.Report
result.ShouldNotBeNull();
_fileContainer.SaveAsync(filename, result.Result, true);
//比对完成后更新状态
var pubSaEntityList = _settleAccountDbContext.Set<HBPO_SA>().Where(t => t.Version == version && t.BusinessType == businessType).ToList();
foreach (var item in pubSaEntityList)
{
item.State = "2";
}
_settleAccountDbContext.SaveChanges();
Notify();
return id.ToString();
}

25
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -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();
}

Loading…
Cancel
Save