change - 入库任务加载问题修改

foamRearStore
wenjy 1 year ago
parent 6ae87cc309
commit ad83bc0b56

@ -203,6 +203,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
public void Query() public void Query()
{ {
lock (string.Empty) lock (string.Empty)
{
try
{ {
#region 通过数据库获取数据进行刷新 #region 通过数据库获取数据进行刷新
var info = inStoreBusiness.GetInStoreTask(); var info = inStoreBusiness.GetInStoreTask();
@ -211,8 +213,6 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
taskItems = new ObservableCollection<RealTaskInfo>(); taskItems = new ObservableCollection<RealTaskInfo>();
try try
{
if(info.Count > 0)
{ {
info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList(); info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1).ToList();
App.Current.Dispatcher.BeginInvoke((Action)(() => App.Current.Dispatcher.BeginInvoke((Action)(() =>
@ -226,13 +226,16 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
InstoreTask = taskItems; InstoreTask = taskItems;
})); }));
} }
}
catch (Exception ex) catch (Exception ex)
{ {
logHelper.Error("入库任务列表刷新异常", ex); logHelper.Error("入库任务列表刷新异常", ex);
} }
} }
#endregion #endregion
} catch (Exception ex)
{
logHelper.Error("入库任务加载异常", ex);
}
} }
} }

Loading…
Cancel
Save