From 14d7a4d35ca2b059aa044aac1e49408f649296cc Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 14 Feb 2022 17:11:27 +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 | 11 +++------- .../Report/UnSettledDetailDapperRepository.cs | 21 ++++++------------- .../Report/UnSettleDiffExportService.cs | 4 ---- 3 files changed, 9 insertions(+), 27 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 52daed0e..9b6b204a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -387,8 +387,6 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices BaseRequestDto request ) { - - List customConditionList = new List(); customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(request.Version) ? string.Empty : request.Version }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(request.MaterialCode) ? string.Empty : request.MaterialCode }); @@ -433,10 +431,6 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode }); - - - - var _taskid = await _service.ExportEnqueueAsync("准时化结算核对明细", ExportExtentsion.Excel,request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) => { }); @@ -491,14 +485,15 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices ) { + 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 = "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 }); diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs index cdcc7eb6..df346579 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs @@ -83,8 +83,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ItemCode MaterialCode,\n" + " ChassisNumber,\n" + " OrderBillNum KENNCode,\n" + -" ChassisNumber2,\n"+ -" KENNCode KENNCode2, \n"+ +" ChassisNumber2,\n" + +" KENNCode KENNCode2, \n" + " QTY,\n" + @@ -116,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " AND STATE = 4 {0}\n" + " ) A\n" + " left join (select * from Set_Unsettle where version='{1}') f \n" + -" on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n"+ +" on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n" + " LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" + " LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) d ON a.ParentSapMaterialCode = d.MaterialCode \n" + " ) temp1\n" + @@ -127,7 +127,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //var _priceList = DbConnection.Query("select MaterialCode,Price from Set_PriceList where version=(select max(version) from set_Set_PriceListVersion)").ToList(); - string _sql = string.Format(sqlString, str,version); + string _sql = string.Format(sqlString, str, version); ; var _query = DbConnection.Query(_sql); @@ -136,8 +136,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //_list= _list.Where(p => p.SapMaterialCode == sapCode).ToList(); - - + + return _list; } @@ -240,11 +240,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode"; - - - - - //var _materialList = DbConnection.Query("select * from set_material").ToList(); //var _priceList = DbConnection.Query("select MaterialCode,Price from Set_PriceList where version=(select max(version) from set_Set_PriceListVersion)").ToList(); @@ -258,10 +253,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report var _list = _query.ToList(); _list = _list.Where(p => p.SapMaterialCode == sapCode).ToList(); - - - - return _list; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs index 76c4b6eb..e2ccb917 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs @@ -246,10 +246,6 @@ namespace SettleAccount.Job.Services.Report result.ShouldNotBeNull(); _fileContainer.SaveAsync(_first, result.Result, true); - - - - } else {