Added Category Description to downed tools table

This commit is contained in:
Daniel Wathen
2023-01-18 12:19:35 -07:00
parent 9cccd00fed
commit 930360a7a9
5 changed files with 38 additions and 22 deletions

View File

@ -14,4 +14,6 @@ public class ReactorEvent
public string REACT_MODE { get; set; } public string REACT_MODE { get; set; }
[JsonPropertyName("COMMENT")] [JsonPropertyName("COMMENT")]
public string COMMENT { get; set; } public string COMMENT { get; set; }
[JsonPropertyName("CAT_PROB_DESC")]
public string CAT_PROB_DESC { get; set; }
} }

View File

@ -325,7 +325,12 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
" (SELECT TOP 1 NOTES " + " (SELECT TOP 1 NOTES " +
" FROM REACTOR_LOG_NOTES rnote " + " FROM REACTOR_LOG_NOTES rnote " +
" WHERE rmode.START_RL_ID = rnote.SEQ " + " 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 " + " FROM REACT_EVENT revnt, REACT_MODE rmode " +
" WHERE EVENT_DTM > @startDate " + " WHERE EVENT_DTM > @startDate " +
" AND EVENT_DTM < @endDate " + " AND EVENT_DTM < @endDate " +
@ -344,7 +349,12 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
" (SELECT TOP 1 NOTES " + " (SELECT TOP 1 NOTES " +
" FROM REACTOR_LOG_NOTES rnote " + " FROM REACTOR_LOG_NOTES rnote " +
" WHERE rmode.START_RL_ID = rnote.SEQ " + " 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 " + " FROM REACT_EVENT revnt, REACT_MODE rmode " +
" WHERE EVENT_DTM < @startDate " + " WHERE EVENT_DTM < @startDate " +
" AND revnt.REACT_NO = @reactorNumber " + " AND revnt.REACT_NO = @reactorNumber " +
@ -368,7 +378,8 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
EVENT_DTM = reader[1].ToString(), EVENT_DTM = reader[1].ToString(),
REASON = reader[2].ToString(), REASON = reader[2].ToString(),
REACT_MODE = reader[3].ToString(), REACT_MODE = reader[3].ToString(),
COMMENT = reader[4].ToString() COMMENT = reader[4].ToString(),
CAT_PROB_DESC = reader[5].ToString()
}); });
} }

View File

@ -1,9 +1,6 @@
using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.Mvc.Testing;
using ReportingServices.Shared.HelperClasses; using ReportingServices.Shared.HelperClasses;
using ReportingServices.Shared.Models.PlanningReport;
using ReportingServices.Shared.Models.ProductionReport;
using Serilog; using Serilog;
using System.Net.Http.Json;
namespace ReportingServices.Test; namespace ReportingServices.Test;

View File

@ -110,9 +110,10 @@
<tr> <tr>
<th scope="col" style="width: 7%">Reactor</th> <th scope="col" style="width: 7%">Reactor</th>
<th scope="col" style="width: 7%">Owner</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: 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> </tr>
</thead> </thead>
<tbody> <tbody>
@ -135,6 +136,7 @@
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td> <td>@tool.Reactor</td>
<td>@owner</td> <td>@owner</td>
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td> <td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
<td class="text-start">@tool.MostRecentEvent.COMMENT</td> <td class="text-start">@tool.MostRecentEvent.COMMENT</td>
@ -155,9 +157,10 @@
<tr> <tr>
<th scope="col" style="width: 7%">Reactor</th> <th scope="col" style="width: 7%">Reactor</th>
<th scope="col" style="width: 7%">Owner</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: 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> </tr>
</thead> </thead>
<tbody> <tbody>
@ -180,6 +183,7 @@
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td> <td>@tool.Reactor</td>
<td>@owner</td> <td>@owner</td>
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td> <td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
<td class="text-start">@tool.MostRecentEvent.COMMENT</td> <td class="text-start">@tool.MostRecentEvent.COMMENT</td>
@ -200,9 +204,10 @@
<tr> <tr>
<th scope="col" style="width: 7%">Reactor</th> <th scope="col" style="width: 7%">Reactor</th>
<th scope="col" style="width: 7%">Owner</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: 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> </tr>
</thead> </thead>
<tbody> <tbody>
@ -225,6 +230,7 @@
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td> <td>@tool.Reactor</td>
<td>@owner</td> <td>@owner</td>
<td class="text-start">@tool.MostRecentEvent.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>
<td>@string.Format("{0:##,###.##}", tool.Downtime)</td> <td>@string.Format("{0:##,###.##}", tool.Downtime)</td>
<td class="text-start">@tool.MostRecentEvent.COMMENT</td> <td class="text-start">@tool.MostRecentEvent.COMMENT</td>

View File

@ -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}]