|
|
|
@ -12,6 +12,7 @@ using Aucma.Core.Tasks;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
@ -79,12 +80,6 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
_totle = $"总产量:{num}";
|
|
|
|
|
foreach (var item in prderList)
|
|
|
|
|
{
|
|
|
|
|
//OldBoxFoamDataModel model = new OldBoxFoamDataModel();
|
|
|
|
|
//model.ObjId = item.ObjId;
|
|
|
|
|
//model.Fixtureboxtype = item.FixtureBoxType;
|
|
|
|
|
//model.Fixturestatus = item.Status;
|
|
|
|
|
//model.Production = item.Yield;
|
|
|
|
|
//model.CuringTimeSettingValue = item.PlanCuringTime.ToString();
|
|
|
|
|
if (item.Status == 1)//生产
|
|
|
|
|
{
|
|
|
|
|
_statusColor.Add("green");
|
|
|
|
@ -96,9 +91,9 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
_fixtureName.Add(item.FixtureBoxType);
|
|
|
|
|
_production.Add(item.Yield);
|
|
|
|
|
//_beat.Add(item.BoxBeat);
|
|
|
|
|
i = +item.Yield;
|
|
|
|
|
_totle = _totle + item.Yield;
|
|
|
|
|
}
|
|
|
|
|
_totle = $"总产量:{i}";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
@ -106,6 +101,9 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
var prderList = Collection.listFixtureStatus;
|
|
|
|
|
int num = prderList.Sum(d => d.Yield);
|
|
|
|
|
_totle = $"总产量:{num}";
|
|
|
|
|
if (GetStoreTimer != null)
|
|
|
|
|
{
|
|
|
|
|
GetStoreTimer.Change(20000, Timeout.Infinite);
|
|
|
|
@ -341,9 +339,10 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
private async void ExecHourData(string productLineCode)
|
|
|
|
|
{
|
|
|
|
|
var boxList = Collection.listFixtureStatus;
|
|
|
|
|
foreach (var item in boxList)
|
|
|
|
|
if (boxList == null) return;
|
|
|
|
|
for (int j = 0; j < boxList.Count; j++)
|
|
|
|
|
{
|
|
|
|
|
OldBoxFoamType space = await _oldBoxFoamTypeServices.FirstAsync(d => d.Boxtype == item.FixtureBoxType);
|
|
|
|
|
OldBoxFoamType space = await _oldBoxFoamTypeServices.FirstAsync(d => d.Boxtype == boxList[j].FixtureBoxType);
|
|
|
|
|
//根据夹具找货道,根据货道找物料
|
|
|
|
|
if (space != null)
|
|
|
|
|
{
|
|
|
|
@ -353,27 +352,27 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
|
|
|
|
|
plan.CompleteAmount = plan.CompleteAmount + 1;
|
|
|
|
|
await _boxFoamPlanServices.UpdateAsync(plan);
|
|
|
|
|
//更新小时数据
|
|
|
|
|
BoxFoamData bfd = await _oldBoxFoamDataServices.FirstAsync(d => d.Fixtureboxtype == item.FixtureBoxType && d.MainId == item.ObjId);
|
|
|
|
|
BoxFoamData bfd = await _oldBoxFoamDataServices.FirstAsync(d => d.Fixtureboxtype == boxList[j].FixtureBoxType && d.MainId == boxList[j].ObjId);
|
|
|
|
|
if (bfd != null)
|
|
|
|
|
{
|
|
|
|
|
UpdateBoxData(item, bfd);
|
|
|
|
|
UpdateBoxData(boxList[j], bfd);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SaveBoxData(productLineCode, item);
|
|
|
|
|
SaveBoxData(productLineCode, boxList[j]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//更新小时数据
|
|
|
|
|
BoxFoamData bfd = await _oldBoxFoamDataServices.FirstAsync(d => d.Fixtureboxtype == item.FixtureBoxType && d.MainId == item.ObjId);
|
|
|
|
|
BoxFoamData bfd = await _oldBoxFoamDataServices.FirstAsync(d => d.Fixtureboxtype == boxList[j].FixtureBoxType && d.MainId == boxList[j].ObjId);
|
|
|
|
|
if (bfd != null)
|
|
|
|
|
{
|
|
|
|
|
UpdateBoxData(item, bfd);
|
|
|
|
|
UpdateBoxData(boxList[j], bfd);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SaveBoxData(productLineCode, item);
|
|
|
|
|
SaveBoxData(productLineCode, boxList[j]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|