添加机台故障信息状态
This commit is contained in:
commit
7d7ed08f96
4 files changed
+33
-5
No files matched your search
@@ -12,6 +12,7 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
@@ -259,6 +260,25 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
for (int i = 0; i < Machinesdata_Count; i++)
|
||||
{
|
||||
int m_run = (int)Selet_Machines(Machines, "WORK_RUN", "ID='" + i + "'");
|
||||
if (m_run==0)
|
||||
{
|
||||
Updata_Machines(Machines, "State", "ID='" + i + "'", "101");//停止状态
|
||||
}
|
||||
else if (m_run==1)
|
||||
{
|
||||
Updata_Machines(Machines, "State", "ID='" + i + "'", "101");//暂停状态
|
||||
}
|
||||
else if (m_run==2)
|
||||
{
|
||||
Updata_Machines(Machines, "State", "ID='" + i + "'", "202");//运行
|
||||
}
|
||||
|
||||
if ((bool)Selet_Machines(Machines, "ERR", "ID='" + i + "'"))
|
||||
{
|
||||
Updata_Machines(Machines, "State", "ID='" + i + "'", "309");//错误
|
||||
}
|
||||
|
||||
string mac_s = Selet_Machines(Machines, "State", "ID='" + i + "'").ToString();
|
||||
if ((mac_s == "101") || (mac_s == "201") || (mac_s == "202") || (mac_s == "301") || (mac_s == "309"))//获取信息
|
||||
{
|
||||
@@ -329,12 +349,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
Updata_Machines(Machines, "State", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "800");
|
||||
Updata_Machines(Machines, "Temperature", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "0.0");
|
||||
Updata_Machines(Machines, "WaterLevel", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "0");
|
||||
Updata_Machines(Machines, "WORK_RUN", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "-1");
|
||||
Updata_Machines(Machines, "ERR", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "False");
|
||||
_ = AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
|
||||
, Selet_Machines(Machines, "IP", "ID='" + Convert.ToInt16(dt["ID"]) + "'").ToString()
|
||||
, Selet_Machines(Machines, "PORT", "ID='" + Convert.ToInt16(dt["ID"]) + "'").ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string SYS_WorkNumder; //工单号
|
||||
public static int SYS_AT1; //附缸1-3
|
||||
public static int SYS_AT2;
|
||||
|
||||
Reference in new issue
Block a user