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