change - 入库更新优化

foamRearStore
wenjy 1 year ago
parent b3a7d61be3
commit 744640fed0

Binary file not shown.

@ -99,9 +99,9 @@ namespace Aucma.Scada.Business
//Task.Run(() => //Task.Run(() =>
//{ //{
// Thread.Sleep(6000); // 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) if (spaceInfo != null)
{ {
//读取PLC获取货道信息存放数量、在途数量 //读取PLC获取货道信息存放数量、在途数量
//实际应用改为读取PLC库存信息
spaceInfo.materialType = taskInfo.materialType; spaceInfo.materialType = taskInfo.materialType;
spaceInfo.spaceStock = spaceInfo.spaceStock + 1; spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
spaceInfo.onRouteAmount -= 1;
_spaceInfoService.UpdateSpaceInfo(spaceInfo); _spaceInfoService.UpdateSpaceInfo(spaceInfo);
#region 添加货道明细 #region 添加货道明细
BaseSpaceDetail spaceDetail = new BaseSpaceDetail(); BaseSpaceDetail spaceDetail = new BaseSpaceDetail();
spaceDetail.materialType = taskInfo.materialType; spaceDetail.materialType = taskInfo.materialType;

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

@ -212,16 +212,15 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
//info.ForEach(x => RefreshInStoreTask(x)); //info.ForEach(x => RefreshInStoreTask(x));
try try
{ {
foreach (var item in info) App.Current.Dispatcher.BeginInvoke((Action)(() =>
{ {
foreach (var item in info)
App.Current.Dispatcher.Invoke((Action)(() =>
{ {
item.materialType = inStoreBusiness.GetMaterialName(item.materialType); item.materialType = inStoreBusiness.GetMaterialName(item.materialType);
taskItems.Add(item); taskItems.Add(item);
InstoreTask = taskItems; InstoreTask = taskItems;
})); }
} }));
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -256,10 +255,8 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
var info = inStoreBusiness.GetFoamStoreStock(); var info = inStoreBusiness.GetFoamStoreStock();
App.Current.Dispatcher.Invoke((Action)(() => App.Current.Dispatcher.BeginInvoke((Action)(() =>
{ {
Query();
if (info != null) if (info != null)
{ {
Achievement.Clear(); Achievement.Clear();
@ -290,6 +287,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
{ {
if (isFinsih) if (isFinsih)
{ {
Query();
Init(); Init();
} }
else else

Loading…
Cancel
Save