|
@@ -49,13 +49,9 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
InitializeComponent();
|
|
|
GetDBData();
|
|
|
GetTableTime();
|
|
|
- GetScheduleStopTime();
|
|
|
GetRepairTime();
|
|
|
- GetDeviceAlarmTime();
|
|
|
GetHighDeviceWorkTime();
|
|
|
- GetDeviceScheduleStopBetweenTime();
|
|
|
- GetDeviceAlarmScheduleStopBetweenTime();
|
|
|
- GetDeviceStopTime();
|
|
|
+
|
|
|
var laserRepairTime = "倒计时" + DeviceRepairTime("激光机").ToString() + "天";//激光机设备保养信息
|
|
|
var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
|
|
|
var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
|
|
@@ -259,119 +255,134 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
}
|
|
|
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)
|
|
|
+ if (deviceMaintenanceTable.Count != 0)
|
|
|
{
|
|
|
- MaintenanceTimeValue = MaintenanceTimeValue + item;
|
|
|
- }
|
|
|
- return MaintenanceTimeValue;
|
|
|
- }
|
|
|
- public List<ScheduleStopModel> deviceScheduleStop { get; set; }
|
|
|
- public void GetScheduleStopTime()//设备停止计划时间
|
|
|
- {
|
|
|
- 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>().ToList();//获取当天所有设备计划停止信息
|
|
|
-
|
|
|
- }
|
|
|
- public double DevicScheduleStop(string deviceName)
|
|
|
- {
|
|
|
- //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 scheduleStopTime = deviceScheduleStop.ToLookup(t => t.TableName)[deviceName].Select(t => t.DurationTime);//获取设备计划停止时间
|
|
|
- var scheduleStopTimeValue = new TimeSpan();
|
|
|
- foreach (TimeSpan item in scheduleStopTime)
|
|
|
- {
|
|
|
- scheduleStopTimeValue = scheduleStopTimeValue + item;
|
|
|
- }
|
|
|
- return Convert.ToDouble(scheduleStopTimeValue.TotalSeconds);
|
|
|
- }
|
|
|
-
|
|
|
- public List<AlarmColumModel> deviceAlarmTime { get; set; }
|
|
|
-
|
|
|
- public List<AlarmColumModel> DistinctDeviceAlarmTime { get; set; }
|
|
|
- public void GetDeviceAlarmTime()//获取设备一天报警信息
|
|
|
- {
|
|
|
- var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
|
|
|
- var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
- deviceAlarmTime = DAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();
|
|
|
-
|
|
|
- var classesYesterdayStartTime = Convert.ToDateTime(DateTime.Now.AddDays(-1).Date);
|
|
|
- var classesDayEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
- DistinctDeviceAlarmTime = DAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesYesterdayStartTime & t.CreateTime <= classesDayEndTime).ToList();
|
|
|
- }
|
|
|
- public List<DeviceScheduleStopModel> deviceStopTime { get; set; }
|
|
|
-
|
|
|
- public void GetDeviceStopTime()//获取计划停止时间
|
|
|
- {
|
|
|
- deviceStopTime = DAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>();
|
|
|
- }
|
|
|
-
|
|
|
- public double DeviceAlarmTime(string deviceName)
|
|
|
- {
|
|
|
- var timeStopTime = deviceStopTime.ToLookup(t => t.Device)[deviceName];
|
|
|
- var timeStopPieces = new List<TimePiece>();
|
|
|
- if (timeStopTime.Count() != 0)
|
|
|
- {
|
|
|
- foreach (var item in timeStopTime)
|
|
|
+ var timeMaintenanceTable = deviceMaintenanceTable.ToLookup(t => t.DeviceName)[deviceName].Select(t => t.DurationTime);//获取设备维修时间
|
|
|
+ var MaintenanceTimeValue = new TimeSpan();
|
|
|
+ foreach (TimeSpan item in timeMaintenanceTable)
|
|
|
{
|
|
|
- timeStopPieces.Add(new TimePiece
|
|
|
- {
|
|
|
- StartTime = Convert.ToDateTime(item.StartTime.ToString()).TimeOfDay,
|
|
|
- EndTime = Convert.ToDateTime(item.EndTime.ToString()).TimeOfDay
|
|
|
- });
|
|
|
+ MaintenanceTimeValue = MaintenanceTimeValue + item;
|
|
|
}
|
|
|
+ return MaintenanceTimeValue;
|
|
|
}
|
|
|
-
|
|
|
- var informationValue = deviceAlarmTime?.ToLookup(t => t.Device_Str)[deviceName];
|
|
|
- var deviceValueInformation = DistinctDeviceAlarmTime.ToLookup(t => t.Device_Str)[deviceName];
|
|
|
- var timePieces = new List<TimePiece>();
|
|
|
- if (deviceValueInformation.Count() != 0)
|
|
|
+ else
|
|
|
{
|
|
|
- foreach (var item in deviceValueInformation)
|
|
|
- {
|
|
|
- if (item.StartTime < Convert.ToDateTime(DateTime.Now.ToString("00:00:00")) & item.EndTime > Convert.ToDateTime(DateTime.Now.ToString("00:00:00")))
|
|
|
- {
|
|
|
- timePieces.Add(new TimePiece
|
|
|
- {
|
|
|
- StartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00")).TimeOfDay,
|
|
|
- EndTime = item.EndTime.TimeOfDay
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- if (informationValue.Count() != 0)
|
|
|
- {
|
|
|
- foreach (var item in informationValue)
|
|
|
- {
|
|
|
- timePieces.Add(new TimePiece
|
|
|
- {
|
|
|
- StartTime = item.StartTime.TimeOfDay,
|
|
|
- EndTime = item.EndTime.TimeOfDay
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (timePieces.Count() == 0)
|
|
|
- {
|
|
|
- timePieces = new List<TimePiece>() {
|
|
|
|
|
|
- new TimePiece{StartTime =TimeSpan.FromSeconds(DateTime.Now.ToOADate()) ,
|
|
|
- EndTime = TimeSpan.FromSeconds(DateTime.Now.ToOADate())},
|
|
|
- };
|
|
|
+ return new TimeSpan(0, 0, 0); ;
|
|
|
}
|
|
|
-
|
|
|
- var total = TimeTotalHelper.DistinctPlanStopTime(TimeTotalHelper.DistinctTime(timePieces), timeStopPieces);
|
|
|
- var doubletotal = total.TotalSeconds;
|
|
|
- return doubletotal;
|
|
|
-
|
|
|
+ //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;
|
|
|
}
|
|
|
+ //public List<ScheduleStopModel> deviceScheduleStop { get; set; }
|
|
|
+ //public void GetScheduleStopTime()//设备停止计划时间
|
|
|
+ //{
|
|
|
+ // 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>().ToList();//获取当天所有设备计划停止信息
|
|
|
+
|
|
|
+ //}
|
|
|
+ //public double DevicScheduleStop(string deviceName)
|
|
|
+ //{
|
|
|
+ // //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 scheduleStopTime = deviceScheduleStop.ToLookup(t => t.TableName)[deviceName].Select(t => t.DurationTime);//获取设备计划停止时间
|
|
|
+ // var scheduleStopTimeValue = new TimeSpan();
|
|
|
+ // foreach (TimeSpan item in scheduleStopTime)
|
|
|
+ // {
|
|
|
+ // scheduleStopTimeValue = scheduleStopTimeValue + item;
|
|
|
+ // }
|
|
|
+ // return Convert.ToDouble(scheduleStopTimeValue.TotalSeconds);
|
|
|
+ //}
|
|
|
+
|
|
|
+ //public List<AlarmColumModel> deviceAlarmTime { get; set; }
|
|
|
+
|
|
|
+ //public List<AlarmColumModel> DistinctDeviceAlarmTime { get; set; }
|
|
|
+ //public void GetDeviceAlarmTime()//获取设备一天报警信息
|
|
|
+ //{
|
|
|
+ // var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
|
|
|
+ // var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
+ // deviceAlarmTime = DAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();
|
|
|
+
|
|
|
+ // var classesYesterdayStartTime = Convert.ToDateTime(DateTime.Now.AddDays(-1).Date);
|
|
|
+ // var classesDayEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
+ // DistinctDeviceAlarmTime = DAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesYesterdayStartTime & t.CreateTime <= classesDayEndTime).ToList();
|
|
|
+ //}
|
|
|
+ //public List<DeviceScheduleStopModel> deviceStopTime { get; set; }
|
|
|
+
|
|
|
+ //public void GetDeviceStopTime()//获取计划停止时间
|
|
|
+ //{
|
|
|
+ // deviceStopTime = DAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>();
|
|
|
+ //}
|
|
|
+
|
|
|
+ //public double DeviceAlarmTime(string deviceName)
|
|
|
+ //{
|
|
|
+ // var timeStopTime = deviceStopTime.ToLookup(t => t.Device)[deviceName];
|
|
|
+ // var timeStopPieces = new List<TimePiece>();
|
|
|
+ // if (timeStopTime.Count() != 0)
|
|
|
+ // {
|
|
|
+ // foreach (var item in timeStopTime)
|
|
|
+ // {
|
|
|
+ // timeStopPieces.Add(new TimePiece
|
|
|
+ // {
|
|
|
+ // StartTime = Convert.ToDateTime(item.StartTime.ToString()).TimeOfDay,
|
|
|
+ // EndTime = Convert.ToDateTime(item.EndTime.ToString()).TimeOfDay
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // var informationValue = deviceAlarmTime?.ToLookup(t => t.Device_Str)[deviceName];
|
|
|
+ // var deviceValueInformation = DistinctDeviceAlarmTime.ToLookup(t => t.Device_Str)[deviceName];
|
|
|
+ // var timePieces = new List<TimePiece>();
|
|
|
+ // if (deviceValueInformation.Count() != 0)
|
|
|
+ // {
|
|
|
+ // foreach (var item in deviceValueInformation)
|
|
|
+ // {
|
|
|
+ // if (item.StartTime < Convert.ToDateTime(DateTime.Now.ToString("00:00:00")) & item.EndTime > Convert.ToDateTime(DateTime.Now.ToString("00:00:00")))
|
|
|
+ // {
|
|
|
+ // timePieces.Add(new TimePiece
|
|
|
+ // {
|
|
|
+ // StartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00")).TimeOfDay,
|
|
|
+ // EndTime = item.EndTime.TimeOfDay
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ // if (informationValue.Count() != 0)
|
|
|
+ // {
|
|
|
+ // foreach (var item in informationValue)
|
|
|
+ // {
|
|
|
+ // timePieces.Add(new TimePiece
|
|
|
+ // {
|
|
|
+ // StartTime = item.StartTime.TimeOfDay,
|
|
|
+ // EndTime = item.EndTime.TimeOfDay
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (timePieces.Count() == 0)
|
|
|
+ // {
|
|
|
+ // timePieces = new List<TimePiece>() {
|
|
|
+
|
|
|
+ // new TimePiece{StartTime =TimeSpan.FromSeconds(DateTime.Now.ToOADate()) ,
|
|
|
+ // EndTime = TimeSpan.FromSeconds(DateTime.Now.ToOADate())},
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+
|
|
|
+ // var total = TimeTotalHelper.DistinctPlanStopTime(TimeTotalHelper.DistinctTime(timePieces), timeStopPieces);
|
|
|
+ // var doubletotal = total.TotalSeconds;
|
|
|
+ // return doubletotal;
|
|
|
+
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
public List<DeviceWorkTimeModel> DeviceWorkTime { get; set; }//所有设备一天通电时间的信息
|
|
@@ -389,80 +400,80 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
return DeviceWait;
|
|
|
}
|
|
|
|
|
|
- public List<MachineInfoModel> DeviceMachineInformation { get; set; }
|
|
|
+ //public List<MachineInfoModel> DeviceMachineInformation { get; set; }
|
|
|
|
|
|
- public List<DeviceScheduleStopModel> DeviceScheduleStopInformation { get; set; }
|
|
|
+ //public List<DeviceScheduleStopModel> DeviceScheduleStopInformation { get; set; }
|
|
|
|
|
|
- public int DeviceScheduleStopBetWeenTime { get; set; }
|
|
|
+ //public int DeviceScheduleStopBetWeenTime { get; set; }
|
|
|
|
|
|
- public List<int> DeviceScheduleStopBetweenTimeList { get; set; }
|
|
|
+ //public List<int> DeviceScheduleStopBetweenTimeList { get; set; }
|
|
|
|
|
|
- public int IntValue { 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 int IntValue { 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)
|
|
|
+ //{
|
|
|
|
|
|
- List<int> DeviceValue = new List<int>();
|
|
|
- var deviceScheduleStop = DeviceScheduleStopInformation.ToLookup(t => t.Device)[deviceName];
|
|
|
- foreach (var item in deviceScheduleStop)
|
|
|
- {
|
|
|
+ // 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);
|
|
|
- DeviceScheduleStopBetWeenTime = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
- DeviceValue.Add(DeviceScheduleStopBetWeenTime);
|
|
|
- }
|
|
|
+ // 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);
|
|
|
+ // DeviceScheduleStopBetWeenTime = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
+ // DeviceValue.Add(DeviceScheduleStopBetWeenTime);
|
|
|
+ // }
|
|
|
|
|
|
- DeviceScheduleStopBetweenTimeList = DeviceValue;
|
|
|
- for (int i = 0; i < DeviceScheduleStopBetweenTimeList.Count; i++)
|
|
|
- {
|
|
|
- IntValue = DeviceScheduleStopBetweenTimeList[i] + IntValue;
|
|
|
- }
|
|
|
- return IntValue;
|
|
|
- }
|
|
|
+ // DeviceScheduleStopBetweenTimeList = DeviceValue;
|
|
|
+ // for (int i = 0; i < DeviceScheduleStopBetweenTimeList.Count; i++)
|
|
|
+ // {
|
|
|
+ // IntValue = DeviceScheduleStopBetweenTimeList[i] + IntValue;
|
|
|
+ // }
|
|
|
+ // return IntValue;
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public List<AlarmColumModel> DeviceAlarmMachineInformation { get; set; }
|
|
|
+ //public List<AlarmColumModel> DeviceAlarmMachineInformation { get; set; }
|
|
|
|
|
|
- public List<DeviceScheduleStopModel> DeviceAlarmScheduleStopInformation { get; set; }
|
|
|
- public int DeviceAlarmInt { get; set; }
|
|
|
+ //public List<DeviceScheduleStopModel> DeviceAlarmScheduleStopInformation { get; set; }
|
|
|
+ //public int DeviceAlarmInt { get; set; }
|
|
|
|
|
|
- public List<int> DeviceAlarmIntList { get; set; }
|
|
|
- public void GetDeviceAlarmScheduleStopBetweenTime()
|
|
|
- {
|
|
|
- DeviceAlarmScheduleStopInformation = Env.SqlDAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>();
|
|
|
+ //public List<int> DeviceAlarmIntList { get; set; }
|
|
|
+ //public void GetDeviceAlarmScheduleStopBetweenTime()
|
|
|
+ //{
|
|
|
+ // DeviceAlarmScheduleStopInformation = Env.SqlDAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>();
|
|
|
|
|
|
- DeviceAlarmMachineInformation = Env.SqlDAL.Base_AlarmLog.GetData<AlarmColumModel>();
|
|
|
- }
|
|
|
+ // DeviceAlarmMachineInformation = Env.SqlDAL.Base_AlarmLog.GetData<AlarmColumModel>();
|
|
|
+ //}
|
|
|
|
|
|
- public double DeviceAlarmScheduleStopBetweenTime(string deviceName)
|
|
|
- {
|
|
|
+ //public double DeviceAlarmScheduleStopBetweenTime(string deviceName)
|
|
|
+ //{
|
|
|
|
|
|
- List<int> DeviceValue = new List<int>();
|
|
|
- var deviceScheduleStop = DeviceAlarmScheduleStopInformation.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 = DeviceAlarmMachineInformation?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime);
|
|
|
- DeviceAlarmInt = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
- DeviceValue.Add(DeviceAlarmInt);
|
|
|
- }
|
|
|
+ // List<int> DeviceValue = new List<int>();
|
|
|
+ // var deviceScheduleStop = DeviceAlarmScheduleStopInformation.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 = DeviceAlarmMachineInformation?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime);
|
|
|
+ // DeviceAlarmInt = deviceBetweenTime.Sum(t => t.DurationSec);
|
|
|
+ // DeviceValue.Add(DeviceAlarmInt);
|
|
|
+ // }
|
|
|
|
|
|
- DeviceAlarmIntList = DeviceValue;
|
|
|
- for (int i = 0; i < DeviceAlarmIntList.Count; i++)
|
|
|
- {
|
|
|
- DeviceAlarmInt = DeviceAlarmIntList[i] + DeviceAlarmInt;
|
|
|
- }
|
|
|
- return DeviceAlarmInt;
|
|
|
- }
|
|
|
+ // DeviceAlarmIntList = DeviceValue;
|
|
|
+ // for (int i = 0; i < DeviceAlarmIntList.Count; i++)
|
|
|
+ // {
|
|
|
+ // DeviceAlarmInt = DeviceAlarmIntList[i] + DeviceAlarmInt;
|
|
|
+ // }
|
|
|
+ // return DeviceAlarmInt;
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
private void Schedual_DateTimeChanged(object sender, SCADA.CommonLib.DateTimeChangedArgs e)
|
|
@@ -477,13 +488,9 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
System.GC.Collect(2);
|
|
|
GetDBData();
|
|
|
GetTableTime();
|
|
|
- GetScheduleStopTime();
|
|
|
GetRepairTime();
|
|
|
- GetDeviceAlarmTime();
|
|
|
GetHighDeviceWorkTime();
|
|
|
- GetDeviceScheduleStopBetweenTime();
|
|
|
- GetDeviceAlarmScheduleStopBetweenTime();
|
|
|
- GetDeviceStopTime();
|
|
|
+
|
|
|
|
|
|
var laserRepairTime = "倒计时" + DeviceRepairTime("激光机").ToString() + "天";//激光机设备保养信息
|
|
|
var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
|