Kaynağa Gözat

临时提交

谢翼翔 1 yıl önce
ebeveyn
işleme
cd9d0a509c
10 değiştirilmiş dosya ile 123 ekleme ve 99 silme
  1. 60 69
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Machines/FXMachine.cs
  2. 2 2
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/AlarmTime/AlarmQueryModel.cs
  3. 2 2
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/MachineMoldTime/QueryMachineMoldModel.cs
  4. 2 2
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/MachineRepairTime/QueryMachinRepairModel.cs
  5. 1 1
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ScheduleStop/QueryScheduleStop.cs
  6. 17 6
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmPunchingMachineEquipmentKanban.xaml.cs
  7. 33 14
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Dashboard/LaserAndDigitalPunchingEquipmentWidget.xaml.cs
  8. 2 1
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Uct/UctDeviceInformationControls.xaml
  9. 4 2
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Uct/UctDeviceInformationControlsSencd.xaml
  10. 0 0
      skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/SCADA_DAQ.csproj

+ 60 - 69
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Machines/FXMachine.cs

@@ -32,6 +32,23 @@ namespace SCADA_DAQ.Customer.Machines
 
         }
 
+        protected override void ScanCompleted(object sender, EventArgs e)
+        {
+            base.ScanCompleted(sender, e);
+            var runFlag = this.GetListenReg("运行标志位");
+            var stopFlag = this.GetListenReg("停止标志位");
+            var toolChangeFlag = this.GetListenReg("换模标志位");
+            var repairFlag = this.GetListenReg("维修时间");
+            var alarmFlag = GetListenReg("故障标志位");
+            if (runFlag.Value == 0 && stopFlag.Value == 0 && toolChangeFlag.Value == 0 && repairFlag.Value == 0 && alarmFlag.Value == 0)
+            {
+                if (ConnectState == SCADA.Comm.ConnectStates.Connected)
+                {
+                    Log.Info($"设备名{BaseDevice.DeviceID},插入状态{0}");
+                }
+
+            }
+        }
         private void FXMachine_PropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             if (e.PropertyName == nameof(IsOpenTime))
@@ -59,21 +76,11 @@ namespace SCADA_DAQ.Customer.Machines
                     {
                         if (ConnectState == SCADA.Comm.ConnectStates.Connected)
                         {
-                            var runFlag = this.GetListenReg("运行标志位");
-                            var stopFlag = this.GetListenReg("停止标志位");
-                            var toolChangeFlag = this.GetListenReg("换模标志位");
-                            var repairFlag = this.GetListenReg("维修时间");
-                            RegInfo reg = runFlag.Value == 1 ? runFlag : stopFlag.Value == 1 ? stopFlag : toolChangeFlag.Value == 1 ? toolChangeFlag : repairFlag.Value == 1 ? repairFlag : null;
-                            if (reg != null)
-                            {
-                                InsertStateRecord(reg);
-                            }
-
-
+                            GetAllStateValue();
                         }
                         else
-                       {
-                          
+                        {
+
                             MachineStateModel machineStateResumeModel = new MachineStateModel();
                             machineStateResumeModel.StateCode = "停止标志位";
                             machineStateResumeModel.StartTime = DateTime.Parse(DateTime.Now.Format());
@@ -105,35 +112,21 @@ namespace SCADA_DAQ.Customer.Machines
                 {
                     if (BaseDevice.ConnectState == SCADA.Comm.ConnectStates.Connected)
                     {
-                        var runFlag = this.GetListenReg("运行标志位");
-                        var stopFlag = this.GetListenReg("停止标志位");
-                        var toolChangeFlag = this.GetListenReg("换模标志位");
-                        var repairFlag = this.GetListenReg("维修时间");
-                        if (runFlag != null && stopFlag != null && toolChangeFlag != null && repairFlag != null)
+                        if (machineStateResumeModels.Count > 0)
                         {
-                            RegInfo reg = runFlag.Value == 1 ? runFlag : stopFlag.Value == 1 ? stopFlag : toolChangeFlag.Value == 1 ? toolChangeFlag : repairFlag.Value == 1 ? repairFlag : null;
-
-                            if (reg != null)
-                            {
-                                if (machineStateResumeModels.Count > 0)
-                                {
-                                    if (machineStateResumeModels[0].TagName == reg.Comment.Variable)
-                                    {
-                                        machineStateResumeModels[0].EndTime = DateTime.Parse(DateTime.Now.Format());
-                                        Env.SqlDAL.App_Vertiv_MachineInfo.Update(
-                                            $"{T_Col_Name.App_Vertiv_MachineInfo.StateId_Str} = '{machineStateResumeModels[0].StateId}'",
-                                            new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.EndTime_Dt, DateTime.Now.Format()),
-                                            new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.Duration_Dt, machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime),
-                                            new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.DurationSec_Int, (machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime).TotalSeconds)
-                                            );
-
-                                    }
-                                    //machineStateResumeModels.Clear();
-                                }
-                                InsertStateRecord(reg);
-                            }
-
+                            machineStateResumeModels[0].EndTime = DateTime.Parse(DateTime.Now.Format());
+                            Env.SqlDAL.App_Vertiv_MachineInfo.Update(
+                                $"{T_Col_Name.App_Vertiv_MachineInfo.StateId_Str} = '{machineStateResumeModels[0].StateId}'",
+                                new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.EndTime_Dt, DateTime.Now.Format()),
+                                new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.Duration_Dt, machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime),
+                                new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.DurationSec_Int, (machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime).TotalSeconds)
+                                );
+                            machineStateResumeModels.RemoveAt(0);
+                            IsExitState = "";
                         }
+                        GetAllStateValue();
+
+
                     }
 
                 }
@@ -157,41 +150,32 @@ namespace SCADA_DAQ.Customer.Machines
 
         protected override void RegReadValueChanged(object sender, RegReadValueChangedEventArgs e)
         {
-         
+
             base.RegReadValueChanged(sender, e);
-             var reg= (RegInfo)sender;
+            var reg = (RegInfo)sender;
             if (!IsOpenTime)
             {
                 if (ConnectState == SCADA.Comm.ConnectStates.Connected)
                 {
                     InsertStateRecord(reg);
-                                  
 
-                }                    
-         
+
+                }
+
             }
 
-          
+
         }
 
         private void InsertStateRecord(RegInfo reg)
         {
-            var runFlag = this.GetListenReg("运行标志位");
-            var stopFlag = this.GetListenReg("停止标志位");
-            var toolChangeFlag = this.GetListenReg("换模标志位");
-            var repairFlag = this.GetListenReg("维修时间");
-            if (runFlag.Value == 0 && stopFlag.Value == 0 && toolChangeFlag.Value == 0 && repairFlag.Value == 0)
-            {
-                if (ConnectState == SCADA.Comm.ConnectStates.Connected)
-                {
-                    Log.Info($"设备名{BaseDevice.DeviceID},插入状态{0}");
-                }
 
-            }
             if (reg.Comment.Variable == "运行标志位" ||
                  reg.Comment.Variable == "停止标志位" ||
                   reg.Comment.Variable == "换模标志位" ||
-                    reg.Comment.Variable == "维修时间")
+                    reg.Comment.Variable == "维修时间" ||
+                        reg.Comment.Variable == "故障标志位")
+
             {
                 if (reg?.Value != null && reg.Value == 1)
                 {
@@ -214,7 +198,7 @@ namespace SCADA_DAQ.Customer.Machines
                     }
 
                 }
-              
+
                 if (reg?.OldValue != null && reg.Value == 0)
                 {
                     if (machineStateResumeModels.Count > 0)
@@ -228,8 +212,9 @@ namespace SCADA_DAQ.Customer.Machines
                                 new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.Duration_Dt, machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime),
                                 new UpdateItem(T_Col_Name.App_Vertiv_MachineInfo.DurationSec_Int, (machineStateResumeModels[0].EndTime - machineStateResumeModels[0].StartTime).TotalSeconds)
                                 );
-                            Log.Info($"设备名{BaseDevice.DeviceID},更新状态{reg.Comment.Variable},记录列表有{machineStateResumeModels.Count}条数据");
+
                             machineStateResumeModels.RemoveAt(0);
+                            Log.Info($"设备名{BaseDevice.DeviceID},更新状态{reg.Comment.Variable},记录列表有{machineStateResumeModels.Count}条数据");
                         }
 
                     }
@@ -291,21 +276,27 @@ namespace SCADA_DAQ.Customer.Machines
                         Log.Info($"设备名{BaseDevice.DeviceID},重连更新停止状态,记录列表有{machineStateResumeModels.Count}条数据");
                     }
 
-                    var runFlag = this.GetListenReg("运行标志位");
-                    var stopFlag = this.GetListenReg("停止标志位");
-                    var toolChangeFlag = this.GetListenReg("换模标志位");
-                    var repairFlag = this.GetListenReg("维修时间");
-                    RegInfo reg = runFlag.Value == 1 ? runFlag : stopFlag.Value == 1 ? stopFlag : toolChangeFlag.Value == 1 ? toolChangeFlag : repairFlag.Value == 1 ? repairFlag : null;
-                    if (reg != null)
-                    {
-                        InsertStateRecord(reg);
-                    }
+                    GetAllStateValue();
 
                 }
 
             }
         }
 
+        private void GetAllStateValue()
+        {
+            var runFlag = this.GetListenReg("运行标志位");
+            var stopFlag = this.GetListenReg("停止标志位");
+            var toolChangeFlag = this.GetListenReg("换模标志位");
+            var repairFlag = this.GetListenReg("维修时间");
+            var alarmFlag = GetListenReg("故障标志位");
+            RegInfo reg = runFlag.Value == 1 ? runFlag : stopFlag.Value == 1 ? stopFlag : toolChangeFlag.Value == 1 ? toolChangeFlag : repairFlag.Value == 1 ? repairFlag : alarmFlag.Value == 1 ? alarmFlag : null;
+            if (reg != null)
+            {
+                InsertStateRecord(reg);
+            }
+        }
+
         public override void Dispose()
         {
             Env.Schedual.DateTimeChanged -= Schedual_DateTimeChanged;

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/AlarmTime/AlarmQueryModel.cs

@@ -36,7 +36,7 @@ namespace SCADA_DAQ.Customer.Models.AlarmTime
             }
         }
         private string _Device;
-        public List<string> DeviceList { get; set; } = new List<string> { "1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
+        public List<string> DeviceList { get; set; } = new List<string> { null,"1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
             "倍福数冲机", "金方圆数控母线冲孔机", "西门子840D数冲", "亚威PBC折弯机" };
 
         /// <summary>
@@ -56,7 +56,7 @@ namespace SCADA_DAQ.Customer.Models.AlarmTime
                 }
             }
         }
-        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.CurrentDay };
+        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.ThisDay };
 
 
     }

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/MachineMoldTime/QueryMachineMoldModel.cs

@@ -40,7 +40,7 @@ namespace SCADA_DAQ.Customer.Models.MachineMoldTime
             }
         }
         private string _Device;
-        public List<string> DeviceList { get; set; } = new List<string> { "1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
+        public List<string> DeviceList { get; set; } = new List<string> {null,"1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
             "倍福数冲机", "金方圆数控母线冲孔机", "西门子840D数冲", "亚威PBC折弯机" };
 
         /// <summary>
@@ -80,7 +80,7 @@ namespace SCADA_DAQ.Customer.Models.MachineMoldTime
                 }
             }
         }
-        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.CurrentDay };
+        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.ThisDay };
 
     }
 }

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/MachineRepairTime/QueryMachinRepairModel.cs

@@ -38,7 +38,7 @@ namespace SCADA_DAQ.Customer.Models.MachineRepairTime
             }
         }
         private string _DeviceName;
-        public List<string> DeviceList { get; set; } = new List<string> { "亚威一号折弯机", "亚威二号折弯机", "亚威三号折弯机", "激光机", "高机铜排冲剪机", "百超折弯机",
+        public List<string> DeviceList { get; set; } = new List<string> {null, "亚威一号折弯机", "亚威二号折弯机", "亚威三号折弯机", "激光机", "高机铜排冲剪机", "百超折弯机",
             "倍福数冲机", "金方圆铜排冲剪机", "西门子840D数冲", "亚威PBC折弯机" };
 
 
@@ -61,6 +61,6 @@ namespace SCADA_DAQ.Customer.Models.MachineRepairTime
                 }
             }
         }
-        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.CurrentDay };
+        private DateRange _CreateTime = new DateRange(Env.Schedual) { TimeInterval = DateRangeInterval.ThisDay };
     }
 }

+ 1 - 1
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/ScheduleStop/QueryScheduleStop.cs

@@ -35,7 +35,7 @@ namespace SCADA_DAQ.Customer.Models.ScheduleStop
             }
         }
         private string _DeviceName;
-        public List<string> DeviceList { get; set; } = new List<string> { "1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
+        public List<string> DeviceList { get; set; } = new List<string> {null,"1号YaWei折弯机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "高机母线冲剪机", "百超折弯机",
             "倍福数冲机", "金方圆数控母线冲孔机", "西门子840D数冲", "亚威PBC折弯机" };
 
 

+ 17 - 6
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmPunchingMachineEquipmentKanban.xaml.cs

@@ -52,9 +52,10 @@ namespace SCADA_DAQ.Customer
             GetScheduleStopTime();
             GetDeviceAlarmTime();
             GetDeviceStopTime();
-         
             ToolBar.Visibility = Visibility.Collapsed;
             Image_Title.Source = SCADA.CommonCtrl.WpfHelper.VisualHelper.ImageToImageSource(@"Icon\VertivBck.png");
+            LocalTime.Text = DateTime.Now.ToString("dddd yyyy年MM月dd日 HH:mm");
+            Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
             PunchingMachineEquipmentKanbanOne.Title = new string[] { "高机冲孔机运行时间:",
                 "高机冲孔机等待时间:",
                 "高机冲孔机报警/维修时间:",
@@ -76,7 +77,7 @@ namespace SCADA_DAQ.Customer
             //var highmachineArlamTimeSpanString = Convert.ToString(DevicMainTableTime("高机铜排冲剪机")
             //    + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
 
-            var kimFangyuanArlamDouble = DeviceAlarmTime("金方圆数控母线冲孔机")
+            var kimFangyuanArlamDouble = DeviceTimeValue("金方圆数控母线冲孔机", "故障标志位")
                 + DeviceTimeValue("金方圆数控母线冲孔机", "维修时间") + DevicMainTableTime("金方圆铜排冲剪机").TotalSeconds;
             var highmachineArlamDouble = DeviceTimeValue("高机母线冲剪机","故障标志位")
                 + DeviceTimeValue("高机母线冲剪机", "维修时间") + DevicMainTableTime("高机铜排冲剪机").TotalSeconds;
@@ -324,7 +325,15 @@ namespace SCADA_DAQ.Customer
      
         private void Schedual_DateTimeChanged(object sender, SCADA.CommonLib.DateTimeChangedArgs e)
         {
+            if (e.ChangeType.HasFlag(DateTimeChangeType.MinuteChanged))
+            {
+                Dispatcher.BeginInvoke(new Action(() =>
+                {
+                    LocalTime.Text = DateTime.Now.ToString("dddd yyyy年MM月dd日 HH:mm");
 
+                }));
+
+            }
             try
             {
                 if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged  &&
@@ -338,14 +347,16 @@ namespace SCADA_DAQ.Customer
                     GetDeviceStopTime();
                      var kimFangyuanRepairTime = "倒计时" + DeviceRepairTime("金方圆铜排冲剪机").ToString() + "天";//金方圆铜排冲剪机设备保养信息
                     var highmachineRepairTime = "倒计时" + DeviceRepairTime("高机铜排冲剪机").ToString() + "天";//高机铜排冲剪机设备保养信息
-                     //var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
-                   // + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
+                                                                                                     //var kimFangyuanArlamTimeSpanString = Convert.ToString(DevicMainTableTime("金方圆铜排冲剪机")
+                                                                                                     // + TimeSpan.FromSeconds(DeviceTimeValue("金方圆数控母线冲孔机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("金方圆数控母线冲孔机")));//获取金方圆铜排冲剪机设备维修时间
 
                     //var highmachineArlamTimeSpanString = Convert.ToString((DevicMainTableTime("高机铜排冲剪机"))
                     //    + TimeSpan.FromSeconds(DeviceTimeValue("高机母线冲剪机", "维修时间")) + TimeSpan.FromSeconds(DeviceAlarmTime("高机母线冲剪机")));//获取高机铜排冲剪机设备维修时间
-             
 
-                    var kimFangyuanArlamDouble = DeviceAlarmTime("金方圆数控母线冲孔机")
+
+                    //var kimFangyuanArlamDouble = DeviceAlarmTime("金方圆数控母线冲孔机")
+                    //    + DeviceTimeValue("金方圆数控母线冲孔机", "维修时间") + DevicMainTableTime("金方圆铜排冲剪机").TotalSeconds;
+                    var kimFangyuanArlamDouble = DeviceTimeValue("金方圆数控母线冲孔机","故障标志位")
                         + DeviceTimeValue("金方圆数控母线冲孔机", "维修时间") + DevicMainTableTime("金方圆铜排冲剪机").TotalSeconds;
                     var highmachineArlamDouble = DeviceTimeValue("高机母线冲剪机", "故障标志位")
                         + DeviceTimeValue("高机母线冲剪机", "维修时间") + DevicMainTableTime("高机铜排冲剪机").TotalSeconds;

+ 33 - 14
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Dashboard/LaserAndDigitalPunchingEquipmentWidget.xaml.cs

@@ -3,6 +3,7 @@ using Microsoft.DwayneNeed.Win32.Kernel32;
 using NPOI.SS.Formula.Functions;
 using SCADA.CommonLib.Data.DIL;
 using SCADA.CommonLib.Helper;
+using SCADA.Drive.XinJie;
 using SCADA.SECS;
 using SCADA_DAQ.Customer.Models;
 using SCADA_DAQ.Customer.Models.AlarmTime;
@@ -68,9 +69,13 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
             //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 = 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数冲", "维修时间");
+            var bewiftArlamDouble = DeviceTimeValue("倍福数冲机", "故障标志位") + DevicMainTableTime("倍福数冲机").TotalSeconds + DeviceTimeValue("倍福数冲机", "维修时间");
 
             var laserArlamString = TimeSpan.FromSeconds(Math.Round(laserArlamDouble)).ToString();
 
@@ -149,27 +154,33 @@ 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 behwiftCeShi = behwiftRunTime + behwiftStopTime + bewiftArlamDouble + behwiftMoldTime;
 
             LaserCountingPunchesOne.DeviceNameOne.Value = laserRunTimeSpan;
             LaserCountingPunchesOne.DeviceNameTwo.Value = laserStopTimeSpan;
             LaserCountingPunchesOne.DeviceNameThree.Value = laserArlamString;
-            //LaserCountingPunchesOne.DeviceNameFour.Value = laserTimeMaintenanceTableString;
             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 = siemensTimeMaintenanceTableString;
             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 = behwifTimeMaintenanceTableString;
             LaserCountingPunchesThree.DeviceNameFive.Value = behwifRepairTime;
-
+            LaserCountingPunchesThree.DeviceNameSix.Value = TimeSpan.FromSeconds(Math.Round(behwiftCeShi)).ToString();
             // 界面文本
             LaserCountingPunchesOne.Title = new string[] { "激光机运行时间:",
                 "激光机等待时间:",
@@ -262,7 +273,7 @@ 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>().ToList();//获取当天所有设备计划停止信息
 
         }
         public double DevicScheduleStop(string deviceName)
@@ -477,9 +488,10 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
                     var siemensRepairTime = "倒计时" + DeviceRepairTime("西门子840D数冲").ToString() + "天";//西门子设备保养信息
                     var behwifRepairTime = "倒计时" + DeviceRepairTime("倍福数冲机").ToString() + "天";//倍福数冲设备保养信息
 
-                    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数冲", "维修时间");
+                    var bewiftArlamDouble = DeviceTimeValue("倍福数冲机", "故障标志位") + DevicMainTableTime("倍福数冲机").TotalSeconds + DeviceTimeValue("倍福数冲机", "维修时间");
+
                     var laserArlamString = TimeSpan.FromSeconds(Math.Round(laserArlamDouble)).ToString();
 
                     var siemensArlamString = TimeSpan.FromSeconds(Math.Round(siemensArlamDouble)).ToString();
@@ -543,25 +555,32 @@ namespace SCADA_DAQ.Customer.Views.Dashboard
                         LaserMmachineOne.Update();
                         SiemensNumberPunch.Update();
                         DoubleBlessingNumberRush.Update();
+                        var laserCeShi = laserArlamDouble + laserRunTime + laserStopTime;
+
+                        var siemensCeShi = siemensArlamDouble + siemensRunTime + siemensStopTime + siemensMoldTime;
+
+                        var behwiftCeShi = behwiftRunTime + behwiftStopTime + bewiftArlamDouble + behwiftMoldTime;
+
                         LaserCountingPunchesOne.DeviceNameOne.Value = laserRunTimeSpan;
                         LaserCountingPunchesOne.DeviceNameTwo.Value = laserStopTimeSpan;
                         LaserCountingPunchesOne.DeviceNameThree.Value = laserArlamString;
-                        //LaserCountingPunchesOne.DeviceNameFour.Value = laserTimeMaintenanceTableString;
                         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 = siemensTimeMaintenanceTableString;
                         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 = behwifTimeMaintenanceTableString;
                         LaserCountingPunchesThree.DeviceNameFive.Value = behwifRepairTime;
+                        LaserCountingPunchesThree.DeviceNameSix.Value = TimeSpan.FromSeconds(Math.Round(behwiftCeShi)).ToString();
                     }));
 
                 }

+ 2 - 1
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Uct/UctDeviceInformationControls.xaml

@@ -17,6 +17,7 @@
                 <RowDefinition/>
                 <RowDefinition/>
                 <RowDefinition/>
+                <RowDefinition/>
             </Grid.RowDefinitions> 
             <local:UctMidcard Title="{Binding Text,ElementName=this}" FontSize="22" Margin="8.8" HorizontalAlignment="Left" />
             <local:UctNameTheTimeControl Grid.Row="1" Title="{Binding Title[0],ElementName=this}" Margin="8.8" x:Name="DeviceNameOne"/>
@@ -24,7 +25,7 @@
             <local:UctNameTheTimeControl Grid.Row="3" Title="{Binding Title[2],ElementName=this}" Margin="8.8" x:Name="DeviceNameThree"/>
             <local:UctNameTheTimeControl Grid.Row="4" Title="{Binding Title[3],ElementName=this}" Margin="8.8" x:Name="DeviceNameFour"/>
             <local:UctNameTheTimeControl Grid.Row="5" Title="{Binding Title[4],ElementName=this}" Margin="8.8" x:Name="DeviceNameFive"/>
-            <!--<local:UctNameTheTimeControl Grid.Row="6" Title="{Binding Title[5],ElementName=this}" Margin="8.8" x:Name="DeviceNameSix"/>-->
+            <local:UctNameTheTimeControl Grid.Row="6" Title="{Binding Title[5],ElementName=this}" Margin="8.8" x:Name="DeviceNameSix"/>
         </Grid>
     </Grid>
 </UserControl>

+ 4 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Views/Uct/UctDeviceInformationControlsSencd.xaml

@@ -18,6 +18,8 @@
                 <RowDefinition/>
                 <RowDefinition/>
                 <RowDefinition/>
+                <RowDefinition/>
+        
             </Grid.RowDefinitions>
             <local:UctMidcard Title="{Binding Text,ElementName=this}" FontSize="22"  Margin="8.8"/>
             <local:UctNameTheTimeControlSencd Title="{Binding Title[0],ElementName=this}" Margin="8.8" x:Name="DeviceNameOne" Grid.Row="1"  />
@@ -25,7 +27,7 @@
             <local:UctNameTheTimeControlSencd Grid.Row="3" Title="{Binding Title[2],ElementName=this}" Margin="8.8" x:Name="DeviceNameThree"/>
             <local:UctNameTheTimeControlSencd Grid.Row="4" Title="{Binding Title[3],ElementName=this}" Margin="8.8" x:Name="DeviceNameFour"/>
             <local:UctNameTheTimeControlSencd Grid.Row="5" Title="{Binding Title[4],ElementName=this}" Margin="8.8" x:Name="DeviceNameFive"/>
-            <!--<local:UctNameTheTimeControlSencd Grid.Row="6" Title="{Binding Title[5],ElementName=this}" Margin="8.8" x:Name="DeviceNameSix"/>-->
-        </Grid>
+            <local:UctNameTheTimeControlSencd Grid.Row="6" Title="{Binding Title[5],ElementName=this}" Margin="8.8" x:Name="DeviceNameSix"/>
+         </Grid>
     </Grid>
 </UserControl>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/SCADA_DAQ.csproj


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor