提交 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,
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论