change - 入库刷新优化

collectionStore
wenjy 11 months ago
parent 6444579446
commit 64e2d2dfb2

Binary file not shown.

@ -98,8 +98,8 @@ namespace Aucma.Scada.Business
// Thread.Sleep(6000);
// for (int i = 1; i < 7; i++)
// {
// //InStore(appConfig.shellStoreCode, "B23600000781101902" + i);
// InStore(appConfig.linerStoreCode, "L23600000788101902" + i);
// //InStore(appConfig.shellStoreCode, "B23600000781102300" + i);
// InStore(appConfig.linerStoreCode, "L23600000788102300" + i);
// }
//});
@ -350,6 +350,7 @@ namespace Aucma.Scada.Business
InStoreFinish(taskCode, appConfig.shellStoreCode);
shellSemaphore.Release();
}
/// <summary>
@ -358,8 +359,11 @@ namespace Aucma.Scada.Business
private void LinerTaskFeedback(string taskCode)
{
PrintLogInfoMessage("内胆执行完成,自动释放信号量");
InStoreFinish(taskCode, appConfig.linerStoreCode);
linerSemaphore.Release();
}
#endregion
@ -380,9 +384,11 @@ namespace Aucma.Scada.Business
if (spaceInfo != null)
{
//读取PLC获取货道信息存放数量、在途数量
//读取PLC获取货道信息存放数量、在途数量,
//实际应用改为读取PLC库存信息
spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
spaceInfo.onRouteAmount -= 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
#region 添加货道明细

@ -283,11 +283,11 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
/// </summary>
public void Init()
{
App.Current.Dispatcher.Invoke((Action)(() =>
{
var planInfos = assemblyPlanBusiness.GetEexecutePlanInfosByProductLineCode();
RefreshDataGrid(planInfos);
var planInfos = assemblyPlanBusiness.GetEexecutePlanInfosByProductLineCode();
RefreshDataGrid(planInfos);
if (planInfos != null)
{
//加载正在执行的计划
planInfos = planInfos.Where(x => x.executeStatus == 2).ToList();
if (planInfos.Count > 0)
@ -295,7 +295,10 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
ExecutePlanInfo planInfo = planInfos.OrderBy(x => x.executeOrder).First();
RefreshPlanExecute(planInfo);
}
}
App.Current.Dispatcher.Invoke((Action)(() =>
{
MaterialNameList = new List<string>()
{
"SC232",

@ -235,16 +235,16 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
//info.ForEach(x => RefreshInStoreTask(x));
try
{
foreach (var item in info)
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
App.Current.Dispatcher.Invoke((Action)(() =>
foreach (var item in info)
{
item.materialType = inStoreBusiness.GetMaterialName(item.materialType);
taskItems.Add(item);
InstoreTask = taskItems;
}));
}
}
}));
}
catch (Exception ex)
{
@ -288,9 +288,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
{
ChartValues<double> achievement = new ChartValues<double>();
ChartValues<double> achievement2 = new ChartValues<double>();
App.Current.Dispatcher.Invoke((Action)(() =>
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
Query();
Achievement.Clear();
MaterialNameList = new List<string>()
{
@ -334,20 +333,10 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
/// <param name="taskInfo"></param>
private void RefreshInStoreTask(RealTaskInfo taskInfo, bool isFinsih = false)
{
//try
//{
// App.Current.Dispatcher.Invoke((Action)(() =>
// {
// taskItems.Add(taskInfo);
// InstoreTask = taskItems;
// }));
//}
//catch (Exception ex)
//{
// logHelper.Error("入库任务列表刷新异常", ex);
//}
if (isFinsih)
{
Query();
Init();
}
else

@ -94,7 +94,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
private void Query()
{
App.Current.Dispatcher.Invoke((Action)(() =>
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
var info = inventoryInfoBusiness.GetSpaceInfos(appConfig.linerStoreCode);
if (info != null)

Loading…
Cancel
Save