From 3a14a739b68d2376dd59d20467096cb5ee773246 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 30 Mar 2022 09:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReportServices/ReportMakeService.cs | 51 ++++++++++++++----- .../Report/WmsOutputSumDapperRepository.cs | 44 ++++++++-------- .../Services/Report/UnSettledSumService.cs | 5 +- 3 files changed, 63 insertions(+), 37 deletions(-) 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 9e1e93e5..7e3362cf 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -396,20 +396,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices ) { - - - - - - - //if (!_settleAccountVersionrepository.Any(p => p.Version == version)) - //{ - // throw new BusinessException("8989", string.Format("不存结算{0}期间",version)); - //} - //if (!_invoiceVersionRepository.Any(p => p.Version == version)) - //{ - // throw new BusinessException("8989", string.Format("不存发票{0}期间", version)); - //} + List customConditionList = new List(); customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? string.Empty }); @@ -843,6 +830,42 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices + /// + /// 结算未结寄售核对表 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("UnSettledSum-Make")] + [DisableRequestSizeLimit] + public async Task UnSettledSumServiceMake( + + BaseRequestDto input + + ) + { + + List customConditionList = new List(); + customConditionList.Add(new CustomCondition() { Name = "Version", Value = !string.IsNullOrEmpty(input.Version) ? input.Version : string.Empty }); + customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.Empty }); + customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(input.MaterialCode) ? input.MaterialCode : string.Empty }); + customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(input.MaterialGroup) ? input.MaterialGroup : string.Empty }); + customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = string.Empty }); + customConditionList.Add(new CustomCondition() { Name = "Begin", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin }); + customConditionList.Add(new CustomCondition() { Name = "End", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End }); + customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode }); + customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber }); + customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); + var _taskid = await _service.ExportEnqueueAsync("结算未结寄售核对表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnSettledSumService), customConditionList, (rs) => + { + }); + return _taskid; + } + + + + + #region F及M平台已经合并入H平台 diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs index 6bc92812..0b6f5007 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs @@ -375,7 +375,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsJitOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " MaterialCode,\n" + @@ -395,7 +395,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " MaterialCode,\n" + @@ -415,7 +415,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsWithOutKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " SapMaterialCode,\n" + @@ -435,7 +435,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsSharePartOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " MaterialCode,\n" + @@ -455,7 +455,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsSharePart90OutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " MaterialCode,\n" + @@ -475,7 +475,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsHQHKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " MaterialCode,\n" + @@ -496,7 +496,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 0 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND Extend = '100113' \n" + " GROUP BY\n" + " BillNum,\n" + @@ -519,7 +519,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 1 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND Extend = '100113' \n" + " GROUP BY\n" + " BillNum,\n" + @@ -542,7 +542,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 0 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND Extend = '100053' \n" + " GROUP BY\n" + " BillNum,\n" + @@ -565,7 +565,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 1 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND Extend = '100053' \n" + " GROUP BY\n" + " BillNum,\n" + @@ -589,7 +589,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsOneTimeSaleOutPutDetial\n" + " WHERE\n" + " \n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " GROUP BY\n" + " BillNum,\n" + " SapMaterialCode,\n" + @@ -635,7 +635,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsJitOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -656,7 +656,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -677,7 +677,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsWithOutKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -698,7 +698,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsSharePartOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -719,7 +719,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsSharePart90OutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -740,7 +740,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_WmsHQHKanbanOutPutDetial \n" + " WHERE\n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + @@ -762,7 +762,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 0 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " AND Extend = '100113' \n" + " GROUP BY\n" + @@ -786,7 +786,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 1 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " AND Extend = '100113' \n" + " GROUP BY\n" + @@ -810,7 +810,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 0 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " AND Extend = '100053' \n" + " GROUP BY\n" + @@ -834,7 +834,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsHQWithOutKanbanOutPutDetial \n" + " WHERE\n" + " IsBack = 1 \n" + -" AND VERSION = '{0}' \n" + +" AND VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " AND Extend = '100053' \n" + " GROUP BY\n" + @@ -859,7 +859,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " Set_WmsOneTimeSaleOutPutDetial\n" + " WHERE\n" + " \n" + -" VERSION = '{0}' \n" + +" VERSION = '{0} AND STATE<>4' \n" + " AND State = 2 \n" + " GROUP BY\n" + " BillNum,\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs index 26e5cb9f..d3dd9de6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs @@ -68,7 +68,10 @@ namespace SettleAccount.Job.Services.Report public string ExportFile(Guid id, List exportName, List p_list) { - GetReport(id,exportName,p_list); + var _lsExport= GetReport(id,exportName,p_list); + + var _first = exportName.FirstOrDefault(); + _outputService.Export(id, _first, _lsExport); return id.ToString(); }