Browse Source

添加结算从表导出接口

master
mahao 1 year ago
parent
commit
43a19ec3af
  1. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
  2. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs

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

@ -32,11 +32,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase<BBAC_SA_DETAI
/// </summary>
private readonly INormalEfCoreRepository<BBAC_SA_DETAIL, Guid> _bbacSaDetailRepository;
/// <summary>
/// BBAC结算仓储
/// </summary>
private readonly INormalEfCoreRepository<BBAC_SA, Guid> _bbacSaRepository;
/// <summary>
/// 任务服务
/// </summary>
@ -46,7 +41,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase<BBAC_SA_DETAI
/// 构造
/// </summary>
public BBAC_SA_DETAIL_SERVICE(INormalEfCoreRepository<BBAC_SA_DETAIL, Guid> bbacSaDetailRepository,
INormalEfCoreRepository<BBAC_SA, Guid> bbacSaRepository,
TaskJobService taskJobService,
IDistributedCache<BBAC_SA_DETAIL> cache,
IExcelImportAppService excelImportService,
@ -55,7 +49,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase<BBAC_SA_DETAI
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_bbacSaDetailRepository = bbacSaDetailRepository;
_bbacSaRepository = bbacSaRepository;
_taskJobService = taskJobService;
}
@ -66,11 +59,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase<BBAC_SA_DETAI
[HttpPost]
public async Task<string> ExportAsync(BBAC_SA_DETAIL_EXPORT_REQUEST_DTO input)
{
var pubSaEntity = await _bbacSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
if (pubSaEntity == null)
{
throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
}
string fileName = $"JisBBAC的结算数据_{Guid.NewGuid()}.xlsx";
List<FilterCondition> filters = new List<FilterCondition>();
filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));

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

@ -32,11 +32,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase<HBPO_SA_DETAI
/// </summary>
private readonly INormalEfCoreRepository<HBPO_SA_DETAIL, Guid> _hbpoSaDetailRepository;
/// <summary>
/// HBPO结算仓储
/// </summary>
private readonly INormalEfCoreRepository<HBPO_SA, Guid> _hbpoSaRepository;
/// <summary>
/// 任务服务
/// </summary>
@ -46,7 +41,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase<HBPO_SA_DETAI
/// 构造
/// </summary>
public HBPO_SA_DETAIL_SERVICE(INormalEfCoreRepository<HBPO_SA_DETAIL, Guid> hbpoSaDetailRepository,
INormalEfCoreRepository<HBPO_SA, Guid> hbpoSaRepository,
TaskJobService taskJobService,
IDistributedCache<HBPO_SA_DETAIL> cache,
IExcelImportAppService excelImportService,
@ -55,7 +49,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase<HBPO_SA_DETAI
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_hbpoSaDetailRepository = hbpoSaDetailRepository;
_hbpoSaRepository = hbpoSaRepository;
_taskJobService = taskJobService;
}
@ -66,11 +59,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase<HBPO_SA_DETAI
[HttpPost]
public async Task<string> ExportAsync(HBPO_SA_DETAIL_EXPORT_REQUEST_DTO input)
{
var pubSaEntity = await _hbpoSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
if (pubSaEntity == null)
{
throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
}
string fileName = $"JisHBPO的结算数据_{Guid.NewGuid()}.xlsx";
List<FilterCondition> filters = new List<FilterCondition>();
filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));

Loading…
Cancel
Save