|
@@ -9,6 +9,7 @@ using SCADA.CommonLib.Data.DIL;
|
|
|
using SCADA.CommonLib.Data.DIL.Sqlite;
|
|
|
using SCADA.Drive.Siemens.CNC840DA.Da;
|
|
|
using SCADA_DAQ.Customer.Models;
|
|
|
+using SCADA_DAQ.Customer.Models.AlarmTime;
|
|
|
using SCADA_DAQ.Customer.Models.DeviceInfoTime;
|
|
|
using SCADA_DAQ.Customer.Models.ScheduleStop;
|
|
|
using SqlSchema.DBNames;
|
|
@@ -87,22 +88,22 @@ namespace SCADA_DAQ.Customer
|
|
|
"换模时间:",
|
|
|
"报警/维修时间:",
|
|
|
"维保时间:"};
|
|
|
-
|
|
|
|
|
|
- var firstYaWeiRunTime = DeviceTimeValue("1号YaWei折弯机", "运行标志位");//1号YaWei折弯机运行时间
|
|
|
- var firstYaWeiMoldTime = DeviceTimeValue("1号YaWei折弯机", "换模标志位");//1号YaWei折弯机换模时间
|
|
|
|
|
|
- var sencondYaWeiRunTime = DeviceTimeValue("2号YaWei折弯机", "运行标志位");//2号YaWei折弯机运行时间
|
|
|
- var sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
+ var firstYaWeiRunTime = DeviceTimeValue("1号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "运行标志位");//1号YaWei折弯机运行时间
|
|
|
+ var firstYaWeiMoldTime = DeviceTimeValue("1号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "换模标志位");//1号YaWei折弯机换模时间
|
|
|
|
|
|
- var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
- var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
+ var sencondYaWeiRunTime = DeviceTimeValue("2号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "运行标志位");//2号YaWei折弯机运行时间
|
|
|
+ var sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
|
|
|
- var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
- var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
+ var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
+ var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
|
|
|
- var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
- var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
+ var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
+ var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
+
|
|
|
+ var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
+ var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
|
|
|
|
|
|
var firstYaWeiRepairTime = "倒计时" + DeviceRepairTime("亚威一号折弯机").ToString() + "天";//亚威一号折弯机设备保养信息
|
|
@@ -111,24 +112,28 @@ namespace SCADA_DAQ.Customer
|
|
|
var pbcYaWweiRepairTime = "倒计时" + DeviceRepairTime("亚威PBC折弯机").ToString() + "天";//亚威PBC折弯机设备保养信息
|
|
|
var baiChaoRepairTime = "倒计时" + DeviceRepairTime("百超折弯机").ToString() + "天";//百超折弯机设备保养信息
|
|
|
|
|
|
- var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间")));
|
|
|
- var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间")));
|
|
|
- var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间")));
|
|
|
- var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间")));
|
|
|
- var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间")));
|
|
|
-
|
|
|
+ var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "维修时间")));
|
|
|
+ var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "维修时间")));
|
|
|
+ var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "维修时间")));
|
|
|
+ var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间")));
|
|
|
+ var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间")));
|
|
|
|
|
|
double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
- var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间") + DeviceScheduleStopBetweenTime("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
+ var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "维修时间");//1号YaWei折弯机等待时间
|
|
|
var sencondYaWeiStopTime = totalTimeOfDay - sencondYaWeiRunTime - sencondYaWeiMoldTime - DevicScheduleStop("2号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间") + DeviceScheduleStopBetweenTime("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "维修时间");//2号YaWei折弯机等待时间
|
|
|
var thirdYaWweiStopTime = totalTimeOfDay - thirdYaWweiRunTime - thirdYaWweiMoldTime - DevicScheduleStop("3号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间") + DeviceScheduleStopBetweenTime("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "维修时间"); //3号YaWei折弯机等待时间
|
|
|
var pbcYaWweiStopTime = totalTimeOfDay - pbcYaWweiRunTime - pbcYaWweiMoldTime - DevicScheduleStop("亚威PBC折弯机")
|
|
|
- - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间") + DeviceScheduleStopBetweenTime("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间");//亚威PBC折弯机等待时间
|
|
|
var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
|
|
|
- - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间") + DeviceScheduleStopBetweenTime("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
+ - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
|
|
|
|
|
|
var firstYaWeiRunTimeSpan = TimeSpan.FromSeconds(Math.Round(firstYaWeiRunTime)).ToString();
|
|
|
var firstYaWeiStopTimeSpan = TimeSpan.FromSeconds(Math.Round(firstYaWeiStopTime)).ToString();
|
|
@@ -287,27 +292,55 @@ namespace SCADA_DAQ.Customer
|
|
|
|
|
|
public List<DeviceScheduleStopModel> DeviceScheduleStopInformation { get; set; }
|
|
|
|
|
|
- public int DeviceScheduleStopBetWeenTime { get; set; }
|
|
|
+ public int DeviceStateCodeScheduleStopBetWeenTime { get; set; }
|
|
|
|
|
|
- public List<int> DeviceScheduleStopBetweenTimeList { get; set; }
|
|
|
+ public List<int> DeviceStateCodeScheduleStopBetweenTimeList { get; set; }
|
|
|
|
|
|
- public int IntValue { get; set; }
|
|
|
+ public int DeviceStateCodeIntValue { get; set; }
|
|
|
public void GetDeviceScheduleStopBetweenTime()
|
|
|
{
|
|
|
DeviceScheduleStopInformation = Env.SqlDAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>();
|
|
|
DeviceMachineInformation = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>();
|
|
|
}
|
|
|
- public double DeviceScheduleStopBetweenTime(string deviceName)
|
|
|
+ public double DeviceStateCodeStopBetweenTime(string deviceName, string deviceStateCode)
|
|
|
{
|
|
|
-
|
|
|
+ DeviceStateCodeIntValue = 0;
|
|
|
List<int> DeviceValue = new List<int>();
|
|
|
var deviceScheduleStop = DeviceScheduleStopInformation.ToLookup(t => t.Device)[deviceName];
|
|
|
foreach (var item in deviceScheduleStop)
|
|
|
{
|
|
|
+ var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString(item.StartTime.ToString()));
|
|
|
+ var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString(item.EndTime.ToString()));
|
|
|
+ var deviceBetweenTime = DeviceMachineInformation.ToLookup(t => t.Device)[deviceName].ToLookup(t => t.StateCode)[deviceStateCode]?
|
|
|
+ .Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime);
|
|
|
+ DeviceStateCodeScheduleStopBetWeenTime = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
+ DeviceValue.Add(DeviceStateCodeScheduleStopBetWeenTime);
|
|
|
+ }
|
|
|
+
|
|
|
+ DeviceStateCodeScheduleStopBetweenTimeList = DeviceValue;
|
|
|
+ for (int i = 0; i < DeviceStateCodeScheduleStopBetweenTimeList.Count; i++)
|
|
|
+ {
|
|
|
+ DeviceStateCodeIntValue = DeviceStateCodeScheduleStopBetweenTimeList[i] + DeviceStateCodeIntValue;
|
|
|
+ }
|
|
|
+ return DeviceStateCodeIntValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int DeviceScheduleStopBetWeenTime { get; set; }
|
|
|
|
|
|
+ public List<int> DeviceScheduleStopBetweenTimeList { get; set; }
|
|
|
+
|
|
|
+ public int DeviceIntValue { get; set; }
|
|
|
+
|
|
|
+ public double DeviceScheduleStopBetweenTime(string deviceName)
|
|
|
+ {
|
|
|
+ DeviceIntValue = 0;
|
|
|
+ List<int> DeviceValue = new List<int>();
|
|
|
+ var deviceScheduleStop = DeviceScheduleStopInformation.ToLookup(t => t.Device)[deviceName];
|
|
|
+ foreach (var item in deviceScheduleStop)
|
|
|
+ {
|
|
|
var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString(item.StartTime.ToString()));
|
|
|
var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString(item.EndTime.ToString()));
|
|
|
- var deviceBetweenTime = DeviceMachineInformation?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime);
|
|
|
+ var deviceBetweenTime = DeviceMachineInformation.ToLookup(t => t.Device)[deviceName]?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime);
|
|
|
DeviceScheduleStopBetWeenTime = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
DeviceValue.Add(DeviceScheduleStopBetWeenTime);
|
|
|
}
|
|
@@ -315,12 +348,11 @@ namespace SCADA_DAQ.Customer
|
|
|
DeviceScheduleStopBetweenTimeList = DeviceValue;
|
|
|
for (int i = 0; i < DeviceScheduleStopBetweenTimeList.Count; i++)
|
|
|
{
|
|
|
- IntValue = DeviceScheduleStopBetweenTimeList[i] + IntValue;
|
|
|
+ DeviceIntValue = DeviceScheduleStopBetweenTimeList[i] + DeviceIntValue;
|
|
|
}
|
|
|
- return IntValue;
|
|
|
+ return DeviceIntValue;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private void Schedual_DateTimeChanged(object sender, SCADA.CommonLib.DateTimeChangedArgs e)
|
|
|
{
|
|
|
|
|
@@ -334,27 +366,22 @@ namespace SCADA_DAQ.Customer
|
|
|
GetRepairTime();
|
|
|
GetScheduleStopTime();
|
|
|
GetDeviceScheduleStopBetweenTime();
|
|
|
- double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
- var firstYaWeiRunTime = DeviceTimeValue("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 sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
|
|
|
- var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
- //var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicScheduleStop("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
- var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
+ var firstYaWeiRunTime = DeviceTimeValue("1号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "运行标志位");//1号YaWei折弯机运行时间
|
|
|
+ var firstYaWeiMoldTime = DeviceTimeValue("1号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "换模标志位");//1号YaWei折弯机换模时间
|
|
|
|
|
|
- var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
- //var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicScheduleStop("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
- var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
+ var sencondYaWeiRunTime = DeviceTimeValue("2号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "运行标志位");//2号YaWei折弯机运行时间
|
|
|
+ var sencondYaWeiMoldTime = DeviceTimeValue("2号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "换模标志位");//2号YaWei折弯机换模时间
|
|
|
|
|
|
- var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
- //var baiChaoStopTime = DeviceTimeValue("百超折弯机", "停止标志位") - DevicScheduleStop("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
- var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
+ var thirdYaWweiRunTime = DeviceTimeValue("3号YaWei折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "运行标志位"); ;//3号YaWei折弯机运行时间
|
|
|
+ var thirdYaWweiMoldTime = DeviceTimeValue("3号YaWei折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "换模标志位");//3号YaWei折弯机换模时间
|
|
|
|
|
|
+ var pbcYaWweiRunTime = DeviceTimeValue("亚威PBC折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "运行标志位"); ;//亚威PBC折弯机运行时间
|
|
|
+ var pbcYaWweiMoldTime = DeviceTimeValue("亚威PBC折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "换模标志位");//亚威PBC折弯机换模时间
|
|
|
+
|
|
|
+ var baiChaoRunTime = DeviceTimeValue("百超折弯机", "运行标志位") - DeviceStateCodeStopBetweenTime("百超折弯机", "运行标志位"); ;//百超折弯机运行时间
|
|
|
+ var baiChaoMoldTime = DeviceTimeValue("百超折弯机", "换模标志位") - DeviceStateCodeStopBetweenTime("百超折弯机", "换模标志位");//百超折弯机换模时间
|
|
|
|
|
|
|
|
|
var firstYaWeiRepairTime = "倒计时" + DeviceRepairTime("亚威一号折弯机").ToString() + "天";//亚威一号折弯机设备保养信息
|
|
@@ -363,23 +390,28 @@ namespace SCADA_DAQ.Customer
|
|
|
var pbcYaWweiRepairTime = "倒计时" + DeviceRepairTime("亚威PBC折弯机").ToString() + "天";//亚威PBC折弯机设备保养信息
|
|
|
var baiChaoRepairTime = "倒计时" + DeviceRepairTime("百超折弯机").ToString() + "天";//百超折弯机设备保养信息
|
|
|
|
|
|
- var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间")));
|
|
|
- var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间")));
|
|
|
- var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间")));
|
|
|
- var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间")));
|
|
|
- var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间")));
|
|
|
+ var firstYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威一号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("1号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "维修时间")));
|
|
|
+ var secondYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威二号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("2号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "维修时间")));
|
|
|
+ var thirdYaWeiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威三号折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("3号YaWei折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "维修时间")));
|
|
|
+ var pbcYaWweiTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("亚威PBC折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("亚威PBC折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间")));
|
|
|
+ var baiChaoTimeMaintenanceTable = Convert.ToString(DevicMainTableTime("百超折弯机") + TimeSpan.FromSeconds(DeviceTimeValue("百超折弯机", "维修时间"))
|
|
|
+ - TimeSpan.FromSeconds(DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间")));
|
|
|
|
|
|
- var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间")+ DeviceScheduleStopBetweenTime("1号YaWei折弯机");//1号YaWei折弯机等待时间
|
|
|
+ double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
+ var firstYaWeiStopTime = totalTimeOfDay - firstYaWeiRunTime - firstYaWeiMoldTime - DevicScheduleStop("1号YaWei折弯机")
|
|
|
+ - DevicMainTableTime("亚威一号折弯机").TotalSeconds - DeviceTimeValue("1号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("1号YaWei折弯机", "维修时间");//1号YaWei折弯机等待时间
|
|
|
var sencondYaWeiStopTime = totalTimeOfDay - sencondYaWeiRunTime - sencondYaWeiMoldTime - DevicScheduleStop("2号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间")+ DeviceScheduleStopBetweenTime("2号YaWei折弯机");//2号YaWei折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威二号折弯机").TotalSeconds - DeviceTimeValue("2号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("2号YaWei折弯机", "维修时间");//2号YaWei折弯机等待时间
|
|
|
var thirdYaWweiStopTime = totalTimeOfDay - thirdYaWweiRunTime - thirdYaWweiMoldTime - DevicScheduleStop("3号YaWei折弯机")
|
|
|
- - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间")+ DeviceScheduleStopBetweenTime("3号YaWei折弯机");//3号YaWei折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威三号折弯机").TotalSeconds - DeviceTimeValue("3号YaWei折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("3号YaWei折弯机", "维修时间"); //3号YaWei折弯机等待时间
|
|
|
var pbcYaWweiStopTime = totalTimeOfDay - pbcYaWweiRunTime - pbcYaWweiMoldTime - DevicScheduleStop("亚威PBC折弯机")
|
|
|
- - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间")+ DeviceScheduleStopBetweenTime("亚威PBC折弯机");//亚威PBC折弯机等待时间
|
|
|
+ - DevicMainTableTime("亚威PBC折弯机").TotalSeconds - DeviceTimeValue("亚威PBC折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("亚威PBC折弯机", "维修时间");//亚威PBC折弯机等待时间
|
|
|
var baiChaoStopTime = totalTimeOfDay - baiChaoRunTime - baiChaoMoldTime - DevicScheduleStop("百超折弯机")
|
|
|
- - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间")+ DeviceScheduleStopBetweenTime("百超折弯机");//百超折弯机折弯机等待时间
|
|
|
-
|
|
|
+ - DevicMainTableTime("百超折弯机").TotalSeconds - DeviceTimeValue("百超折弯机", "维修时间") + DeviceStateCodeStopBetweenTime("百超折弯机", "维修时间");//百超折弯机折弯机等待时间
|
|
|
|
|
|
var firstYaWeiRunTimeSpan = TimeSpan.FromSeconds(Math.Round(firstYaWeiRunTime)).ToString();
|
|
|
var firstYaWeiStopTimeSpan = TimeSpan.FromSeconds(Math.Round(firstYaWeiStopTime)).ToString();
|