Browse Source

食堂更新

煮面机(新)
lyw 1 month ago
parent
commit
298f2f4b93
4 changed files with 9 additions and 8 deletions
  1. +5
    -3
      BPASmartClient.Business/Plugin/StatusMgr.cs
  2. +2
    -2
      BPASmartClient.Device/DeviceStatus.cs
  3. +0
    -1
      BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
  4. +2
    -2
      BPASmartClient/App.xaml.cs

+ 5
- 3
BPASmartClient.Business/Plugin/StatusMgr.cs View File

@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;

namespace BPASmartClient.Business
{
@@ -22,7 +23,7 @@ namespace BPASmartClient.Business
private bool wholeDeviceHealth;


private Dictionary<int, Dictionary<string, object>> wholeDeviceStatus = new Dictionary<int, Dictionary<string, object>>();
private ConcurrentDictionary<int, ConcurrentDictionary<string, object>> wholeDeviceStatus = new ConcurrentDictionary<int, ConcurrentDictionary<string, object>>();

public void Initialize()
{
@@ -41,7 +42,7 @@ namespace BPASmartClient.Business
wholeDeviceHealth = true;
foreach (var device in deviceMgr.GetDevices())
{
wholeDeviceStatus[device.DeviceId] = device.Status.GetStatus();
wholeDeviceStatus[device.DeviceId] = device.Status.GetStatus();
}
Thread.Sleep(50);
}
@@ -56,7 +57,8 @@ namespace BPASmartClient.Business
wholeDeviceHealth = true;
foreach (var device in deviceMgr.GetDevices())
{
wholeDeviceStatus[device.DeviceId] = device.Status.GetStatus();
var s = device.Status.GetStatus();
wholeDeviceStatus[device.DeviceId] = s;

deviceStatus.Healthy = device.IsHealth ? BPA.Message.Enum.DeviceHealthy.Health : BPA.Message.Enum.DeviceHealthy.UnHealth;
deviceStatus.DeviceType = device.DeviceType;


+ 2
- 2
BPASmartClient.Device/DeviceStatus.cs View File

@@ -50,9 +50,9 @@ namespace BPASmartClient.Device
status.AddOrUpdate(key, value, (key, value) => value);
}

public Dictionary<string, object> GetStatus()
public ConcurrentDictionary<string, object> GetStatus()
{
return status.ToDictionary(x => x.Key, x => x.Value);
return status;
}

public object GetIOTStatus()


+ 0
- 1
BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs View File

@@ -610,7 +610,6 @@ namespace BPASmartClient.MorkSUpgradedVer
private void DataParse()
{

EventBus.GetInstance().Subscribe<DoOrderEvent>(DeviceId, delegate (IEvent @event, EventCallBackHandle callBackHandle)
{
if (@event == null)


+ 2
- 2
BPASmartClient/App.xaml.cs View File

@@ -31,7 +31,7 @@ namespace BPASmartClient
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
InternetInfo.IsEnableNetwork = false;
InternetInfo.IsEnableNetwork = true;
DataRead();
SystemHelper.GetInstance.CreateDesktopShortcut();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
@@ -39,7 +39,7 @@ namespace BPASmartClient
MainWindow mainView = new MainWindow();
mainView.Show();

SplitScreenDisplay();
//SplitScreenDisplay();
//NoCompleteOrderInit();
ActionManage.GetInstance.Register(new Action<object>(par =>
{


Loading…
Cancel
Save