|
|
@ -71,7 +71,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
drEmployee["State"] = "800"; |
|
|
|
drEmployee["WorkOrder"] = "------"; |
|
|
|
drEmployee["Dyelot"] = ""; |
|
|
|
drEmployee["Temperature"] = "---.-"; |
|
|
|
drEmployee["Temperature"] = 0.0; |
|
|
|
drEmployee["WaterLevel"] = "----"; |
|
|
|
drEmployee["Process"] = ""; |
|
|
|
drEmployee["Step"] = ""; |
|
|
@ -97,7 +97,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
drEmployee["State"] = "800"; |
|
|
|
drEmployee["WorkOrder"] = "------"; |
|
|
|
drEmployee["Dyelot"] = ""; |
|
|
|
drEmployee["Temperature"] = "---.-"; |
|
|
|
drEmployee["Temperature"] = 0.0; |
|
|
|
drEmployee["WaterLevel"] = "----"; |
|
|
|
drEmployee["Process"] = ""; |
|
|
|
drEmployee["Step"] = ""; |
|
|
@ -174,11 +174,40 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass |
|
|
|
try |
|
|
|
{ |
|
|
|
DAT = DAT.Substring(DAT.IndexOf("]") + 1); |
|
|
|
MainWindowViewModel.Dyelot_CALL = JsonConvert.DeserializeObject<DataTable>(DAT).Copy();//反序列化
|
|
|
|
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(DAT);//反序列化
|
|
|
|
|
|
|
|
foreach (DataRow sourceRow in dataTable.Rows) |
|
|
|
{ |
|
|
|
// 创建新行(基于目标表结构)
|
|
|
|
DataRow newRow = MainWindowViewModel.Dyelot_CALL.NewRow(); |
|
|
|
// 复制源表中存在的列数据
|
|
|
|
foreach (DataColumn column in dataTable.Columns) |
|
|
|
{ |
|
|
|
if (MainWindowViewModel.Dyelot_CALL.Columns.Contains(column.ColumnName)) |
|
|
|
{ |
|
|
|
newRow[column.ColumnName] = sourceRow[column.ColumnName]; |
|
|
|
} |
|
|
|
} |
|
|
|
MainWindowViewModel.Dyelot_CALL.Rows.Add(newRow); |
|
|
|
|
|
|
|
Dictionary<string, object> Product_ = new Dictionary<string, object>();//缓存函数
|
|
|
|
Product_.Add("State", 202); |
|
|
|
Product_.Add("Dyelot", newRow.Field<string>("Dyelot")); |
|
|
|
Product_.Add("Step", newRow.Field<int>("Step")); |
|
|
|
Product_.Add("ProductCode", newRow.Field<string>("ProductCode")); |
|
|
|
Product_.Add("Amount", newRow.Field<object>("Amount")); |
|
|
|
Product_.Add("DispenseEndTime", newRow.Field<object>("DispenseEndTime")); |
|
|
|
|
|
|
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString |
|
|
|
{ |
|
|
|
ID = Convert.ToInt16(MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, |
|
|
|
"ID", "Name='" + newRow.Field<string>("Machine") + "'")), |
|
|
|
DAT = "SC828" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, |
|
|
|
"SYSKEY", "Name='" + newRow.Field<string>("Machine") + "'") + Product_.ToJsonString() |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; } |
|
|
|
catch (Exception ex) { LogGing.LogGingDATA("[ERR='" + ex + "']=Exception"); MainWindowViewModel.ERR_c++; } |
|
|
|
}//呼叫领料单
|
|
|
|
else if (SYSAPI == "SC830") |
|
|
|
{ |
|
|
|