添加输送状态返回
This commit is contained in:
commit
65bebbf591
1 file changed
+35
-1
@@ -179,7 +179,7 @@ namespace DyeingComputer.UserClass
|
||||
{
|
||||
DataTable Dyelot_dat;
|
||||
Dyelot_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT);
|
||||
bool dat_w = SQLDATA.WorkOderStep(Dyelot_dat);
|
||||
bool dat_w = SQLDATA.Dyelot(Dyelot_dat);
|
||||
if (!dat_w)
|
||||
{
|
||||
client.SendAsync("SC913" + "[" + MainWindowViewModel.S01 + "]" +
|
||||
@@ -401,6 +401,40 @@ namespace DyeingComputer.UserClass
|
||||
}
|
||||
else { client.SendAsync("SC999"); }
|
||||
}//启停跳步指令
|
||||
else if (SYSAPI == "SC828")
|
||||
{
|
||||
if (SYSKEY == MainWindowViewModel.SYSKEY)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable Dyelot_dat;
|
||||
Dyelot_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT);
|
||||
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
Dictionary<string, object> Product_data = new Dictionary<string, object>();//缓存函数
|
||||
for (int i=0;i<=Dyelot_dat.Rows.Count;i++)
|
||||
{
|
||||
DataRow drEmployee = Dyelot_dat.Rows[i];
|
||||
Product_data.Add("State", drEmployee.Field<int>("State"));
|
||||
Product_data.Add("Amount", drEmployee.Field<float>("Amount"));
|
||||
Product_data.Add("END_TIME", drEmployee.Field<string>("END_TIME"));
|
||||
|
||||
SQLiteHelpers.Update("Dyelot", Product_data, "Dyelot ='" + drEmployee.Field<string>("Dyelot")
|
||||
+ "' AND Step ='"+ drEmployee.Field<int>("Step") + "' AND ProductCode='"+
|
||||
drEmployee.Field<string>("ProductCode") + "'", null);
|
||||
|
||||
Product_data.Clear();
|
||||
}
|
||||
SQLiteHelpers.Close(); //关闭连接
|
||||
|
||||
MainWindowViewModel.TX++;
|
||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||
}
|
||||
catch (Exception ex) { client.SendAsync("SC928" + "[" + MainWindowViewModel.S01 + "]" + ex); }
|
||||
}
|
||||
else { client.SendAsync("SC999"); }
|
||||
}//输送信息指令
|
||||
else if (SYSAPI == "SC829")
|
||||
{
|
||||
if (SYSKEY == MainWindowViewModel.SYSKEY)
|
||||
|
||||
Reference in new issue
Block a user