|
|
|
@ -17,6 +17,7 @@ using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using System.Runtime.InteropServices.WindowsRuntime;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
|
|
|
|
namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
@ -41,16 +42,14 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
|
inStoreBusiness.RefreshScanMateriaCodeEvent += RefreshScanInfo;
|
|
|
|
|
inStoreBusiness.RefreshLogMessageEvent += PrintMessageToListBox;
|
|
|
|
|
outStoreBusiness.RefreshStoreStockEvent += Init;
|
|
|
|
|
inStoreTaskHandle.SpaceCapacityAlarmEvent += (storeCode, spaceName) =>
|
|
|
|
|
|
|
|
|
|
inStoreTaskHandle.SpaceCapacityAlarmEvent += async (storeCode, spaceName) =>
|
|
|
|
|
{
|
|
|
|
|
if(storeCode == appConfig.shellStoreCode)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxTimeoutA((IntPtr)0, $"箱壳库货道预警:{spaceName};库存即将放满请尽快清理库存,3秒后关闭提示", "告警提示", 0, 0, 3000);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageBoxTimeoutA((IntPtr)0, $"箱壳库货道预警:{spaceName};库存即将放满请尽快清理库存,3秒后关闭提示", "告警提示", 0, 0, 3000);
|
|
|
|
|
}
|
|
|
|
|
// MessageBoxTimeoutA((IntPtr)0, $"货道预警:{spaceName};库存即将放满请尽快清理库存,10秒后关闭提示", "告警提示", 0, 0, 10000);
|
|
|
|
|
|
|
|
|
|
AlarmMessage = $"货道预警:{spaceName}库存即将放满请尽快清理库存";
|
|
|
|
|
Task.Delay(1000*10).Wait();
|
|
|
|
|
AlarmMessage = string.Empty;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
QueryCommand = new RelayCommand(Query);
|
|
|
|
@ -124,6 +123,12 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
|
set { linerSpaceName = value; RaisePropertyChanged(nameof(LinerSpaceName)); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string alarmMessage = string.Empty;
|
|
|
|
|
public string AlarmMessage
|
|
|
|
|
{
|
|
|
|
|
get { return alarmMessage; }
|
|
|
|
|
set { alarmMessage = value; RaisePropertyChanged(nameof(AlarmMessage)); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// LisBox数据模板
|
|
|
|
@ -297,7 +302,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
logHelper.Error("入库任务加载异常", ex);
|
|
|
|
|
}
|
|
|
|
@ -365,7 +371,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
|
Achievement.Add(shellColumn);
|
|
|
|
|
Achievement.Add(linerColumn);
|
|
|
|
|
}));
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
logHelper.Error(ex.Message.ToString());
|
|
|
|
|
}
|
|
|
|
@ -378,7 +385,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private string SubStringByName(string name)
|
|
|
|
|
{
|
|
|
|
|
if(string.IsNullOrEmpty(name)) return string.Empty;
|
|
|
|
|
if (string.IsNullOrEmpty(name)) return string.Empty;
|
|
|
|
|
string result = string.Empty;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|