|
@ -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 ICSContainerReceiptsNumber b ON a.ApplyCode= b.TransCode |
|
|
INNER JOIN ICSWareHouseLotInfoLog c ON a.ApplyCode= c.TransCode |
|
|
INNER JOIN ICSWareHouseLotInfoLog c ON a.ApplyCode= c.TransCode |
|
|
AND |
|
|
AND |
|
|
c.BusinessCode= '15' |
|
|
|
|
|
|
|
|
c.TransType= '15' |
|
|
AND a.Sequence= c.TransSequence |
|
|
AND a.Sequence= c.TransSequence |
|
|
INNER JOIN ( SELECT DISTINCT e.StartLocation,e.EndLocation FROM |
|
|
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 |
|
|
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 + "'";
|
|
|
// 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 += @"order by a.MTIME "; |
|
|
|
|
|
|
|
|
//SqlText = string.Format(SqlText, ERPName, workpoint);
|
|
|
//SqlText = string.Format(SqlText, ERPName, workpoint);
|
|
|