Procházet zdrojové kódy

更新状态

样式分支
fyf před 2 roky
rodič
revize
cdfc65c23b
8 změnil soubory, kde provedl 18 přidání a 16 odebrání
  1. +1
    -0
      BPASmartClient.DRCoffee/CoffeeMachine.cs
  2. +2
    -0
      BPASmartClient.Device/BaseDevice.cs
  3. +1
    -0
      BPASmartClient.GSIceCream/IceCreamMachine.cs
  4. +7
    -3
      BPASmartClient.IoT/DataVClient.cs
  5. +1
    -0
      BPASmartClient.KLMCoffee/CoffeeMachine.cs
  6. +2
    -0
      BPASmartClient.Lebai/LebaiRobot.cs
  7. +1
    -1
      BPASmartClient.SCChip/ICChipMachine.cs
  8. +3
    -12
      BPASmartClient.ViewModel/LogViewModel.cs

+ 1
- 0
BPASmartClient.DRCoffee/CoffeeMachine.cs Zobrazit soubor

@@ -228,6 +228,7 @@ namespace BPASmartClient.DRCoffee
MessageLog.GetInstance.ShowEx($"BPASmartClient.DRCoffee 中引发错误,CoffeeMachine 类,描述:[{ex.Message}]");
}
});
InitStatus();
}

}


+ 2
- 0
BPASmartClient.Device/BaseDevice.cs Zobrazit soubor

@@ -60,6 +60,7 @@ namespace BPASmartClient.Device
{
p.DeviceId = this.DeviceId;
p.Init();
});
this.peripherals = peripherals;
}
@@ -73,6 +74,7 @@ namespace BPASmartClient.Device
foreach (var key in peripheral.GetAllStatus().Keys)
{
peripheralStatus[key] = peripheral.GetAllStatus()[key];
Status.Update(key, peripheral.GetAllStatus()[key]);
}
}
Thread.Sleep(100);


+ 1
- 0
BPASmartClient.GSIceCream/IceCreamMachine.cs Zobrazit soubor

@@ -329,6 +329,7 @@ namespace BPASmartClient.GSIceCream
MessageLog.GetInstance.ShowEx($"BPASmartClient.GSIceCream 中引发错误,IceCreamMachine 类,描述:[{ex.Message}]");
}
});
InitStatus();
}
}



+ 7
- 3
BPASmartClient.IoT/DataVClient.cs Zobrazit soubor

@@ -139,7 +139,12 @@ namespace BPASmartClient.IoT
List<object> dataVNode = new List<object>();
Plugin.GetInstance()?.GetPlugin<DeviceMgr>()?.GetDevices()?.ForEach(device =>
{
var obj=new
Dictionary<string, object> keys=new Dictionary<string, object>();
keys["电机"] = "正常";
keys["电机"] = "正常";
keys["电机"] = "正常";
keys["电机"] = "正常";
var obj =new
{
DeviceId=device.DeviceId,
Name=device.Name,
@@ -151,11 +156,10 @@ namespace BPASmartClient.IoT
Status = device.Status.GetStatus(),
};
dataVNode.Add(obj);
dataVNode.Add(obj); dataVNode.Add(obj); dataVNode.Add(obj); dataVNode.Add(obj); dataVNode.Add(obj); dataVNode.Add(obj); dataVNode.Add(obj);
});
if (dataVNode.Count > 0)
{
iOTDevSXModel.KZSX = Tools.JsonConvertTools<DevSX>(new DevSX { data = new List<DevSXBase> { new DevSXBase { SXMC = "", SXLX = "" } } });
iOTDevSXModel.JBSX = Tools.JsonConvertTools<DevSX>(new DevSX { data = new List<DevSXBase> { new DevSXBase { SXMC = "", SXLX = "" } } });
iOTDevSXModel.NodeStatus = Tools.JsonConvertTools(new { data = dataVNode });
DeviceDataV.IOT_Publish(DeviceDataV.PubTopic, iOTDevSXModel.Tojson());
}


+ 1
- 0
BPASmartClient.KLMCoffee/CoffeeMachine.cs Zobrazit soubor

@@ -283,6 +283,7 @@ namespace BPASmartClient.KLMCoffee
MessageLog.GetInstance.ShowEx($"BPASmartClient.KLMCoffee 中引发错误,CoffeeMachine 类,描述:[{ex.Message}]");
}
});
InitStatus();
}




+ 2
- 0
BPASmartClient.Lebai/LebaiRobot.cs Zobrazit soubor

@@ -238,6 +238,7 @@ namespace BPASmartClient.Lebai
public override void Start()
{
Connect(IpAddress);
}

public override void Stop()
@@ -250,6 +251,7 @@ namespace BPASmartClient.Lebai
{

});
InitStatus();
}
}
}

+ 1
- 1
BPASmartClient.SCChip/ICChipMachine.cs Zobrazit soubor

@@ -377,7 +377,7 @@ namespace BPASmartClient.SCChip
MessageLog.GetInstance.ShowEx($"BPASmartClient.SCChip 中引发错误,ICChipMachine 类,描述:[{ex.Message}]");
}
});
InitStatus();
}
}



+ 3
- 12
BPASmartClient.ViewModel/LogViewModel.cs Zobrazit soubor

@@ -22,7 +22,7 @@ namespace BPASmartClient.ViewModel
/// </summary>
public class LogViewModel :ObservableObject
{
public DispatcherTimer dispatcherTimer;
//public DispatcherTimer dispatcherTimer;
public string ClientId= System.Configuration.ConfigurationManager.AppSettings["ClientId"].ToString();
private ObservableCollection<LogModel> _LogModels;
public ObservableCollection<LogModel> LogDataGrid
@@ -63,7 +63,7 @@ namespace BPASmartClient.ViewModel
LogTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
LogType = "严重",
LogMessage = s,
LogVla = "错误日志",
LogVla = "错误日志"
});
}));
});
@@ -71,16 +71,6 @@ namespace BPASmartClient.ViewModel
{
ExcellOrder();
});

//dispatcherTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };//1秒一流转
//dispatcherTimer.Tick += delegate
//{
// if (TimedClear)
// {
// }
//};
//dispatcherTimer.Start();
}

/// <summary>
@@ -129,6 +119,7 @@ namespace BPASmartClient.ViewModel
System.Windows.MessageBox.Show("无数据!");

}

/// <summary>
/// 打开指定路径下文件,比如:Word、Excel、Dll、图片等都可以(前提是你已经安装打开程序的对应软件)
/// </summary>


Načítá se…
Zrušit
Uložit