Browse Source

升级导入导出控件版本

master
zhouhongjun 1 year ago
parent
commit
8fa9855fab
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SE_DETAIL_DTO.cs
  4. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs
  5. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj
  6. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj
  7. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/InputService.cs
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccount.Job.csproj

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs

@ -270,7 +270,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
[ExporterHeader(DisplayName = "发货时间")]
[ExporterHeader(DisplayName = "发货时间", Format = "yyyy-MM-dd HH:mm:ss")]
public DateTime BillTime { get; set; }
/// <summary>
@ -285,7 +285,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "数量")]
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
public int Qty { get; set; }
/// <summary>
/// 排序单号

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs

@ -270,7 +270,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
[ExporterHeader(DisplayName = "发货时间")]
[ExporterHeader(DisplayName = "发货时间", Format = "yyyy-MM-dd HH:mm:ss")]
public DateTime BillTime { get; set; }
/// <summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SE_DETAIL_DTO.cs

@ -216,7 +216,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 发货时间
/// </summary>
[ExporterHeader(DisplayName = "发货时间")]
[ExporterHeader(DisplayName = "发货时间", Format = "yyyy-MM-dd HH:mm:ss")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
@ -264,7 +264,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
[ExporterHeader(DisplayName = "发货时间")]
[ExporterHeader(DisplayName = "发货时间", Format = "yyyy-MM-dd HH:mm:ss")]
public DateTime BillTime { get; set; }
/// <summary>
/// 订单时间

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

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
@ -50,12 +53,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
string fileName = $"JisBBAC发运数据_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false);
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false);
return fileName;
}
#endregion
@ -74,5 +77,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
#endregion
}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj

@ -10,7 +10,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="NPOI" Version="2.5.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj

@ -33,8 +33,8 @@
<ItemGroup>
<PackageReference Include="EFCore.BulkExtensions" Version="5.3.0" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BlobStoring" Version="4.3.3" />

2
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/InputService.cs

@ -26,7 +26,7 @@ namespace SettleAccount.Job.Services
}
var ImportList = new List<T>();
ExcelImporter _importer = new ExcelImporter();
var import = _importer.Import<T>(filePath).Result;
var import = _importer.Import<T>(filePath,null,null).Result;
if (import.Exception != null)
{
if (import.Exception.Message.ToString() == "导入文件不存在!")

4
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccount.Job.csproj

@ -7,8 +7,8 @@
<ItemGroup>
<PackageReference Include="EFCore.BulkExtensions" Version="5.3.0" />
<PackageReference Include="EPPlus" Version="5.7.4" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5" />
<PackageReference Include="NPOI" Version="2.5.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Abstractions" Version="4.3.3" />

Loading…
Cancel
Save