diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs index f678b9e4..14fdddd4 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs @@ -73,7 +73,7 @@ namespace Win.Sfs.SettleAccount typeof(AbpBackgroundJobsHangfireModule) //typeof(AbpEventBusRabbitMqModule) - + //typeof(AbpHangfireModule) @@ -86,7 +86,7 @@ namespace Win.Sfs.SettleAccount public override void ConfigureServices(ServiceConfigurationContext context) { - + @@ -125,7 +125,7 @@ namespace Win.Sfs.SettleAccount ConfigureBLOBTSecSummaryServices(configuration); ConfigureHangfire(context, configuration); - + //context.Services.Configure(options => @@ -178,9 +178,9 @@ namespace Win.Sfs.SettleAccount { context.Services.Configure(options => { - options.ValueLengthLimit= int.MaxValue; + options.ValueLengthLimit = int.MaxValue; options.MultipartBodyLengthLimit = int.MaxValue; - + options.MultipartHeadersLengthLimit = int.MaxValue; @@ -411,13 +411,13 @@ namespace Win.Sfs.SettleAccount { context.Services.AddHangfire(config => { - + config.UseSqlServerStorage(configuration.GetConnectionString("SettleAccountService")); - + }); } - + private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddCors(options => @@ -444,7 +444,7 @@ namespace Win.Sfs.SettleAccount public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); - + app.UseCorrelationId(); //app.UseVirtualFiles(); app.UseRouting(); @@ -464,7 +464,7 @@ namespace Win.Sfs.SettleAccount options.DocExpansion(DocExpansion.None); //->修改界面打开时自动折叠 }); - new BackgroundJobServerOptions() { WorkerCount = 12, ServerTimeout=TimeSpan.FromSeconds(1200) }; + new BackgroundJobServerOptions() { WorkerCount = 12, ServerTimeout = TimeSpan.FromSeconds(1200) }; app.UseHangfireServer(); app.UseHangfireDashboard(); app.UseAuditing(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs index 31dae638..e59dc781 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs @@ -75,5 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts public virtual int FileType { get; set; } + public virtual string Version { get; set; } + } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs index e01f5bc9..6d6b41fe 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs @@ -120,7 +120,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -154,7 +153,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(BT_Car_PlatformRequestDto input) { @@ -208,7 +206,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(BT_Car_PlatformRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -235,7 +232,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -247,7 +243,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -268,7 +263,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// [HttpDelete] [Route("{id}")] - /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); @@ -281,7 +275,6 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car /// 是否执行成功 [HttpPost] [Route("delete")] - // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs index dc6e3615..aff0a217 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs @@ -259,7 +259,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables /// 是否导入成功 //[HttpPost] //[Route("import")] - [Authorize(SettleAccountPermissions.CodeSettings.Create)] + //[Authorize(SettleAccountPermissions.CodeSettings.Create)] //virtual public async Task ImportAsync(List dtos) //{ // var entities =ObjectMapper.Map, List>(dtos); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs index ae1532e1..f79e8d62 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs @@ -30,7 +30,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// /// 红旗H平台导入 /// - //[Authorize(SettleAccountPermissions.HQ_HPlatform.Default)] + [Authorize(SettleAccountPermissions.HQ_HPlatform.Default)] //[AllowAnonymous] [Route("api/settleaccount/HQHPlatform")] public class HQ_H_PlatformAppService : SettleAccountApplicationBase, IHQ_H_PlatformAppService @@ -85,7 +85,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - //[Authorize(SettleAccountPermissions.HQ_HPlatform.Create)] + [Authorize(SettleAccountPermissions.HQ_HPlatform.Create)] public async Task HQ_H_PlatformUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { ExportImporter _exportImporter = new ExportImporter(); @@ -193,7 +193,6 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -227,7 +226,6 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(HQ_H_PlatformRequestDto input) { @@ -281,7 +279,6 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(HQ_H_PlatformRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -320,7 +317,6 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs index cf99128b..3f029460 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs @@ -39,7 +39,7 @@ using Win.Utils; namespace Win.Sfs.SettleAccount.Entities.Invoices { /// - /// + /// 发票汇总导入 /// [Route("api/settleaccount/Invoices")] [Authorize(SettleAccountPermissions.Invoices.Default)] @@ -81,7 +81,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - //[Authorize(SettleAccountPermissions.Invoices.Default)] + [Authorize(SettleAccountPermissions.Invoices.Create)] public async Task InvoiceUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) { ExportImporter _exportImporter = new ExportImporter(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index c9374e59..faa6e17c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -23,9 +23,9 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// /// 标准价格单-相关应用服务 /// - //[Authorize(SettleAccountPermissions.PriceLists.Default)] + [Authorize(SettleAccountPermissions.PriceLists.Default)] [Route("api/SettleAccount/PriceList")] - [AllowAnonymous] + //[AllowAnonymous] public class PriceListAppService : ApplicationService /*, IPriceListAppService*/ { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs index 68c0790f..cd783228 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs @@ -52,8 +52,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// /// 大众准时化结算明细导入-R3已结 /// - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - [AllowAnonymous] + [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[AllowAnonymous] [Route("api/settleaccount/SettleAccount")] public class SettleAccountAppService : SettleAccountApplicationBase, ISettleAccountAppService { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs index 2caf084e..c2cb1a15 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs @@ -39,7 +39,7 @@ using Win.Utils; namespace Win.Sfs.SettleAccount.Entities.TaskJobs { - //[Authorize(SettleAccountPermissions.Reports.Default)] + [Authorize(SettleAccountPermissions.Reports.Default)] //[AllowAnonymous] [Route("api/settleaccount/Job")] public class JobAppService: ApplicationService diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs index 7944e303..f8413cc9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs @@ -29,7 +29,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// /// 红旗主机场明细导入 /// - //[Authorize(SettleAccountPermissions.HQ_HPlatform.Default)] + [Authorize(SettleAccountPermissions.HQ_HPlatform.Default)] //[AllowAnonymous] [Route("api/settleaccount/UnHQSettle")] public class UnHQSettleAppService : SettleAccountApplicationBase, IUnHQSettleAppService @@ -135,7 +135,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -169,7 +168,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(UnHQSettleRequestDto input) { @@ -223,7 +221,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(UnHQSettleRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -250,7 +247,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -262,7 +258,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -283,7 +278,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// [HttpDelete] [Route("{id}")] - /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); @@ -296,7 +290,6 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts /// 是否执行成功 [HttpPost] [Route("delete")] - // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs index 520caa57..aebf1c07 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs @@ -100,7 +100,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - [Authorize(SettleAccountPermissions.SettleAccounts.Create)] + [Authorize(SettleAccountPermissions.UnSettleAccount.Create)] public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) { @@ -126,7 +126,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -163,7 +162,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(UnSettleAccountRequestDto input) { @@ -171,9 +169,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts IExporter _excel = new ExcelExporter(); - if (input.ParentId != Guid.Empty) + //if (input.ParentId != Guid.Empty) + //{ + // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + //} + if (input.Version != string.Empty) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version.ToString() }); } var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, 0, true); @@ -226,14 +228,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(Guid id, UnSettleAccountRequestDto input) { - if (input.ParentId != Guid.Empty) + if (input.Version != string.Empty) { // var _entity = await _versionRepository.GetAsync(input.ParentId); - // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = _entity.Version }); - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version.ToString() }); + //input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); } else { @@ -255,7 +256,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体总数 [HttpGet] [Route("count")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -267,7 +267,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs index 1a52e6d1..29c81593 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs @@ -71,7 +71,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - [Authorize(SettleAccountPermissions.SettleAccounts.Create)] + [Authorize(SettleAccountPermissions.VWKanBan.Create)] public async Task VWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { if(string.IsNullOrEmpty(version)) @@ -124,7 +124,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 实体DTO [HttpGet] [Route("{id}")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -158,7 +157,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(VWKanBanRequestDto input) { @@ -213,7 +211,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetListAsync(VWKanBanRequestDto input) { @@ -239,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -285,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 是否执行成功 [HttpPost] [Route("delete")] - // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs index fec2cbdd..4f8ae907 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs @@ -207,7 +207,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetListAsync(ScrapClaimsRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs index 06da9081..32d54b99 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs @@ -30,7 +30,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 大众备件服务 /// [Route("api/settleaccount/SparePart")] - //[Authorize(SettleAccountPermissions.SparePart.Default)] + [Authorize(SettleAccountPermissions.SparePart.Default)] public class SparePartAppService : SettleAccountApplicationBase, ISparePartAppService { private readonly IGuidGenerator _guidGenerator; @@ -70,7 +70,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - [Authorize(SettleAccountPermissions.SettleAccounts.Create)] + [Authorize(SettleAccountPermissions.SparePart.Create)] public async Task SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { if (string.IsNullOrEmpty(version)) @@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("ExcelImport90")] [DisableRequestSizeLimit] - //[Authorize(SettleAccountPermissions.SettleAccounts.Create)] + public async Task SparePartUploadExcelImport90([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { if (string.IsNullOrEmpty(version)) @@ -167,7 +167,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -201,7 +201,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task ExportAsync(SparePartRequestDto input) { if (string.IsNullOrEmpty(input.Version)) @@ -250,7 +250,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("Export90")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task Export90Async(SparePartRequestDto input) { if (string.IsNullOrEmpty(input.Version)) @@ -337,7 +337,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetListAsync(SparePartRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -360,7 +360,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("list90")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetList90Async(SparePartRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -395,7 +395,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -407,7 +407,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -428,7 +428,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// [HttpDelete] [Route("{id}")] - /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); @@ -441,7 +441,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 是否执行成功 [HttpPost] [Route("delete")] - // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs index a9ba9cf6..b009082e 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs @@ -30,7 +30,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// /// 大众看板发货明细 /// - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] //[AllowAnonymous] [Route("api/settleaccount/WMSVWKanBan")] public class WMSKanBanAppService : SettleAccountApplicationBase, IWMSVWKanBanAppService @@ -126,7 +126,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// 实体DTO [HttpGet] [Route("{id}")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -160,7 +159,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(WMSVWKanBanRequestDto input) { @@ -215,7 +213,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(WMSVWKanBanRequestDto input) { @@ -241,7 +238,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -253,7 +249,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -287,7 +282,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan /// 是否执行成功 [HttpPost] [Route("delete")] - // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs index f9c2bfd7..975862ec 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs @@ -33,6 +33,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// /// 大众备件服务 /// + [Authorize(SettleAccountPermissions.WMSJIT.Default)] [Route("api/settleaccount/WMSSparePart")] public class WMSSparePartAppService : SettleAccountApplicationBase, IWMSSparePartAppService { @@ -73,7 +74,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { if (string.IsNullOrEmpty(version)) @@ -125,7 +125,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// 实体DTO [HttpGet] [Route("{id}")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -159,7 +158,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// [HttpPost] [Route("Export")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(WMSSparePartRequestDto input) { if (string.IsNullOrEmpty(input.Version)) @@ -216,7 +214,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// 实体DTO列表 [HttpPost] [Route("list")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(WMSSparePartRequestDto input) { if (!string.IsNullOrEmpty(input.Version)) @@ -244,7 +241,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -256,7 +252,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// 实体DTO列表 [HttpGet] [Route("all")] - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -277,7 +272,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart /// [HttpDelete] [Route("{id}")] - /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteAsync(Guid id) { await _repository.DeleteAsync(id); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs index e0dfeee1..95d6b7c0 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs @@ -56,7 +56,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// //[AllowAnonymous] - //[Authorize(SettleAccountPermissions.WMSHQ.Default)] + [Authorize(SettleAccountPermissions.WMSHQ.Default)] [Route("api/settleaccount/WmsHQHSharePartoutput")] public class WmsHQHSharePartAppService : SettleAccountApplicationBase diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs index 353f62c5..9f2fe5b4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -54,7 +54,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// wms出库 /// - + [Authorize(SettleAccountPermissions.WMSJIT.Default)] [Route("api/settleaccount/wmsjitoutput")] public class WMSJitAppService : diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs index 3b7c3fb9..1ba77268 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanExtendAppService.cs @@ -53,8 +53,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS { [Route("api/settleaccount/wmskanbanoutputextend")] - [AllowAnonymous] - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] + //[AllowAnonymous] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] public class WMSKanbanExtendAppService : SettleAccountApplicationBase { /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs index f0b938e5..56c57dd1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs @@ -31,7 +31,7 @@ using WY.NewJit.Extends.PaiGe.WMS; namespace Win.Sfs.SettleAccount.Entities.WMS { [Route("api/settleaccount/wmsSharePart90output")] - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] public class WMSSharePart90AppService : SettleAccountApplicationBase { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs index d97db6c5..598224f7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs @@ -55,9 +55,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// wms出库 /// - [AllowAnonymous] + //[AllowAnonymous] [Route("api/settleaccount/wmsSharePartoutput")] - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] public class WMSSharePartAppService : SettleAccountApplicationBase { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs index 25c74203..34000c05 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs @@ -34,8 +34,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS /// wms出库-一汽轿车 /// - [AllowAnonymous] - //[Authorize(SettleAccountPermissions.WMSHQ.Default)] + //[AllowAnonymous] + [Authorize(SettleAccountPermissions.WMSHQ.Default)] [Route("api/settleaccount/WmsHQCaroutput")] public class WmsHQCarAppService : SettleAccountApplicationBase diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs index 08f8b365..cc04410d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs @@ -53,8 +53,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS { [Route("api/settleaccount/WmsHQKBOutput")] - [AllowAnonymous] - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] + //[AllowAnonymous] + [Authorize(SettleAccountPermissions.WMSHQ.Default)] public class WmsHQKBOutputAppService : SettleAccountApplicationBase { /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs index 963be3db..262d4984 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOneTimeSaleOutputAppService.cs @@ -33,7 +33,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS { [Route("api/settleaccount/WmsOneTimeSaleOutput")] //[AllowAnonymous] - //[Authorize(SettleAccountPermissions.WMSJIT.Default)] + [Authorize(SettleAccountPermissions.WMSJIT.Default)] public class WmsOneTimeSaleOutputAppService : SettleAccountApplicationBase { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs index 3d0b70c1..ebbc1529 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsOutputSumInterfaceAppService.cs @@ -52,12 +52,13 @@ using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report; namespace Win.Sfs.SettleAccount.Entities.WMS { - + [Authorize(SettleAccountPermissions.WMSJIT.Default)] [Route("api/settleaccount/WmsOutputSumInterface")] + public class WmsOutputSumInterfaceAppService :ApplicationService { private readonly TaskJobService _service; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index 75ca24a4..6b26c0ba 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -33,8 +33,8 @@ using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report; namespace Win.Sfs.SettleAccount.Reports.ReportServices { - //[Authorize(SettleAccountPermissions.Reports.Default)] - [AllowAnonymous] + [Authorize(SettleAccountPermissions.Reports.Default)] + //[AllowAnonymous] [Route("api/settleaccount/ReportMakeService")] public class ReportService : ApplicationService { diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs index fa7a4aaf..a932e55c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs @@ -123,10 +123,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report /// /// /// - public virtual List GetHQCarSettledDetailDiffSumReportList(string version, string materialCode, string begin, string end, string materialGroup) + public virtual List GetHQCarSettledDetailDiffSumReportList(string version, string materialCode, string begin, string end, string materialGroup) { - List _list = new List(); + List _list = new List(); string condition = " "; @@ -153,37 +153,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " SELECT\n" + " ISNULL( A.Qty, 0 ) 结算数量,\n" + " A.MaterialCode 结算物料号,\n" + - " A.StorageLocation 收货仓库,\n" + - " A.StorageLocationDesc 收货仓库描述,\n" + " C.EstimateTypeDesc 物料组,\n" + " C.MaterialCode Sap编码,\n" + " C.MaterialDesc 物料描述,\n" + - " a.[AcceptanceNo] AS 结算验收单号,\n" + - " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + " 0 寄销库数量 \n" + " FROM\n" + - " (\n" + - " SELECT SUM\n" + - " ( Qty ) Qty,\n" + - " MaterialCode,\n" + - " StorageLocation,\n" + - " StorageLocationDesc,\n" + - " Version,\n" + - " AcceptanceNo,\n" + - " AcceptanceDate \n" + - " FROM\n" + - " Set_BT_Car_Platform \n" + - " WHERE\n" + - " version = '{0}' \n" + - " AND StorageLocationDesc NOT LIKE '%备品%' \n" + - " GROUP BY\n" + - " MaterialCode,\n" + - " StorageLocation,\n" + - " StorageLocationDesc,\n" + - " Version,\n" + - " AcceptanceNo,\n" + - " AcceptanceDate \n" + - " ) A\n" + + " ( SELECT SUM ( Qty ) Qty, MaterialCode, Version FROM Set_BT_Car_Platform WHERE version = '{0}' AND StorageLocationDesc NOT LIKE '%备品%' GROUP BY MaterialCode, Version ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" + @@ -207,7 +182,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //var _sql = string.Format(str, version, condition); var _sql = string.Format(str, version); - var _query = DbConnection.Query(_sql, null, null, true, 1200, null); + var _query = DbConnection.Query(_sql, null, null, true, 1200, null); _list = _query.ToList(); return _list; @@ -289,10 +264,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report /// /// /// - public virtual List GetBJHQCarSettledDetailDiffSumReportList(string version, string materialCode, string begin, string end, string materialGroup) + public virtual List GetBJHQCarSettledDetailDiffSumReportList(string version, string materialCode, string begin, string end, string materialGroup) { - List _list = new List(); + List _list = new List(); string condition = " "; @@ -319,37 +294,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " SELECT\n" + " ISNULL( A.Qty, 0 ) 结算数量,\n" + " A.MaterialCode 结算物料号,\n" + - " A.StorageLocation 收货仓库,\n" + - " A.StorageLocationDesc 收货仓库描述,\n" + " C.EstimateTypeDesc 物料组,\n" + " C.MaterialCode Sap编码,\n" + " C.MaterialDesc 物料描述,\n" + - " a.[AcceptanceNo] AS 结算验收单号,\n" + - " CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" + " 0 寄销库数量 \n" + " FROM\n" + - " (\n" + - " SELECT SUM\n" + - " ( Qty ) Qty,\n" + - " MaterialCode,\n" + - " StorageLocation,\n" + - " StorageLocationDesc,\n" + - " Version,\n" + - " AcceptanceNo,\n" + - " AcceptanceDate \n" + - " FROM\n" + - " Set_BT_Car_Platform \n" + - " WHERE\n" + - " version = '{0}' \n" + - " AND StorageLocationDesc LIKE '%备品%' \n" + - " GROUP BY\n" + - " MaterialCode,\n" + - " StorageLocation,\n" + - " StorageLocationDesc,\n" + - " Version,\n" + - " AcceptanceNo,\n" + - " AcceptanceDate \n" + - " ) A\n" + + " ( SELECT SUM ( Qty ) Qty, MaterialCode, Version FROM Set_BT_Car_Platform WHERE version = '{0}' AND StorageLocationDesc LIKE '%备品%' GROUP BY MaterialCode, Version ) A\n" + " LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + " ) temp1\n" + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode\n" + @@ -373,7 +323,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //var _sql = string.Format(str, version, condition); var _sql = string.Format(str, version); - var _query = DbConnection.Query(_sql, null, null, true, 1200, null); + var _query = DbConnection.Query(_sql, null, null, true, 1200, null); _list = _query.ToList(); return _list; @@ -424,24 +374,24 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ExporterHeader(DisplayName = "收货仓库描述")] public string 收货仓库描述 { set; get; } + [ExporterHeader(DisplayName = "验收单日期")] + public string 验收单日期 { set; get; } + + [ExporterHeader(DisplayName = "结算验收单号")] + public string 结算验收单号 { set; get; } + + [ExporterHeader(DisplayName = "物料组")] + public string 物料组 { set; get; } + [ExporterHeader(DisplayName = "Sap编码")] public string SAP编码 { set; get; } [ExporterHeader(DisplayName = "结算物料号")] public string 结算物料号 { set; get; } - [ExporterHeader(DisplayName = "物料组")] - public string 物料组 { set; get; } - [ExporterHeader(DisplayName = "物料描述")] public string 物料描述 { set; get; } - [ExporterHeader(DisplayName = "验收单日期")] - public string 验收单日期 { set; get; } - - [ExporterHeader(DisplayName = "结算验收单号")] - public string 结算验收单号 { set; get; } - [ExporterHeader(DisplayName = "定价")] public decimal 定价 { set; get; } @@ -463,38 +413,63 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } - //public class HQCarSettledDetailDiff - //{ - // [ExporterHeader(DisplayName = "收货仓库")] - // public string 收货仓库 { set; get; } - // [ExporterHeader(DisplayName = "收货仓库描述")] - // public string 收货仓库描述 { set; get; } - // [ExporterHeader(DisplayName = "结算物料号")] - // public string 结算物料号 { set; get; } + public class HQSumCarSettledDetailDiff + { + public HQSumCarSettledDetailDiff() + { + } - // [ExporterHeader(DisplayName = "结算物料描述")] - // public string 物料描述 { set; get; } - // [ExporterHeader(DisplayName = "结算数量")] - // public decimal 结算数量 { set; get; } - // [ExporterHeader(DisplayName = "结算单价")] - // public decimal 结算单价 { set; get; } - // [ExporterHeader(DisplayName = "结算金额")] - // public decimal 结算金额 { set; get; } - // [ExporterHeader(DisplayName = "Sap编码")] - // public string Sap编码 { set; get; } - // [ExporterHeader(DisplayName = "物料组(车型)")] - // public string 物料组 { set; get; } - // [ExporterHeader(DisplayName = "寄销库数量")] - // public decimal 寄销库数量 { set; get; } + public HQSumCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price, + decimal selprice, decimal diffprice, decimal sumprice, decimal settleprice, decimal qty, + decimal sockQty, string metarialGroup) + { + SAP编码 = sapMaterialCode; + 物料描述 = materialDesc; + 结算物料号 = materialCode; + 寄销库数量 = sockQty; + 结算单价 = price; + 定价 = selprice; + 价格差异 = diffprice; + 差异总金额 = sumprice; + 结算数量 = qty; + 结算金额 = settleprice; + 物料组 = metarialGroup; + } + + [ExporterHeader(DisplayName = "物料组")] + public string 物料组 { set; get; } - // [ExporterHeader(DisplayName = "是否备件")] - // public string 是否备件 { set; get; } + [ExporterHeader(DisplayName = "Sap编码")] + public string SAP编码 { set; get; } + [ExporterHeader(DisplayName = "结算物料号")] + public string 结算物料号 { set; get; } + [ExporterHeader(DisplayName = "物料描述")] + public string 物料描述 { set; get; } + + [ExporterHeader(DisplayName = "定价")] + public decimal 定价 { set; get; } - //} + [ExporterHeader(DisplayName = "结算单价")] + public decimal 结算单价 { set; get; } + [ExporterHeader(DisplayName = "结算数量")] + public decimal 结算数量 { set; get; } + + [ExporterHeader(DisplayName = "结算金额")] + public decimal 结算金额 { set; get; } + + [ExporterHeader(DisplayName = "价格差异")] + public decimal 价格差异 { set; get; } + [ExporterHeader(DisplayName = "差异总金额")] + public decimal 差异总金额 { set; get; } + [ExporterHeader(DisplayName = "寄销库数量")] + public decimal 寄销库数量 { set; get; } + + + } public class HQCarSettleQtyDiff { public string 客户物料号 { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs index 25c3bc3b..b31efe5c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs @@ -70,22 +70,18 @@ namespace SettleAccount.Job.Services.Report var queryStockList = from itm in _ls_sum join itm1 in stockList on itm.SAP编码 equals itm1.SapCode into temp1 from tm1 in temp1.DefaultIfEmpty() - select new HQCarSettledDetailDiff( + select new HQSumCarSettledDetailDiff( itm.SAP编码, itm.结算物料号, itm.物料描述, itm.结算单价, - itm.收货仓库, - itm.收货仓库描述, itm.定价, itm.价格差异, itm.差异总金额, itm.结算金额, itm.结算数量, tm1 == null ? 0 : tm1.Qty, - itm.物料组, - itm.结算验收单号, - itm.验收单日期 + itm.物料组 ); @@ -97,22 +93,18 @@ namespace SettleAccount.Job.Services.Report var queryBJStockList = from itm in _ls_bj_sum join itm1 in stockList on itm.SAP编码 equals itm1.SapCode into temp1 from tm1 in temp1.DefaultIfEmpty() - select new HQCarSettledDetailDiff( + select new HQSumCarSettledDetailDiff( itm.SAP编码, itm.结算物料号, itm.物料描述, itm.结算单价, - itm.收货仓库, - itm.收货仓库描述, itm.定价, itm.价格差异, itm.差异总金额, itm.结算金额, itm.结算数量, tm1 == null ? 0 : tm1.Qty, - itm.物料组, - itm.结算验收单号, - itm.验收单日期 + itm.物料组 ); //if (!string.IsNullOrEmpty(kanban))