Added Hot Work Order information into downed tool table and as a line item in the daily report.

This commit is contained in:
Daniel Wathen
2023-01-18 16:03:42 -07:00
parent 930360a7a9
commit a963525b43
14 changed files with 63 additions and 743 deletions

View File

@ -578,4 +578,35 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
return lots;
}
public List<string> GetCurrentHotWORunning()
{
List<string> lots = new();
OpenConnection();
SqlCommand cmd = _connection.CreateCommand();
string query = "SELECT REACT_NO " +
" FROM SCHED_DET_NG schd " +
"INNER JOIN WO_LOG wlog ON WO = WO_NO " +
" WHERE STOP_DTM > SYSDATETIME() " +
" AND START_DTM < SYSDATETIME() " +
" AND HOT_FLAG = 1 " +
"ORDER BY REACT_NO";
cmd.CommandText = query;
using (SqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
lots.Add("R" + reader[0].ToString());
}
cmd.Dispose();
CloseConnection();
return lots;
}
}