Added Category Description to downed tools table
This commit is contained in:
@ -14,4 +14,6 @@ public class ReactorEvent
|
||||
public string REACT_MODE { get; set; }
|
||||
[JsonPropertyName("COMMENT")]
|
||||
public string COMMENT { get; set; }
|
||||
[JsonPropertyName("CAT_PROB_DESC")]
|
||||
public string CAT_PROB_DESC { get; set; }
|
||||
}
|
@ -325,7 +325,12 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
|
||||
" (SELECT TOP 1 NOTES " +
|
||||
" FROM REACTOR_LOG_NOTES rnote " +
|
||||
" WHERE rmode.START_RL_ID = rnote.SEQ " +
|
||||
" ORDER BY MV_NO) AS COMMENT " +
|
||||
" ORDER BY MV_NO DESC) AS COMMENT, " +
|
||||
" (SELECT TOP 1 CONCAT(PROB_CAT_ID, ' - ', PROB_CAT_DESC) " +
|
||||
" FROM REACT_MODE_SERV_INFO srv " +
|
||||
" WHERE rmode.REACT_NO = srv.REACT_NO " +
|
||||
" AND rmode.START_DTM = srv.START_DTM " +
|
||||
" ORDER BY MV_NO DESC) AS CATEGORY " +
|
||||
" FROM REACT_EVENT revnt, REACT_MODE rmode " +
|
||||
" WHERE EVENT_DTM > @startDate " +
|
||||
" AND EVENT_DTM < @endDate " +
|
||||
@ -344,7 +349,12 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
|
||||
" (SELECT TOP 1 NOTES " +
|
||||
" FROM REACTOR_LOG_NOTES rnote " +
|
||||
" WHERE rmode.START_RL_ID = rnote.SEQ " +
|
||||
" ORDER BY MV_NO) AS COMMENT " +
|
||||
" ORDER BY MV_NO DESC) AS COMMENT, " +
|
||||
" (SELECT TOP 1 CONCAT(PROB_CAT_ID, ' - ', PROB_CAT_DESC) " +
|
||||
" FROM REACT_MODE_SERV_INFO srv " +
|
||||
" WHERE rmode.REACT_NO = srv.REACT_NO " +
|
||||
" AND rmode.START_DTM = srv.START_DTM " +
|
||||
" ORDER BY MV_NO DESC) AS CATEGORY " +
|
||||
" FROM REACT_EVENT revnt, REACT_MODE rmode " +
|
||||
" WHERE EVENT_DTM < @startDate " +
|
||||
" AND revnt.REACT_NO = @reactorNumber " +
|
||||
@ -352,7 +362,7 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
|
||||
" AND revnt.REACT_NO = rmode.REACT_NO " +
|
||||
" AND LOGGED_BY = START_USER " +
|
||||
" AND REACT_MODE = MODE ORDER BY EVENT_DTM DESC) AS tbl1 " +
|
||||
"ORDER BY EVENT_DTM ASC ";
|
||||
"ORDER BY EVENT_DTM ASC";
|
||||
|
||||
cmd.CommandText = query;
|
||||
_ = cmd.Parameters.AddWithValue("@startDate", startDate);
|
||||
@ -368,7 +378,8 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
|
||||
EVENT_DTM = reader[1].ToString(),
|
||||
REASON = reader[2].ToString(),
|
||||
REACT_MODE = reader[3].ToString(),
|
||||
COMMENT = reader[4].ToString()
|
||||
COMMENT = reader[4].ToString(),
|
||||
CAT_PROB_DESC = reader[5].ToString()
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using ReportingServices.Shared.HelperClasses;
|
||||
using ReportingServices.Shared.Models.PlanningReport;
|
||||
using ReportingServices.Shared.Models.ProductionReport;
|
||||
using Serilog;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
namespace ReportingServices.Test;
|
||||
|
||||
|
@ -110,9 +110,10 @@
|
||||
<tr>
|
||||
<th scope="col" style="width: 7%">Reactor</th>
|
||||
<th scope="col" style="width: 7%">Owner</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 20%" class="text-start">Category Description</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 10%">Downtime</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Most Recent Comment</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Most Recent Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -135,6 +136,7 @@
|
||||
<tr class="@myClass">
|
||||
<td>@tool.Reactor</td>
|
||||
<td>@owner</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.REASON</td>
|
||||
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.COMMENT</td>
|
||||
@ -155,9 +157,10 @@
|
||||
<tr>
|
||||
<th scope="col" style="width: 7%">Reactor</th>
|
||||
<th scope="col" style="width: 7%">Owner</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 20%" class="text-start">Category Description</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 10%">Downtime</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Most Recent Comment</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Most Recent Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -180,6 +183,7 @@
|
||||
<tr class="@myClass">
|
||||
<td>@tool.Reactor</td>
|
||||
<td>@owner</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.REASON</td>
|
||||
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.COMMENT</td>
|
||||
@ -200,9 +204,10 @@
|
||||
<tr>
|
||||
<th scope="col" style="width: 7%">Reactor</th>
|
||||
<th scope="col" style="width: 7%">Owner</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 20%" class="text-start">Category Description</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Issue</th>
|
||||
<th scope="col" style="width: 10%">Downtime</th>
|
||||
<th scope="col" style="width: 38%" class="text-start">Most Recent Comment</th>
|
||||
<th scope="col" style="width: 28%" class="text-start">Most Recent Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -225,6 +230,7 @@
|
||||
<tr class="@myClass">
|
||||
<td>@tool.Reactor</td>
|
||||
<td>@owner</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.REASON</td>
|
||||
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
|
||||
<td class="text-start">@tool.MostRecentEvent.COMMENT</td>
|
||||
|
@ -1 +1 @@
|
||||
[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15}]
|
||||
[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-18T00:00:00-07:00","ASM":9,"HTR":15}]
|
Reference in New Issue
Block a user