diff --git a/KanBan/NFine.Application/SRM/WatchPanelApp.cs b/KanBan/NFine.Application/SRM/WatchPanelApp.cs index 3e29c54..4863bcf 100644 --- a/KanBan/NFine.Application/SRM/WatchPanelApp.cs +++ b/KanBan/NFine.Application/SRM/WatchPanelApp.cs @@ -238,7 +238,7 @@ and CreatedOn>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' and st -- INNER JOIN ICSContainerReceiptsNumber b ON a.ApplyCode= b.TransCode INNER JOIN ICSWareHouseLotInfoLog c ON a.ApplyCode= c.TransCode AND - c.BusinessCode= '15' + c.TransType= '15' AND a.Sequence= c.TransSequence INNER JOIN ( SELECT DISTINCT e.StartLocation,e.EndLocation FROM ICSForkLiftTaskLog e WHERE e.EndLocation is not null AND e.EndLocation!='' ) e ON c.FromLocationCode= e.StartLocation @@ -254,16 +254,16 @@ and CreatedOn>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' and st //{ // SqlText += " and a.CreatedOn<'" + EndTime + "'"; //} - if (!string.IsNullOrWhiteSpace(advDays)) - { - SqlText += @" and a.MTIME>CAST(CAST(DATEADD(day, -" + advDays + @", GETDATE()) as date) as varchar(10)) + ' 00:00:00' - and a.MTIME<=CAST(CAST(GETDATE() as date) as varchar(10)) + ' 23:59:59'"; - } - if (string.IsNullOrWhiteSpace(StratTime) && string.IsNullOrWhiteSpace(EndTime) && string.IsNullOrWhiteSpace(advDays)) - { - SqlText += @" and a.MTIME>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' - and a.MTIME<=CAST(CAST(GETDATE() as date) as varchar(10)) + ' 23:59:59'"; - } + //if (!string.IsNullOrWhiteSpace(advDays)) + //{ + // SqlText += @" and a.MTIME>CAST(CAST(DATEADD(day, -" + advDays + @", GETDATE()) as date) as varchar(10)) + ' 00:00:00' + // and a.MTIME<=CAST(CAST(GETDATE() as date) as varchar(10)) + ' 23:59:59'"; + //} + //if (string.IsNullOrWhiteSpace(StratTime) && string.IsNullOrWhiteSpace(EndTime) && string.IsNullOrWhiteSpace(advDays)) + //{ + // SqlText += @" and a.MTIME>CAST(CAST(GETDATE() as date) as varchar(10)) + ' 00:00:00' + // and a.MTIME<=CAST(CAST(GETDATE() as date) as varchar(10)) + ' 23:59:59'"; + //} SqlText += @"order by a.MTIME "; //SqlText = string.Format(SqlText, ERPName, workpoint);