From dc696d2e0936aab183a13c5627225e4190843531 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 17 Feb 2022 16:53:57 +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 --- .../Report/KanbanUnSettledDapperRepository.cs | 4 ++-- .../Services/Report/KanBanUnSettledExport.cs | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs index 8c919fae..008ce474 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs @@ -152,9 +152,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " C.CustomerPartCode,\n" + " C.EstimateTypeDesc MaterialGroup,\n" + " ISNULL( B.Qty, 0 ) SettleQty,\n" + - " a.Qty,\n" + + " a.WMSDeliveryQty,\n" + " (\n" + - " a.Qty - ISNULL( b.Qty, 0 )) AS DiffQty \n" + + " a.WMSDeliveryQty - ISNULL( b.Qty, 0 )) AS DiffQty \n" + " FROM\n" + " Set_WMSKanBanSettle A\n" + " LEFT JOIN ( SELECT * FROM Set_KanBanSettle WHERE version = '{0}' ) B ON A.Kanban = B.Kanban \n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs index df5edd16..c8e69f87 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs @@ -42,7 +42,7 @@ namespace SettleAccount.Job.Services.Report var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value; var sapCode = p_list.Where(p => p.Name == "SapCode").FirstOrDefault().Value; var _ls = _dapper.GetKanbanReportList(version, begin,end); - var _lst = _dapper.GetNoKanbanReportList(version, begin, end); + // var _lst = _dapper.GetNoKanbanReportList(version, begin, end); if (!string.IsNullOrEmpty(materialGroup)) { var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); @@ -72,7 +72,7 @@ namespace SettleAccount.Job.Services.Report var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); if (_groupList.Count() > 0) { - _lst = _lst.Where(p => _groupList.Contains(p.MaterialGroup)).ToList(); + _ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList(); } } //if (!string.IsNullOrEmpty(materialCode)) @@ -88,13 +88,12 @@ namespace SettleAccount.Job.Services.Report var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); if (_groupList.Count() > 0) { - _lst = _lst.Where(p => _groupList.Contains(p.SapCode)).ToList(); + _ls = _ls.Where(p => _groupList.Contains(p.SapCode)).ToList(); } } ExcelExporter _exporter = new ExcelExporter();//导出Excel var result = _exporter.Append(_ls.ToList(), "有看板号未结差异对比") - .SeparateBySheet() - .Append(_lst.ToList(), "无看板号未结差异对比") + .ExportAppendDataAsByteArray(); result.ShouldNotBeNull(); _fileContainer.SaveAsync(_filename, result.Result, true);