change - 入库加载

collectionStore
wenjy 1 year ago
parent e6b53452da
commit 04aad9649b

Binary file not shown.

@ -104,8 +104,8 @@ namespace Aucma.Scada.Business
// { // {
// InStore(appConfig.shellStoreCode, "B2360000078110240" + i.ToString().PadLeft(2, '0')); // InStore(appConfig.shellStoreCode, "B2360000078110240" + i.ToString().PadLeft(2, '0'));
// Thread.Sleep(1000); // Thread.Sleep(1000);
// InStore(appConfig.linerStoreCode, "L2360000078810240" + i.ToString().PadLeft(2, '0')); // //InStore(appConfig.linerStoreCode, "L2360000078810240" + i.ToString().PadLeft(2, '0'));
// Thread.Sleep(1000); // //Thread.Sleep(1000);
// } // }
//}); //});
@ -194,6 +194,7 @@ namespace Aucma.Scada.Business
Task.Run(() => Task.Run(() =>
{ {
Thread.Sleep(5000);
while (true) while (true)
{ {
PassDownShellTask(); PassDownShellTask();
@ -203,6 +204,7 @@ namespace Aucma.Scada.Business
Task.Run(() => Task.Run(() =>
{ {
Thread.Sleep(5000);
while (true) while (true)
{ {
PassDownLinerTask(); PassDownLinerTask();

@ -227,6 +227,9 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
lock (string.Empty) lock (string.Empty)
{ {
try
{
taskItems = new ObservableCollection<RealTaskInfo>();
#region 通过数据库获取数据进行刷新 #region 通过数据库获取数据进行刷新
var info = inStoreBusiness.GetInStoreTask(); var info = inStoreBusiness.GetInStoreTask();
if (info != null) if (info != null)
@ -244,12 +247,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
materialTypeCombox = string.Empty; materialTypeCombox = string.Empty;
} }
taskItems = new ObservableCollection<RealTaskInfo>();
//info.ForEach(x => RefreshInStoreTask(x)); //info.ForEach(x => RefreshInStoreTask(x));
try try
{
if(info.Count > 0)
{ {
info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1 && !string.IsNullOrEmpty(materialTypeCombox) ? x.storeCode == materialTypeCombox : 1 == 1).ToList(); info = info.Where(x => !string.IsNullOrEmpty(search) ? x.materialCode == search : 1 == 1 && !string.IsNullOrEmpty(materialTypeCombox) ? x.storeCode == materialTypeCombox : 1 == 1).ToList();
App.Current.Dispatcher.BeginInvoke((Action)(() => App.Current.Dispatcher.BeginInvoke((Action)(() =>
@ -263,13 +262,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