1.移植查询电压值功能

This commit is contained in:
hehaibing-1996
2024-05-28 20:09:24 +08:00
parent ac14b22507
commit 08850a2f15
9 changed files with 227 additions and 6 deletions

View File

@ -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
}
}

View File

@ -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"],
//设备类型 可以配置为每个电脑不一样