Browse Source

临时提交

谢翼翔 1 year ago
parent
commit
953e86deae

+ 3 - 17
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/DeviceInfoTime/MachineInfoModel.cs

@@ -15,6 +15,8 @@ namespace SCADA_DAQ.Customer.Models.DeviceInfoTime
     {
         private static SqlSchema.DIL.DILDB DAL = Env.SqlDAL;
 
+
+
         /// <summary>
         /// 唯一码
         /// </summary>
@@ -138,23 +140,7 @@ namespace SCADA_DAQ.Customer.Models.DeviceInfoTime
 
         }
 
-        //public double DeviceTimeValue(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)[Device].ToLookup(t => t.StateCode)[StateCode].Sum(t => t.DurationSec);
-        //    return Convert.ToDouble(keepTime);
-        //}
-
-        //public ILookup<string, MachineInfoModel> DeviceTimeValue_2()//设备运行状态时间
-        //{
-        //    //获取当天所有设备信息
-        //    var deviceInformation = DAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>()?
-        //        .Where(t => t.CreateTime.Date == DateTime.Now.Date && t.Device == Device).ToLookup(t => t.StateCode);
-        //    //var keepTime = deviceInformation.ToLookup(t => t.Device)[Device].ToLookup(t => t.StateCode)[StateCode].Sum(t => t.DurationSec);
-        //    //return Convert.ToDouble(keepTime);
-        //    return deviceInformation;
-        //}
+     
 
         public double DeviceTimeValue_3(List<MachineInfoModel> data, string Device, string StateCode)//设备运行状态时间
         {

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

@@ -46,7 +46,7 @@ namespace SCADA_DAQ.Customer.Models.MachineMoldTime
         /// <summary>
         /// 
         /// </summary>
-        [AutoViewProperty("设备状态")]
+        [AutoViewProperty("设备状态",OptionItemsSource = nameof(DeviceCode), StringType = StringType.IsLimited)]
         [Query(T_Col_Name.App_Vertiv_MachineInfo.StateCode_Str)]
         public string StateCode
         {
@@ -61,7 +61,7 @@ namespace SCADA_DAQ.Customer.Models.MachineMoldTime
             }
         }
         private string _StateCode;
-        //public List<string> DeviceCode { get; set; } = new List<string> { "换模标志位", "停止标志位" };
+        public List<string> DeviceCode { get; set; } = new List<string> { null,"运行标志位", "停止标志位","故障标志位","换模标志位","维修时间"};
 
         /// <summary>
         /// 

+ 59 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/OEEData/OEEDataModel.cs

@@ -0,0 +1,59 @@
+using SCADA.CommonLib;
+using SCADA.CommonLib.Helper;
+using SCADA_DAQ.Customer.Models.DeviceInfoTime;
+using SCADA_DAQ.Customer.Models.DistinctTimePiece;
+using System;
+using System.Collections.Generic;
+using System.Drawing.Printing;
+using System.Linq;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SCADA_DAQ.Customer.Models.OEEData
+{
+ 
+    public class OEEDataModel:ObservableObject
+    {
+
+       
+        //var DeviceData = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>();
+
+        public static List<double> OeeData(List<OeeProperty> deviceOeeData,string DeviceName)
+        {
+            var result = new List<double>();
+            var AddRunTime = 0;
+            var dayTime = DateTimeHelper.GetDays(DateTimeHelper.ToMonthStart(DateTime.Now), DateTimeHelper.ToMonthEnd(DateTime.Now));
+            if (deviceOeeData?.Count !=null)
+            {
+                var runTime = deviceOeeData.OrderBy(t=>t.CreateTime).ToList();
+                foreach (var item in deviceOeeData)
+                {
+                    if (item.DeviceName == DeviceName)
+                    {
+                        for (int i = 0; i < dayTime.Count; i++)
+                        {
+                            var hourStartResult = dayTime[i].StartTime.Format();
+                            var hourEndResult = dayTime[i].EndTime.Format();
+                            for (int p = 0; runTime.Count < p; p++)
+                            {
+                                if (runTime[p].CreateTime >= DateTime.Parse(hourStartResult) & runTime[p].CreateTime <= DateTime.Parse(hourEndResult))
+                                {
+                                    AddRunTime = runTime[p].DeviceRunTime + AddRunTime;
+                                    
+                                }
+                              
+                            }
+                            result.Add(AddRunTime);
+
+                        }
+                     
+                    }
+                 
+                }
+            }
+            return result;
+        } 
+    }
+    
+}

+ 21 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Models/OEEData/OeeProperty.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SCADA_DAQ.Customer.Models.OEEData
+{
+    public class OeeProperty
+    {
+
+        public int DeviceRunTime { get; set; }
+        public List<int> AddDeviceRunTime { get; set; }
+
+        public string DeviceName { get; set; }
+
+        public DateTime CreateTime { get; set; }
+
+        
+    }
+}

+ 52 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmDeviceOeeInformation.xaml.cs

@@ -1,4 +1,7 @@
 using SCADA.CommonCtrl.WpfControl;
+using SCADA.CommonLib.Helper;
+using SCADA.CommonLib;
+using SCADA_DAQ.Customer.Models.DeviceInfoTime;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -30,5 +33,54 @@ namespace SCADA_DAQ.Customer
             LocalTime.Text = DateTime.Now.ToString("dddd yyyy年MM月dd日 HH:mm");
             
         }
+        public List<MachineInfoModel> OeeData { get; set; }
+
+        public List<TimeSection> Days { get; set; }
+        public void GetOeeData()
+        {
+            Days = DateTimeHelper.GetDays(DateTimeHelper.ToMonthStart(DateTime.Now), DateTimeHelper.ToMonthEnd(DateTime.Now));
+            var first = DateTime.Parse(Days.First().StartTime.ToString());
+            var last = DateTime.Parse(Days.Last().EndTime.ToString());
+            OeeData = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>();
+            var deviceMonthTime = OeeData.Where(t => t.CreateTime >= first & t.CreateTime <= last);
+        }
+        public List<double> OeePercent(string deviceName, string deviceCode)
+        {
+            var allTime = new List<double>();
+            var dayAllTime = 0;
+            var runTime = new List<double>();
+            var dayRunTime = 0;
+            for (int i = 0; i < Days.Count; i++)
+            {
+                var hourStartResult = Days[i].StartTime.Format();
+                var hourEndResult = Days[i].EndTime.Format();
+                var deviceDayTIme = OeeData.ToLookup(t => t.Device)[deviceName]
+                 .Where(t => t.CreateTime >= DateTime.Parse(hourStartResult) & t.CreateTime < DateTime.Parse(hourEndResult));
+                foreach (var item in deviceDayTIme)
+                {
+                    dayAllTime = item.DurationSec + dayAllTime;
+
+                }
+                var deviceRunDayTIme = OeeData.ToLookup(t => t.Device)[deviceName].ToLookup(t => t.StateCode)[deviceCode]
+                    .Where(t => t.CreateTime >= DateTime.Parse(hourStartResult) & t.CreateTime < DateTime.Parse(hourEndResult));
+                foreach (var item in deviceRunDayTIme)
+                {
+                    dayRunTime = item.DurationSec + dayRunTime;
+                }
+                if (dayAllTime != 0)
+                {
+                    var oeeValue = Convert.ToDouble(dayRunTime) / dayAllTime;
+                    //var percentOeeValue = oeeValue.ToString("0.##%");
+                    allTime.Add(Math.Round(oeeValue, 2));
+                }
+                else
+                {
+                    allTime.Add(0);
+                }
+                dayAllTime = 0;
+                dayRunTime = 0;
+            }
+            return allTime;
+        }
     }
 }

+ 26 - 26
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmKanbanForPressBrakeEquipment.xaml.cs

@@ -60,32 +60,32 @@ namespace SCADA_DAQ.Customer
             LocalTime.Text = DateTime.Now.ToString("dddd yyyy年MM月dd日 HH:mm");
             KanbanForPressBrakeEquipmentOne.Title = new string[] { "运行时间:",
                 "等待时间:",
-                "换模时间:",
                 "报警/维修时间:",
+                "换模时间:",
                 "维保时间:"};
 
             KanbanForPressBrakeEquipmentTwo.Title = new string[] { "运行时间:",
                 "等待时间:",
-                "换模时间:",
                 "报警/维修时间:",
+                "换模时间:",
                 "维保时间:"};
 
             KanbanForPressBrakeEquipmentThree.Title = new string[] { "运行时间:",
                 "等待时间:",
-                "换模时间:",
                 "报警/维修时间:",
+                "换模时间:",
                 "维保时间:"};
 
             KanbanForPressBrakeEquipmentFour.Title = new string[] { "运行时间:",
                 "等待时间:",
-                "换模时间:",
                 "报警/维修时间:",
+                "换模时间:",
                 "维保时间:"};
 
             KanbanForPressBrakeEquipmentFive.Title = new string[] { "运行时间:",
                 "等待时间:",
-                "换模时间:",
                 "报警/维修时间:",
+                "换模时间:",
                 "维保时间:"};
 
 
@@ -162,7 +162,7 @@ namespace SCADA_DAQ.Customer
             var baiChaoTimeMaintenanceTable = TimeSpan.FromSeconds(Math.Round(baiChaoTimeMaintenanceTableDouble)).ToString();
 
 
-            var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位")- DevicMainTableTime("亚威一号折弯机").TotalSeconds;//1号YaWei折弯机等待时间
+            var firstYaWeiStopTime = DeviceTimeValue("1号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威一号折弯机").TotalSeconds;//1号YaWei折弯机等待时间
             var sencondYaWeiStopTime = DeviceTimeValue("2号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威二号折弯机").TotalSeconds;//2号YaWei折弯机等待时间
             var thirdYaWweiStopTime = DeviceTimeValue("3号YaWei折弯机", "停止标志位") - DevicMainTableTime("亚威三号折弯机").TotalSeconds; //3号YaWei折弯机等待时间
             var pbcYaWweiStopTime = DeviceTimeValue("亚威PBC折弯机", "停止标志位") - DevicMainTableTime("亚威PBC折弯机").TotalSeconds;//亚威PBC折弯机等待时间
@@ -194,32 +194,32 @@ namespace SCADA_DAQ.Customer
 
             KanbanForPressBrakeEquipmentOne.DeviceNameOne.Value = firstYaWeiRunTimeSpan;
             KanbanForPressBrakeEquipmentOne.DeviceNameTwo.Value = firstYaWeiStopTimeSpan;
-            KanbanForPressBrakeEquipmentOne.DeviceNameThree.Value = firstYaWeiMoldTimeSpan;
-            KanbanForPressBrakeEquipmentOne.DeviceNameFour.Value = firstYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentOne.DeviceNameThree.Value = firstYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentOne.DeviceNameFour.Value = firstYaWeiMoldTimeSpan;
             KanbanForPressBrakeEquipmentOne.DeviceNameFive.Value = firstYaWeiRepairTime;
 
             KanbanForPressBrakeEquipmentTwo.DeviceNameOne.Value = sencondYaWeiRunTimeSpan;
             KanbanForPressBrakeEquipmentTwo.DeviceNameTwo.Value = sencondYaWeiStopTimeSpan;
-            KanbanForPressBrakeEquipmentTwo.DeviceNameThree.Value = sencondYaWeiMoldTimeSpan;
-            KanbanForPressBrakeEquipmentTwo.DeviceNameFour.Value = secondYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentTwo.DeviceNameThree.Value = secondYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentTwo.DeviceNameFour.Value = sencondYaWeiMoldTimeSpan;
             KanbanForPressBrakeEquipmentTwo.DeviceNameFive.Value = secondYaWeiRepairTime;
 
             KanbanForPressBrakeEquipmentThree.DeviceNameOne.Value = thirdYaWweiRunTimeSpan;
             KanbanForPressBrakeEquipmentThree.DeviceNameTwo.Value = thirdYaWweiStopTimeSpan;
-            KanbanForPressBrakeEquipmentThree.DeviceNameThree.Value = thirdYaWweiMoldTimeSpan;
-            KanbanForPressBrakeEquipmentThree.DeviceNameFour.Value = thirdYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentThree.DeviceNameThree.Value = thirdYaWeiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentThree.DeviceNameFour.Value = thirdYaWweiMoldTimeSpan;
             KanbanForPressBrakeEquipmentThree.DeviceNameFive.Value = thirdYaWeiRepairTime;
 
             KanbanForPressBrakeEquipmentFour.DeviceNameOne.Value = pbcYaWweiRunTimeSpan;
             KanbanForPressBrakeEquipmentFour.DeviceNameTwo.Value = pbcYaWweiStopTimeSpan;
-            KanbanForPressBrakeEquipmentFour.DeviceNameThree.Value = pbcYaWweiMoldTimeSpan;
-            KanbanForPressBrakeEquipmentFour.DeviceNameFour.Value = pbcYaWweiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentFour.DeviceNameThree.Value = pbcYaWweiTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentFour.DeviceNameFour.Value =  pbcYaWweiMoldTimeSpan;
             KanbanForPressBrakeEquipmentFour.DeviceNameFive.Value = pbcYaWweiRepairTime;
 
             KanbanForPressBrakeEquipmentFive.DeviceNameOne.Value = baiChaoRunTimeSpan;
             KanbanForPressBrakeEquipmentFive.DeviceNameTwo.Value = baiChaoStopTimeSpan;
-            KanbanForPressBrakeEquipmentFive.DeviceNameThree.Value = baiChaoMoldTimeSpan;
-            KanbanForPressBrakeEquipmentFive.DeviceNameFour.Value = baiChaoTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentFive.DeviceNameThree.Value = baiChaoTimeMaintenanceTable;
+            KanbanForPressBrakeEquipmentFive.DeviceNameFour.Value =  baiChaoMoldTimeSpan;
             KanbanForPressBrakeEquipmentFive.DeviceNameFive.Value = baiChaoRepairTime;
             Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
         }
@@ -474,32 +474,32 @@ namespace SCADA_DAQ.Customer
                     {
                         KanbanForPressBrakeEquipmentOne.DeviceNameOne.Value = firstYaWeiRunTimeSpan;
                         KanbanForPressBrakeEquipmentOne.DeviceNameTwo.Value = firstYaWeiStopTimeSpan;
-                        KanbanForPressBrakeEquipmentOne.DeviceNameThree.Value = firstYaWeiMoldTimeSpan;
-                        KanbanForPressBrakeEquipmentOne.DeviceNameFour.Value = firstYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentOne.DeviceNameThree.Value = firstYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentOne.DeviceNameFour.Value = firstYaWeiMoldTimeSpan;
                         KanbanForPressBrakeEquipmentOne.DeviceNameFive.Value = firstYaWeiRepairTime;
 
                         KanbanForPressBrakeEquipmentTwo.DeviceNameOne.Value = sencondYaWeiRunTimeSpan;
                         KanbanForPressBrakeEquipmentTwo.DeviceNameTwo.Value = sencondYaWeiStopTimeSpan;
-                        KanbanForPressBrakeEquipmentTwo.DeviceNameThree.Value = sencondYaWeiMoldTimeSpan;
-                        KanbanForPressBrakeEquipmentTwo.DeviceNameFour.Value = secondYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentTwo.DeviceNameThree.Value = secondYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentTwo.DeviceNameFour.Value = sencondYaWeiMoldTimeSpan;
                         KanbanForPressBrakeEquipmentTwo.DeviceNameFive.Value = secondYaWeiRepairTime;
 
                         KanbanForPressBrakeEquipmentThree.DeviceNameOne.Value = thirdYaWweiRunTimeSpan;
                         KanbanForPressBrakeEquipmentThree.DeviceNameTwo.Value = thirdYaWweiStopTimeSpan;
-                        KanbanForPressBrakeEquipmentThree.DeviceNameThree.Value = thirdYaWweiMoldTimeSpan;
-                        KanbanForPressBrakeEquipmentThree.DeviceNameFour.Value = thirdYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentThree.DeviceNameThree.Value = thirdYaWeiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentThree.DeviceNameFour.Value = thirdYaWweiMoldTimeSpan;
                         KanbanForPressBrakeEquipmentThree.DeviceNameFive.Value = thirdYaWeiRepairTime;
 
                         KanbanForPressBrakeEquipmentFour.DeviceNameOne.Value = pbcYaWweiRunTimeSpan;
                         KanbanForPressBrakeEquipmentFour.DeviceNameTwo.Value = pbcYaWweiStopTimeSpan;
-                        KanbanForPressBrakeEquipmentFour.DeviceNameThree.Value = pbcYaWweiMoldTimeSpan;
-                        KanbanForPressBrakeEquipmentFour.DeviceNameFour.Value = pbcYaWweiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentFour.DeviceNameThree.Value = pbcYaWweiTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentFour.DeviceNameFour.Value = pbcYaWweiMoldTimeSpan;
                         KanbanForPressBrakeEquipmentFour.DeviceNameFive.Value = pbcYaWweiRepairTime;
 
                         KanbanForPressBrakeEquipmentFive.DeviceNameOne.Value = baiChaoRunTimeSpan;
                         KanbanForPressBrakeEquipmentFive.DeviceNameTwo.Value = baiChaoStopTimeSpan;
-                        KanbanForPressBrakeEquipmentFive.DeviceNameThree.Value = baiChaoMoldTimeSpan;
-                        KanbanForPressBrakeEquipmentFive.DeviceNameFour.Value = baiChaoTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentFive.DeviceNameThree.Value = baiChaoTimeMaintenanceTable;
+                        KanbanForPressBrakeEquipmentFive.DeviceNameFour.Value = baiChaoMoldTimeSpan;
                         KanbanForPressBrakeEquipmentFive.DeviceNameFive.Value = baiChaoRepairTime;
                     }));
                 }

+ 1 - 1
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmMachineRepairTimeQuery.xaml.cs

@@ -22,7 +22,7 @@ namespace SCADA_DAQ.Customer
     /// <summary>
     /// UctFrmMachineRepairTimeQuery.xaml 的交互逻辑
     /// </summary>
-    [UctMenu("设备维修时间查询",Icon ="查询")]
+    [UctMenu("设备断电维修时间查询",Icon ="查询")]
     public partial class UctFrmMachineRepairTimeQuery : BaseUctFrm<QueryMachinRepairModel>
     {
         public UctFrmMachineRepairTimeQuery()

+ 7 - 67
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/UctFrmRunHistory.xaml.cs

@@ -4,11 +4,13 @@ using Mysqlx.Crud;
 using NPOI.SS.Formula.Eval;
 using NPOI.SS.Formula.Functions;
 using SCADA.CommonCtrl.WpfControl;
+using SCADA.CommonLib;
 using SCADA.CommonLib.Data.DIL.Sqlite;
 using SCADA.CommonLib.Helper;
 using SCADA_DAQ.Customer.Models.AlarmTime;
 using SCADA_DAQ.Customer.Models.DeviceInfoTime;
 using SCADA_DAQ.Customer.Models.DistinctTimePiece;
+using SCADA_DAQ.Customer.Models.OEEData;
 using SCADA_DAQ.Customer.Models.ScheduleStop;
 using SqlSchema.DBNames;
 using System;
@@ -46,78 +48,16 @@ namespace SCADA_DAQ.Customer
         public UctFrmRunHistory()
         {
             InitializeComponent();
-
-            //    var timeListAdd = new List<List<TimePiece>>();
-            //    var timeStopTime = DAL.App_Vertiv_DeviceScheduleStop.GetData<DeviceScheduleStopModel>().ToLookup(t => t.Device)["激光机"];
-            //    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 classesStartTime = Convert.ToDateTime(DateTime.Now.ToString("00:00:00"));
-            //    var classesEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
-            //    var informationValue = Env.SqlDAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesStartTime & t.CreateTime <= classesEndTime).ToLookup(t => t.Device_Str)["激光机"];
-
-            //    var classesYesterdayStartTime = Convert.ToDateTime(DateTime.Now.AddDays(-1).Date);
-            //    var classesDayEndTime = Convert.ToDateTime(DateTime.Now.ToString("23:59:59"));
-            //    var deviceValueInformation = Env.SqlDAL.Base_AlarmLog.GetData<AlarmColumModel>()?.Where(t => t.CreateTime >= classesYesterdayStartTime & t.CreateTime <= classesDayEndTime).ToLookup(t => t.Device_Str)["激光机"];
-
-            //    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);
-
-
+         
+            
         }
 
-    }
-
-       
+        
 
     }
 
+}
+
 
 
 

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Env.cs

@@ -29,8 +29,8 @@ namespace SCADA_DAQ
 
         //public static SqlSchema.DIL.DILDB SqlDAL = new SqlSchema.DIL.DILDB("10.163.96.79", "Vertiv", "sa", "1qaz2wsx");
 
-        //public static SqlSchema.DIL.DILDB SqlDAL = new SqlSchema.DIL.DILDB("127.0.0.1", "Vertiv", "sa", "M+123456");
-        public static SqlSchema.DIL.DILDB SqlDAL = new SqlSchema.DIL.DILDB("10.163.96.79", "Vertiv", "sa", "1qaz2wsx");
+        public static SqlSchema.DIL.DILDB SqlDAL = new SqlSchema.DIL.DILDB("127.0.0.1", "Vertiv", "sa", "M+123456");
+       //public static SqlSchema.DIL.DILDB SqlDAL = new SqlSchema.DIL.DILDB("10.163.96.79", "Vertiv", "sa", "1qaz2wsx");
 
         //public static SqlSchema.DIL.DILDB SqlDAL;