|
@@ -34,78 +34,104 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
public partial class YaweiPressBrakeOneWidget : BaseUserControl
|
|
|
{
|
|
|
private static SqlSchema.DIL.DILDB DAL = Env.SqlDAL;
|
|
|
- private List<YaweiPressBrakeOneModel> pressBrakeOneValue = new List<YaweiPressBrakeOneModel>();
|
|
|
- private List<YaweiPressBrakeOneModel> pressBrakeTwoValue = new List<YaweiPressBrakeOneModel>();
|
|
|
- private List<YaweiPressBrakeOneModel> pressBrakeThreeValue = new List<YaweiPressBrakeOneModel>();
|
|
|
- private List<YaweiPressBrakeOneModel> pressBrakeFourValue = new List<YaweiPressBrakeOneModel>();
|
|
|
- private List<YaweiPressBrakeOneModel> pressBrakeFiveValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+ //private List<YaweiPressBrakeOneModel> pressBrakeOneValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+ //private List<YaweiPressBrakeOneModel> pressBrakeTwoValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+ //private List<YaweiPressBrakeOneModel> pressBrakeThreeValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+ //private List<YaweiPressBrakeOneModel> pressBrakeFourValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+ //private List<YaweiPressBrakeOneModel> pressBrakeFiveValue = new List<YaweiPressBrakeOneModel>();
|
|
|
+
|
|
|
+ private List<LaserMmachinePieChartModel> pressBrakeOneValue = new List<LaserMmachinePieChartModel>();
|
|
|
+ private List<LaserMmachinePieChartModel> pressBrakeTwoValue = new List<LaserMmachinePieChartModel>();
|
|
|
+ private List<LaserMmachinePieChartModel> pressBrakeThreeValue = new List<LaserMmachinePieChartModel>();
|
|
|
+ private List<LaserMmachinePieChartModel> pressBrakeFourValue = new List<LaserMmachinePieChartModel>();
|
|
|
+ private List<LaserMmachinePieChartModel> pressBrakeFiveValue = new List<LaserMmachinePieChartModel>();
|
|
|
public YaweiPressBrakeOneWidget()
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
|
|
|
GetDBData();
|
|
|
GetScheduleStopTime();
|
|
|
- string[] bending = { "运行", "等待", "换模" };
|
|
|
+ GetTableTime();
|
|
|
+ string[] deviceStatus = { "运行", "等待", "报警/维修", "换模" };
|
|
|
var firstYaWeiRunTime = DeviceTimeValue("1号YaWei折弯机", "运行标志位");//1号YaWei折弯机运行时间
|
|
|
- var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位")- DevicScheduleStop("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
+ //var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位")- DevicScheduleStop("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
var firstYaWeiMoldTime = DeviceTimeValue("1号YaWei折弯机", "换模标志位");//1号YaWei折弯机换模时间
|
|
|
|
|
|
var sencondYaWeiRunTime = DeviceTimeValue("2号YaWei折弯机", "运行标志位");//2号YaWei折弯机运行时间
|
|
|
- var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicScheduleStop("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
+ //var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicScheduleStop("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
var sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
|
|
|
var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
- var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicScheduleStop("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
+ //var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicScheduleStop("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
|
|
|
var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
- var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicScheduleStop("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
+ //var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicScheduleStop("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
|
|
|
var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
- var baiChaoStopTime = DeviceTimeValue("百超折弯机", "停止标志位") - DevicScheduleStop("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
+ //var baiChaoStopTime = DeviceTimeValue("百超折弯机", "停止标志位") - DevicScheduleStop("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
|
|
|
- var firstYaWeiValueTime = new double[] { firstYaWeiRunTime, firstYaWeiStopTime , firstYaWeiMoldTime };
|
|
|
- var sencondYaWeiValueTime = new double[] { sencondYaWeiRunTime, sencondYaWeiStopTime, sencondYaWeiMoldTime };
|
|
|
- var thirdYaWeiValueTime = new double[] { thirdYaWweiRunTime, thirdYaWweiStopTime, thirdYaWweiMoldTime };
|
|
|
- var pbcYaWeiValueTime = new double[] { pbcYaWweiRunTime,pbcYaWweiStopTime,pbcYaWweiMoldTime };
|
|
|
- var baiChaoValueTime = new double[] { baiChaoRunTime, baiChaoStopTime , baiChaoMoldTime };
|
|
|
-
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
+ double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
+ var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间");//1号YaWei折弯机等待时间
|
|
|
+ var sencondYaWeiStopTime = totalTimeOfDay - sencondYaWeiRunTime - sencondYaWeiMoldTime - DevicScheduleStop("2号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间");//2号YaWei折弯机等待时间
|
|
|
+ var thirdYaWweiStopTime = totalTimeOfDay - thirdYaWweiRunTime - thirdYaWweiMoldTime - DevicScheduleStop("3号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间");//3号YaWei折弯机等待时间
|
|
|
+ var pbcYaWweiStopTime = totalTimeOfDay - pbcYaWweiRunTime - pbcYaWweiMoldTime - DevicScheduleStop("亚威PBC折弯机")
|
|
|
+ - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间");//亚威PBC折弯机等待时间
|
|
|
+ var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
|
|
|
+ - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
|
|
|
+
|
|
|
+
|
|
|
+ var firstYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威一号折弯机").TotalSeconds + DeviceTimeValue("1号YaWei折弯机", "维修时间");
|
|
|
+ var secondYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威二号折弯机").TotalSeconds + DeviceTimeValue("2号YaWei折弯机", "维修时间");
|
|
|
+ var thirdYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威三号折弯机").TotalSeconds + DeviceTimeValue("3号YaWei折弯机", "维修时间");
|
|
|
+ var pbcYaWweiTimeMaintenanceTable = DevicMainTableTime("亚威PBC折弯机").TotalSeconds + DeviceTimeValue("亚威PBC折弯机", "维修时间");
|
|
|
+ var baiChaoTimeMaintenanceTable = DevicMainTableTime("百超折弯机").TotalSeconds+ DeviceTimeValue("百超折弯机", "维修时间");
|
|
|
+
|
|
|
+ var firstYaWeiValueTime = new double[] { firstYaWeiRunTime, firstYaWeiStopTime, firstYaWeiTimeMaintenanceTable, firstYaWeiMoldTime };
|
|
|
+ var sencondYaWeiValueTime = new double[] { sencondYaWeiRunTime, sencondYaWeiStopTime, secondYaWeiTimeMaintenanceTable, sencondYaWeiMoldTime };
|
|
|
+ var thirdYaWeiValueTime = new double[] { thirdYaWweiRunTime, thirdYaWweiStopTime, thirdYaWeiTimeMaintenanceTable, thirdYaWweiMoldTime };
|
|
|
+ var pbcYaWeiValueTime = new double[] { pbcYaWweiRunTime, pbcYaWweiStopTime, pbcYaWweiTimeMaintenanceTable, pbcYaWweiMoldTime };
|
|
|
+ var baiChaoValueTime = new double[] { baiChaoRunTime, baiChaoStopTime, baiChaoTimeMaintenanceTable, baiChaoMoldTime };
|
|
|
+
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
{
|
|
|
- pressBrakeOneValue.Add(new YaweiPressBrakeOneModel() { ItemName = bending[k], Value = firstYaWeiValueTime[k], MyProperty = k });
|
|
|
+ pressBrakeOneValue.Add(new LaserMmachinePieChartModel() { ItemName = deviceStatus[k], Value = firstYaWeiValueTime[k], MyProperty = k });
|
|
|
|
|
|
}
|
|
|
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
{
|
|
|
- pressBrakeTwoValue.Add(new YaweiPressBrakeOneModel() { ItemName = bending[k], Value = sencondYaWeiValueTime[k], MyProperty = k });
|
|
|
+ pressBrakeTwoValue.Add(new LaserMmachinePieChartModel() { ItemName = deviceStatus[k], Value = sencondYaWeiValueTime[k], MyProperty = k });
|
|
|
}
|
|
|
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
{
|
|
|
- pressBrakeThreeValue.Add(new YaweiPressBrakeOneModel() { ItemName = bending[k], Value = thirdYaWeiValueTime[k], MyProperty = k });
|
|
|
+ pressBrakeThreeValue.Add(new LaserMmachinePieChartModel() { ItemName = deviceStatus[k], Value = thirdYaWeiValueTime[k], MyProperty = k });
|
|
|
}
|
|
|
|
|
|
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
{
|
|
|
- pressBrakeFourValue.Add(new YaweiPressBrakeOneModel() { ItemName = bending[k], Value = pbcYaWeiValueTime[k], MyProperty = k });
|
|
|
+ pressBrakeFourValue.Add(new LaserMmachinePieChartModel() { ItemName = deviceStatus[k], Value = pbcYaWeiValueTime[k], MyProperty = k });
|
|
|
}
|
|
|
|
|
|
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
{
|
|
|
- pressBrakeFiveValue.Add(new YaweiPressBrakeOneModel() { ItemName = bending[k], Value = baiChaoValueTime[k], MyProperty = k });
|
|
|
+ pressBrakeFiveValue.Add(new LaserMmachinePieChartModel() { ItemName = deviceStatus[k], Value = baiChaoValueTime[k], MyProperty = k });
|
|
|
}
|
|
|
|
|
|
- YaweiPressBrakeOne.ChartInit(pressBrakeOneValue, "1号YaWei折弯机");
|
|
|
- YaweiPressBrakeTwo.ChartInit(pressBrakeTwoValue, "2号YaWei折弯机");
|
|
|
- YaweiPressBrakeThree.ChartInit(pressBrakeThreeValue, "3号YaWei折弯机");
|
|
|
- YaweiPressBrakeFour.ChartInit(pressBrakeFourValue, "亚威PBC折弯机");
|
|
|
- YaweiPressBrakeFive.ChartInit(pressBrakeFiveValue, "Bystronic折弯机");
|
|
|
+ YaweiPressBrakeOne.ChartInit(pressBrakeOneValue);
|
|
|
+ YaweiPressBrakeTwo.ChartInit(pressBrakeTwoValue);
|
|
|
+ YaweiPressBrakeThree.ChartInit(pressBrakeThreeValue);
|
|
|
+ YaweiPressBrakeFour.ChartInit(pressBrakeFourValue);
|
|
|
+ YaweiPressBrakeFive.ChartInit(pressBrakeFiveValue);
|
|
|
|
|
|
}
|
|
|
public List<MachineInfoModel> deviceInformation { get; set; }
|
|
@@ -120,9 +146,9 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
|
|
|
|
|
|
//获取当天所有设备信息
|
|
|
- deviceInformation = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>()?
|
|
|
- .Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime)?.ToList();
|
|
|
-
|
|
|
+ deviceInformation = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>()?
|
|
|
+ .Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime)?.ToList();
|
|
|
+
|
|
|
}
|
|
|
public double DeviceTimeValue(string deviceName, string StateCode)
|
|
|
{
|
|
@@ -143,8 +169,8 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
|
|
|
var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
|
|
|
- deviceScheduleStop = DAL.App_Vertiv_ScheduleStop.GetData<ScheduleStopModel>()?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();//获取当天所有设备计划停止信息
|
|
|
-
|
|
|
+ deviceScheduleStop = DAL.App_Vertiv_ScheduleStop.GetData<ScheduleStopModel>()?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();//获取当天所有设备计划停止信息
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -158,6 +184,33 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
}
|
|
|
return Convert.ToDouble(scheduleStopTimeValue.TotalSeconds);
|
|
|
}
|
|
|
+
|
|
|
+ public List<MaintenanceTableModel> deviceMaintenanceTable { get; set; }
|
|
|
+ public void GetTableTime()
|
|
|
+ {
|
|
|
+ //var classesStartTimeSpan = Env.Schedual.CurrentClasses.StartTime.ToString();
|
|
|
+ //var classesEndTimeSpan = Env.Schedual.CurrentClasses.EndTime.ToString();
|
|
|
+ //var classesStartTime = Convert.ToDateTime(classesStartTimeSpan);
|
|
|
+ //var classesEndTime = Convert.ToDateTime(classesEndTimeSpan);
|
|
|
+ var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
|
|
|
+ var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
+
|
|
|
+ deviceMaintenanceTable = DAL.App_Vertiv_MaintenanceTable.GetData<MaintenanceTableModel>()?
|
|
|
+ .Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();//获取当天所有设备维修信息
|
|
|
+
|
|
|
+ }
|
|
|
+ public TimeSpan DevicMainTableTime(string deviceName)
|
|
|
+ {
|
|
|
+
|
|
|
+ var timeMaintenanceTable = deviceMaintenanceTable.ToLookup(t => t.DeviceName)[deviceName].Select(t => t.DurationTime);//获取设备维修时间
|
|
|
+ var MaintenanceTimeValue = new TimeSpan();
|
|
|
+ foreach (TimeSpan item in timeMaintenanceTable)
|
|
|
+ {
|
|
|
+ MaintenanceTimeValue = MaintenanceTimeValue + item;
|
|
|
+ }
|
|
|
+ return MaintenanceTimeValue;
|
|
|
+ }
|
|
|
+
|
|
|
private void Schedual_DateTimeChanged(object sender, SCADA.CommonLib.DateTimeChangedArgs e)
|
|
|
{
|
|
|
try
|
|
@@ -167,65 +220,84 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
{
|
|
|
GetDBData();
|
|
|
GetScheduleStopTime();
|
|
|
- string[] bending = { "运行", "等待", "换模" };
|
|
|
+ GetTableTime();
|
|
|
+ string[] deviceStatus = { "运行", "等待", "报警/维修", "换模" };
|
|
|
var firstYaWeiRunTime = DeviceTimeValue("1号YaWei折弯机", "运行标志位");//1号YaWei折弯机运行时间
|
|
|
- var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位") - DevicScheduleStop("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
+ //var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位") - DevicScheduleStop("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
var firstYaWeiMoldTime = DeviceTimeValue("1号YaWei折弯机", "换模标志位");//1号YaWei折弯机换模时间
|
|
|
|
|
|
var sencondYaWeiRunTime = DeviceTimeValue("2号YaWei折弯机", "运行标志位");//2号YaWei折弯机运行时间
|
|
|
- var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicScheduleStop("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
+ //var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicScheduleStop("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
var sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
|
|
|
var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
- var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicScheduleStop("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
+ //var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicScheduleStop("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
|
|
|
var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
- var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicScheduleStop("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
+ //var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicScheduleStop("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
|
|
|
var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
- var baiChaoStopTime = DeviceTimeValue("百超折弯机", "停止标志位") - DevicScheduleStop("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
+ //var baiChaoStopTime = DeviceTimeValue("百超折弯机", "停止标志位") - DevicScheduleStop("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
|
|
|
- var firstYaWeiValueTime = new double[] { firstYaWeiRunTime, firstYaWeiStopTime, firstYaWeiMoldTime };
|
|
|
- var sencondYaWeiValueTime = new double[] { sencondYaWeiRunTime, sencondYaWeiStopTime, sencondYaWeiMoldTime };
|
|
|
- var thirdYaWeiValueTime = new double[] { thirdYaWweiRunTime, thirdYaWweiStopTime, thirdYaWweiMoldTime };
|
|
|
- var pbcYaWeiValueTime = new double[] { pbcYaWweiRunTime, pbcYaWweiStopTime, pbcYaWweiMoldTime };
|
|
|
- var baiChaoValueTime = new double[] { baiChaoRunTime, baiChaoStopTime, baiChaoMoldTime };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
- {
|
|
|
- pressBrakeOneValue[k].Value = firstYaWeiValueTime[k];
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
- {
|
|
|
- pressBrakeTwoValue[k].Value = sencondYaWeiValueTime[k];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
- {
|
|
|
- pressBrakeThreeValue[k].Value = thirdYaWeiValueTime[k];
|
|
|
- }
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
- {
|
|
|
- pressBrakeFourValue[k].Value = pbcYaWeiValueTime[k];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- for (int k = 0; k < bending.Length; k++)
|
|
|
- {
|
|
|
- pressBrakeFiveValue[k].Value = baiChaoValueTime[k];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
+ var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间");//1号YaWei折弯机等待时间
|
|
|
+ var sencondYaWeiStopTime = totalTimeOfDay - sencondYaWeiRunTime - sencondYaWeiMoldTime - DevicScheduleStop("2号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间");//2号YaWei折弯机等待时间
|
|
|
+ var thirdYaWweiStopTime = totalTimeOfDay - thirdYaWweiRunTime - thirdYaWweiMoldTime - DevicScheduleStop("3号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间");//3号YaWei折弯机等待时间
|
|
|
+ var pbcYaWweiStopTime = totalTimeOfDay - pbcYaWweiRunTime - pbcYaWweiMoldTime - DevicScheduleStop("亚威PBC折弯机")
|
|
|
+ - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间");//亚威PBC折弯机等待时间
|
|
|
+ var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
|
|
|
+ - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
|
|
|
+
|
|
|
+ var firstYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威一号折弯机").TotalSeconds + DeviceTimeValue("1号YaWei折弯机", "维修时间");
|
|
|
+ var secondYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威二号折弯机").TotalSeconds + DeviceTimeValue("2号YaWei折弯机", "维修时间");
|
|
|
+ var thirdYaWeiTimeMaintenanceTable = DevicMainTableTime("亚威三号折弯机").TotalSeconds + DeviceTimeValue("3号YaWei折弯机", "维修时间");
|
|
|
+ var pbcYaWweiTimeMaintenanceTable = DevicMainTableTime("亚威PBC折弯机").TotalSeconds + DeviceTimeValue("亚威PBC折弯机", "维修时间");
|
|
|
+ var baiChaoTimeMaintenanceTable = DevicMainTableTime("百超折弯机").TotalSeconds + DeviceTimeValue("百超折弯机", "维修时间");
|
|
|
+
|
|
|
+ var firstYaWeiValueTime = new double[] { firstYaWeiRunTime, firstYaWeiStopTime, firstYaWeiTimeMaintenanceTable, firstYaWeiMoldTime };
|
|
|
+ var sencondYaWeiValueTime = new double[] { sencondYaWeiRunTime, sencondYaWeiStopTime, secondYaWeiTimeMaintenanceTable, sencondYaWeiMoldTime };
|
|
|
+ var thirdYaWeiValueTime = new double[] { thirdYaWweiRunTime, thirdYaWweiStopTime, thirdYaWeiTimeMaintenanceTable, thirdYaWweiMoldTime };
|
|
|
+ var pbcYaWeiValueTime = new double[] { pbcYaWweiRunTime, pbcYaWweiStopTime, pbcYaWweiTimeMaintenanceTable, pbcYaWweiMoldTime };
|
|
|
+ var baiChaoValueTime = new double[] { baiChaoRunTime, baiChaoStopTime, baiChaoTimeMaintenanceTable, baiChaoMoldTime };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
+ {
|
|
|
+ pressBrakeOneValue[k].Value = firstYaWeiValueTime[k];
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
+ {
|
|
|
+ pressBrakeTwoValue[k].Value = sencondYaWeiValueTime[k];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
+ {
|
|
|
+ pressBrakeThreeValue[k].Value = thirdYaWeiValueTime[k];
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
+ {
|
|
|
+ pressBrakeFourValue[k].Value = pbcYaWeiValueTime[k];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ for (int k = 0; k < deviceStatus.Length; k++)
|
|
|
+ {
|
|
|
+ pressBrakeFiveValue[k].Value = baiChaoValueTime[k];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 委托
|
|
|
Dispatcher.Invoke(new Action(() =>
|
|
|
{
|