学 赵 1 year ago
parent
commit
1c2fb06101
  1. 15
      code/src/Modules/BaseService/BaseService.Host/Startup.cs
  2. 27
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
  3. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs
  4. 135
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_EDI_DTO.cs
  5. 159
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SE_DETAIL_DTO.cs
  6. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs
  7. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs
  9. 65
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs
  10. 77
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs
  11. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs
  12. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs
  13. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
  14. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs
  15. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs
  16. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs
  17. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  18. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  19. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

15
code/src/Modules/BaseService/BaseService.Host/Startup.cs

@ -1,7 +1,10 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
namespace BaseService
{
@ -9,6 +12,8 @@ namespace BaseService
{
public void ConfigureServices(IServiceCollection services)
{
services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
services.AddMvc(options => options.Conventions.Add(new RouteTokenTransformerConvention(new SlugifyParameterTransformer())));
services.AddApplication<BaseServiceHostModule>();
}
@ -16,5 +21,15 @@ namespace BaseService
{
app.InitializeApplication();
}
public class SlugifyParameterTransformer : IOutboundParameterTransformer
{
public string TransformOutbound(object value)
{
if (value == null) { return null; }
var str = value.ToString();
if (string.IsNullOrEmpty(str)) { return null; }
return Regex.Replace(str?.ToString(), "([a-z])([A-Z])", "$1-$2").ToLowerInvariant();
}
}
}
}

27
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs

@ -1,10 +1,11 @@
using System;
using System.Configuration;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
namespace Win.Sfs.SettleAccount
{
@ -12,6 +13,8 @@ namespace Win.Sfs.SettleAccount
{
public void ConfigureServices(IServiceCollection services)
{
services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
services.AddMvc(options=>options.Conventions.Add(new RouteTokenTransformerConvention(new SlugifyParameterTransformer())));
services.AddApplication<SettleAccountHttpApiHostModule>();
services.Configure<KestrelServerOptions>(options =>
{
@ -23,10 +26,7 @@ namespace Win.Sfs.SettleAccount
{
options.MaxRequestBodySize = 268435456;
options.AllowSynchronousIO = true;
});
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
@ -34,8 +34,15 @@ namespace Win.Sfs.SettleAccount
app.InitializeApplication();
}
public class SlugifyParameterTransformer : IOutboundParameterTransformer
{
public string TransformOutbound(object value)
{
if (value == null) { return null; }
var str = value.ToString();
if (string.IsNullOrEmpty(str)) { return null; }
return Regex.Replace(str?.ToString(), "([a-z])([A-Z])", "$1-$2").ToLowerInvariant();
}
}
}
}
}

24
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs

@ -13,7 +13,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// LU+生产码
/// </summary>
[Display(Name = "LU+生产码")]
public string KeyCode { get; set; } = null!;
public string KeyCode { get; set; }
/// <summary>
/// 期间
@ -25,31 +25,31 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; } = null!;
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
public string PN { get; set; } = null!;
public string PN { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; } = null!;
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; } = null!;
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; } = null!;
public string InjectionCode { get; set; }
/// <summary>
/// EDI数量
@ -74,7 +74,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "LU+生产码")]
[ExporterHeader(DisplayName = "LU+生产码")]
public string KeyCode { get; set; } = null!;
public string KeyCode { get; set; }
/// <summary>
/// 期间
@ -88,35 +88,35 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { get; set; } = null!;
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; } = null!;
public string PN { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; } = null!;
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; } = null!;
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; } = null!;
public string InjectionCode { get; set; }
/// <summary>
/// EDI数量

135
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_EDI_DTO.cs

@ -0,0 +1,135 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// HBPO的EDI数据
/// </summary>
public class HBPO_SE_EDI_DTO
{
/// <summary>
/// LU+生产码
/// </summary>
[Display(Name = "LU+生产码")]
public string KeyCode { get; set; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
public string PN { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
public decimal Qty { get; set; }
/// <summary>
/// 订货时间
/// </summary>
[Display(Name = "订货时间")]
public DateTime BeginDate { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class HBPO_SE_EDI_EXPORT_DTO
{
/// <summary>
/// LU+生产码
/// </summary>
[Display(Name = "LU+生产码")]
[ExporterHeader(DisplayName = "LU+生产码")]
public string KeyCode { get; set; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
[ExporterHeader(DisplayName = "EDI数量")]
public decimal Qty { get; set; }
/// <summary>
/// 订货时间
/// </summary>
[Display(Name = "订货时间")]
[ExporterHeader(DisplayName = "订货时间")]
public DateTime BeginDate { get; set; }
}
}

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

@ -0,0 +1,159 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// PUB发运数据
/// </summary>
public class PUB_SE_DETAIL_DTO
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[Display(Name = "发运单号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[Display(Name = "组合键值(LU+PN)")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime BeginDate { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class PUB_SE_DETAIL_EXPORT_DTO
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
[ExporterHeader(DisplayName = "订单时间")]
public DateTime BeginDate { get; set; }
}
}

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

@ -18,7 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// BBAC发运单
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/BBAC_SE_DETAIL_SERVICE")]
[Route("api/settleaccount/[controller]/[action]")]
public class BBAC_SE_DETAIL_SERVICE : ApplicationService
{
/// <summary>
@ -45,7 +45,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"BBAC发运单_{Guid.NewGuid()}.xlsx";
@ -66,7 +65,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<BBAC_SE_DETAIL_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs

@ -18,7 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// BBAC的EDI数据
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/bbac_se_edi_service")]
[Route("api/settleaccount/[controller]/[action]")]
public class BBAC_SE_EDI_SERVICE : ApplicationService
{
/// <summary>
@ -45,7 +45,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"BBAC的EDI数据_{Guid.NewGuid()}.xlsx";
@ -66,7 +65,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<BBAC_SE_EDI_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

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

@ -18,7 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// HBPO发运单
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/HBPO_SE_DETAIL_SERVICE")]
[Route("api/settleaccount/[controller]/[action]")]
public class HBPO_SE_DETAIL_SERVICE : ApplicationService
{
/// <summary>
@ -42,7 +42,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"HBPO发运单_{Guid.NewGuid()}.xlsx";
@ -63,7 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<HBPO_SE_DETAIL_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

65
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs

@ -1,11 +1,16 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@ -13,8 +18,60 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// HBPO的EDI数据
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/hbpo_se_edi_service")]
[Route("api/settleaccount/[controller]/[action]")]
public class HBPO_SE_EDI_SERVICE : ApplicationService
{
/// <summary>
/// HBPO的EDI数据仓储
/// </summary>
private readonly INormalEfCoreRepository<HBPO_SE_EDI, Guid> _repository;
/// <summary>
/// excel服务
/// </summary>
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 构造
/// </summary>
public HBPO_SE_EDI_SERVICE(INormalEfCoreRepository<HBPO_SE_EDI, Guid> repository, IExcelImportAppService excelImportService)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"HBPO的EDI数据_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<HBPO_SE_EDI>, List<HBPO_SE_EDI_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region 查询
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
public async Task<PagedResultDto<HBPO_SE_EDI_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<HBPO_SE_EDI>, List<HBPO_SE_EDI_DTO>>(entities);
return new PagedResultDto<HBPO_SE_EDI_DTO>(totalCount, dtos);
}
#endregion
}
}

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

@ -0,0 +1,77 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// PUB发运数据
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class PUB_SE_DETAIL_SERVICE : ApplicationService
{
/// <summary>
/// PUB发运单仓储
/// </summary>
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _repository;
/// <summary>
/// excel服务
/// </summary>
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 构造
/// </summary>
public PUB_SE_DETAIL_SERVICE(INormalEfCoreRepository<PUB_SE_DETAIL, Guid> repository, IExcelImportAppService excelImportService)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"PUB发运单_{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);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region 查询
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
public async Task<PagedResultDto<PUB_SE_DETAIL_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PUB_SE_DETAIL>, List<PUB_SE_DETAIL_DTO>>(entities);
return new PagedResultDto<PUB_SE_DETAIL_DTO>(totalCount, dtos);
}
#endregion
}
}

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

@ -112,7 +112,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
public async Task<PagedResultDto<TB_RePartsRelationship_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs

@ -80,7 +80,7 @@ namespace Win.Sfs.SettleAccount.Boms
/// <summary>
/// »ñÈ¡Áбí
/// </summary>
[HttpGet]
[HttpPost]
public async Task<PagedResultDto<BomDto>> GetListAsync(BomRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs

@ -143,7 +143,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[HttpPost]
virtual public async Task<CodeSettingDto> GetAsync(Guid id)
{
var result = await _repository.GetAsync(id);
@ -179,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpGet]
[HttpPost]
virtual public async Task<PagedResultDto<CodeSettingDto>> GetListAsync(CodeSettingRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
@ -196,7 +196,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[HttpPost]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[HttpPost]
virtual public async Task<ListResultDto<CodeSettingDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs

@ -64,7 +64,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
public async Task<PagedResultDto<CentralizedControlDto>> GetListAsync(CentralizedControlRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs

@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(RequestDtoBase input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs

@ -75,7 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.Materials
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
virtual public async Task<PagedResultDto<MaterialDto>> GetListAsync(MaterialRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount,

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -123,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
public virtual async Task<PagedResultDto<TB_PRICE_LISTDto>> GetListAsync(RequestDto input)
{
var entitys = await _priceListManager.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

@ -90,7 +90,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
[HttpPost]
public async Task<PagedResultDto<PriceListBJDto>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -140,6 +140,7 @@ namespace Win.Sfs.SettleAccount
CreateMapBBAC_SE_EDI();
CreateMapHBPO_SE_DETAIL();
CreateMapHBPO_SE_EDI();
CreateMapPUB_SE_DETAIL();
}
#region BQ
@ -795,8 +796,17 @@ namespace Win.Sfs.SettleAccount
/// </summary>
private void CreateMapHBPO_SE_EDI()
{
//CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_DTO>();
//CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_EXPORT_DTO>();
CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_DTO>();
CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_EXPORT_DTO>();
}
/// <summary>
/// PUB发运单
/// </summary>
private void CreateMapPUB_SE_DETAIL()
{
CreateMap<PUB_SE_DETAIL, PUB_SE_DETAIL_DTO>();
CreateMap<PUB_SE_DETAIL, PUB_SE_DETAIL_EXPORT_DTO>();
}
}

Loading…
Cancel
Save