1.移植查询电压值功能
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using Ping9719.WpfEx;
|
||||
using HandyControl.Controls;
|
||||
using Ping9719.WpfEx;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -14,7 +15,11 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel.StoreInfo;
|
||||
using 货架标准上位机.Api;
|
||||
using 货架标准上位机.ViewModel;
|
||||
using 货架标准上位机.Views.Controls;
|
||||
|
||||
namespace 货架标准上位机
|
||||
{
|
||||
@ -66,7 +71,7 @@ namespace 货架标准上位机
|
||||
//dataGrid.UnselectAllCells(); // 取消选中所有单元格
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine("SelectionChanged event handler failed: " + ex.Message);
|
||||
}
|
||||
@ -91,8 +96,33 @@ namespace 货架标准上位机
|
||||
{
|
||||
//先获取选中的模组
|
||||
var module = viewModel.SelectedataGridItem;
|
||||
#region 调用接口 发送指令获取
|
||||
#region 调用接口 发送指令进行查询
|
||||
try
|
||||
{
|
||||
var body = new QueryModuleVoltageRequest()
|
||||
{
|
||||
MouduleIds = new List<int>() { module.Id },
|
||||
UserName = LocalStatic.CurrentUser,
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
var Result = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "storeInfo/queryModuleVoltage", body, "POST");
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
Growl.Success("操作成功:可以进行查询!");
|
||||
}
|
||||
else if (Result != null)
|
||||
{
|
||||
Growl.Success(Result.Message);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Error("操作失败:" + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
//连接不上加:SslMode=none;
|
||||
"MySql": "server=localhost;Database=db1;Uid=root;Pwd=123456;Convert Zero Datetime=True",
|
||||
//货架服务器的IP和端口号
|
||||
"ApiIpHost": "http://192.168.9.183:8888/",
|
||||
"ApiIpHost": "http://127.0.0.1:8888/",
|
||||
//WebSocket的地址
|
||||
"WebSocketUrl": "ws://192.168.9.183:7789/ws",
|
||||
"WebSocketUrl": "ws://127.0.0.1:7789/ws",
|
||||
//货架分区
|
||||
"GroupName": [ "C0"],
|
||||
//设备类型 可以配置为每个电脑不一样
|
||||
|
Reference in New Issue
Block a user