添加信息通知,回复Notification请求的信息

This commit is contained in:
Administrator committed 2026-06-06 00:13:23 +08:00
commit 797738c240
3 files changed
+147 -77

No files matched your search

+16
View File
@@ -225,6 +225,22 @@ namespace SunlightAggregationManager.UserClass
data_.Add("QueryDetail", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
ret = JsonSerializer.Serialize(data_);
}
if (Command == "Notification")//回复Notification请求的信息
{
string s_ = deserialized.GetValue("StartTime").ToString()!;
string e_ = deserialized.GetValue("EndTime").ToString()!;
var groups = MainWindowViewModel.Selet_Memory(MainWindowViewModel._userData,
"Groups", "User='" + person?.User + "'");
var resultTable = MainWindowViewModel.SQLiteHelpers.ExecuteDataSet("" +
"select * from Notification WHERE Groups='" + groups + "' and Time>'" +
s_ + "' and Time<'" + e_ + "'", null)?.Tables[0] ?? new DataTable();
//格式化返回信息
data_.Add("Notification", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
ret = JsonSerializer.Serialize(data_);
}
person.Dat=ret.ToString();
var jsdat = JsonSerializer.Serialize(person);