|
|
@ -258,6 +258,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
dat_.Add("Dye", dataRow["DYELOT"].ToString()); |
|
|
dat_.Add("Dye", dataRow["DYELOT"].ToString()); |
|
|
dat_.Add("Time", dataRow["StepTime"].ToString()); |
|
|
dat_.Add("Time", dataRow["StepTime"].ToString()); |
|
|
dat_.Add("ReDye", dataRow["ReDye"].ToString()); |
|
|
dat_.Add("ReDye", dataRow["ReDye"].ToString()); |
|
|
|
|
|
dat_.Add("Program", dataRow["Program"].ToString()); |
|
|
dat_.Add("Step", dataRow["Step"].ToString()); |
|
|
dat_.Add("Step", dataRow["Step"].ToString()); |
|
|
dat_.Add("StepID", dataRow["StepID"].ToString()); |
|
|
dat_.Add("StepID", dataRow["StepID"].ToString()); |
|
|
dat_.Add("P1", dataRow["Parameter1"].ToString()); |
|
|
dat_.Add("P1", dataRow["Parameter1"].ToString()); |
|
|
@ -400,6 +401,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
dat_.Add("Dye", dt_temp["DYELOT"].ToString()); |
|
|
dat_.Add("Dye", dt_temp["DYELOT"].ToString()); |
|
|
dat_.Add("STime", dt_temp["StartTime"].ToString()); |
|
|
dat_.Add("STime", dt_temp["StartTime"].ToString()); |
|
|
dat_.Add("Time", dt_temp["Time"].ToString()); |
|
|
dat_.Add("Time", dt_temp["Time"].ToString()); |
|
|
|
|
|
dat_.Add("ReDye", 0); |
|
|
|
|
|
|
|
|
int index = Convert.ToInt16(Selet_Machines(Machines, "ID", "Name='" + WorkOrderdata_m + "'").ToString()); |
|
|
int index = Convert.ToInt16(Selet_Machines(Machines, "ID", "Name='" + WorkOrderdata_m + "'").ToString()); |
|
|
string dat = "SC810[" + Selet_Machines(Machines, "Station", "ID='" + index + "'") + "]" + dat_.ToJsonString(); |
|
|
string dat = "SC810[" + Selet_Machines(Machines, "Station", "ID='" + index + "'") + "]" + dat_.ToJsonString(); |
|
|
@ -648,6 +650,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
Updata_Machines(Machines, "State", "ID='" + MachinesRow["ID"] + "'", "101"); |
|
|
} |
|
|
} |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
{ |
|
|
{ |
|
|
@ -786,7 +789,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if ((mac_s == "101") || (mac_s == "201") || (mac_s == "202") || (mac_s == "301") || (mac_s == "309")|| (mac_s == "802"))//获取信息
|
|
|
if ((mac_s == "101") || (mac_s == "201") || (mac_s == "202") || (mac_s == "301") || (mac_s == "309"))//获取信息
|
|
|
{ |
|
|
{ |
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
{ |
|
|
{ |
|
|
@ -1129,24 +1132,15 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{//串口
|
|
|
{//串口
|
|
|
int index = Convert.ToInt16(MachinesRow["ID"]); |
|
|
|
|
|
string dat_ = "SC827[" + MachinesRow["Station"] + "]"; |
|
|
|
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_1.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_1.Enqueue(new QueueSerial |
|
|
stringQueueSerial_1.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
ID = index, |
|
|
ID = Convert.ToInt16(MachinesRow["ID"]), |
|
|
DAT = dat_ |
|
|
DAT = "SC827[" + MachinesRow["Station"] + "]" |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_2.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_2.Enqueue(new QueueSerial |
|
|
stringQueueSerial_2.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
@ -1154,11 +1148,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
DAT = "SC827[" + MachinesRow["Station"] + "]" |
|
|
DAT = "SC827[" + MachinesRow["Station"] + "]" |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT3") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT3") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_3.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_3.Enqueue(new QueueSerial |
|
|
stringQueueSerial_3.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
@ -1166,11 +1156,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
DAT = "SC827[" + MachinesRow["Station"] + "]" |
|
|
DAT = "SC827[" + MachinesRow["Station"] + "]" |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT4") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT4") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_4.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_4.Enqueue(new QueueSerial |
|
|
stringQueueSerial_4.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
@ -1181,7 +1167,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
catch (Exception EX) { LogGing.ERRDATA(EX); } |
|
|
catch (Exception EX) { LogGing.ERRDATA(EX); } |
|
|
/**染机呼叫完成**/ |
|
|
/**染机呼叫完成**/ |
|
|
try |
|
|
try |
|
|
@ -1208,57 +1193,39 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{//串口
|
|
|
{//串口
|
|
|
int index = Convert.ToInt16(MachinesRow["ID"]); |
|
|
|
|
|
string dat_ = "SC828[" + MachinesRow["Station"] + "]" + Product_.ToJsonString(); |
|
|
|
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
if (MachinesRow["Serial"].ToString() == "PORT1") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_1.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_1.Enqueue(new QueueSerial |
|
|
stringQueueSerial_1.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
ID = index, |
|
|
ID = Convert.ToInt16(MachinesRow["ID"]), |
|
|
DAT = dat_ |
|
|
DAT = "SC828[" + MachinesRow["Station"] + "]" + Product_.ToJsonString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT2") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_2.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_2.Enqueue(new QueueSerial |
|
|
stringQueueSerial_2.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
ID = index, |
|
|
ID = Convert.ToInt16(MachinesRow["ID"]), |
|
|
DAT = dat_ |
|
|
DAT = "SC828[" + MachinesRow["Station"] + "]" + Product_.ToJsonString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT3") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT3") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_3.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_3.Enqueue(new QueueSerial |
|
|
stringQueueSerial_3.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
ID = index, |
|
|
ID = Convert.ToInt16(MachinesRow["ID"]), |
|
|
DAT = dat_ |
|
|
DAT = "SC828[" + MachinesRow["Station"] + "]" + Product_.ToJsonString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else if (MachinesRow["Serial"].ToString() == "PORT4") |
|
|
else if (MachinesRow["Serial"].ToString() == "PORT4") |
|
|
{ |
|
|
|
|
|
bool exists = stringQueueSerial_4.Any(item => item.ID == index && item.DAT == dat_); |
|
|
|
|
|
if (!exists) |
|
|
|
|
|
{ |
|
|
{ |
|
|
stringQueueSerial_4.Enqueue(new QueueSerial |
|
|
stringQueueSerial_4.Enqueue(new QueueSerial |
|
|
{ |
|
|
{ |
|
|
ID = index, |
|
|
ID = Convert.ToInt16(MachinesRow["ID"]), |
|
|
DAT = dat_ |
|
|
DAT = "SC828[" + MachinesRow["Station"] + "]" + Product_.ToJsonString() |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (row["State"].ToString() == "309") |
|
|
if (row["State"].ToString() == "309") |
|
|
{ |
|
|
{ |
|
|
|