提交 af9fbdfd authored 作者: yangbinjay's avatar yangbinjay

正反向数据处理

上级 abca2ec5
......@@ -448,6 +448,7 @@ namespace GK_HTRB_C16P.Upgradation
{
stationlist = stationTbridoDataBll.GetobjectextNew(pid, DestPath, isqb, CalculationAo.DicBoardInfo[aId]);
}
if (stationlist != null)
CsvFileUtilityDt.SaveArrayToCSVFiledt<DataTable>(this, stationlist, path, stationlist.Columns.Count);
}
}
......@@ -481,6 +482,7 @@ namespace GK_HTRB_C16P.Upgradation
stationlist = stationTbridoDataBll.GetobjectextOld(pid, isqb, CalculationAo.DicBoardInfo[aId]);
}
int ret = stationTbridoDataBll.CreateUpgtadation(DestPath, isqb, isqb + "_Index", Stations,aId);
if (stationlist == null)
CsvFileUtilityDt.SaveStationTbrDatatableToDb(this, stationlist, DestPath, isqb, aId);
}
Summary summary = new Summary();
......
......@@ -674,6 +674,7 @@
<Name>Frm_Correspondence</Name>
<Controls>
<Control name="Frm_Correspondence" text="设备对应关系维护"/>
<Control name="uiLabel1" text="注意:多个通道以逗号分隔,如:PS1,PS2"/>
<Control name="uiSymbolButton2" text="清空"/>
<Control name="uiSymbolButton1" text="保存"/>
</Controls>
......
......@@ -661,6 +661,7 @@
<Name>Frm_Correspondence</Name>
<Controls>
<Control name="Frm_Correspondence" text="Equipment Correspondence Maintenance"/>
<Control name="uiLabel1" text="Multiple channels are separated by commas, such as PS1, PS2"/>
<Control name="uiSymbolButton2" text="Empty"/>
<Control name="uiSymbolButton1" text="Save"/>
</Controls>
......
......@@ -67,7 +67,7 @@ namespace GKHTRBC16P.Bll
'TemE' float(10,3),
'Humi' float(10,3),", tablename);
}
else if (CalculationAo.CorrPowerDic[td].PowerId.Split(',').Length == 2)
else if (CalculationAo.CorrPowerDic[td].PowerId.Split(',').Length == 2|| CalculationAo.CorrPowerDic[td].PowerId.Split(',').Length == 1)
{
Csql1 = string.Format(@"CREATE TABLE '{0}' (
'Id' integer PRIMARY KEY AUTOINCREMENT,
......
......@@ -37,17 +37,6 @@
this.uiLedBulb1 = new Sunny.UI.UILedBulb();
this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
this.Column1_Check = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.GridPs = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1_Slot = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridVoltageSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridElectricSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridVoltageCheck = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridElectricCheck = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridExceedVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridExceedElectric = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridSetupVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridStageVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridStageTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Txt_ExceedVoltage = new Sunny.UI.UITextBox();
this.Txt_ExceedElectric = new Sunny.UI.UITextBox();
this.Txt_SetupVoltage = new Sunny.UI.UITextBox();
......@@ -75,6 +64,17 @@
this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridPs = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1_Slot = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridVoltageSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridElectricSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridVoltageCheck = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridElectricCheck = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridExceedVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridExceedElectric = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridSetupVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridStageVoltage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GridStageTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.uiDataGridView1)).BeginInit();
this.SuspendLayout();
......@@ -171,6 +171,7 @@
this.uiDataGridView1.TabIndex = 6;
this.uiDataGridView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uiDataGridView1_CellClick);
this.uiDataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.uiDataGridView1_CellEndEdit);
//
// Column1_Check
//
......@@ -181,83 +182,6 @@
this.Column1_Check.Visible = false;
this.Column1_Check.Width = 50;
//
// GridPs
//
this.GridPs.DataPropertyName = "PS";
this.GridPs.HeaderText = "PS";
this.GridPs.Name = "GridPs";
this.GridPs.Width = 60;
//
// Column1_Slot
//
this.Column1_Slot.DataPropertyName = "Slot";
this.Column1_Slot.HeaderText = "通道";
this.Column1_Slot.Name = "Column1_Slot";
this.Column1_Slot.Width = 80;
//
// GridVoltageSpec
//
this.GridVoltageSpec.DataPropertyName = "VoltageSpec";
this.GridVoltageSpec.HeaderText = "反偏电压值";
this.GridVoltageSpec.Name = "GridVoltageSpec";
this.GridVoltageSpec.Width = 120;
//
// GridElectricSpec
//
this.GridElectricSpec.DataPropertyName = "ElectricSpec";
this.GridElectricSpec.HeaderText = "电流规格值";
this.GridElectricSpec.Name = "GridElectricSpec";
this.GridElectricSpec.Visible = false;
//
// GridVoltageCheck
//
this.GridVoltageCheck.DataPropertyName = "VoltageCheck";
this.GridVoltageCheck.HeaderText = "电压回检值";
this.GridVoltageCheck.Name = "GridVoltageCheck";
this.GridVoltageCheck.Width = 120;
//
// GridElectricCheck
//
this.GridElectricCheck.DataPropertyName = "ElectricCheck";
this.GridElectricCheck.HeaderText = "电流回检值";
this.GridElectricCheck.Name = "GridElectricCheck";
this.GridElectricCheck.Visible = false;
//
// GridExceedVoltage
//
this.GridExceedVoltage.DataPropertyName = "ExceedVoltage";
this.GridExceedVoltage.HeaderText = "过压设置值";
this.GridExceedVoltage.Name = "GridExceedVoltage";
this.GridExceedVoltage.Width = 120;
//
// GridExceedElectric
//
this.GridExceedElectric.DataPropertyName = "ExceedElectric";
this.GridExceedElectric.HeaderText = "过流设置值";
this.GridExceedElectric.Name = "GridExceedElectric";
this.GridExceedElectric.Visible = false;
//
// GridSetupVoltage
//
this.GridSetupVoltage.DataPropertyName = "SetupVoltage";
this.GridSetupVoltage.HeaderText = "设定电压值";
this.GridSetupVoltage.Name = "GridSetupVoltage";
this.GridSetupVoltage.Width = 120;
//
// GridStageVoltage
//
this.GridStageVoltage.DataPropertyName = "StageVoltage";
this.GridStageVoltage.HeaderText = "阶段加压值";
this.GridStageVoltage.Name = "GridStageVoltage";
this.GridStageVoltage.Width = 130;
//
// GridStageTime
//
this.GridStageTime.DataPropertyName = "StageTime";
this.GridStageTime.HeaderText = "阶段时长值";
this.GridStageTime.Name = "GridStageTime";
this.GridStageTime.Width = 120;
//
// Txt_ExceedVoltage
//
this.Txt_ExceedVoltage.Cursor = System.Windows.Forms.Cursors.IBeam;
......@@ -596,6 +520,83 @@
this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
this.dataGridViewTextBoxColumn11.Width = 80;
//
// GridPs
//
this.GridPs.DataPropertyName = "PS";
this.GridPs.HeaderText = "PS";
this.GridPs.Name = "GridPs";
this.GridPs.Width = 60;
//
// Column1_Slot
//
this.Column1_Slot.DataPropertyName = "Slot";
this.Column1_Slot.HeaderText = "通道";
this.Column1_Slot.Name = "Column1_Slot";
this.Column1_Slot.Width = 80;
//
// GridVoltageSpec
//
this.GridVoltageSpec.DataPropertyName = "VoltageSpec";
this.GridVoltageSpec.HeaderText = "反偏电压值";
this.GridVoltageSpec.Name = "GridVoltageSpec";
this.GridVoltageSpec.Width = 120;
//
// GridElectricSpec
//
this.GridElectricSpec.DataPropertyName = "ElectricSpec";
this.GridElectricSpec.HeaderText = "电流规格值";
this.GridElectricSpec.Name = "GridElectricSpec";
this.GridElectricSpec.Visible = false;
//
// GridVoltageCheck
//
this.GridVoltageCheck.DataPropertyName = "VoltageCheck";
this.GridVoltageCheck.HeaderText = "电压回检值";
this.GridVoltageCheck.Name = "GridVoltageCheck";
this.GridVoltageCheck.Width = 120;
//
// GridElectricCheck
//
this.GridElectricCheck.DataPropertyName = "ElectricCheck";
this.GridElectricCheck.HeaderText = "电流回检值";
this.GridElectricCheck.Name = "GridElectricCheck";
this.GridElectricCheck.Visible = false;
//
// GridExceedVoltage
//
this.GridExceedVoltage.DataPropertyName = "ExceedVoltage";
this.GridExceedVoltage.HeaderText = "过压设置值";
this.GridExceedVoltage.Name = "GridExceedVoltage";
this.GridExceedVoltage.Width = 120;
//
// GridExceedElectric
//
this.GridExceedElectric.DataPropertyName = "ExceedElectric";
this.GridExceedElectric.HeaderText = "过流设置值";
this.GridExceedElectric.Name = "GridExceedElectric";
this.GridExceedElectric.Visible = false;
//
// GridSetupVoltage
//
this.GridSetupVoltage.DataPropertyName = "SetupVoltage";
this.GridSetupVoltage.HeaderText = "设定电压值";
this.GridSetupVoltage.Name = "GridSetupVoltage";
this.GridSetupVoltage.Width = 120;
//
// GridStageVoltage
//
this.GridStageVoltage.DataPropertyName = "StageVoltage";
this.GridStageVoltage.HeaderText = "阶段加压值";
this.GridStageVoltage.Name = "GridStageVoltage";
this.GridStageVoltage.Width = 130;
//
// GridStageTime
//
this.GridStageTime.DataPropertyName = "StageTime";
this.GridStageTime.HeaderText = "阶段时长值";
this.GridStageTime.Name = "GridStageTime";
this.GridStageTime.Width = 120;
//
// dataGridViewTextBoxColumn12
//
this.dataGridViewTextBoxColumn12.HeaderText = "停止加压";
......
......@@ -785,6 +785,28 @@ namespace GKHTRBC16P.Jurisdiction
ShowErrorTip(ex.Message);
}
}
private void uiDataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
try
{
if (e.ColumnIndex == uiDataGridView1.Columns["GridSetupVoltage"].Index)
{
DataGridViewRow row = uiDataGridView1.Rows[e.RowIndex];
int quantity = Convert.ToInt32(row.Cells["GridSetupVoltage"].Value ?? 0);
if (quantity > 100)
quantity = quantity / 3;
else
quantity = quantity / 4;
row.Cells["GridStageVoltage"].Value = quantity;
}
}
catch (Exception ex)
{
uPublic.WriteLog(ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
}
public class FrmStagePress_Keyv
{
......
......@@ -616,34 +616,6 @@ namespace GKHTRBC16P.RunLibrary
}
}
}
else if (CalculationAo.Thorous[WayId + 1].Snum == 40)
{
Home_Status.home_Status.Invoke((EventHandler)(delegate
{
for (int c = 0; c < cols; c++)
{
for (int r = 0; r < rows; r++)
{
SI2 = ConvertDataOpear.OutI(ComRxdData[9], ComRxdData[5], ComRxdData[pla[pl + 0]], ComRxdData[pla[pl + 1]]);
SI = ConvertDataOpear.OutI(ComRxdData[9], ComRxdData[5], ComRxdData[pla[pl + 2]], ComRxdData[pla[pl + 3]]);
pl = pl + 4;
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 1].Value = ConvertDataOpear.GetShowDouble(SI, CalculationAo.ThisDevConfig.DataLength);
if (SI > (double)tes.EleUpper && tes.Id != 0)
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 1].Style.ForeColor = Color.Red;
else
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 1].Style.ForeColor = Color.Black;
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 2].Value = ConvertDataOpear.GetShowDouble(SI2, CalculationAo.ThisDevConfig.DataLength);
if (SI2 > (double)tes.EleUpper && tes.Id != 0)
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 2].Style.ForeColor = Color.Red;
else
Home_Status.home_Status.uiDataGridView3.Rows[r].Cells[c * 3 + 2].Style.ForeColor = Color.Black;
SaveStation[c * Home_Status.home_Status.uiDataGridView3.Rows.Count * 2 + r * 2] = Convert.ToDouble(ConvertDataOpear.GetShowDouble(SI, CalculationAo.ThisDevConfig.DataLength));
SaveStation[c * Home_Status.home_Status.uiDataGridView3.Rows.Count * 2 + r * 2 + 1] = Convert.ToDouble(ConvertDataOpear.GetShowDouble(SI2, CalculationAo.ThisDevConfig.DataLength));
}
}
}));
JunIsTempVarf(WayId, tes, SaveStation, cols, rows);
}
else if (CalculationAo.Thorous[WayId + 1].Snum == 24)
{
Home_Status.home_Status.Invoke((EventHandler)(delegate
......@@ -784,7 +756,7 @@ namespace GKHTRBC16P.RunLibrary
twsin = dptime / Math.Round((endtime - begintime).TotalHours, 1) * 100;
twsin = twsin > 100 ? 100 : twsin;
Home_Status.home_Status.inGridviewValue(Home_Status.home_Status.uiDataGridView1, WayId, 5, twsin.ToString()); //单元格内进度条的值
tes.TotalTime = Math.Round(((DateTime.Now - begintime).TotalMinutes - CalculationAo.ThisDevConfig.TimeInterVal) / 60, 2);
tes.TotalTime = zstop / 60 > (DateTime.Now - begintime).TotalHours ? Math.Round((DateTime.Now - begintime).TotalHours) : Math.Round((DateTime.Now - begintime).TotalHours - zstop / 60, 2);
}
if ((CalculationAo.HTRBOT[WayId, 12] >= 2 || CalculationAo.ThisDevConfig.StateSave == 0))//如果正在运行
{
......@@ -1150,20 +1122,12 @@ namespace GKHTRBC16P.RunLibrary
}
}));
}
var SupplyRGPW = "";
if (tes.Id != 0)
{
if (tes.SupplyRGPW == 1)
SupplyRGPW = "+";
else
SupplyRGPW = "-";
}
if (CalculationAo.ThisDevConfig.SaveVoltage == 0 || CalculationAo.ThisDevConfig.SaveVoltage == 1)
{
double v2 = (double)(ComRxdData[164] + ComRxdData[165] * 256) / 100;
double v1 = (double)(ComRxdData[162] + ComRxdData[163] * 256) / 100;
Home_Status.home_Status.inVokeText(Home_Status.home_Status.EB_INVol, v1.ToString("0.0") + SupplyRGPW);
Home_Status.home_Status.inVokeText(Home_Status.home_Status.EdZFConfig, v2.ToString("0.0") + SupplyRGPW);
Home_Status.home_Status.inVokeText(Home_Status.home_Status.EB_INVol, v1.ToString("0.0"));
Home_Status.home_Status.inVokeText(Home_Status.home_Status.EdZFConfig, v2.ToString("0.0"));
}
else
{
......@@ -1216,7 +1180,7 @@ namespace GKHTRBC16P.RunLibrary
twsin = dptime / Math.Round((endtime - begintime).TotalHours, 1) * 100;
twsin = twsin > 100 ? 100 : twsin;
Home_Status.home_Status.inGridviewValue(Home_Status.home_Status.uiDataGridView1, WayId, 5, twsin.ToString()); //单元格内进度条的值
tes.TotalTime = Math.Round(((DateTime.Now - begintime).TotalMinutes - CalculationAo.ThisDevConfig.TimeInterVal) / 60, 2);
tes.TotalTime = zstop / 60 > (DateTime.Now - begintime).TotalHours ? Math.Round((DateTime.Now - begintime).TotalHours) : Math.Round((DateTime.Now - begintime).TotalHours - zstop / 60, 2);
}
if ((CalculationAo.HTRBOT[WayId, 12] >= 2 || CalculationAo.ThisDevConfig.StateSave == 0))//如果正在运行
{
......
......@@ -59,6 +59,8 @@ namespace GKHTRBC16P.RunLibrary
{
power_Data = ConvertDataOpear.GetPower(tes.PowerNo, CalculationAo.PowerList);
}
if (tes.SupplyRGPW != 1)
power_Data.Voltage = power_Data.Voltage * -1;
int[] cureeint = tes.Summary.TransfiniteSum;
int Sinvalid = 0;
double[] additional = new double[10];
......@@ -126,6 +128,8 @@ namespace GKHTRBC16P.RunLibrary
{
power_Data = ConvertDataOpear.GetPower(tes.PowerNo, CalculationAo.PowerList);
}
if (tes.SupplyRGPW != 1)
power_Data.Voltage = power_Data.Voltage * -1;
//stationDataBl.Addto(SaveStation, tes.ParmId, tes.BatchName, tes.TotalTime, CurrTime, oven_Data, power_Data);
int[] cureeint = tes.Summary.TransfiniteSum;
int Sinvalid = 0;
......@@ -370,6 +374,10 @@ namespace GKHTRBC16P.RunLibrary
{
power_Data = ConvertDataOpear.GetPower(tes.PowerNo, CalculationAo.PowerList);
}
if (tes.SupplyRGPW != 1)
{
power_Data.Voltage = power_Data.Voltage * -1;
}
int[] cureeint = tes.Summary.TransfiniteSum;
int Sinvalid = 0;
double[] additional = new double[10];
......@@ -603,6 +611,10 @@ namespace GKHTRBC16P.RunLibrary
power_Data = ConvertDataOpear.GetPower(tes.PowerNo, CalculationAo.PowerList);
}
double Vg = (double)Convert.ToUInt32(ComRxdData[345].ToString("X2") + ComRxdData[344].ToString("X2") + ComRxdData[343].ToString("X2") + ComRxdData[342].ToString("X2"), 16) / 100;
if (tes.SupplyRGPW != 1)
power_Data.Voltage = power_Data.Voltage * -1;
if (!ComRxdData[11].ToString("X2").Equals("D1") && Vg > 0)
Vg = -Vg;
int[] cureeint = tes.Summary.TransfiniteSum;
int Sinvalid = 0;
double[] additional = new double[10];
......
......@@ -381,6 +381,8 @@ namespace GKHTRBC16P.ToolLibrary
this.SESetOven.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SESetOven.Location = new System.Drawing.Point(584, 136);
this.SESetOven.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.SESetOven.Maximum = 300D;
this.SESetOven.Minimum = -150D;
this.SESetOven.MinimumSize = new System.Drawing.Size(1, 16);
this.SESetOven.Name = "SESetOven";
this.SESetOven.ShowText = false;
......@@ -400,6 +402,8 @@ namespace GKHTRBC16P.ToolLibrary
this.SEdtHui.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.SEdtHui.Location = new System.Drawing.Point(695, 136);
this.SEdtHui.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.SEdtHui.Maximum = 150D;
this.SEdtHui.Minimum = 100D;
this.SEdtHui.MinimumSize = new System.Drawing.Size(1, 16);
this.SEdtHui.Name = "SEdtHui";
this.SEdtHui.ShowText = false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论