From a01b3b8e9141a494d6ba4bb9879014dc28fd2590 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 23 Feb 2022 15:33:59 +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 --- .../HQHSettledDetailDapperRepository.cs | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs index 5b94b4de..6355e5b2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs @@ -156,6 +156,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report var listCompare= DbConnection.Query(sql2); + + var sql3 = "SELECT\n" + + " a.WmsBillNum,\n" + + " a.MaterialCode,\n" + + " a.Kanban,\n" + + " A.LastModificationTime WmsDate \n" + + "FROM\n" + + " Set_HQ_H_Kanban A\n" + + " LEFT JOIN ( SELECT MaterialCode, Kanban FROM Set_HQ_H_Kanban GROUP BY MaterialCode, Kanban HAVING COUNT(*)> 1 ) B ON A.Kanban = B.Kanban \n" + + " AND A.MaterialCode = B.MaterialCode \n" + + "WHERE\n" + + " B.Kanban IS NULL"; + + + + var listCompare1 = DbConnection.Query(sql3); + + + + + List _ls = new List(); foreach (var itm in listCompare.ToList()) { @@ -165,11 +186,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report first.WmsBillNum += itm.WmsBillNum; first.WmsDate += itm.WmsDate; } - - } - + foreach (var itm in listCompare1.ToList()) + { + _ls.Add(itm); + } var _query = DbConnection.Query(_sql, null, null, true, 1200, null); _list = _query.ToList();