Merge branch 'master' of http://192.168.0.12:13000/sc/DyeingComputer
This commit is contained in:
commit
2b93e8141e
2 files changed
+51
-65
No files matched your search
@@ -429,10 +429,6 @@ namespace DyeingComputer.View
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
DataRow dr = WorkorderSteps.Rows[i];//行转
|
||||
dr.BeginEdit(); //添加订单号
|
||||
dr["ProgramID"] = Process_id;
|
||||
dr["Program"] = MainWindowViewModel.ProgramName;
|
||||
dr.EndEdit();
|
||||
|
||||
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dr));//行插入
|
||||
}
|
||||
|
||||
@@ -826,6 +826,10 @@ namespace DyeingComputer.ViewModel
|
||||
STEP_ID = ID;
|
||||
switch (ID)
|
||||
{
|
||||
case "999":
|
||||
SETP_runtime = true;
|
||||
STEP_finish = false;
|
||||
break;
|
||||
case "001":
|
||||
STEP_P1 = Convert.ToDouble(P1);
|
||||
STEP_P2 = Convert.ToDouble(P2);
|
||||
@@ -1028,34 +1032,37 @@ namespace DyeingComputer.ViewModel
|
||||
dt_TP = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
|
||||
//SQLiteHelpers.Close();//关闭数据库
|
||||
//启动副功能
|
||||
STEP_RUN_slave_stop();
|
||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||
if (arrRows.First().Field<object>("StepID_S1") != null)
|
||||
if (STEP_ID != "999")
|
||||
{
|
||||
STEP_IDp1 = (string)arrRows[0]["StepID_S1"];
|
||||
STEP_P1p1 = (double)arrRows[0]["Parameter1_S1"];
|
||||
STEP_P2p1 = (double)arrRows[0]["Parameter2_S1"];
|
||||
STEP_P3p1 = (double)arrRows[0]["Parameter3_S1"];
|
||||
STEP_P4p1 = (double)arrRows[0]["Parameter4_S1"];
|
||||
STEP_P5p1 = (double)arrRows[0]["Parameter5_S1"];
|
||||
}
|
||||
if (arrRows.First().Field<object>("StepID_S2") != null)
|
||||
{
|
||||
STEP_IDp2 = (string)arrRows[0]["StepID_S2"];
|
||||
STEP_P1p2 = (double)arrRows[0]["Parameter1_S2"];
|
||||
STEP_P2p2 = (double)arrRows[0]["Parameter2_S2"];
|
||||
STEP_P3p2 = (double)arrRows[0]["Parameter3_S2"];
|
||||
STEP_P4p2 = (double)arrRows[0]["Parameter4_S2"];
|
||||
STEP_P5p2 = (double)arrRows[0]["Parameter5_S2"];
|
||||
}
|
||||
if (arrRows.First().Field<object>("StepID_S3") != null)
|
||||
{
|
||||
STEP_IDp3 = (string)arrRows[0]["StepID_S3"];
|
||||
STEP_P1p3 = (double)arrRows[0]["Parameter1_S3"];
|
||||
STEP_P2p3 = (double)arrRows[0]["Parameter2_S3"];
|
||||
STEP_P3p3 = (double)arrRows[0]["Parameter3_S3"];
|
||||
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
||||
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
||||
STEP_RUN_slave_stop();
|
||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||
if (arrRows.First().Field<object>("StepID_S1") != null)
|
||||
{
|
||||
STEP_IDp1 = (string)arrRows[0]["StepID_S1"];
|
||||
STEP_P1p1 = (double)arrRows[0]["Parameter1_S1"];
|
||||
STEP_P2p1 = (double)arrRows[0]["Parameter2_S1"];
|
||||
STEP_P3p1 = (double)arrRows[0]["Parameter3_S1"];
|
||||
STEP_P4p1 = (double)arrRows[0]["Parameter4_S1"];
|
||||
STEP_P5p1 = (double)arrRows[0]["Parameter5_S1"];
|
||||
}
|
||||
if (arrRows.First().Field<object>("StepID_S2") != null)
|
||||
{
|
||||
STEP_IDp2 = (string)arrRows[0]["StepID_S2"];
|
||||
STEP_P1p2 = (double)arrRows[0]["Parameter1_S2"];
|
||||
STEP_P2p2 = (double)arrRows[0]["Parameter2_S2"];
|
||||
STEP_P3p2 = (double)arrRows[0]["Parameter3_S2"];
|
||||
STEP_P4p2 = (double)arrRows[0]["Parameter4_S2"];
|
||||
STEP_P5p2 = (double)arrRows[0]["Parameter5_S2"];
|
||||
}
|
||||
if (arrRows.First().Field<object>("StepID_S3") != null)
|
||||
{
|
||||
STEP_IDp3 = (string)arrRows[0]["StepID_S3"];
|
||||
STEP_P1p3 = (double)arrRows[0]["Parameter1_S3"];
|
||||
STEP_P2p3 = (double)arrRows[0]["Parameter2_S3"];
|
||||
STEP_P3p3 = (double)arrRows[0]["Parameter3_S3"];
|
||||
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
||||
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
||||
}
|
||||
}
|
||||
User_Button = true;
|
||||
}
|
||||
@@ -1082,6 +1089,9 @@ namespace DyeingComputer.ViewModel
|
||||
{
|
||||
switch (STEP_ID)
|
||||
{
|
||||
case "999":
|
||||
Status_Str = Resources.Await+"[Not End]";
|
||||
break;
|
||||
case "001":
|
||||
if (Selet_dtd("3011"))
|
||||
{
|
||||
@@ -2397,7 +2407,7 @@ namespace DyeingComputer.ViewModel
|
||||
break;
|
||||
}
|
||||
|
||||
STEP_RUN_slave();//子功能
|
||||
if(STEP_ID!="999") STEP_RUN_slave();//子功能
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2407,43 +2417,23 @@ namespace DyeingComputer.ViewModel
|
||||
STEP_finish = false;
|
||||
UserCall_OK = false;
|
||||
RUN_STEPID = dt_TP.Select("RUN ='1'").First().Field<int>("Step") +1;
|
||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||
string T_ID = arrRows[0]["StepID"].ToString();
|
||||
double T_P1 = Convert.ToDouble(arrRows[0]["Parameter1"].ToString());
|
||||
double T_P2 = Convert.ToDouble(arrRows[0]["Parameter2"].ToString());
|
||||
double T_P3 = Convert.ToDouble(arrRows[0]["Parameter3"].ToString());
|
||||
double T_P4 = Convert.ToDouble(arrRows[0]["Parameter4"].ToString());
|
||||
double T_P5 = Convert.ToDouble(arrRows[0]["Parameter5"].ToString());
|
||||
STEP_START(T_ID, T_P1, T_P2, T_P3, T_P4, T_P5);
|
||||
/* if (arrRows.First().Field<object>("StepID_S1") != null)
|
||||
try
|
||||
{
|
||||
STEP_IDp1 = (string)arrRows[0]["StepID_S1"];
|
||||
STEP_P1p1 = (double)arrRows[0]["Parameter1_S1"];
|
||||
STEP_P2p1 = (double)arrRows[0]["Parameter2_S1"];
|
||||
STEP_P3p1 = (double)arrRows[0]["Parameter3_S1"];
|
||||
STEP_P4p1 = (double)arrRows[0]["Parameter4_S1"];
|
||||
STEP_P5p1 = (double)arrRows[0]["Parameter5_S1"];
|
||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||
string T_ID = arrRows[0]["StepID"].ToString();
|
||||
double T_P1 = Convert.ToDouble(arrRows[0]["Parameter1"].ToString());
|
||||
double T_P2 = Convert.ToDouble(arrRows[0]["Parameter2"].ToString());
|
||||
double T_P3 = Convert.ToDouble(arrRows[0]["Parameter3"].ToString());
|
||||
double T_P4 = Convert.ToDouble(arrRows[0]["Parameter4"].ToString());
|
||||
double T_P5 = Convert.ToDouble(arrRows[0]["Parameter5"].ToString());
|
||||
STEP_START(T_ID, T_P1, T_P2, T_P3, T_P4, T_P5);
|
||||
APILog.LOGlog(WorkNumder.ToString(), "Process", "Next", "STEP = " + RUN_STEPID + ";StepID=" +
|
||||
T_ID + ";P1=" + T_P1 + ";P2=" + T_P2 + ";P3=" + T_P3 + ";P4=" + T_P4 + ";P5=" + T_P5);
|
||||
}
|
||||
if (arrRows.First().Field<object>("StepID_S") != null)
|
||||
catch (Exception)
|
||||
{
|
||||
STEP_IDp2 = (string)arrRows[0]["StepID_S2"];
|
||||
STEP_P1p2 = (double)arrRows[0]["Parameter1_S2"];
|
||||
STEP_P2p2 = (double)arrRows[0]["Parameter2_S2"];
|
||||
STEP_P3p2 = (double)arrRows[0]["Parameter3_S2"];
|
||||
STEP_P4p2 = (double)arrRows[0]["Parameter4_S2"];
|
||||
STEP_P5p2 = (double)arrRows[0]["Parameter5_S2"];
|
||||
STEP_START("999", 0, 0, 0, 0, 0);
|
||||
}
|
||||
if (arrRows[0]["StepID_S2"] != null)
|
||||
{
|
||||
STEP_IDp3 = (string)arrRows[0]["StepID_S3"];
|
||||
STEP_P1p3 = (double)arrRows[0]["Parameter1_S3"];
|
||||
STEP_P2p3 = (double)arrRows[0]["Parameter2_S3"];
|
||||
STEP_P3p3 = (double)arrRows[0]["Parameter3_S3"];
|
||||
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
||||
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
||||
}*/
|
||||
APILog.LOGlog(WorkNumder.ToString(), "Process", "Next", "STEP = " + RUN_STEPID + ";StepID=" +
|
||||
T_ID + ";P1=" + T_P1 + ";P2=" + T_P2 + ";P3=" + T_P3 + ";P4=" + T_P4 + ";P5=" + T_P5);
|
||||
if (ViewID == 1) { sys_workSTEPID = RUN_STEPID; } else { sys_workSTEPID = -1; }
|
||||
}
|
||||
if (errTabler.Rows.Count == 0)
|
||||
|
||||
Reference in new issue
Block a user