change - 代码同步

collectionStore
wenjy 8 months ago
parent 1118273851
commit 96648e78c8

@ -35,12 +35,12 @@ namespace Aucma.Scada.Business
private PlcConfig plcConfig = PlcConfig.Instance; private PlcConfig plcConfig = PlcConfig.Instance;
private JsonChange jsonChange = JsonChange.Instance;
private PlcPool _pool = PlcPool.Instance; private PlcPool _pool = PlcPool.Instance;
private PlcSpaceConfig spaceConfig = PlcSpaceConfig.Instance; private PlcSpaceConfig spaceConfig = PlcSpaceConfig.Instance;
private JsonChange jsonChange = JsonChange.Instance;
/// <summary> /// <summary>
/// 实时任务 /// 实时任务
/// </summary> /// </summary>
@ -91,12 +91,6 @@ namespace Aucma.Scada.Business
public delegate void RefreshLinerStock(); public delegate void RefreshLinerStock();
public event RefreshLinerStock RefreshLinerStockEvent; public event RefreshLinerStock RefreshLinerStockEvent;
/// <summary>
/// 库容告警
/// </summary>
public delegate void SpaceCapacityAlarm(string storeCode,string spaceName);
public event SpaceCapacityAlarm SpaceCapacityAlarmEvent;
/// <summary> /// <summary>
/// 入库完成 /// 入库完成
@ -116,6 +110,12 @@ namespace Aucma.Scada.Business
public delegate void BareBoardHandle(string storeCode, bool isFlag = true); public delegate void BareBoardHandle(string storeCode, bool isFlag = true);
public event BareBoardHandle BareBoardHandleEvent; public event BareBoardHandle BareBoardHandleEvent;
/// <summary>
/// 库容告警
/// </summary>
public delegate void SpaceCapacityAlarm(string storeCode, string spaceName);
public event SpaceCapacityAlarm SpaceCapacityAlarmEvent;
#endregion #endregion
@ -158,9 +158,9 @@ namespace Aucma.Scada.Business
RefreshShellStockEvent?.Invoke(); RefreshShellStockEvent?.Invoke();
RefreshLinerStockEvent?.Invoke(); RefreshLinerStockEvent?.Invoke();
if((spaceInfo.spaceCapacity - spaceInfo.spaceStock) <= 5) if ((spaceInfo.spaceCapacity - spaceInfo.spaceStock) <= 5)
{ {
if(spaceInfo.storeCode == appConfig.shellStoreCode) if (spaceInfo.storeCode == appConfig.shellStoreCode)
{ {
ShellAlarmSpaceName.Add(spaceInfo.spaceName); ShellAlarmSpaceName.Add(spaceInfo.spaceName);
} }
@ -174,10 +174,10 @@ namespace Aucma.Scada.Business
if (ShellAlarmSpaceName.Count > 0) if (ShellAlarmSpaceName.Count > 0)
{ {
SpaceCapacityAlarmEvent?.Invoke(appConfig.shellStoreCode,jsonChange.ModeToJson(ShellAlarmSpaceName)); SpaceCapacityAlarmEvent?.Invoke(appConfig.shellStoreCode, jsonChange.ModeToJson(ShellAlarmSpaceName));
} }
if(LinerAlarmSpaceName.Count > 0) if (LinerAlarmSpaceName.Count > 0)
{ {
SpaceCapacityAlarmEvent?.Invoke(appConfig.linerStoreCode, jsonChange.ModeToJson(LinerAlarmSpaceName)); SpaceCapacityAlarmEvent?.Invoke(appConfig.linerStoreCode, jsonChange.ModeToJson(LinerAlarmSpaceName));
} }

Loading…
Cancel
Save