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

@ -58,4 +58,7 @@ public class ScrapeDBController : ControllerBase
[HttpGet("GetCurrentHoldLots")] [HttpGet("GetCurrentHoldLots")]
public List<HoldLot> GetCurrentHoldLots() => _scrapeDBRepository.GetCurrentHoldLots(); public List<HoldLot> GetCurrentHoldLots() => _scrapeDBRepository.GetCurrentHoldLots();
[HttpGet("GetCurrentHotWORunning")]
public List<string> GetCurrentHotWORunning() => _scrapeDBRepository.GetCurrentHotWORunning();
} }

View File

@ -1,137 +0,0 @@
namespace ReportingServices.Desktop
{
partial class DailyReport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.btnPrevious = new System.Windows.Forms.Button();
this.btnNext = new System.Windows.Forms.Button();
this.dgvCurrentWeek = new System.Windows.Forms.DataGridView();
this.rtbManualEntries = new System.Windows.Forms.RichTextBox();
this.dgvPreviousWeek = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.dgvCurrentWeek)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvPreviousWeek)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(786, 5);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(271, 37);
this.label1.TabIndex = 0;
this.label1.Text = "Production Passdown";
//
// btnPrevious
//
this.btnPrevious.Location = new System.Drawing.Point(64, 37);
this.btnPrevious.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnPrevious.Name = "btnPrevious";
this.btnPrevious.Size = new System.Drawing.Size(179, 56);
this.btnPrevious.TabIndex = 1;
this.btnPrevious.Text = "Previous Button";
this.btnPrevious.UseVisualStyleBackColor = true;
this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click);
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(1651, 37);
this.btnNext.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(179, 56);
this.btnNext.TabIndex = 2;
this.btnNext.Text = "Next Button";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Visible = false;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// dgvCurrentWeek
//
this.dgvCurrentWeek.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCurrentWeek.Location = new System.Drawing.Point(64, 119);
this.dgvCurrentWeek.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dgvCurrentWeek.Name = "dgvCurrentWeek";
this.dgvCurrentWeek.RowHeadersWidth = 62;
this.dgvCurrentWeek.RowTemplate.Height = 33;
this.dgvCurrentWeek.Size = new System.Drawing.Size(1765, 378);
this.dgvCurrentWeek.TabIndex = 3;
//
// rtbManualEntries
//
this.rtbManualEntries.Location = new System.Drawing.Point(64, 527);
this.rtbManualEntries.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rtbManualEntries.Name = "rtbManualEntries";
this.rtbManualEntries.Size = new System.Drawing.Size(576, 395);
this.rtbManualEntries.TabIndex = 4;
this.rtbManualEntries.Text = "";
//
// dgvPreviousWeek
//
this.dgvPreviousWeek.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvPreviousWeek.Location = new System.Drawing.Point(64, 119);
this.dgvPreviousWeek.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dgvPreviousWeek.Name = "dgvPreviousWeek";
this.dgvPreviousWeek.RowHeadersWidth = 62;
this.dgvPreviousWeek.RowTemplate.Height = 33;
this.dgvPreviousWeek.Size = new System.Drawing.Size(1765, 378);
this.dgvPreviousWeek.TabIndex = 5;
this.dgvPreviousWeek.Visible = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1925, 853);
this.Controls.Add(this.dgvPreviousWeek);
this.Controls.Add(this.rtbManualEntries);
this.Controls.Add(this.dgvCurrentWeek);
this.Controls.Add(this.btnNext);
this.Controls.Add(this.btnPrevious);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.dgvCurrentWeek)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvPreviousWeek)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Label label1;
private Button btnPrevious;
private Button btnNext;
private DataGridView dgvCurrentWeek;
private RichTextBox rtbManualEntries;
private DataGridView dgvPreviousWeek;
}
}

View File

@ -1,344 +0,0 @@
using Microsoft.Extensions.Logging;
using ReportingServices.Shared.HelperClasses;
using ReportingServices.Shared.ViewModels.ProductionReport;
using System.Data;
using System.Reflection;
namespace ReportingServices.Desktop
{
public partial class DailyReport : Form
{
private DataTable currentWeek = new();
private DataTable previousWeek = new();
private readonly ILogger<Form1> _logger;
private readonly string _dailyRptFilePath = "wwwroot/Assets/DailyReportInfo.json";
private readonly string _toolStateOwnerFilePath = "wwwroot/Assets/ToolStates.json";
private readonly string _baseFTUrl;
private readonly string _baseDBUrl;
public DailyReport(ILogger<Form1> logger)
{
_logger = logger;
_baseFTUrl = "http://mestsa008:50201/api/";
_baseDBUrl = "https://localhost:7196/api/";
_logger.LogInformation("Base FabTime Address: {baseUrl}", _baseFTUrl);
_logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl);
InitializeComponent();
string baseFabTimeUrl = _baseFTUrl + "FabTime/";
string baseScrapeDbUrl = _baseDBUrl + "ScrapeDB/";
try
{
Shared.ViewModels.ProductionReport.DailyReport dailyReport = DailyReportHelper.SetUpDailyReport(_logger, baseFabTimeUrl, baseScrapeDbUrl);
Dictionary<string, List<string>> toolStateOwners = JsonFileHandler.LoadJSONFile<Dictionary<string, List<string>>>(_toolStateOwnerFilePath);
dailyReport.ToolStatesByOwner = toolStateOwners;
SetupWeekView(dailyReport.CurrentWeek, currentWeek);
SetupWeekView(dailyReport.PreviousWeek, previousWeek);
dgvCurrentWeek.DataSource = currentWeek;
dgvPreviousWeek.DataSource = previousWeek;
}
catch (Exception ex)
{
_logger.LogCritical(ex, "Failed to load report");
}
}
public void SetupWeekView(YieldStatistics rpt, DataTable dt)
{
dt.Columns.Add("SIOperations");
dt.Columns.Add("Monday");
dt.Columns.Add("Tuesday");
dt.Columns.Add("Wednesday");
dt.Columns.Add("Thursday");
dt.Columns.Add("Friday");
dt.Columns.Add("Saturday");
dt.Columns.Add("Sunday");
dt.Columns.Add("Weekly Total");
dt.Columns.Add("Comment");
AddDates(rpt, dt);
AddTargets(rpt, dt);
AddOuts(rpt, dt);
AddYieldedWafers(rpt, dt);
AddCustomerScrap(rpt, dt);
AddManufacturingScrap(rpt, dt);
AddProductionScrap(rpt, dt);
AddYield(rpt, dt);
AddDeltaToCommit(rpt, dt);
AddDeltaToTarget(rpt, dt);
AddNeededTarget(rpt, dt);
}
public void AddDates(YieldStatistics rpt, DataTable dt)
{
DataRow dr = dt.NewRow();
for (int i = 0; i < 7; i++)
{
dr[1 + i] = rpt.StartDate.AddDays(i).ToString("MM/dd/yyyy");
}
dt.Rows.Add(dr);
}
public void AddTargets(YieldStatistics rpt, DataTable dt)
{
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Commited Target to meet Shipment Requirements";
for (int i = 0; i < 7; i++)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.DailyPlanWafers);
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", rpt.DailyPlanWafers * 7);
dr["Comment"] = "Number updated quarterly";
dt.Rows.Add(dr);
}
public void AddOuts(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Actual Reactor Out";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.OutsByDay[i].TotalWafers);
counter += rpt.OutsByDay[i].TotalWafers;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dr["Comment"] = "Before Scrap";
dt.Rows.Add(dr);
}
public void AddYieldedWafers(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Actual Yielded Wafers Out";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.OutsByDay[i].TotalWafers - rpt.ScrapByDay[i].TOT_REJ_WFRS - rpt.ScrapByDay[i].TW_PROD);
counter += rpt.OutsByDay[i].TotalWafers - rpt.ScrapByDay[i].TOT_REJ_WFRS - rpt.ScrapByDay[i].TW_PROD;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dr["Comment"] = "After Scrap";
dt.Rows.Add(dr);
}
public void AddCustomerScrap(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Customer Scrap";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.ScrapByDay[i].TOT_REJ_CUST);
counter += rpt.ScrapByDay[i].TOT_REJ_CUST;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dt.Rows.Add(dr);
}
public void AddManufacturingScrap(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Manufacturing Scrap";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.ScrapByDay[i].TOT_REJ_MANU);
counter += rpt.ScrapByDay[i].TOT_REJ_MANU;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dt.Rows.Add(dr);
}
public void AddProductionScrap(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Production Scrap";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.ScrapByDay[i].TW_PROD);
counter += rpt.ScrapByDay[i].TW_PROD;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dt.Rows.Add(dr);
}
public void AddYield(YieldStatistics rpt, DataTable dt)
{
int totalOuts = 0;
int totalScrap = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Yield";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
float yield = ((float)rpt.OutsByDay[i].TotalWafers - (float)rpt.ScrapByDay[i].TOT_REJ_WFRS) / (float)rpt.OutsByDay[i].TotalWafers;
dr[1 + i] = string.Format("{0:P2}", rpt.ScrapByDay[i].TW_PROD);
totalOuts += rpt.OutsByDay[i].TotalWafers;
totalScrap += rpt.ScrapByDay[i].TOT_REJ_CUST + rpt.ScrapByDay[i].TOT_REJ_MANU;
}
}
dr["WeeklyTotal"] = string.Format("{0:P2}", (float)(totalOuts - totalScrap) / (float)totalOuts);
dr["Comment"] = "After Scrap";
dt.Rows.Add(dr);
}
public void AddDeltaToCommit(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Delta to commit";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
int delta = rpt.OutsByDay[i].TotalWafers - rpt.ScrapByDay[i].TOT_REJ_WFRS - rpt.DailyPlanWafers;
dr[1 + i] = string.Format("{0:#,###}", delta);
counter += delta;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dr["Comment"] = "Difference to commitment";
dt.Rows.Add(dr);
}
public void AddDeltaToTarget(YieldStatistics rpt, DataTable dt)
{
int counter = 0;
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Delta to the Plan";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
int delta = rpt.OutsByDay[i].TotalWafers - rpt.ScrapByDay[i].TOT_REJ_WFRS - rpt.DailyPlanWafers;
dr[1 + i] = string.Format("{0:#,###}", delta);
counter += delta;
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", counter);
dr["Comment"] = "Difference to Target";
dt.Rows.Add(dr);
}
public void AddNeededTarget(YieldStatistics rpt, DataTable dt)
{
DataRow dr = dt.NewRow();
dr["SIOperations"] = "Wafers Needed to make QTR";
for (int i = 0; i < 7; i++)
{
if (i < rpt.OutsByDay.Count)
{
dr[1 + i] = string.Format("{0:#,###}", rpt.DailyPlanWafers);
}
}
dr["WeeklyTotal"] = string.Format("{0:##,###}", rpt.DailyPlanWafers * 7);
dr["Comment"] = "Number updated Weekly";
dt.Rows.Add(dr);
}
private void btnPrevious_Click(object sender, EventArgs e)
{
btnNext.Visible = true;
btnPrevious.Visible = false;
dgvCurrentWeek.Visible = false;
dgvPreviousWeek.Visible = true;
}
private void btnNext_Click(object sender, EventArgs e)
{
btnNext.Visible = false;
btnPrevious.Visible = true;
dgvCurrentWeek.Visible = true;
dgvPreviousWeek.Visible = false;
}
}
}

View File

@ -1,60 +0,0 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,60 +0,0 @@
namespace ReportingServices.Desktop
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnDailyReport = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnDailyReport
//
this.btnDailyReport.Location = new System.Drawing.Point(98, 12);
this.btnDailyReport.Name = "btnDailyReport";
this.btnDailyReport.Size = new System.Drawing.Size(140, 65);
this.btnDailyReport.TabIndex = 0;
this.btnDailyReport.Text = "Daily Report";
this.btnDailyReport.UseVisualStyleBackColor = true;
this.btnDailyReport.Click += new System.EventHandler(this.btnDailyReport_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.btnDailyReport);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private Button btnDailyReport;
}
}

View File

@ -1,31 +0,0 @@
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ReportingServices.Desktop
{
public partial class Form1 : Form
{
ILogger<Form1> _logger;
public Form1(ILogger<Form1> logger)
{
_logger = logger;
InitializeComponent();
}
private void btnDailyReport_Click(object sender, EventArgs e)
{
DailyReport report = new DailyReport(_logger);
this.Hide();
report.Show();
}
}
}

View File

@ -1,60 +0,0 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,32 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace ReportingServices.Desktop
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var services = new ServiceCollection();
ConfigureServices(services);
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
{
var form1 = serviceProvider.GetRequiredService<Form1>();
Application.Run(form1);
}
}
private static void ConfigureServices(ServiceCollection services)
{
services.AddSingleton<Form1>()
.AddLogging(configure => configure.AddConsole());
}
}
}

View File

@ -1,15 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ReportingServices.Shared\ReportingServices.Shared.csproj" />
</ItemGroup>
</Project>

View File

@ -75,6 +75,7 @@ public static class DailyReportHelper
Task<OutsAndScrapTotal> task4 = null; Task<OutsAndScrapTotal> task4 = null;
Task<OutsAndScrapTotal> task5 = null; Task<OutsAndScrapTotal> task5 = null;
Task<OutsAndScrapTotal> task6 = null; Task<OutsAndScrapTotal> task6 = null;
Task<List<string>> task7 = null;
try try
{ {
@ -108,6 +109,7 @@ public static class DailyReportHelper
task4 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + currentDateTime.ToString()); task4 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + currentDateTime.ToString());
task5 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.ToString()); task5 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.ToString());
task6 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.AddDays(-7).ToString()); task6 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.AddDays(-7).ToString());
task7 = ApiCaller.GetApi<List<string>>(baseUrlScrapeDb + "GetCurrentHotWORunning");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -133,7 +135,6 @@ public static class DailyReportHelper
report.SetReactorInfo(reactors, GetUnscheduledReactors(report)); report.SetReactorInfo(reactors, GetUnscheduledReactors(report));
report.ToolEvents = report.ToolEvents report.ToolEvents = report.ToolEvents
.Where(x => x.Reactor is not "47")
.OrderBy(x => x.Reactor) .OrderBy(x => x.Reactor)
.ToList(); .ToList();
@ -153,6 +154,8 @@ public static class DailyReportHelper
report.CurrentWeek.QTDOutsAndScrap = task4.Result; report.CurrentWeek.QTDOutsAndScrap = task4.Result;
report.PreviousWeek.QTDOutsAndScrap = task4.Result; report.PreviousWeek.QTDOutsAndScrap = task4.Result;
report.CurrentHotWORunning = task7.Result;
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -578,4 +578,35 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository
return lots; 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;
}
} }

View File

@ -20,4 +20,5 @@ public interface IScrapeDatabaseRepository
public OutsAndScrapTotal GetOutsAndScrapTotals(string startDate, string endDate); public OutsAndScrapTotal GetOutsAndScrapTotals(string startDate, string endDate);
public DateTime GetQuarterStartDate(); public DateTime GetQuarterStartDate();
public List<HoldLot> GetCurrentHoldLots(); public List<HoldLot> GetCurrentHoldLots();
public List<string> GetCurrentHotWORunning();
} }

View File

@ -17,6 +17,7 @@ public class DailyReport
public ManualReportEntries ManualReportEntries { get; set; } public ManualReportEntries ManualReportEntries { get; set; }
public List<UnloadTempsByDay> UnloadTempsByDay { get; set; } public List<UnloadTempsByDay> UnloadTempsByDay { get; set; }
public List<SLLTool> SLLTools { get; set; } public List<SLLTool> SLLTools { get; set; }
public List<string> CurrentHotWORunning { get; set; }
public int NumberOfToolsWaferSize6IN { get; set; } public int NumberOfToolsWaferSize6IN { get; set; }
public int NumberOfToolsWaferSize8IN { get; set; } public int NumberOfToolsWaferSize8IN { get; set; }
public int NumberOfToolsWaferSize6INScheduled { get; set; } public int NumberOfToolsWaferSize6INScheduled { get; set; }

View File

@ -94,6 +94,7 @@
<li>Bottle Change (@bottleChanges): @bottle</li> <li>Bottle Change (@bottleChanges): @bottle</li>
<li>Daily Part Changes (@dailyPartChanges): @daily</li> <li>Daily Part Changes (@dailyPartChanges): @daily</li>
<li>Weekly Part Changes (@weeklyPartChanges): @weekly</li> <li>Weekly Part Changes (@weeklyPartChanges): @weekly</li>
<li>Red Hot Work Orders (@Model.CurrentHotWORunning.Count()): @string.Join(", ", Model.CurrentHotWORunning)</li>
</ul> </ul>
<br /> <br />
<a class="btn btn-light" asp-controller="ProductionReport" asp-action="EditDailyReport">Edit</a> <a class="btn btn-light" asp-controller="ProductionReport" asp-action="EditDailyReport">Edit</a>
@ -120,6 +121,7 @@
@foreach (ToolEventView tool in asmTools) @foreach (ToolEventView tool in asmTools)
{ {
string owner = ""; string owner = "";
string hot = "";
if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.MostRecentEvent.REACT_MODE)) if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.MostRecentEvent.REACT_MODE))
owner = "Maint"; owner = "Maint";
@ -134,7 +136,13 @@
myClass = ""; myClass = "";
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td>
@if (Model.CurrentHotWORunning.Contains("R" + tool.Reactor))
myClass = "table-danger text-danger";
else
myClass = "";
<td class="@myClass">@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.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>
@ -181,7 +189,13 @@
myClass = ""; myClass = "";
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td>
@if (Model.CurrentHotWORunning.Contains("R" + tool.Reactor))
myClass = "table-danger text-danger";
else
myClass = "";
<td class="@myClass">@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.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>
@ -228,7 +242,13 @@
myClass = ""; myClass = "";
<tr class="@myClass"> <tr class="@myClass">
<td>@tool.Reactor</td>
@if (Model.CurrentHotWORunning.Contains("R" + tool.Reactor))
myClass = "table-danger text-danger";
else
myClass = "";
<td class="@myClass">@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.CAT_PROB_DESC</td>
<td class="text-start">@tool.MostRecentEvent.REASON</td> <td class="text-start">@tool.MostRecentEvent.REASON</td>