|
|
|
@ -19,12 +19,7 @@ using System.Windows.Shapes;
|
|
|
|
|
using System.Timers;
|
|
|
|
|
using Aucma.Core.BoxFoam.Models;
|
|
|
|
|
using Admin.Core.Model;
|
|
|
|
|
using Admin.Core.Model.Model_New;
|
|
|
|
|
using Admin.Core.Model.ViewModels;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using Aucma.Core.HwPLc;
|
|
|
|
|
using Castle.Core.Internal;
|
|
|
|
|
using Admin.Core.Repository;
|
|
|
|
|
|
|
|
|
|
namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
{
|
|
|
|
@ -274,8 +269,8 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 夹具节拍
|
|
|
|
|
private ObservableCollection<int> _beat = new ObservableCollection<int>();
|
|
|
|
|
public ObservableCollection<int> Beat
|
|
|
|
|
private ObservableCollection<string> _beat = new ObservableCollection<string>();
|
|
|
|
|
public ObservableCollection<string> Beat
|
|
|
|
|
{
|
|
|
|
|
get => _beat;
|
|
|
|
|
set => SetProperty(ref _beat, value);
|
|
|
|
@ -308,7 +303,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
if (!string.IsNullOrEmpty(item.Yield.ToString())) Production.Add(item.Yield.ToString());
|
|
|
|
|
if (!string.IsNullOrEmpty(item.InternalTemperature.ToString())) InternalTemperature.Add(item.InternalTemperature.ToString());
|
|
|
|
|
if (!string.IsNullOrEmpty(item.OutsideTemperature.ToString())) OutsideTemperature.Add(item.OutsideTemperature.ToString());
|
|
|
|
|
if (!string.IsNullOrEmpty(item.ProductionCycle.ToString())) Beat.Add(item.ProductionCycle);
|
|
|
|
|
if (!string.IsNullOrEmpty(item.ProductionCycle.ToString())) Beat.Add(item.ProductionCycle.ToString());
|
|
|
|
|
|
|
|
|
|
totalAmount = totalAmount + item.Yield;
|
|
|
|
|
}
|
|
|
|
@ -334,16 +329,16 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
{
|
|
|
|
|
string productLineCode = Appsettings.app("StationInfo", "ProductLineCode");
|
|
|
|
|
|
|
|
|
|
DateTime now = DateTime.Now;
|
|
|
|
|
CurrentTeamTime time = await _currentTeamTimeServices.FirstAsync(d => d.StartTime <= now && d.EndTime >= now);
|
|
|
|
|
if (time != null)
|
|
|
|
|
{
|
|
|
|
|
//DateTime now = DateTime.Now;
|
|
|
|
|
//CurrentTeamTime time = await _currentTeamTimeServices.FirstAsync(d => d.StartTime <= now && d.EndTime >= now);
|
|
|
|
|
//if (time != null)
|
|
|
|
|
//{
|
|
|
|
|
ExecHourDataAsync(productLineCode);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ShiftChangeAsync(productLineCode);
|
|
|
|
|
}
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// //ShiftChangeAsync(productLineCode);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -386,6 +381,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
plan.CompleteAmount = plan.CompleteAmount + complateAmount;
|
|
|
|
|
if (complateAmount>0)
|
|
|
|
|
{
|
|
|
|
|
//保存历史记录
|
|
|
|
|
BoxFoamDataRealTimeHistory history = new BoxFoamDataRealTimeHistory();
|
|
|
|
|
|
|
|
|
|
history.PlantCode = bfd.PlantCode;
|
|
|
|
@ -398,7 +394,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
|
|
|
|
|
history.ModeInternaltemperature = bLis[j].InternalTemperature;
|
|
|
|
|
history.ModeOutsidetemperature = bLis[j].InternalTemperature;
|
|
|
|
|
history.UpdatedTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
//事务合并
|
|
|
|
|
await _boxFoamDataRealTimeHistoryServices.AddAsync(history);
|
|
|
|
|
await _boxFoamPlanServices.UpdateAsync(plan);
|
|
|
|
|
}
|
|
|
|
|