From 4b2a61bced1c0031c8829fcd613163c218f7f665 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 23 Feb 2022 20:29:48 +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 | 13 +++++++++++-- .../Services/Report/KanBanUnSettledExport.cs | 5 +++++ 2 files changed, 16 insertions(+), 2 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 4e5c8123..90c2f4be 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 @@ -156,14 +156,23 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " (\n" + " a.WMSDeliveryQty - ISNULL( b.Qty, 0 )) AS DiffQty \n" + " FROM\n" + - " Set_WMSKanBanSettle A\n" + + " Set_WMSKanBanSettle A \n" + " LEFT JOIN ( SELECT * FROM Set_KanBanSettle ) B ON A.Kanban = B.Kanban \n" + " AND A.MaterialCode = B.MaterialCode\n" + - " LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode \n" + + " LEFT JOIN Set_material AS C ON a.MaterialCode = C.CustomerPartCode {0}\n" + " ) TEMP1\n" + " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT MAX( Version ) FROM Set_PriceList ) ) TEMP2 ON TEMP1.SapCode = TEMP2.MaterialCode"; string str = string.Empty; str += " where 1=1 "; + if (!string.IsNullOrEmpty(begintime)) + { + str += string.Format(" and BeginDate >='{0}'", begintime); + } + if (string.IsNullOrEmpty(endtime)) + { + str += string.Format(" and BeginDate<='{0}'", endtime); + } + sql = string.Format(sql, str); var _query = DbConnection.Query(sql, null, null, true, 1200, null); var _list = _query.ToList(); return _list; 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 89032352..3578b6ff 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs @@ -75,6 +75,11 @@ namespace SettleAccount.Job.Services.Report _ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList(); } } + + + + + //if (!string.IsNullOrEmpty(materialCode)) //{ // var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();