change - 入库更新优化

foamRearStore
wenjy 1 year ago
parent b3a7d61be3
commit 744640fed0

Binary file not shown.

@ -99,9 +99,9 @@ namespace Aucma.Scada.Business
//Task.Run(() =>
//{
// Thread.Sleep(6000);
// for (int i = 1; i < 3; i++)
// for (int i = 1; i < 9; i++)
// {
// InStore("F23406001225101900" + i);
// InStore("F23406001225101901" + i);
// }
//});
}
@ -304,10 +304,11 @@ namespace Aucma.Scada.Business
if (spaceInfo != null)
{
//读取PLC获取货道信息存放数量、在途数量
//实际应用改为读取PLC库存信息
spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
spaceInfo.onRouteAmount -= 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
#region 添加货道明细
BaseSpaceDetail spaceDetail = new BaseSpaceDetail();
spaceDetail.materialType = taskInfo.materialType;

@ -259,11 +259,13 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
private void RefreshPlanInfoDataGrid()
{
App.Current.Dispatcher.Invoke((Action)(() =>
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
var planInfos = assemblyPlanBusiness.GetEexecutePlanInfosByProductLineCode();
RefreshDataGrid(planInfos);
if(planInfos != null)
{
//加载正在执行的计划
planInfos = planInfos.Where(x => x.executeStatus == 2).ToList();
if (planInfos.Count > 0)
@ -271,6 +273,7 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
ExecutePlanInfo planInfo = planInfos.OrderBy(x => x.executeOrder).First();
RefreshPlanExecute(planInfo);
}
}
OrderCode = string.Empty;
PlanCode = string.Empty;

@ -212,16 +212,15 @@ 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)
{
@ -256,10 +255,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
var info = inStoreBusiness.GetFoamStoreStock();
App.Current.Dispatcher.Invoke((Action)(() =>
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
Query();
if (info != null)
{
Achievement.Clear();
@ -290,6 +287,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
{
if (isFinsih)
{
Query();
Init();
}
else

Loading…
Cancel
Save