|
|
@ -1198,9 +1198,22 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
|
|
|
|
|
|
|
lastComplateAmount = sidePanelComplates.First().CompleteAmount;
|
|
|
|
lastComplateAmount = sidePanelComplates.First().CompleteAmount;
|
|
|
|
sidePanelComplate.OutPutAmount = complateAmount - lastComplateAmount;
|
|
|
|
sidePanelComplate.OutPutAmount = complateAmount - lastComplateAmount;
|
|
|
|
|
|
|
|
//判断是否重新下发的计划
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sidePanelComplate.OutPutAmount<0)//默认重新开始
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sidePanelComplate.CompleteAmount = 0;
|
|
|
|
|
|
|
|
sidePanelComplate.OutPutAmount = 0;
|
|
|
|
|
|
|
|
sidePanelComplate.OffLineAmount = 0;
|
|
|
|
|
|
|
|
_ = _sidePanelComplateServices.InsertSidePanelCimplate(sidePanelComplate).Result;
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sumComplateAmount = sidePanelComplates.Sum(x => x.OutPutAmount) + sidePanelComplate.OutPutAmount;
|
|
|
|
sumComplateAmount = sidePanelComplates.Sum(x => x.OutPutAmount) + sidePanelComplate.OutPutAmount;
|
|
|
|
// sumComplateAmount = complateAmount; // 改为plc读取的数量
|
|
|
|
|
|
|
|
|
|
|
|
// sumComplateAmount = complateAmount; // 改为plc读取的数量
|
|
|
|
if (sidePanelComplate.OutPutAmount == 0)
|
|
|
|
if (sidePanelComplate.OutPutAmount == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Thread.Sleep(5000);
|
|
|
|
Thread.Sleep(5000);
|
|
|
@ -1231,10 +1244,11 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
planInfo.CompleteAmount = sumComplateAmount;
|
|
|
|
planInfo.CompleteAmount = sumComplateAmount;
|
|
|
|
|
|
|
|
|
|
|
|
RefreshExecInfoEvent?.Invoke($"前板计划执行完成,:{planInfo.CompleteAmount}", "White");
|
|
|
|
RefreshExecInfoEvent?.Invoke($"前板计划执行完成,:{planInfo.CompleteAmount}", "White");
|
|
|
|
|
|
|
|
|
|
|
|
var r = _executePlanInfoServices.UpdateAsync(planInfo).Result;
|
|
|
|
var r = _executePlanInfoServices.UpdateAsync(planInfo).Result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ = _sidePanelComplateServices.InsertSidePanelCimplate(sidePanelComplate).Result;
|
|
|
|
_ = _sidePanelComplateServices.InsertSidePanelCimplate(sidePanelComplate).Result;
|
|
|
|
|
|
|
|
|
|
|
@ -1472,6 +1486,20 @@ namespace Aucma.Core.SheetMetalTasks
|
|
|
|
|
|
|
|
|
|
|
|
lastComplateAmount = backPanelComplates.First().CompleteAmount;//最新的完工数量
|
|
|
|
lastComplateAmount = backPanelComplates.First().CompleteAmount;//最新的完工数量
|
|
|
|
backPanelComplate.OutPutAmount = complateAmount - lastComplateAmount;//实际产量
|
|
|
|
backPanelComplate.OutPutAmount = complateAmount - lastComplateAmount;//实际产量
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否重新下发的计划
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (backPanelComplate.OutPutAmount < 0)//默认重新开始
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
backPanelComplate.CompleteAmount = 0;
|
|
|
|
|
|
|
|
backPanelComplate.OutPutAmount = 0;
|
|
|
|
|
|
|
|
backPanelComplate.OffLineAmount = 0;
|
|
|
|
|
|
|
|
_ = _backPanelComplateServices.InsertBackPanelCimplate(backPanelComplate).Result;
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sumComplateAmount = backPanelComplates.Sum(x => x.OutPutAmount) + backPanelComplate.OutPutAmount; //计划总产量
|
|
|
|
sumComplateAmount = backPanelComplates.Sum(x => x.OutPutAmount) + backPanelComplate.OutPutAmount; //计划总产量
|
|
|
|
|
|
|
|
|
|
|
|
//sumComplateAmount = sidePanelComplates.Sum(x => x.OutPutAmount) + sidePanelComplate.OutPutAmount;
|
|
|
|
//sumComplateAmount = sidePanelComplates.Sum(x => x.OutPutAmount) + sidePanelComplate.OutPutAmount;
|
|
|
|