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