|
@ -400,6 +400,22 @@ namespace DyeingComputer.UserClass |
|
|
} |
|
|
} |
|
|
else { client.SendAsync("SC999"); } |
|
|
else { client.SendAsync("SC999"); } |
|
|
}//启停跳步指令
|
|
|
}//启停跳步指令
|
|
|
|
|
|
else if (SYSAPI == "SC827") |
|
|
|
|
|
{ |
|
|
|
|
|
if (SYSKEY == MainWindowViewModel.SYSKEY) |
|
|
|
|
|
{ |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
client.SendAsync("SC827" + "[" + MainWindowViewModel.S01 + "]" + |
|
|
|
|
|
MainWindowViewModel.Dyelot_dat.ToJsonString()); |
|
|
|
|
|
|
|
|
|
|
|
MainWindowViewModel.TX++; |
|
|
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) { client.SendAsync("SC927" + "[" + MainWindowViewModel.S01 + "]" + ex); } |
|
|
|
|
|
} |
|
|
|
|
|
else { client.SendAsync("SC999"); } |
|
|
|
|
|
}//输送信息指令
|
|
|
else if (SYSAPI == "SC828") |
|
|
else if (SYSAPI == "SC828") |
|
|
{ |
|
|
{ |
|
|
if (SYSKEY == MainWindowViewModel.SYSKEY) |
|
|
if (SYSKEY == MainWindowViewModel.SYSKEY) |
|
@ -423,13 +439,16 @@ namespace DyeingComputer.UserClass |
|
|
+ "' AND Step ='"+ drEmployee.Field<int>("Step") + "' AND ProductCode='"+ |
|
|
+ "' AND Step ='"+ drEmployee.Field<int>("Step") + "' AND ProductCode='"+ |
|
|
drEmployee.Field<string>("ProductCode") + "'", null); |
|
|
drEmployee.Field<string>("ProductCode") + "'", null); |
|
|
Product_data.Clear(); |
|
|
Product_data.Clear(); |
|
|
|
|
|
MainWindowViewModel.Dyelot_dat = SQLiteHelpers.ExecuteDataSet( |
|
|
|
|
|
"select * from Dyelot where WorkOrder = '" + |
|
|
|
|
|
MainWindowViewModel.WorkNumder + "'", null).Tables[0]; |
|
|
int dt = SQLiteHelpers.ExecuteDataSet("select * from Dyelot where Dyelot='" + |
|
|
int dt = SQLiteHelpers.ExecuteDataSet("select * from Dyelot where Dyelot='" + |
|
|
drEmployee.Field<string>("Dyelot") + "' AND State ='" + drEmployee.Field<int>("State") + |
|
|
drEmployee.Field<string>("Dyelot") + "' AND State ='" + drEmployee.Field<int>("State") + |
|
|
"'", null).Tables[0].Rows.Count; |
|
|
"'", null).Tables[0].Rows.Count; |
|
|
if (dt == 0) MainWindowViewModel.CALL_FR = false; |
|
|
if (dt == 0) MainWindowViewModel.CALL_FR = false; |
|
|
} |
|
|
} |
|
|
SQLiteHelpers.Close(); //关闭连接
|
|
|
SQLiteHelpers.Close(); //关闭连接
|
|
|
|
|
|
client.SendAsync("SC828" + SYSKEY + SYSDAT); |
|
|
|
|
|
|
|
|
MainWindowViewModel.TX++; |
|
|
MainWindowViewModel.TX++; |
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
|
@ -437,7 +456,7 @@ namespace DyeingComputer.UserClass |
|
|
catch (Exception ex) { client.SendAsync("SC928" + "[" + MainWindowViewModel.S01 + "]" + ex); } |
|
|
catch (Exception ex) { client.SendAsync("SC928" + "[" + MainWindowViewModel.S01 + "]" + ex); } |
|
|
} |
|
|
} |
|
|
else { client.SendAsync("SC999"); } |
|
|
else { client.SendAsync("SC999"); } |
|
|
}//输送信息指令
|
|
|
}//输送状态指令
|
|
|
else if (SYSAPI == "SC829") |
|
|
else if (SYSAPI == "SC829") |
|
|
{ |
|
|
{ |
|
|
if (SYSKEY == MainWindowViewModel.SYSKEY) |
|
|
if (SYSKEY == MainWindowViewModel.SYSKEY) |
|
|