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();