[성현모] TRA 버그 수정, Json Convert Tool 추가
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using DevExpress.Spreadsheet;
|
||||
using DevExpress.Data.Helpers;
|
||||
using DevExpress.Spreadsheet;
|
||||
using DevExpress.XtraPrinting;
|
||||
using DevExpress.XtraVerticalGrid;
|
||||
using DevExpress.XtraVerticalGrid.Rows;
|
||||
|
||||
@ -88,28 +88,31 @@
|
||||
this.layoutControl1.Controls.Add(this.splitContainerControl1);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
this.layoutControl1.Root = this.Root;
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1179, 635);
|
||||
this.layoutControl1.Size = new System.Drawing.Size(1684, 952);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
this.layoutControl1.Text = "layoutControl1";
|
||||
//
|
||||
// labelControl1
|
||||
//
|
||||
this.labelControl1.Location = new System.Drawing.Point(12, 578);
|
||||
this.labelControl1.Location = new System.Drawing.Point(17, 868);
|
||||
this.labelControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.labelControl1.Name = "labelControl1";
|
||||
this.labelControl1.Size = new System.Drawing.Size(77, 14);
|
||||
this.labelControl1.Size = new System.Drawing.Size(110, 22);
|
||||
this.labelControl1.StyleController = this.layoutControl1;
|
||||
this.labelControl1.TabIndex = 9;
|
||||
this.labelControl1.Text = "Auto Range : ";
|
||||
//
|
||||
// toggleSwitchAutoRange
|
||||
//
|
||||
this.toggleSwitchAutoRange.Location = new System.Drawing.Point(93, 578);
|
||||
this.toggleSwitchAutoRange.Location = new System.Drawing.Point(133, 868);
|
||||
this.toggleSwitchAutoRange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.toggleSwitchAutoRange.Name = "toggleSwitchAutoRange";
|
||||
this.toggleSwitchAutoRange.Properties.OffText = "Off";
|
||||
this.toggleSwitchAutoRange.Properties.OnText = "On";
|
||||
this.toggleSwitchAutoRange.Size = new System.Drawing.Size(196, 19);
|
||||
this.toggleSwitchAutoRange.Size = new System.Drawing.Size(279, 27);
|
||||
this.toggleSwitchAutoRange.StyleController = this.layoutControl1;
|
||||
this.toggleSwitchAutoRange.TabIndex = 2;
|
||||
//
|
||||
@ -117,9 +120,10 @@
|
||||
//
|
||||
this.simpleButtonAllData.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question;
|
||||
this.simpleButtonAllData.Appearance.Options.UseBackColor = true;
|
||||
this.simpleButtonAllData.Location = new System.Drawing.Point(148, 601);
|
||||
this.simpleButtonAllData.Location = new System.Drawing.Point(211, 901);
|
||||
this.simpleButtonAllData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.simpleButtonAllData.Name = "simpleButtonAllData";
|
||||
this.simpleButtonAllData.Size = new System.Drawing.Size(141, 22);
|
||||
this.simpleButtonAllData.Size = new System.Drawing.Size(201, 33);
|
||||
this.simpleButtonAllData.StyleController = this.layoutControl1;
|
||||
this.simpleButtonAllData.TabIndex = 8;
|
||||
this.simpleButtonAllData.Text = "All Data";
|
||||
@ -129,9 +133,10 @@
|
||||
//
|
||||
this.simpleButtonOKDataOnly.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary;
|
||||
this.simpleButtonOKDataOnly.Appearance.Options.UseBackColor = true;
|
||||
this.simpleButtonOKDataOnly.Location = new System.Drawing.Point(12, 601);
|
||||
this.simpleButtonOKDataOnly.Location = new System.Drawing.Point(17, 901);
|
||||
this.simpleButtonOKDataOnly.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.simpleButtonOKDataOnly.Name = "simpleButtonOKDataOnly";
|
||||
this.simpleButtonOKDataOnly.Size = new System.Drawing.Size(132, 22);
|
||||
this.simpleButtonOKDataOnly.Size = new System.Drawing.Size(188, 33);
|
||||
this.simpleButtonOKDataOnly.StyleController = this.layoutControl1;
|
||||
this.simpleButtonOKDataOnly.TabIndex = 6;
|
||||
this.simpleButtonOKDataOnly.Text = "Only OK Data";
|
||||
@ -140,42 +145,57 @@
|
||||
// groupControl2
|
||||
//
|
||||
this.groupControl2.Controls.Add(this.vGridControlStepSummary);
|
||||
this.groupControl2.Location = new System.Drawing.Point(12, 314);
|
||||
this.groupControl2.Location = new System.Drawing.Point(17, 471);
|
||||
this.groupControl2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.groupControl2.Name = "groupControl2";
|
||||
this.groupControl2.Size = new System.Drawing.Size(277, 260);
|
||||
this.groupControl2.Size = new System.Drawing.Size(395, 391);
|
||||
this.groupControl2.TabIndex = 7;
|
||||
this.groupControl2.Text = "Measured Data Analysis";
|
||||
//
|
||||
// vGridControlStepSummary
|
||||
//
|
||||
this.vGridControlStepSummary.BandsInterval = 3;
|
||||
this.vGridControlStepSummary.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.vGridControlStepSummary.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vGridControlStepSummary.Location = new System.Drawing.Point(2, 23);
|
||||
this.vGridControlStepSummary.Location = new System.Drawing.Point(2, 34);
|
||||
this.vGridControlStepSummary.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.vGridControlStepSummary.Name = "vGridControlStepSummary";
|
||||
this.vGridControlStepSummary.Size = new System.Drawing.Size(273, 235);
|
||||
this.vGridControlStepSummary.OptionsView.FixedLineWidth = 3;
|
||||
this.vGridControlStepSummary.OptionsView.MinRowAutoHeight = 15;
|
||||
this.vGridControlStepSummary.RecordWidth = 143;
|
||||
this.vGridControlStepSummary.RowHeaderWidth = 143;
|
||||
this.vGridControlStepSummary.Size = new System.Drawing.Size(391, 355);
|
||||
this.vGridControlStepSummary.TabIndex = 1;
|
||||
//
|
||||
// groupControl1
|
||||
//
|
||||
this.groupControl1.Controls.Add(this.vGridControlInfo);
|
||||
this.groupControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupControl1.Location = new System.Drawing.Point(17, 18);
|
||||
this.groupControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.groupControl1.Name = "groupControl1";
|
||||
this.groupControl1.Size = new System.Drawing.Size(277, 298);
|
||||
this.groupControl1.Size = new System.Drawing.Size(395, 447);
|
||||
this.groupControl1.TabIndex = 6;
|
||||
this.groupControl1.Text = "Test Step Info.";
|
||||
//
|
||||
// vGridControlInfo
|
||||
//
|
||||
this.vGridControlInfo.BandsInterval = 3;
|
||||
this.vGridControlInfo.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.vGridControlInfo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vGridControlInfo.Location = new System.Drawing.Point(2, 23);
|
||||
this.vGridControlInfo.Location = new System.Drawing.Point(2, 34);
|
||||
this.vGridControlInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.vGridControlInfo.Name = "vGridControlInfo";
|
||||
this.vGridControlInfo.Size = new System.Drawing.Size(273, 273);
|
||||
this.vGridControlInfo.OptionsView.FixedLineWidth = 3;
|
||||
this.vGridControlInfo.OptionsView.MinRowAutoHeight = 15;
|
||||
this.vGridControlInfo.RecordWidth = 143;
|
||||
this.vGridControlInfo.RowHeaderWidth = 143;
|
||||
this.vGridControlInfo.Size = new System.Drawing.Size(391, 411);
|
||||
this.vGridControlInfo.TabIndex = 1;
|
||||
//
|
||||
// splitContainerControl1
|
||||
//
|
||||
this.splitContainerControl1.Location = new System.Drawing.Point(293, 12);
|
||||
this.splitContainerControl1.Location = new System.Drawing.Point(418, 18);
|
||||
this.splitContainerControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.splitContainerControl1.Name = "splitContainerControl1";
|
||||
//
|
||||
// splitContainerControl1.Panel1
|
||||
@ -187,17 +207,19 @@
|
||||
//
|
||||
this.splitContainerControl1.Panel2.Controls.Add(this.chartControlMain);
|
||||
this.splitContainerControl1.Panel2.Text = "Panel2";
|
||||
this.splitContainerControl1.Size = new System.Drawing.Size(874, 611);
|
||||
this.splitContainerControl1.SplitterPosition = 472;
|
||||
this.splitContainerControl1.Size = new System.Drawing.Size(1249, 916);
|
||||
this.splitContainerControl1.SplitterPosition = 674;
|
||||
this.splitContainerControl1.TabIndex = 6;
|
||||
//
|
||||
// gridControlMain
|
||||
//
|
||||
this.gridControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.gridControlMain.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridControlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.gridControlMain.MainView = this.gridViewMain;
|
||||
this.gridControlMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.gridControlMain.Name = "gridControlMain";
|
||||
this.gridControlMain.Size = new System.Drawing.Size(472, 611);
|
||||
this.gridControlMain.Size = new System.Drawing.Size(674, 916);
|
||||
this.gridControlMain.TabIndex = 5;
|
||||
this.gridControlMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
|
||||
this.gridViewMain});
|
||||
@ -206,6 +228,7 @@
|
||||
//
|
||||
this.gridViewMain.Appearance.Row.BackColor = System.Drawing.Color.Transparent;
|
||||
this.gridViewMain.Appearance.Row.Options.UseBackColor = true;
|
||||
this.gridViewMain.DetailHeight = 525;
|
||||
this.gridViewMain.GridControl = this.gridControlMain;
|
||||
this.gridViewMain.Name = "gridViewMain";
|
||||
this.gridViewMain.OptionsBehavior.Editable = false;
|
||||
@ -220,9 +243,10 @@
|
||||
//
|
||||
this.chartControlMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chartControlMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.chartControlMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.chartControlMain.Name = "chartControlMain";
|
||||
this.chartControlMain.SeriesSerializable = new DevExpress.XtraCharts.Series[0];
|
||||
this.chartControlMain.Size = new System.Drawing.Size(392, 611);
|
||||
this.chartControlMain.Size = new System.Drawing.Size(560, 916);
|
||||
this.chartControlMain.TabIndex = 0;
|
||||
this.chartControlMain.DoubleClick += new System.EventHandler(this.chartControlMain_DoubleClick);
|
||||
//
|
||||
@ -239,15 +263,15 @@
|
||||
this.layoutControlItem7,
|
||||
this.layoutControlItem6});
|
||||
this.Root.Name = "Root";
|
||||
this.Root.Size = new System.Drawing.Size(1179, 635);
|
||||
this.Root.Size = new System.Drawing.Size(1684, 952);
|
||||
this.Root.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.splitContainerControl1;
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(281, 0);
|
||||
this.layoutControlItem3.Location = new System.Drawing.Point(401, 0);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(878, 615);
|
||||
this.layoutControlItem3.Size = new System.Drawing.Size(1255, 922);
|
||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem3.TextVisible = false;
|
||||
//
|
||||
@ -255,10 +279,10 @@
|
||||
//
|
||||
this.layoutControlItem1.Control = this.groupControl1;
|
||||
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(281, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(281, 5);
|
||||
this.layoutControlItem1.MaxSize = new System.Drawing.Size(401, 0);
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(401, 7);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(281, 302);
|
||||
this.layoutControlItem1.Size = new System.Drawing.Size(401, 453);
|
||||
this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem1.TextVisible = false;
|
||||
@ -266,11 +290,11 @@
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.simpleButtonOKDataOnly;
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 589);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 26);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem4.Location = new System.Drawing.Point(0, 883);
|
||||
this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 39);
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(127, 39);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(136, 26);
|
||||
this.layoutControlItem4.Size = new System.Drawing.Size(194, 39);
|
||||
this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem4.TextVisible = false;
|
||||
@ -278,11 +302,11 @@
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.simpleButtonAllData;
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(136, 589);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 26);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(89, 26);
|
||||
this.layoutControlItem5.Location = new System.Drawing.Point(194, 883);
|
||||
this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 39);
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(127, 39);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(145, 26);
|
||||
this.layoutControlItem5.Size = new System.Drawing.Size(207, 39);
|
||||
this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
|
||||
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem5.TextVisible = false;
|
||||
@ -290,37 +314,38 @@
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.groupControl2;
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 302);
|
||||
this.layoutControlItem2.Location = new System.Drawing.Point(0, 453);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(281, 264);
|
||||
this.layoutControlItem2.Size = new System.Drawing.Size(401, 397);
|
||||
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem2.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem7
|
||||
//
|
||||
this.layoutControlItem7.Control = this.labelControl1;
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 566);
|
||||
this.layoutControlItem7.Location = new System.Drawing.Point(0, 850);
|
||||
this.layoutControlItem7.Name = "layoutControlItem7";
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(81, 23);
|
||||
this.layoutControlItem7.Size = new System.Drawing.Size(116, 33);
|
||||
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem7.TextVisible = false;
|
||||
//
|
||||
// layoutControlItem6
|
||||
//
|
||||
this.layoutControlItem6.Control = this.toggleSwitchAutoRange;
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(81, 566);
|
||||
this.layoutControlItem6.Location = new System.Drawing.Point(116, 850);
|
||||
this.layoutControlItem6.Name = "layoutControlItem6";
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(200, 23);
|
||||
this.layoutControlItem6.Size = new System.Drawing.Size(285, 33);
|
||||
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
|
||||
this.layoutControlItem6.TextVisible = false;
|
||||
//
|
||||
// UcTRAStepTrend
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 18F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "UcTRAStepTrend";
|
||||
this.Size = new System.Drawing.Size(1179, 635);
|
||||
this.Size = new System.Drawing.Size(1684, 952);
|
||||
this.Load += new System.EventHandler(this.UcTRADetailTestResult_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
|
||||
@ -199,14 +199,17 @@ namespace SystemX.Product.TRA.UIControl
|
||||
|
||||
DataRow dtRowLogFirst = vdtRowLogs[0];
|
||||
DateTime dtTested = Convert.ToDateTime(dtRowLogFirst[DMTestHistory.eColList.TestDateTime.ToString()]);
|
||||
ulong ulAccessNo = Convert.ToUInt64(dtRowLogFirst[DMTestHistory.eColList.No.ToString()]);
|
||||
|
||||
CPXV2Log.Tables.HIST_TestResult drStep = null;
|
||||
|
||||
for (int i = 0; i < vdtRowLogs.Count; i++)
|
||||
{
|
||||
dtRowLogFirst = vdtRowLogs[i];
|
||||
dtTested = Convert.ToDateTime(dtRowLogFirst[DMTestHistory.eColList.TestDateTime.ToString()]);
|
||||
dtTested = Convert.ToDateTime(dtRowLogFirst[DMTestHistory.eColList.TestDateTime.ToString()]);
|
||||
ulAccessNo = Convert.ToUInt64(dtRowLogFirst[DMTestHistory.eColList.No.ToString()]);
|
||||
|
||||
DataTable dtFirstLog = DataManager.SearchTestResult(dtTested);
|
||||
DataTable dtFirstLog = DataManager.SearchTestResult(dtTested, ulAccessNo);
|
||||
|
||||
var logData = dtFirstLog.Rows[0]["LogData"].ToString();
|
||||
var decompStr = logData.GzipDecompress();
|
||||
@ -221,17 +224,24 @@ namespace SystemX.Product.TRA.UIControl
|
||||
|
||||
if (drStep == null)
|
||||
return;
|
||||
|
||||
|
||||
int nPoint = 0;
|
||||
DataTable dtResult = GetTrendData(dtTested, vdtRowLogs);
|
||||
|
||||
nPoint = 1;
|
||||
dtResult = CombineLogForm(dtResult, dtRow);
|
||||
|
||||
nPoint = 2;
|
||||
TrendDataResult resultUnit = MakeTrendSummary(dtResult, dtRow, data);
|
||||
|
||||
nPoint = 3;
|
||||
ShowDataTable(dtResult);
|
||||
ShowTestStepSummary(resultUnit);
|
||||
ShowTrendChart(resultUnit);
|
||||
|
||||
nPoint = 4;
|
||||
ShowTestStepSummary(resultUnit);
|
||||
|
||||
nPoint = 5;
|
||||
ShowTrendChart(resultUnit);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -248,16 +258,14 @@ namespace SystemX.Product.TRA.UIControl
|
||||
{
|
||||
DataTable dtResult = DataManager.GetTestStepResults(dtTested, vnData.Select(x => Convert.ToUInt64(x[0])).ToList());
|
||||
|
||||
dtResult.Columns.Add(eColDataTable.RowNo.ToString(), typeof(int));
|
||||
dtResult.Columns.Add(eColDataTable.RowNo.ToString(), typeof(ulong));
|
||||
|
||||
for (int i = 0; i < dtResult.Rows.Count; i++)
|
||||
dtResult.Rows[i][eColDataTable.RowNo.ToString()] = i + 1;
|
||||
|
||||
|
||||
return dtResult;
|
||||
}
|
||||
|
||||
|
||||
DataTable CombineLogForm(DataTable dtResult, DataRow dtRowTestlistSpec)
|
||||
{
|
||||
DataTable dtFinal = new DataTable();
|
||||
@ -275,41 +283,101 @@ namespace SystemX.Product.TRA.UIControl
|
||||
DataRow drTL = DTTestLogList.AsEnumerable().Where(x =>
|
||||
x[DMTestHistory.eColList.TestID.ToString()].ToString() == drLog[DMTestHistory.eColList.TestID.ToString()].ToString()).FirstOrDefault();*/
|
||||
|
||||
//string strValue = drLog[DMTestHistory.eColList.No.ToString()].ToString();
|
||||
try
|
||||
{
|
||||
string logData = drLog["LogData"].ToString();
|
||||
string decompStr = logData.GzipDecompress();
|
||||
List<CPXV2Log.Tables.HIST_TestResult> list = JsonConvert.DeserializeObject<List<CPXV2Log.Tables.HIST_TestResult>>(decompStr);
|
||||
|
||||
DataRow drTL = DTTestLogList.AsEnumerable()
|
||||
.Where(x => Convert.ToInt64(x[DMTestHistory.eColList.No.ToString()]) == Convert.ToInt64(drLog[0].ToString())).FirstOrDefault();
|
||||
long outValue = 0;
|
||||
if (Int64.TryParse(dtRowTestlistSpec[2].ToString(), out outValue))
|
||||
{
|
||||
CPXV2Log.Tables.HIST_TestResult row = list.Where(x => x.StepID == outValue)?.First();
|
||||
if(row == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
DataRow drDisp = dtFinal.NewRow();
|
||||
if (//!string.IsNullOrEmpty(row.MeasValStr) ||
|
||||
//!string.IsNullOrEmpty(row.Message) ||
|
||||
((row.MeasVal == 0) ||
|
||||
string.Compare(row.Result, "NONE") == 0))
|
||||
continue;
|
||||
|
||||
if (drTL == null)
|
||||
continue;
|
||||
//string strValue = drLog[DMTestHistory.eColList.No.ToString()].ToString();
|
||||
try
|
||||
{
|
||||
DataRow drTL = DTTestLogList.AsEnumerable()
|
||||
.Where(x => Convert.ToInt64(x[DMTestHistory.eColList.No.ToString()]) == Convert.ToInt64(drLog[0].ToString())).FirstOrDefault();
|
||||
|
||||
var logData = drLog["LogData"].ToString();
|
||||
var decompStr = logData.GzipDecompress();
|
||||
var list = JsonConvert.DeserializeObject<List<CPXV2Log.Tables.HIST_TestResult>>(decompStr);
|
||||
var row = list.Where(x => x.StepID == Convert.ToInt64(dtRowTestlistSpec[2].ToString())).First();
|
||||
DataRow drDisp = dtFinal.NewRow();
|
||||
|
||||
drDisp[eColDataTable.RowNo.ToString()] = (int)drLog[eColDataTable.RowNo.ToString()];
|
||||
drDisp[eColDataTable.TestTime.ToString()] = drTL[1].ToString();
|
||||
drDisp[eColDataTable.ProductID.ToString()] = drTL[5].ToString();
|
||||
drDisp[eColDataTable.Result.ToString()] = row.Result.ToString();
|
||||
if (drTL == null)
|
||||
continue;
|
||||
|
||||
bool bIsGlobal = (Convert.ToInt32(dtRowTestlistSpec[eColTestlist.IsGlobal.ToString()])) > 0 ? true : false;
|
||||
|
||||
drDisp[eColDataTable.Min.ToString()] = bIsGlobal ? row.GlobalMin.ToString() : dtRowTestlistSpec[eColTestlist.SpecMin.ToString()].ToString();
|
||||
drDisp[eColDataTable.Max.ToString()] = bIsGlobal ? row.GlobalMAx.ToString() : dtRowTestlistSpec[eColTestlist.SpecMax.ToString()].ToString();
|
||||
drDisp[0] = drLog[0];
|
||||
drDisp[1] = drTL[1].ToString();
|
||||
drDisp[2] = drTL[5].ToString();
|
||||
|
||||
string strMessage = row.Message.ToString();
|
||||
string strMeasValStr = row.MeasValStr.ToString();
|
||||
string strMeasVal = row.MeasVal.ToString();
|
||||
bool bIsGlobal = (Convert.ToInt32(dtRowTestlistSpec[eColTestlist.IsGlobal.ToString()])) > 0 ? true : false;
|
||||
|
||||
drDisp[eColDataTable.Value.ToString()] = string.IsNullOrWhiteSpace(strMessage) ? (string.IsNullOrWhiteSpace(strMeasValStr) ? strMeasVal : strMeasValStr) : strMessage;
|
||||
drDisp[eColDataTable.Result.ToString()] = row.Result.ToString();
|
||||
drDisp[3] = bIsGlobal ? row.GlobalMin.ToString() : dtRowTestlistSpec[eColTestlist.SpecMin.ToString()].ToString();
|
||||
drDisp[5] = bIsGlobal ? row.GlobalMAx.ToString() : dtRowTestlistSpec[eColTestlist.SpecMax.ToString()].ToString();
|
||||
|
||||
dtFinal.Rows.Add(drDisp);
|
||||
string strMessage = row.Message.ToString();
|
||||
string strMeasValStr = row.MeasValStr.ToString();
|
||||
string strMeasVal = row.MeasVal.ToString();
|
||||
|
||||
drDisp[4] = string.IsNullOrWhiteSpace(strMessage) ? (string.IsNullOrWhiteSpace(strMeasValStr) ? strMeasVal : strMeasValStr) : strMessage;
|
||||
drDisp[6] = row.Result.ToString();
|
||||
|
||||
/*
|
||||
public enum eColDataTable
|
||||
{
|
||||
RowNo,
|
||||
TestTime,
|
||||
ProductID,
|
||||
Min,
|
||||
Value,
|
||||
Max,
|
||||
Result,
|
||||
Duration
|
||||
}
|
||||
drDisp[eColDataTable.RowNo.ToString()] = drLog[eColDataTable.RowNo.ToString()];
|
||||
drDisp[eColDataTable.TestTime.ToString()] = drTL[1].ToString();
|
||||
drDisp[eColDataTable.ProductID.ToString()] = drTL[5].ToString();
|
||||
drDisp[eColDataTable.Result.ToString()] = row.Result.ToString();
|
||||
|
||||
bool bIsGlobal = (Convert.ToInt32(dtRowTestlistSpec[eColTestlist.IsGlobal.ToString()])) > 0 ? true : false;
|
||||
|
||||
drDisp[eColDataTable.Min.ToString()] = bIsGlobal ? row.GlobalMin.ToString() : dtRowTestlistSpec[eColTestlist.SpecMin.ToString()].ToString();
|
||||
drDisp[eColDataTable.Max.ToString()] = bIsGlobal ? row.GlobalMAx.ToString() : dtRowTestlistSpec[eColTestlist.SpecMax.ToString()].ToString();
|
||||
|
||||
string strMessage = row.Message.ToString();
|
||||
string strMeasValStr = row.MeasValStr.ToString();
|
||||
string strMeasVal = row.MeasVal.ToString();
|
||||
|
||||
drDisp[eColDataTable.Value.ToString()] = string.IsNullOrWhiteSpace(strMessage) ? (string.IsNullOrWhiteSpace(strMeasValStr) ? strMeasVal : strMeasValStr) : strMessage;
|
||||
drDisp[eColDataTable.Result.ToString()] = row.Result.ToString();
|
||||
*/
|
||||
|
||||
dtFinal.Rows.Add(drDisp);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return dtFinal;
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ namespace SystemX.Product.TRA.UIControl
|
||||
|
||||
public UcTRASummaryTestResult()
|
||||
{
|
||||
ContentsType = eContents.TestSumamry;
|
||||
ContentsType = eContents.TestSummary;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
@ -235,6 +235,18 @@ namespace SystemX.Product.TRA.UIControl
|
||||
*/
|
||||
|
||||
//drTL = DataManager[nAccessPos].Rows.Find(drLog[eColTestLog.StepID.ToString()]);
|
||||
|
||||
/*
|
||||
try
|
||||
{
|
||||
drTL = DataManager.dtHistVersionTL.Rows.Find(drLog[eColTestLog.StepID.ToString()]);
|
||||
}
|
||||
catch
|
||||
{
|
||||
drTL = null;
|
||||
}
|
||||
*/
|
||||
|
||||
drTL = DataManager.dtHistVersionTL.Rows.Find(drLog[eColTestLog.StepID.ToString()]);
|
||||
|
||||
if (drTL == null)
|
||||
@ -251,24 +263,47 @@ namespace SystemX.Product.TRA.UIControl
|
||||
DataRow drDisp = dtFinal.NewRow();
|
||||
|
||||
drDisp[eColDataTable.StepNo.ToString()] = Convert.ToInt32(Convert.ToInt32(drLog[eColTestSummary.StepID.ToString()]));
|
||||
drDisp[eColDataTable.Variant.ToString()] = drTL[eColTestlist.Variant.ToString()].ToString();
|
||||
drDisp[eColDataTable.Gate.ToString()] = drTL[eColTestlist.Gate.ToString()].ToString();
|
||||
drDisp[eColDataTable.MO.ToString()] = drTL[eColTestlist.StepDesc.ToString()].ToString();
|
||||
drDisp[eColDataTable.Function.ToString()] = drTL[eColTestlist.UseFunction.ToString()].ToString();
|
||||
|
||||
bool bIsGlobal = (Convert.ToInt32(drTL[eColTestlist.IsGlobal.ToString()])) > 0 ? true : false;
|
||||
if (drTL != null)
|
||||
{
|
||||
drDisp[eColDataTable.Variant.ToString()] = drTL[eColTestlist.Variant.ToString()].ToString();
|
||||
drDisp[eColDataTable.Gate.ToString()] = drTL[eColTestlist.Gate.ToString()].ToString();
|
||||
drDisp[eColDataTable.MO.ToString()] = drTL[eColTestlist.StepDesc.ToString()].ToString();
|
||||
drDisp[eColDataTable.Function.ToString()] = drTL[eColTestlist.UseFunction.ToString()].ToString();
|
||||
|
||||
drDisp[eColDataTable.Min.ToString()] = bIsGlobal ? "Global Var" : drTL[eColTestlist.SpecMin.ToString()].ToString();
|
||||
drDisp[eColDataTable.Max.ToString()] = bIsGlobal ? "Global Var" : drTL[eColTestlist.SpecMax.ToString()].ToString();
|
||||
bool bIsGlobal = (Convert.ToInt32(drTL[eColTestlist.IsGlobal.ToString()])) > 0 ? true : false;
|
||||
|
||||
drDisp[eColDataTable.Min.ToString()] = bIsGlobal ? "Global Var" : drTL[eColTestlist.SpecMin.ToString()].ToString();
|
||||
drDisp[eColDataTable.Max.ToString()] = bIsGlobal ? "Global Var" : drTL[eColTestlist.SpecMax.ToString()].ToString();
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
drDisp[eColDataTable.Variant.ToString()] = drLog[eColDataTable.Variant.ToString()].ToString();
|
||||
drDisp[eColDataTable.Gate.ToString()] = drLog[eColDataTable.Gate.ToString()].ToString();
|
||||
drDisp[eColDataTable.MO.ToString()] = drLog[eColDataTable.MO.ToString()].ToString();
|
||||
drDisp[eColDataTable.Function.ToString()] = drLog[eColDataTable.Function.ToString()].ToString();
|
||||
|
||||
drDisp[eColDataTable.Min.ToString()] = drLog[eColDataTable.Min.ToString()].ToString();
|
||||
drDisp[eColDataTable.Max.ToString()] = drLog[eColDataTable.Max.ToString()].ToString();
|
||||
}
|
||||
*/
|
||||
var strMeasVal = drLog[eColTestSummary.Average.ToString()];
|
||||
int nOK = Convert.ToInt32(drLog[eColTestSummary.OK.ToString()]);
|
||||
int nNOK = Convert.ToInt32(drLog[eColTestSummary.NG.ToString()]);
|
||||
|
||||
drDisp[eColDataTable.Average.ToString()] = strMeasVal == null ? string.Empty : (nOK + nNOK) == 0 ? string.Empty : strMeasVal.ToString();
|
||||
|
||||
drDisp[eColDataTable.Dimension.ToString()] = drTL[eColTestlist.Dim.ToString()].ToString();
|
||||
|
||||
if (drTL != null)
|
||||
{
|
||||
drDisp[eColDataTable.Dimension.ToString()] = drTL[eColTestlist.Dim.ToString()].ToString();
|
||||
}
|
||||
/*
|
||||
else
|
||||
{
|
||||
drDisp[eColDataTable.Dimension.ToString()] = drLog[eColTestlist.Dim.ToString()].ToString();
|
||||
}
|
||||
*/
|
||||
drDisp[eColDataTable.Total.ToString()] = Convert.ToInt32(drLog[eColTestSummary.Total.ToString()]);
|
||||
drDisp[eColDataTable.OK.ToString()] = nOK;
|
||||
drDisp[eColDataTable.NG.ToString()] = nNOK;
|
||||
|
||||
Reference in New Issue
Block a user