diff --git a/code/src/Modules/BaseService/BaseService.Host/Startup.cs b/code/src/Modules/BaseService/BaseService.Host/Startup.cs index 79a41d59..9b7e1ca5 100644 --- a/code/src/Modules/BaseService/BaseService.Host/Startup.cs +++ b/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(); } @@ -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(); + } + } } } diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs index 054a61df..8daf20ee 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs +++ b/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(); services.Configure(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(); + } + } } -} +} \ No newline at end of file diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs index 596807e6..1e4da74a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs +++ b/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+生产码 /// [Display(Name = "LU+生产码")] - public string KeyCode { get; set; } = null!; + public string KeyCode { get; set; } /// /// 期间 @@ -25,31 +25,31 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos /// 零件号 /// [Display(Name = "零件号")] - public string LU { get; set; } = null!; + public string LU { get; set; } /// /// 生产码 /// [Display(Name = "生产码")] - public string PN { get; set; } = null!; + public string PN { get; set; } /// /// 日顺序号 /// [Display(Name = "日顺序号")] - public string SeqNumber { get; set; } = null!; + public string SeqNumber { get; set; } /// /// 小总成号 /// [Display(Name = "小总成号")] - public string AssemblyCode { get; set; } = null!; + public string AssemblyCode { get; set; } /// /// 注塑码 /// [Display(Name = "注塑码")] - public string InjectionCode { get; set; } = null!; + public string InjectionCode { get; set; } /// /// EDI数量 @@ -74,7 +74,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos /// [Display(Name = "LU+生产码")] [ExporterHeader(DisplayName = "LU+生产码")] - public string KeyCode { get; set; } = null!; + public string KeyCode { get; set; } /// /// 期间 @@ -88,35 +88,35 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos /// [Display(Name = "零件号")] [ExporterHeader(DisplayName = "零件号")] - public string LU { get; set; } = null!; + public string LU { get; set; } /// /// 生产码 /// [Display(Name = "生产码")] [ExporterHeader(DisplayName = "生产码")] - public string PN { get; set; } = null!; + public string PN { get; set; } /// /// 日顺序号 /// [Display(Name = "日顺序号")] [ExporterHeader(DisplayName = "日顺序号")] - public string SeqNumber { get; set; } = null!; + public string SeqNumber { get; set; } /// /// 小总成号 /// [Display(Name = "小总成号")] [ExporterHeader(DisplayName = "小总成号")] - public string AssemblyCode { get; set; } = null!; + public string AssemblyCode { get; set; } /// /// 注塑码 /// [Display(Name = "注塑码")] [ExporterHeader(DisplayName = "注塑码")] - public string InjectionCode { get; set; } = null!; + public string InjectionCode { get; set; } /// /// EDI数量 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_EDI_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_EDI_DTO.cs new file mode 100644 index 00000000..054b8c00 --- /dev/null +++ b/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 +{ + /// + /// HBPO的EDI数据 + /// + public class HBPO_SE_EDI_DTO + { + /// + /// LU+生产码 + /// + [Display(Name = "LU+生产码")] + public string KeyCode { get; set; } + + /// + /// 期间 + /// + [Display(Name = "期间")] + public int Version { get; set; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + public string LU { get; set; } + + /// + /// 生产码 + /// + [Display(Name = "生产码")] + public string PN { get; set; } + + /// + /// 日顺序号 + /// + [Display(Name = "日顺序号")] + public string SeqNumber { get; set; } + + /// + /// 小总成号 + /// + [Display(Name = "小总成号")] + public string AssemblyCode { get; set; } + + /// + /// 注塑码 + /// + [Display(Name = "注塑码")] + public string InjectionCode { get; set; } + + /// + /// EDI数量 + /// + [Display(Name = "EDI数量")] + public decimal Qty { get; set; } + + /// + /// 订货时间 + /// + [Display(Name = "订货时间")] + public DateTime BeginDate { get; set; } + } + + /// + /// 导出 + /// + public class HBPO_SE_EDI_EXPORT_DTO + { + /// + /// LU+生产码 + /// + [Display(Name = "LU+生产码")] + [ExporterHeader(DisplayName = "LU+生产码")] + public string KeyCode { get; set; } + + /// + /// 期间 + /// + [Display(Name = "期间")] + [ExporterHeader(DisplayName = "期间")] + public int Version { get; set; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + [ExporterHeader(DisplayName = "零件号")] + public string LU { get; set; } + + /// + /// 生产码 + /// + [Display(Name = "生产码")] + [ExporterHeader(DisplayName = "生产码")] + public string PN { get; set; } + + /// + /// 日顺序号 + /// + [Display(Name = "日顺序号")] + [ExporterHeader(DisplayName = "日顺序号")] + public string SeqNumber { get; set; } + + /// + /// 小总成号 + /// + [Display(Name = "小总成号")] + [ExporterHeader(DisplayName = "小总成号")] + public string AssemblyCode { get; set; } + + /// + /// 注塑码 + /// + [Display(Name = "注塑码")] + [ExporterHeader(DisplayName = "注塑码")] + public string InjectionCode { get; set; } + + /// + /// EDI数量 + /// + [Display(Name = "EDI数量")] + [ExporterHeader(DisplayName = "EDI数量")] + public decimal Qty { get; set; } + + /// + /// 订货时间 + /// + [Display(Name = "订货时间")] + [ExporterHeader(DisplayName = "订货时间")] + public DateTime BeginDate { get; set; } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SE_DETAIL_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SE_DETAIL_DTO.cs new file mode 100644 index 00000000..6c9b4f61 --- /dev/null +++ b/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 +{ + /// + /// PUB发运数据 + /// + public class PUB_SE_DETAIL_DTO + { + /// + /// 期间 + /// + [Display(Name = "期间")] + public int Version { set; get; } + + /// + /// 发货时间 + /// + [Display(Name = "发货时间")] + public DateTime ShippingDate { set; get; } + + /// + /// 发运单号 + /// + [Display(Name = "发运单号")] + public string WmsBillNum { set; get; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "生产号")] + public string PN { get; set; } + + /// + /// 组合键值(LU+PN) + /// + [Display(Name = "组合键值(LU+PN)")] + public string KeyCode { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 日顺序号 + /// + [Display(Name = "日顺序号")] + public string SeqNumber { get; set; } + + /// + /// 小总成号 + /// + [Display(Name = "小总成号")] + public string AssemblyCode { get; set; } + + /// + /// 注塑码 + /// + [Display(Name = "注塑码")] + public string InjectionCode { get; set; } + + /// + /// 订单时间 + /// + [Display(Name = "订单时间")] + public DateTime BeginDate { get; set; } + } + + /// + /// 导出 + /// + public class PUB_SE_DETAIL_EXPORT_DTO + { + /// + /// 期间 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public int Version { set; get; } + + /// + /// 发货时间 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public DateTime ShippingDate { set; get; } + + /// + /// 发运单号 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public string WmsBillNum { set; get; } + + /// + /// 零件号 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public string PN { get; set; } + + /// + /// 组合键值(LU+PN) + /// + [ExporterHeader(DisplayName = "日顺序号")] + public string KeyCode { get; set; } + + /// + /// 数量 + /// + [ExporterHeader(DisplayName = "日顺序号")] + public decimal Qty { get; set; } + + /// + /// 日顺序号 + /// + [Display(Name = "日顺序号")] + [ExporterHeader(DisplayName = "日顺序号")] + public string SeqNumber { get; set; } + + /// + /// 小总成号 + /// + [Display(Name = "小总成号")] + [ExporterHeader(DisplayName = "小总成号")] + public string AssemblyCode { get; set; } + + /// + /// 注塑码 + /// + [Display(Name = "注塑码")] + [ExporterHeader(DisplayName = "注塑码")] + public string InjectionCode { get; set; } + + /// + /// 订单时间 + /// + [Display(Name = "订单时间")] + [ExporterHeader(DisplayName = "订单时间")] + public DateTime BeginDate { get; set; } + } + +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs index 2f7f9e68..3637a019 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs +++ b/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发运单 /// [AllowAnonymous] - [Route("api/settleaccount/BBAC_SE_DETAIL_SERVICE")] + [Route("api/settleaccount/[controller]/[action]")] public class BBAC_SE_DETAIL_SERVICE : ApplicationService { /// @@ -45,7 +45,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 导出 /// [HttpPost] - [Route("Export")] public async Task ExportAsync(RequestDto input) { string fileName = $"BBAC发运单_{Guid.NewGuid()}.xlsx"; @@ -66,7 +65,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 获取列表 /// [HttpPost] - [Route("list")] public async Task> GetListAsync(RequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs index a7791e30..908bafc3 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs +++ b/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数据 /// [AllowAnonymous] - [Route("api/settleaccount/bbac_se_edi_service")] + [Route("api/settleaccount/[controller]/[action]")] public class BBAC_SE_EDI_SERVICE : ApplicationService { /// @@ -45,7 +45,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 导出 /// [HttpPost] - [Route("Export")] public async Task ExportAsync(RequestDto input) { string fileName = $"BBAC的EDI数据_{Guid.NewGuid()}.xlsx"; @@ -66,7 +65,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 获取列表 /// [HttpPost] - [Route("list")] public async Task> GetListAsync(RequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs index e67248dc..1653f432 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs +++ b/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发运单 /// [AllowAnonymous] - [Route("api/settleaccount/HBPO_SE_DETAIL_SERVICE")] + [Route("api/settleaccount/[controller]/[action]")] public class HBPO_SE_DETAIL_SERVICE : ApplicationService { /// @@ -42,7 +42,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 导出 /// [HttpPost] - [Route("Export")] public async Task ExportAsync(RequestDto input) { string fileName = $"HBPO发运单_{Guid.NewGuid()}.xlsx"; @@ -63,7 +62,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 获取列表 /// [HttpPost] - [Route("list")] public async Task> GetListAsync(RequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs index 40fdbf9e..c816622b 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs +++ b/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数据 /// [AllowAnonymous] - [Route("api/settleaccount/hbpo_se_edi_service")] + [Route("api/settleaccount/[controller]/[action]")] public class HBPO_SE_EDI_SERVICE : ApplicationService { + /// + /// HBPO的EDI数据仓储 + /// + private readonly INormalEfCoreRepository _repository; + + /// + /// excel服务 + /// + private readonly IExcelImportAppService _excelImportService; + + /// + /// 构造 + /// + public HBPO_SE_EDI_SERVICE(INormalEfCoreRepository repository, IExcelImportAppService excelImportService) + { + _repository = repository; + _excelImportService = excelImportService; + } + + #region 导出 + /// + /// 导出 + /// + [HttpPost] + public async Task 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>(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 查询 + /// + /// 获取列表 + /// + [HttpPost] + public async Task> 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>(entities); + return new PagedResultDto(totalCount, dtos); + } + #endregion } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs new file mode 100644 index 00000000..17344159 --- /dev/null +++ b/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 +{ + /// + /// PUB发运数据 + /// + [AllowAnonymous] + [Route("api/settleaccount/[controller]/[action]")] + public class PUB_SE_DETAIL_SERVICE : ApplicationService + { + /// + /// PUB发运单仓储 + /// + private readonly INormalEfCoreRepository _repository; + + /// + /// excel服务 + /// + private readonly IExcelImportAppService _excelImportService; + + /// + /// 构造 + /// + public PUB_SE_DETAIL_SERVICE(INormalEfCoreRepository repository, IExcelImportAppService excelImportService) + { + _repository = repository; + _excelImportService = excelImportService; + } + + #region 导出 + /// + /// 导出 + /// + [HttpPost] + public async Task 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>(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 查询 + /// + /// 获取列表 + /// + [HttpPost] + public async Task> 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>(entities); + return new PagedResultDto(totalCount, dtos); + } + #endregion + + } +} \ No newline at end of file diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs index 030a409b..06590766 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs @@ -112,7 +112,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// /// 获取列表 /// - [HttpGet] + [HttpPost] public async Task> GetListAsync(RequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs index dd2bcfae..934e28f6 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs @@ -80,7 +80,7 @@ namespace Win.Sfs.SettleAccount.Boms /// /// ȡб /// - [HttpGet] + [HttpPost] public async Task> GetListAsync(BomRequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs index 1f2fcb96..39c4dea8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs @@ -143,7 +143,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables /// /// ID /// 实体DTO - [HttpGet] + [HttpPost] virtual public async Task GetAsync(Guid id) { var result = await _repository.GetAsync(id); @@ -179,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables /// /// 请求条件 /// 实体DTO列表 - [HttpGet] + [HttpPost] virtual public async Task> 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 /// 获取实体总数 /// /// 实体总数 - [HttpGet] + [HttpPost] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables /// 获取全部实体列表 /// /// 实体DTO列表 - [HttpGet] + [HttpPost] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs index cb19ee9b..9efa0c95 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs @@ -64,7 +64,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls /// /// 获取列表 /// - [HttpGet] + [HttpPost] public async Task> GetListAsync(CentralizedControlRequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs index ab9c8b2c..c5872bba 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs @@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships /// /// 获取列表 /// - [HttpGet] + [HttpPost] public async Task> GetListAsync(RequestDtoBase input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs index 466616c6..8b38a844 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs @@ -75,7 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.Materials /// /// 获取列表 /// - [HttpGet] + [HttpPost] virtual public async Task> GetListAsync(MaterialRequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index 558877c2..63b0e3a4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -123,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// /// 获取列表 /// - [HttpGet] + [HttpPost] public virtual async Task> GetListAsync(RequestDto input) { var entitys = await _priceListManager.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index e6a307ba..3270d577 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -90,7 +90,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// /// 获取列表 /// - [HttpGet] + [HttpPost] public async Task> GetListAsync(RequestDto input) { var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index 2fd169f7..940643e2 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/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 /// private void CreateMapHBPO_SE_EDI() { - //CreateMap(); - //CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// PUB发运单 + /// + private void CreateMapPUB_SE_DETAIL() + { + CreateMap(); + CreateMap(); } }