|
@@ -50,24 +50,11 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
GetDBData();
|
|
|
GetTableTime();
|
|
|
GetRepairTime();
|
|
|
- GetHighDeviceWorkTime();
|
|
|
-
|
|
|
+
|
|
|
var laserRepairTime = "倒计时" + DeviceRepairTime("激光机").ToString() + "天";//激光机设备保养信息
|
|
|
var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
|
|
|
var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
|
|
|
|
|
|
- //var laserArlamString = Convert.ToString(DevicMainTableTime("激光机")
|
|
|
- // + TimeSpan.FromSeconds(DeviceTimeValue("激光机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("激光机")));
|
|
|
-
|
|
|
- //var siemensArlamString = Convert.ToString(DevicMainTableTime("西门子840D数冲")
|
|
|
- // + TimeSpan.FromSeconds(DeviceTimeValue("西门子840D数冲", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("西门子840D数冲")));
|
|
|
-
|
|
|
- //var behwiftArlamString = Convert.ToString(DevicMainTableTime("倍福数冲机")
|
|
|
- // + TimeSpan.FromSeconds(DeviceTimeValue("倍福数冲机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("倍福数冲机")));
|
|
|
- Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
|
|
|
- //var laserArlamDouble = DeviceAlarmTime("激光机") + DevicMainTableTime("激光机").TotalSeconds + DeviceTimeValue("激光机", "维修时间");
|
|
|
- //var siemensArlamDouble = DeviceAlarmTime("西门子840D数冲") + DevicMainTableTime("西门子840D数冲").TotalSeconds + DeviceTimeValue("西门子840D数冲", "维修时间");
|
|
|
- //var bewiftArlamDouble = DeviceAlarmTime("倍福数冲机") + DevicMainTableTime("倍福数冲机").TotalSeconds + DeviceTimeValue("倍福数冲机", "维修时间");
|
|
|
|
|
|
var laserArlamDouble = DeviceTimeValue("激光机", "故障标志位") + DevicMainTableTime("激光机").TotalSeconds + DeviceTimeValue("激光机", "维修时间");
|
|
|
var siemensArlamDouble = DeviceTimeValue("西门子840D数冲", "故障标志位") + DevicMainTableTime("西门子840D数冲").TotalSeconds + DeviceTimeValue("西门子840D数冲", "维修时间");
|
|
@@ -94,18 +81,10 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
var behwiftMoldTime = DeviceTimeValue("倍福数冲机", "换模标志位");//倍福数冲换模时间
|
|
|
var behwiftMoldTimeSpan = TimeSpan.FromSeconds(Math.Round(behwiftMoldTime)).ToString();
|
|
|
|
|
|
-
|
|
|
- //double totalTimeOfDay = TimeSpan.Parse(DateTime.Now.ToString("HH:mm:ss")).TotalSeconds;
|
|
|
-
|
|
|
var laserStopTime = DeviceTimeValue("激光机", "停止标志位") - DevicMainTableTime("激光机").TotalSeconds;//激光机等待时间
|
|
|
- var siemensStopTime = DeviceTimeValue("西门子840D数冲","停止标志位") - DevicMainTableTime("西门子840D数冲").TotalSeconds;//西门子等待时间
|
|
|
+ var siemensStopTime = DeviceTimeValue("西门子840D数冲", "停止标志位") - DevicMainTableTime("西门子840D数冲").TotalSeconds;//西门子等待时间
|
|
|
var behwiftStopTime = DeviceTimeValue("倍福数冲机", "停止标志位") - DevicMainTableTime("倍福数冲机").TotalSeconds;//倍福数冲等待时间
|
|
|
- //var laserStopTime = totalTimeOfDay - laserRunTime - DevicScheduleStop("激光机") - laserArlamDouble
|
|
|
- // + DeviceScheduleStopBetweenTime("激光机") + DeviceAlarmScheduleStopBetweenTime("激光机");//激光机等待时间
|
|
|
- //var siemensStopTime = totalTimeOfDay - siemensRunTime - siemensMoldTime - DevicScheduleStop("西门子840D数冲") - siemensArlamDouble
|
|
|
- // + DeviceScheduleStopBetweenTime("西门子840D数冲") + DeviceAlarmScheduleStopBetweenTime("西门子840D数冲");//西门子等待时间
|
|
|
- //var behwiftStopTime = totalTimeOfDay - behwiftRunTime - behwiftMoldTime - DevicScheduleStop("倍福数冲机") - bewiftArlamDouble
|
|
|
- // + DeviceScheduleStopBetweenTime("倍福数冲机") + DeviceAlarmScheduleStopBetweenTime("倍福数冲机");//倍福数冲等待时间
|
|
|
+
|
|
|
|
|
|
|
|
|
var laserStopTimeSpan = TimeSpan.FromSeconds(Math.Round(laserStopTime)).ToString();
|
|
@@ -152,8 +131,8 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
|
|
|
TimeSpan Time = new TimeSpan(2, 40, 0);
|
|
|
var laserCeShi = laserArlamDouble + laserRunTime + laserStopTime;
|
|
|
-
|
|
|
- var siemensCeShi= siemensArlamDouble + siemensRunTime + siemensStopTime + siemensMoldTime;
|
|
|
+
|
|
|
+ var siemensCeShi = siemensArlamDouble + siemensRunTime + siemensStopTime + siemensMoldTime;
|
|
|
|
|
|
var behwiftCeShi = behwiftRunTime + behwiftStopTime + bewiftArlamDouble + behwiftMoldTime;
|
|
|
|
|
@@ -161,23 +140,21 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
LaserCountingPunchesOne.DeviceNameTwo.Value = laserStopTimeSpan;
|
|
|
LaserCountingPunchesOne.DeviceNameThree.Value = laserArlamString;
|
|
|
LaserCountingPunchesOne.DeviceNameFour.Value = laserRepairTime;
|
|
|
- //LaserCountingPunchesOne.DeviceNameFive.Value = Time.ToString();
|
|
|
-; /* LaserCountingPunchesOne.DeviceNameSix.Value = TimeSpan.FromSeconds(Math.Round(laserCeShi)).ToString();*/
|
|
|
+
|
|
|
|
|
|
LaserCountingPunchesTwo.DeviceNameOne.Value = siemensRunTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameTwo.Value = siemensStopTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameThree.Value = siemensArlamString;
|
|
|
LaserCountingPunchesTwo.DeviceNameFour.Value = siemensMoldTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameFive.Value = siemensRepairTime;
|
|
|
- //LaserCountingPunchesTwo.DeviceNameSix.Value = TimeSpan.FromSeconds(Math.Round(siemensCeShi)).ToString();
|
|
|
+
|
|
|
|
|
|
LaserCountingPunchesThree.DeviceNameOne.Value = behwiftRunTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameTwo.Value = behwiftStopTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameThree.Value = behwiftArlamString;
|
|
|
LaserCountingPunchesThree.DeviceNameFour.Value = behwiftMoldTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameFive.Value = behwifRepairTime;
|
|
|
- //LaserCountingPunchesThree.DeviceNameSix.Value = TimeSpan.FromSeconds(Math.Round(behwiftCeShi)).ToString();
|
|
|
- // 界面文本
|
|
|
+
|
|
|
LaserCountingPunchesOne.Title = new string[] { "激光机运行时间:",
|
|
|
"激光机等待时间:",
|
|
|
"激光机报警/维修时间:",
|
|
@@ -201,22 +178,12 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
public List<MachineInfoModel> deviceInformation { get; set; }
|
|
|
public void GetDBData()//设备运行状态时间
|
|
|
{
|
|
|
- //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"));
|
|
|
- //获取当天所有设备信息
|
|
|
- deviceInformation = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>()?
|
|
|
- .Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToList();
|
|
|
+ deviceInformation = CustomerEnv.MachineInfos; //获取当天所有设备信息
|
|
|
|
|
|
}
|
|
|
|
|
|
public double DeviceTimeValue(string deviceName, string StateCode)//设备运行状态时间
|
|
|
{
|
|
|
- ////获取当天所有设备信息
|
|
|
- //var deviceInformation = DAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>()?.Where(t => t.CreateTime.Date == DateTime.Now.Date);
|
|
|
var keepTime = deviceInformation.ToLookup(t => t.Device)[deviceName].ToLookup(t => t.StateCode)[StateCode].Sum(t => t.DurationSec);
|
|
|
return Convert.ToDouble(keepTime);
|
|
|
}
|
|
@@ -224,7 +191,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
public List<RepairTableModel> deviceRepairDay { get; set; }
|
|
|
public void GetRepairTime()
|
|
|
{
|
|
|
- deviceRepairDay = DAL.APP_Vertiv_RepairTable.GetData<RepairTableModel>();
|
|
|
+ deviceRepairDay = CustomerEnv.RepairInfos;
|
|
|
|
|
|
}
|
|
|
public int DeviceRepairTime(string deviceName)//设备保养时间到期所剩的天数
|
|
@@ -246,11 +213,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
public List<MaintenanceTableModel> deviceMaintenanceTable { get; set; }
|
|
|
public void GetTableTime()
|
|
|
{
|
|
|
- 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();//获取当天所有设备维修信息
|
|
|
+ deviceMaintenanceTable =CustomerEnv.MaintenanceInfos;//获取当天所有设备维修信息
|
|
|
|
|
|
}
|
|
|
public TimeSpan DevicMainTableTime(string deviceName)
|
|
@@ -270,210 +233,11 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
|
|
|
return new TimeSpan(0, 0, 0); ;
|
|
|
}
|
|
|
- //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; }//所有设备一天通电时间的信息
|
|
|
- public void GetHighDeviceWorkTime()
|
|
|
- {
|
|
|
- var classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
|
|
|
- var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
|
|
|
- DeviceWorkTime = DAL.App_Vertiv_WorkTime.GetData<DeviceWorkTimeModel>()?.Where(t => t.TurnOnTime >= classesStartTime & t.TurnOnTime <= classesEndTime).ToList();
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
- public double AllDeviceWorkTime(string deviceName)//设备一天通电的时长
|
|
|
- {
|
|
|
-
|
|
|
- var DeviceWait = DeviceWorkTime.ToLookup(t => t.DeviceName)[deviceName].Sum(t => t.DurationSec);//获取设备等待时间
|
|
|
- return DeviceWait;
|
|
|
- }
|
|
|
-
|
|
|
- //public List<MachineInfoModel> DeviceMachineInformation { get; set; }
|
|
|
-
|
|
|
- //public List<DeviceScheduleStopModel> DeviceScheduleStopInformation { get; set; }
|
|
|
-
|
|
|
- //public int DeviceScheduleStopBetWeenTime { 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)
|
|
|
- //{
|
|
|
-
|
|
|
- // 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);
|
|
|
- // }
|
|
|
-
|
|
|
- // DeviceScheduleStopBetweenTimeList = DeviceValue;
|
|
|
- // for (int i = 0; i < DeviceScheduleStopBetweenTimeList.Count; i++)
|
|
|
- // {
|
|
|
- // IntValue = DeviceScheduleStopBetweenTimeList[i] + IntValue;
|
|
|
- // }
|
|
|
- // return IntValue;
|
|
|
- //}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //public List<AlarmColumModel> DeviceAlarmMachineInformation { 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>();
|
|
|
-
|
|
|
- // DeviceAlarmMachineInformation = Env.SqlDAL.Base_AlarmLog.GetData<AlarmColumModel>();
|
|
|
- //}
|
|
|
-
|
|
|
- //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);
|
|
|
- // }
|
|
|
-
|
|
|
- // 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)
|
|
@@ -481,7 +245,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
|
|
|
+ if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged &&
|
|
|
e.TimeFlag.Second % 16 == 0)
|
|
|
|
|
|
{
|
|
@@ -489,9 +253,7 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
GetDBData();
|
|
|
GetTableTime();
|
|
|
GetRepairTime();
|
|
|
- GetHighDeviceWorkTime();
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
var laserRepairTime = "倒计时" + DeviceRepairTime("激光机").ToString() + "天";//激光机设备保养信息
|
|
|
var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
|
|
|
var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
|
|
@@ -574,20 +336,20 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
|
|
|
LaserCountingPunchesOne.DeviceNameThree.Value = laserArlamString;
|
|
|
LaserCountingPunchesOne.DeviceNameFour.Value = laserRepairTime;
|
|
|
//LaserCountingPunchesOne.DeviceNameFive.Value = Time.ToString();
|
|
|
-
|
|
|
+
|
|
|
LaserCountingPunchesTwo.DeviceNameOne.Value = siemensRunTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameTwo.Value = siemensStopTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameThree.Value = siemensArlamString;
|
|
|
LaserCountingPunchesTwo.DeviceNameFour.Value = siemensMoldTimeSpan;
|
|
|
LaserCountingPunchesTwo.DeviceNameFive.Value = siemensRepairTime;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
LaserCountingPunchesThree.DeviceNameOne.Value = behwiftRunTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameTwo.Value = behwiftStopTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameThree.Value = behwiftArlamString;
|
|
|
LaserCountingPunchesThree.DeviceNameFour.Value = behwiftMoldTimeSpan;
|
|
|
LaserCountingPunchesThree.DeviceNameFive.Value = behwifRepairTime;
|
|
|
-
|
|
|
+
|
|
|
}));
|
|
|
|
|
|
}
|