料单查询相关指令
This commit is contained in:
commit
a61a74340e
1 file changed
+22
-2
@@ -184,16 +184,36 @@ namespace SunlightAggregationManager.UserClass
|
||||
{
|
||||
string s_ = deserialized.GetValue("StartTime").ToString()!;
|
||||
string e_ = deserialized.GetValue("EndTime").ToString()!;
|
||||
string f_ = deserialized.GetValue("Field").ToString()!;
|
||||
|
||||
DataTable resultTable = await MainWindowViewModel.dataBase.ExecuteQueryAsync("SELECT * FROM [dbo].[Dyelots] " +
|
||||
"WHERE CreationTime>'"+s_+"'and CreationTime<'"+e_+"'");
|
||||
DataTable resultTable = await MainWindowViewModel.dataBase.ExecuteQueryAsync("SELECT "+
|
||||
f_+" FROM [dbo].[Dyelots] " + "WHERE CreationTime>'"+s_+"'and CreationTime<'"+e_+"'");
|
||||
//格式化返回信息
|
||||
data_.Add("Query", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
if (Command == "QueryDyelot")//回复QueryDyelot请求的信息
|
||||
{
|
||||
string d_ = deserialized.GetValue("DyelotName").ToString()!;
|
||||
string f_ = deserialized.GetValue("Field").ToString()!;
|
||||
|
||||
DataTable resultTable = await MainWindowViewModel.dataBase.ExecuteQueryAsync("SELECT " +
|
||||
f_ + " FROM [dbo].[Dyelots] " + "WHERE Dyelot LIKE '" + d_ + "%'");
|
||||
//格式化返回信息
|
||||
data_.Add("Query", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
if (Command == "QueryDetail")//回复info请求的信息
|
||||
{
|
||||
string d_ = deserialized.GetValue("Dyelot").ToString()!;
|
||||
string r_ = deserialized.GetValue("ReDye").ToString()!;
|
||||
string f_ = deserialized.GetValue("Field").ToString()!;
|
||||
|
||||
DataTable resultTable = await MainWindowViewModel.dataBase.ExecuteQueryAsync("SELECT " +
|
||||
f_ + " FROM [dbo].[DyelotsBulkedRecipe] " + "WHERE Dyelot='" + d_ + "'and ReDye='" + r_ + "'");
|
||||
//格式化返回信息
|
||||
data_.Add("QueryDetail", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
|
||||
await service.SendAsync(id, ret);
|
||||
|
||||
Reference in new issue
Block a user