软件增加功能:标定时记录上一次的历史电压

This commit is contained in:
hehaibing-1996
2024-11-12 08:33:28 +08:00
parent 6282ecc0c1
commit 40024b339d
13 changed files with 422 additions and 8 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,10 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WCS.Model.ApiModel.StoreInfo;
using WCS.Model;
using WCS管理系统.ViewModel;
using WCS管理系统.Api;
namespace WCS管理系统
{
@ -86,5 +90,50 @@ namespace 智能仓储WCS管理系统
{
;
}
private void MenuItem_Click(object sender, RoutedEventArgs e)
{
//先获取选中的模组
var storeInfo = viewModel.SelectedataGridItem;
#region
try
{
var body = new QueryStoreInfoHistoryVoltageRequest()
{
StoreIds = new List<int>() { storeInfo.Id },
UserName = LocalStatic.CurrentUser,
DeviceType = LocalFile.Config.DeviceType,
};
var Result = ApiHelp.GetDataFromHttp<ResponseCommon<List<StoreInfoHistoryVoltageModel>>>(LocalFile.Config.ApiIpHost + "storeInfo/queryStoreInfoHistoryVoltage", body, "POST");
if (Result != null && Result.Code == 200)
{
if (Result.Data == null || Result.Data.Count == 0)
{
Growl.Success("查询成功!该库位没有历史电压值数据!");
return;
}
else
{
Growl.Success("查询成功!请查看弹窗内数据!");
var window = new StoreInfoHistoryVoltageWindow(Result.Data, storeInfo.StoreCode);
window.ShowDialog();
}
}
else if (Result != null)
{
Growl.Success(Result.Message);
}
}
catch (Exception ex)
{
Growl.Warning("查询失败:" + ex.Message);
}
finally
{
}
#endregion
}
}
}