mengshunguo 2 週間 前
コミット
d08a1b1b3b

+ 7 - 0
SCADA_DAQ/Customer/Machines/RFIDBindingMachine.cs

@@ -112,6 +112,13 @@ namespace SCADA_DAQ.Customer.Machines
 
         private async void Schedual_DateTimeChanged(object sender, SCADA.CommonLib.DateTimeChangedArgs e)
         {
+            #region 定时删除设备状态表
+            if (e.ChangeType == DateTimeChangeType.HourChanged && e.TimeFlag.Hour % 2 == 0)
+            {
+                Env.DAL.Base_DeviceStateResume.DeleteOldData(DateTime.Now);
+            }
+            #endregion
+
             #region 90s后读回绑定队列产品数据
             if (e.ChangeType == DateTimeChangeType.SecondChanged && e.TimeFlag.Second % 5 == 0)
             {

+ 4 - 0
SCADA_DAQ/Customer/Models/ProcessData.cs

@@ -120,6 +120,7 @@ namespace SCADA_DAQ.Customer.Models
                     model.Power = 1150.564m;
                     model.Voltage = 225.12m;
                     model.Amps = 5.11m;
+                    points.Add(model);
                 }
                 else if (i >= 10 && i <= 19)
                 {
@@ -127,6 +128,7 @@ namespace SCADA_DAQ.Customer.Models
                     model.Power = 0;
                     model.Voltage = 0;
                     model.Amps = 0;
+                    points.Add(model);
                 }
                 else if (i >= 20 && i <= 110)
                 {
@@ -134,6 +136,7 @@ namespace SCADA_DAQ.Customer.Models
                     model.Power = 1155.854m;
                     model.Voltage = 223.191m;
                     model.Amps = 5.30m;
+                    points.Add(model);
                 }
                 else if (i >= 111)
                 {
@@ -141,6 +144,7 @@ namespace SCADA_DAQ.Customer.Models
                     model.Power = 0;
                     model.Voltage = 0;
                     model.Amps = 0;
+                    points.Add(model);
                 }
             }
             return points;