|
|
|
@ -36,15 +36,12 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
///Task.Run(() =>
|
|
|
|
|
//{
|
|
|
|
|
// Thread.Sleep(3000);
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
plc1 = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc1"));
|
|
|
|
|
plc2 = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
|
|
|
|
|
plc3 = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc3"));
|
|
|
|
|
plc4 = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc4"));
|
|
|
|
|
//while (true)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
BoxTypeList.Clear();
|
|
|
|
|
HolderStatusList.Clear();
|
|
|
|
|
HolderOutPutList.Clear();
|
|
|
|
@ -84,29 +81,41 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
ReadStoreAmount(plc4, StoreAmountList);
|
|
|
|
|
for (int i = 0; i < 24; i++)
|
|
|
|
|
{
|
|
|
|
|
//if (listFixtureStatus.Count > 0)
|
|
|
|
|
//{
|
|
|
|
|
FixtureStatus model = new FixtureStatus();
|
|
|
|
|
model.ObjId = i + 1;
|
|
|
|
|
if (BoxTypeList.Count > 0) model.FixtureBoxType = BoxTypeList[i].ToString();
|
|
|
|
|
if (HolderStatusList.Count > 0) model.Status = HolderStatusList[i];
|
|
|
|
|
if (HolderOutPutList.Count > 0) model.Yield = HolderOutPutList[i];
|
|
|
|
|
if (SolidifyTimeList.Count > 0) model.PlanCuringTime = SolidifyTimeList[i];
|
|
|
|
|
|
|
|
|
|
if (BoxTypeList.Count > 0&& BoxTypeList!=null)
|
|
|
|
|
{
|
|
|
|
|
model.FixtureBoxType = BoxTypeList[i].ToString();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
model.FixtureBoxType = "";
|
|
|
|
|
}
|
|
|
|
|
if (HolderStatusList.Count > 0 && HolderStatusList != null)
|
|
|
|
|
{
|
|
|
|
|
model.Status = HolderStatusList[i];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
model.Status = HolderStatusList[i];
|
|
|
|
|
}
|
|
|
|
|
if (HolderOutPutList.Count > 0 && HolderOutPutList != null)
|
|
|
|
|
{
|
|
|
|
|
model.Yield = HolderOutPutList[i];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
model.Yield = 0;
|
|
|
|
|
}
|
|
|
|
|
if (SolidifyTimeList.Count > 0 && HolderOutPutList != null)
|
|
|
|
|
{
|
|
|
|
|
model.PlanCuringTime = SolidifyTimeList[i];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
model.PlanCuringTime = 0;
|
|
|
|
|
}
|
|
|
|
|
listFixtureStatus.Add(model);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// FixtureStatus model = new FixtureStatus();
|
|
|
|
|
// model.ObjId = i + 1;
|
|
|
|
|
// if (BoxTypeList.Count > 0) model.FixtureBoxType = BoxTypeList[i].ToString();
|
|
|
|
|
// if (HolderStatusList.Count > 0) model.Status = HolderStatusList[i];
|
|
|
|
|
// if (HolderOutPutList.Count > 0) model.Yield = HolderOutPutList[i];
|
|
|
|
|
// if (SolidifyTimeList.Count > 0) model.PlanCuringTime = SolidifyTimeList[i];
|
|
|
|
|
|
|
|
|
|
// listFixtureStatus.Add(model);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
|
{
|
|
|
|
@ -116,9 +125,6 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
if (StoreAmountList.Count > 0) model.StoreAmount = Convert.ToInt32(StoreAmountList[i]);
|
|
|
|
|
spaceDetailModel.Add(model);
|
|
|
|
|
}
|
|
|
|
|
// Thread.Sleep(10000);
|
|
|
|
|
//}
|
|
|
|
|
//});
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex.Message);
|
|
|
|
|