更改LOG记录方式

This commit is contained in:
sc committed 2025-07-06 19:18:23 +08:00
commit 8b3d98114e
6 files changed
+6 -8

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ namespace DyeingComputer.UserClass
API_LOG.Add("MESSAGE", MESSAGE);
API_LOG.Add("TIME", MainWindowViewModel.SYSTime);
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
SQLiteHelpers = new SQLiteHelper(LOGAddress); //数据库连接路径
SQLiteHelpers.Open(); //打开数据库
SQLiteHelpers.InsertData("SERVER", API_LOG);//行插入
SQLiteHelpers.Close(); //关闭连接
+3 -6
View File
@@ -409,20 +409,16 @@ namespace DyeingComputer.UserClass
{
Dictionary<string, object> dat_829;
dat_829 = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
if (dat_829.GetValue("LOCK").ToString() == "TRUE")
if (dat_829.GetValue("LOCK").ToString() == "True")
{
MainWindowViewModel._Lock_bool = true;
client.SendAsync("SC829" + SYSKEY + SYSDAT);
}
else if (dat_829.GetValue("LOCK").ToString() == "FALSE")
else
{
MainWindowViewModel._Lock_bool = false;
client.SendAsync("SC829" + SYSKEY + SYSDAT);
}
else
{
client.SendAsync("SC829" + "[NOT]");
}
MainWindowViewModel.TX++;
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
}
@@ -437,6 +433,7 @@ namespace DyeingComputer.UserClass
try
{
Dictionary<string, object> Chart_new = new Dictionary<string, object>();//缓存函数
Chart_new.Add("LOCK", MainWindowViewModel._Lock_bool);
Chart_new.Add("Status", MainWindowViewModel.StatusStr);
Chart_new.Add("Machine", MainWindowViewModel.S01);
Chart_new.Add("WorkNumder", MainWindowViewModel.WorkNumder);