|
@ -1,9 +1,11 @@ |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|
|
using Microsoft.OpenApi.Extensions; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using Shouldly; |
|
|
using Shouldly; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
using Volo.Abp.Application.Dtos; |
|
|
using Volo.Abp.Application.Dtos; |
|
|
using Volo.Abp.Application.Services; |
|
|
using Volo.Abp.Application.Services; |
|
@ -45,9 +47,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
/// 导出
|
|
|
/// 导出
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
public async Task<string> ExportAsync(RequestDto input) |
|
|
public async Task<string> ExportAsync(PUB_SE_DETAIL_RequestDto input) |
|
|
{ |
|
|
{ |
|
|
string fileName = $"PUB发运单_{Guid.NewGuid()}.xlsx"; |
|
|
input.Filters.Add(new FilterCondition("BusinessType", input.BusinessType.ToString(), EnumFilterAction.Equal, EnumFilterLogic.And)); |
|
|
|
|
|
var businessTypeDisplayName = input.BusinessType.GetDisplayName(); |
|
|
|
|
|
|
|
|
|
|
|
string fileName = $"{businessTypeDisplayName}发运数据_{Guid.NewGuid()}.xlsx"; |
|
|
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true); |
|
|
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true); |
|
|
var dtos = ObjectMapper.Map<List<PUB_SE_DETAIL>, List<PUB_SE_DETAIL_EXPORT_DTO>>(entities); |
|
|
var dtos = ObjectMapper.Map<List<PUB_SE_DETAIL>, List<PUB_SE_DETAIL_EXPORT_DTO>>(entities); |
|
|
|
|
|
|
|
|