Browse Source

临时提交

谢翼翔 1 year ago
parent
commit
cea0419f19

+ 230 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.DAL/SqlServer.cs

@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data.SqlClient;
+using System.Linq.Expressions;
 using SCADA.CommonLib;
 using SCADA.CommonLib.Data;
 using SCADA.CommonLib.Data.DIL;
@@ -261,6 +262,53 @@ public static class T_Col_Name
                 /// </summary>
                  public const string @ModifyUser_Str=nameof(@ModifyUser_Str);
                     
+             }
+             /// <summary> 
+             /// App_Vertiv_MachineInfoOeeData
+             /// </summary>
+             public class App_Vertiv_MachineInfoOeeData
+             {
+             	/// <summary>
+                /// 
+                /// </summary>
+                 public const string @ID=nameof(@ID);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @OrgID_Int=nameof(@OrgID_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @StateId_Str=nameof(@StateId_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @Device_Str=nameof(@Device_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @CreateTime_Dt=nameof(@CreateTime_Dt);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @ModifyTime_Dt=nameof(@ModifyTime_Dt);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @ModifyUser_Str=nameof(@ModifyUser_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @RunDayTime_Int=nameof(@RunDayTime_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @AllDayTime_Int=nameof(@AllDayTime_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @Duration_Dec=nameof(@Duration_Dec);
+                    
              }
              /// <summary> 
              /// App_Vertiv_MaintenanceTable
@@ -1587,6 +1635,163 @@ namespace DBModel
                 }
             }
             
+             }
+             /// <summary> 
+             /// 
+             /// </summary>
+             public class App_Vertiv_MachineInfoOeeData:ObservableObject
+             {
+             	  private int _ID;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int ID
+                {
+                get {return _ID;}
+                set{
+                    if(value!=(_ID))
+                    {
+                        _ID=value;
+                        OnPropertyChanged(nameof( ID));
+                    }
+                }
+            }
+              private int? _OrgID_Int;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int? OrgID_Int
+                {
+                get {return _OrgID_Int;}
+                set{
+                    if(value!=(_OrgID_Int))
+                    {
+                        _OrgID_Int=value;
+                        OnPropertyChanged(nameof( OrgID_Int));
+                    }
+                }
+            }
+              private string _StateId_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string StateId_Str
+                {
+                get {return _StateId_Str;}
+                set{
+                    if(value!=(_StateId_Str))
+                    {
+                        _StateId_Str=value;
+                        OnPropertyChanged(nameof( StateId_Str));
+                    }
+                }
+            }
+              private string _Device_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string Device_Str
+                {
+                get {return _Device_Str;}
+                set{
+                    if(value!=(_Device_Str))
+                    {
+                        _Device_Str=value;
+                        OnPropertyChanged(nameof( Device_Str));
+                    }
+                }
+            }
+              private DateTime? _CreateTime_Dt;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public DateTime? CreateTime_Dt
+                {
+                get {return _CreateTime_Dt;}
+                set{
+                    if(value!=(_CreateTime_Dt))
+                    {
+                        _CreateTime_Dt=value;
+                        OnPropertyChanged(nameof( CreateTime_Dt));
+                    }
+                }
+            }
+              private DateTime? _ModifyTime_Dt;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public DateTime? ModifyTime_Dt
+                {
+                get {return _ModifyTime_Dt;}
+                set{
+                    if(value!=(_ModifyTime_Dt))
+                    {
+                        _ModifyTime_Dt=value;
+                        OnPropertyChanged(nameof( ModifyTime_Dt));
+                    }
+                }
+            }
+              private string _ModifyUser_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string ModifyUser_Str
+                {
+                get {return _ModifyUser_Str;}
+                set{
+                    if(value!=(_ModifyUser_Str))
+                    {
+                        _ModifyUser_Str=value;
+                        OnPropertyChanged(nameof( ModifyUser_Str));
+                    }
+                }
+            }
+              private int? _RunDayTime_Int;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int? RunDayTime_Int
+                {
+                get {return _RunDayTime_Int;}
+                set{
+                    if(value!=(_RunDayTime_Int))
+                    {
+                        _RunDayTime_Int=value;
+                        OnPropertyChanged(nameof( RunDayTime_Int));
+                    }
+                }
+            }
+              private int? _AllDayTime_Int;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int? AllDayTime_Int
+                {
+                get {return _AllDayTime_Int;}
+                set{
+                    if(value!=(_AllDayTime_Int))
+                    {
+                        _AllDayTime_Int=value;
+                        OnPropertyChanged(nameof( AllDayTime_Int));
+                    }
+                }
+            }
+              private string _Duration_Dec;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string Duration_Dec
+                {
+                get {return _Duration_Dec;}
+                set{
+                    if(value!=(_Duration_Dec))
+                    {
+                        _Duration_Dec=value;
+                        OnPropertyChanged(nameof( Duration_Dec));
+                    }
+                }
+            }
+            
              }
              /// <summary> 
              /// 
@@ -3348,6 +3553,10 @@ public BaseTable App_Vertiv_MachineInfo{get;private set;}
  /// <summary> 
  ///  
  /// </summary> 
+public BaseTable App_Vertiv_MachineInfoOeeData{get;private set;}
+ /// <summary> 
+ ///  
+ /// </summary> 
 public BaseTable App_Vertiv_MaintenanceTable{get;private set;}
  /// <summary> 
  ///  
@@ -3388,6 +3597,7 @@ App_Vertiv_ByBendInfo=CreateTable("ID","App_Vertiv_ByBendInfo");
 App_Vertiv_ByBendPowerOnTime=CreateTable("ID","App_Vertiv_ByBendPowerOnTime");
 App_Vertiv_DeviceScheduleStop=CreateTable("ID","App_Vertiv_DeviceScheduleStop");
 App_Vertiv_MachineInfo=CreateTable("ID","App_Vertiv_MachineInfo");
+App_Vertiv_MachineInfoOeeData=CreateTable("ID","App_Vertiv_MachineInfoOeeData");
 App_Vertiv_MaintenanceTable=CreateTable("ID","App_Vertiv_MaintenanceTable");
 App_Vertiv_ProductionLog=CreateTable("ID","App_Vertiv_ProductionLog");
 APP_Vertiv_RepairTable=CreateTable("ID","APP_Vertiv_RepairTable");
@@ -3426,6 +3636,10 @@ public BaseTable App_Vertiv_MachineInfo{get;private set;}
  /// <summary> 
  ///  
  /// </summary> 
+public BaseTable App_Vertiv_MachineInfoOeeData{get;private set;}
+ /// <summary> 
+ ///  
+ /// </summary> 
 public BaseTable App_Vertiv_MaintenanceTable{get;private set;}
  /// <summary> 
  ///  
@@ -3472,6 +3686,7 @@ App_Vertiv_ByBendInfo=innerDb.CreateTable("ID","App_Vertiv_ByBendInfo");
 App_Vertiv_ByBendPowerOnTime=innerDb.CreateTable("ID","App_Vertiv_ByBendPowerOnTime");
 App_Vertiv_DeviceScheduleStop=innerDb.CreateTable("ID","App_Vertiv_DeviceScheduleStop");
 App_Vertiv_MachineInfo=innerDb.CreateTable("ID","App_Vertiv_MachineInfo");
+App_Vertiv_MachineInfoOeeData=innerDb.CreateTable("ID","App_Vertiv_MachineInfoOeeData");
 App_Vertiv_MaintenanceTable=innerDb.CreateTable("ID","App_Vertiv_MaintenanceTable");
 App_Vertiv_ProductionLog=innerDb.CreateTable("ID","App_Vertiv_ProductionLog");
 APP_Vertiv_RepairTable=innerDb.CreateTable("ID","APP_Vertiv_RepairTable");
@@ -3539,6 +3754,21 @@ V_Base_AlarmLog=innerDb.CreateTable("ID","V_Base_AlarmLog");
             {
                 return innerDb.UpdateColumnComment(tableName,columnName, comment);
             }
+
+            public override bool BatchUpdateOrInsert<T>(IEnumerable<T> modelList, Expression<Func<T, dynamic>> onRelations, string destinationTableName = null, Expression<Func<T, dynamic>> updateProperts = null)
+            {
+                return innerDb.BatchUpdateOrInsert(modelList, onRelations, destinationTableName, updateProperts);
+            }
+
+            public override int BatchDelete(IEnumerable<object> ids, string destinationTableName, string idColumn = "ID")
+            {
+                return base.BatchDelete(ids, destinationTableName, idColumn);
+            }
+
+            public override int BatchDelete<T>(IEnumerable<T> modelList, Expression<Func<T, dynamic>> onRelations, string destinationTableName = null)
+            {
+                return base.BatchDelete(modelList, onRelations, destinationTableName);
+            }
 #endregion
 
     }

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

@@ -2,6 +2,7 @@
 using SCADA.CommonLib.Helper;
 using SCADA_DAQ.Customer.Models.DeviceInfoTime;
 using SCADA_DAQ.Customer.Models.DistinctTimePiece;
+using SqlSchema.DBNames;
 using System;
 using System.Collections.Generic;
 using System.Drawing.Printing;
@@ -16,44 +17,101 @@ 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)
+        /// <summary>
+        /// 设备名称
+        /// </summary>
+        [Column(T_Col_Name.App_Vertiv_MachineInfoOeeData.Device_Str)]
+        public 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)
+            get { return _DeviceName; }
+            set
             {
-                var runTime = deviceOeeData.OrderBy(t=>t.CreateTime).ToList();
-                foreach (var item in deviceOeeData)
+                if (value != _DeviceName)
                 {
-                    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);
-
-                        }
-                     
-                    }
-                 
+                    _DeviceName = value;
+                    OnPropertyChanged(nameof(DeviceName));
                 }
             }
-            return result;
-        } 
+        }
+        private string _DeviceName;
+
+
+        /// <summary>
+        /// 设备运行时间
+        /// </summary>
+        [Column(T_Col_Name.App_Vertiv_MachineInfoOeeData.RunDayTime_Int)]
+        public int RunTime
+        {
+            get { return _RunTime; }
+            set
+            {
+                if (value != _RunTime)
+                {
+                    _RunTime = value;
+                    OnPropertyChanged(nameof(RunTime));
+                }
+            }
+        }
+        private int _RunTime;
+
+
+        /// <summary>
+        /// 设备今日总时间
+        /// </summary>
+        [Column(T_Col_Name.App_Vertiv_MachineInfoOeeData.AllDayTime_Int)]
+        public int DeviceDayTime
+        {
+            get { return _DeviceDayTime; }
+            set
+            {
+                if (value != _DeviceDayTime)
+                {
+                    _DeviceDayTime = value;
+                    OnPropertyChanged(nameof(DeviceDayTime));
+                }
+            }
+        }
+        private int _DeviceDayTime;
+
+
+        /// <summary>
+        /// 设备Oee百分比
+        /// </summary>
+        [Column(T_Col_Name.App_Vertiv_MachineInfoOeeData.Duration_Dec)]
+        public string OeePercentage
+        {
+            get { return _OeePercentage; }
+            set
+            {
+                if (value != _OeePercentage)
+                {
+                    _OeePercentage = value;
+                    OnPropertyChanged(nameof(OeePercentage));
+                }
+            }
+        }
+        private string _OeePercentage;
+
+
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        [Column(T_Col_Name.App_Vertiv_MachineInfoOeeData.CreateTime_Dt)]
+        public DateTime CreateTime
+        {
+            get { return _CreateTime; }
+            set
+            {
+                if (value != _CreateTime)
+                {
+                    _CreateTime = value;
+                    OnPropertyChanged(nameof(CreateTime));
+                }
+            }
+        }
+        private DateTime _CreateTime;
+
     }
     
 }

+ 95 - 25
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/Customer/Service/CustomerService.cs

@@ -1,4 +1,5 @@
-using Microsoft.Expression.Interactivity.Media;
+using ControlzEx.Standard;
+using Microsoft.Expression.Interactivity.Media;
 using NPOI.SS.Formula.Functions;
 using Opc.Ua;
 using SCADA;
@@ -7,6 +8,8 @@ using SCADA.CommonLib.Data.DIL;
 using SCADA.CommonLib.Helper;
 using SCADA.CommonLib.Service;
 using SCADA_DAQ.Customer.Models;
+using SCADA_DAQ.Customer.Models.DeviceInfoTime;
+using SCADA_DAQ.Customer.Models.OEEData;
 using SCADA_DAQ.Plugin.Machine.Config;
 using SqlSchema.DBNames;
 using System;
@@ -88,8 +91,9 @@ namespace SCADA_DAQ.Customer.Service
             Timer.Start();
             Timer.Elapsed += Timer_Elapsed;
             Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
+            GetOeeData();
             var str = $"{T_Col_Name.App_Vertiv_MachineInfo.Device_Str} = '亚威PBC折弯机' ";
-            var lastTime = Env.SqlDAL.App_Vertiv_MachineInfo.GetTopOne(str, "StartTime_Dt"," ID Desc ");
+            var lastTime = Env.SqlDAL.App_Vertiv_MachineInfo.GetTopOne(str, "StartTime_Dt", " ID Desc ");
             LastRecordTime = Convert.ToDateTime(lastTime);
             return base.Start();
 
@@ -99,12 +103,12 @@ namespace SCADA_DAQ.Customer.Service
 
         private void Schedual_DateTimeChanged(object sender, DateTimeChangedArgs e)
         {
-            if (e.ChangeType==DateTimeChangeType.MinuteChanged)
+            if (e.ChangeType == DateTimeChangeType.MinuteChanged)
             {
                 TimeToUpdate();
             }
 
-            if (e.ChangeType==DateTimeChangeType.DayChanged)
+            if (e.ChangeType == DateTimeChangeType.DayChanged)
             {
                 TimeToUpdate();
                 yaweiMac.Power.OnOrgID_Str = Guid.NewGuid().ToString();
@@ -118,6 +122,7 @@ namespace SCADA_DAQ.Customer.Service
                 Env.SqlDAL.App_Vertiv_WorkTime.Insert(
                     new UpdateItem(T_Col_Name.App_Vertiv_WorkTime.DeviceName_Str, "西门子840D数冲"),
                     new UpdateItem(T_Col_Name.App_Vertiv_WorkTime.OrgID_Str, simensModel.OnOrgID_Str));
+                OeePercent();
 
             }
 
@@ -158,10 +163,17 @@ namespace SCADA_DAQ.Customer.Service
                                new UpdateItem(T_Col_Name.App_Vertiv_ScheduleStop.Duration_Dt, lastTime)
                                    );
                             OrgID = null;
-                         }
+                        }
                     }
                 }
             }
+
+
+            if (e.ChangeType == SCADA.CommonLib.DateTimeChangeType.SecondChanged & e.TimeFlag.Second % 10 == 0 )
+            {
+                GetOeeData();
+                OeePercent();
+            }
         }
 
         private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -235,11 +247,11 @@ namespace SCADA_DAQ.Customer.Service
                                     }
                                 }
                             }
-                            
+
                             var modeChange = recordModelList.Where(t => t.@event == "mode" && t.StrTimeFormat(t.time) > LastRecordTime).ToList();
                             if (modeChange != null)
                             {
-                                if (modeChange.Count >0)
+                                if (modeChange.Count > 0)
                                 {
                                     foreach (var item in modeChange)
                                     {
@@ -256,14 +268,14 @@ namespace SCADA_DAQ.Customer.Service
                                                 ref yaweiMac.Program.StateOnDuration_Double);
                                         }
                                     }
-             
+
                                 }
                             }
 
-                            var stepList = recordModelList.Where(t=>t.@event == "step" && t.StrTimeFormat(t.time) > LastRecordTime).ToList();
+                            var stepList = recordModelList.Where(t => t.@event == "step" && t.StrTimeFormat(t.time) > LastRecordTime).ToList();
                             if (stepList != null)
                             {
-                                if (stepList.Count>0)
+                                if (stepList.Count > 0)
                                 {
                                     foreach (var item in stepList)
                                     {
@@ -272,18 +284,18 @@ namespace SCADA_DAQ.Customer.Service
                                     }
                                 }
                             }
-                                //if (recordModelList[i].StrTimeFormat(recordModelList[i].time) > LastRecordTime)
-                                //    {
-                                //        //程序启动
-                                //        if (recordModelList[i].@event == "start")
-                                //        {
-                                //            Env.SqlDAL.App_Vertiv_ProductionLog.Insert(
-                                //                new UpdateItem(T_Col_Name.App_Vertiv_ProductionLog.DeviceName_Str, "亚威PBC折弯机"));
-                                //            InsertStateCode(ref yaweiMac.Work.OnOrgID_Str,
-                                //                "运行标志位",
-                                //                ref yaweiMac.Work.StateOn_Bool,
-                                //                recordModelList[i].StrTimeFormat(recordModelList[i].time),
-                                //                ref yaweiMac.Work.StateOnTime_Dt);
+                            //if (recordModelList[i].StrTimeFormat(recordModelList[i].time) > LastRecordTime)
+                            //    {
+                            //        //程序启动
+                            //        if (recordModelList[i].@event == "start")
+                            //        {
+                            //            Env.SqlDAL.App_Vertiv_ProductionLog.Insert(
+                            //                new UpdateItem(T_Col_Name.App_Vertiv_ProductionLog.DeviceName_Str, "亚威PBC折弯机"));
+                            //            InsertStateCode(ref yaweiMac.Work.OnOrgID_Str,
+                            //                "运行标志位",
+                            //                ref yaweiMac.Work.StateOn_Bool,
+                            //                recordModelList[i].StrTimeFormat(recordModelList[i].time),
+                            //                ref yaweiMac.Work.StateOnTime_Dt);
 
                             //        }
                             //        else if (recordModelList[i].@event == "mode")
@@ -319,9 +331,9 @@ namespace SCADA_DAQ.Customer.Service
 
 
 
-                                LastRecordTime = recordModelList.Last().StrTimeFormat(recordModelList.Last().time);
+                            LastRecordTime = recordModelList.Last().StrTimeFormat(recordModelList.Last().time);
                             file.Close();
-                         
+
 
 
                             try
@@ -369,7 +381,7 @@ namespace SCADA_DAQ.Customer.Service
                         new UpdateItem(T_Col_Name.App_Vertiv_WorkTime.DurationSec_Dec, yaweiMac.Power.StateOnDuration_Double),
                         new UpdateItem(T_Col_Name.App_Vertiv_WorkTime.TurnOffTime_Dt, DateTime.Now.Format()));
                     yaweiMac.Power.StateOn_Bool = false;
-                    
+
                 }
                 if (!string.IsNullOrEmpty(OrgID))
                 {
@@ -512,5 +524,63 @@ namespace SCADA_DAQ.Customer.Service
                     new UpdateItem(T_Col_Name.App_Vertiv_WorkTime.TurnOffTime_Dt, DateTime.Now.Format()));
             }
         }
+
+
+        public IEnumerable<MachineInfoModel> OeeData { get; set; }
+
+        public IEnumerable<OEEDataModel> DailyOeeData { get; set; }
+        public void GetOeeData()
+        {
+            var startDayTime = DateTime.Parse(DateTime.Now.ToString("00:00:00"));
+            var endDayTime = DateTime.Parse(DateTime.Now.ToString("23:59:59"));
+            OeeData = Env.SqlDAL.App_Vertiv_MachineInfo.GetData<MachineInfoModel>().Where(t => t.CreateTime >= startDayTime & t.CreateTime <= endDayTime);
+            DailyOeeData = Env.SqlDAL.App_Vertiv_MachineInfoOeeData.GetData<OEEDataModel>().Where(t => t.CreateTime >= startDayTime & t.CreateTime <= endDayTime);
+
+        }
+
+        public string OeeValue { get; set; }
+
+        public void OeePercent()
+        {
+            var deviceName = new List<string>{"高机母线冲剪机", "2号YaWei折弯机", "3号YaWei折弯机", "激光机", "1号YaWei折弯机", "百超折弯机",
+            "倍福数冲机", "金方圆数控母线冲孔机", "西门子840D数冲", "亚威PBC折弯机"};
+
+            for (int i = 0; i < deviceName.Count; i++)
+            {
+                var device = deviceName[i];
+                var deviceDayTIme = OeeData.ToLookup(t => t.Device)[deviceName[i]].Sum(t => t.DurationSec);
+                var deviceRunDayTIme = OeeData.ToLookup(t => t.Device)[deviceName[i]].ToLookup(t => t.StateCode)["运行标志位"].Sum(t => t.DurationSec);
+
+                if (deviceDayTIme == 0)
+                {
+                    OeeValue = "0";
+                }
+                else
+                {
+                    OeeValue = Math.Round(Convert.ToDouble(deviceRunDayTIme) / deviceDayTIme, 4).ToString();
+                  
+                }
+                if (DailyOeeData.Count() != 0)
+                {
+                    Env.SqlDAL.App_Vertiv_MachineInfoOeeData.Update(
+                       $"{T_Col_Name.App_Vertiv_MachineInfoOeeData.Device_Str} = '{deviceName[i]}'",
+                      new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.RunDayTime_Int, deviceRunDayTIme),
+                      new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.AllDayTime_Int, deviceDayTIme),
+                      new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.Duration_Dec, OeeValue));
+                }
+                else
+                {
+                    OrgID = Guid.NewGuid().ToString();
+                    Env.SqlDAL.App_Vertiv_MachineInfoOeeData.Insert(
+                    new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.Device_Str, deviceName[i]),
+                    new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.StateId_Str, OrgID),
+                    new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.RunDayTime_Int, deviceRunDayTIme),
+                    new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.AllDayTime_Int, deviceDayTIme),
+                    new UpdateItem(T_Col_Name.App_Vertiv_MachineInfoOeeData.Duration_Dec, OeeValue));
+
+                }
+            }
+
+        }
     }
 }

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

@@ -32,11 +32,11 @@
             <uct:UctDeviceChart Grid.Row="2" x:Name="BeiFuDevice"/>
             <uct:UctDeviceChart Grid.Row="3" x:Name="KimFangyuanDevice"/>
             <uct:UctDeviceChart Grid.Row="4" x:Name="HighDevice"/>
-            <uct:UctDeviceChart Grid.Column="0"  x:Name="OneBendingDevice" />
+            <uct:UctDeviceChart Grid.Column="1"  x:Name="OneBendingDevice" />
             <uct:UctDeviceChart Grid.Row="1" x:Name="TwoBendingDevice" Grid.Column="1"/>
-            <uct:UctDeviceChart Grid.Row="2" x:Name="ThreeBendingDevice" Grid.Column="2"/>
-            <uct:UctDeviceChart Grid.Row="3" x:Name="YaWeiPBCDevice" Grid.Column="3"/>
-            <uct:UctDeviceChart Grid.Row="4" x:Name="BaiChaoDevice" Grid.Column="4"/>
+            <uct:UctDeviceChart Grid.Row="2" x:Name="ThreeBendingDevice" Grid.Column="1"/>
+            <uct:UctDeviceChart Grid.Row="3" x:Name="YaWeiPBCDevice" Grid.Column="1"/>
+            <uct:UctDeviceChart Grid.Row="4" x:Name="BaiChaoDevice" Grid.Column="1"/>
         </Grid>
         </Grid>
 </wpfcontrol:BaseUctFrm>

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

@@ -48,8 +48,8 @@ namespace SCADA_DAQ.Customer
         public UctFrmRunHistory()
         {
             InitializeComponent();
-         
-            
+          var  uuu = Convert.ToDecimal(Math.Round(Convert.ToDouble(198) / 273, 4));
+
         }
 
         

File diff suppressed because it is too large
+ 0 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ/SCADA_DAQ.csproj


Some files were not shown because too many files changed in this diff