Browse Source

修改发运数据导出文件名称

master
mahao 1 year ago
parent
commit
3df55f0da5
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs

@ -47,7 +47,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"BBAC发运数据_{Guid.NewGuid()}.xlsx";
string fileName = $"JisBBAC发运数据_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_EXPORT_DTO>>(entities);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs

@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"HBPO发运数据_{Guid.NewGuid()}.xlsx";
string fileName = $"JisHBPO发运数据_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<HBPO_SE_DETAIL>, List<HBPO_SE_DETAIL_EXPORT_DTO>>(entities);

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs

@ -50,8 +50,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async Task<string> ExportAsync(PUB_SE_DETAIL_RequestDto input)
{
input.Filters.Add(new FilterCondition("BusinessType", input.BusinessType.ToString(), EnumFilterAction.Equal, EnumFilterLogic.And));
var businessTypeDisplayName = input.BusinessType.GetDisplayName();
var businessTypeDisplayName = input.BusinessType.ToString();
DisplayAttribute attributeOfType = input.BusinessType.GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null)
{
businessTypeDisplayName = attributeOfType.Name;
}
string fileName = $"{businessTypeDisplayName}发运数据_{Guid.NewGuid()}.xlsx";
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);

Loading…
Cancel
Save