Browse Source

临时提交

蒙顺国 1 year ago
parent
commit
1806deefbf
3 changed files with 384 additions and 74 deletions
  1. 383 73
      SCADA_DAQ.DAL/SqlServer.cs
  2. 1 1
      SCADA_DAQ.DAL/SqlServer.tt
  3. BIN
      SCADA_DAQ/Data/QwPlatform.db

+ 383 - 73
SCADA_DAQ.DAL/SqlServer.cs

@@ -829,15 +829,15 @@ namespace SqlSchema
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @ModifyUser_Str=nameof(@ModifyUser_Str);
+                 public const string @OrgID_Int=nameof(@OrgID_Int);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @CreateUser_Str=nameof(@CreateUser_Str);
+                 public const string @ModifyUser_Str=nameof(@ModifyUser_Str);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @OrgID_Int=nameof(@OrgID_Int);
+                 public const string @CreateUser_Str=nameof(@CreateUser_Str);
                     /// <summary>
                 /// 
                 /// </summary>
@@ -852,11 +852,11 @@ namespace SqlSchema
              	/// <summary>
                 /// 
                 /// </summary>
-                 public const string @IsClosed_Bit=nameof(@IsClosed_Bit);
+                 public const string @OrgID_Int=nameof(@OrgID_Int);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @OrgID_Int=nameof(@OrgID_Int);
+                 public const string @IsClosed_Bit=nameof(@IsClosed_Bit);
                     /// <summary>
                 /// 
                 /// </summary>
@@ -868,15 +868,15 @@ namespace SqlSchema
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @Helper_Str=nameof(@Helper_Str);
+                 public const string @TriggedTime_Dt=nameof(@TriggedTime_Dt);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @TriggedTime_Dt=nameof(@TriggedTime_Dt);
+                 public const string @Device_Str=nameof(@Device_Str);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @Device_Str=nameof(@Device_Str);
+                 public const string @Helper_Str=nameof(@Helper_Str);
                     /// <summary>
                 /// 
                 /// </summary>
@@ -891,6 +891,18 @@ namespace SqlSchema
                  public const string @ID=nameof(@ID);
                     /// <summary>
                 /// 
+                /// </summary>
+                 public const string @AlarmCode_Str=nameof(@AlarmCode_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @TagName_Str=nameof(@TagName_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @AlarmId_Str=nameof(@AlarmId_Str);
+                    /// <summary>
+                /// 
                 /// </summary>
                  public const string @CreateUser_Str=nameof(@CreateUser_Str);
                     /// <summary>
@@ -900,11 +912,26 @@ namespace SqlSchema
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @AlarmCode_Str=nameof(@AlarmCode_Str);
+                 public const string @Duration_Str=nameof(@Duration_Str);
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @AlarmId_Str=nameof(@AlarmId_Str);
+                 public const string @Remark_Str=nameof(@Remark_Str);
+                    
+             }
+             /// <summary> 
+             /// Base_DeviceStateResume
+             /// </summary>
+             public class Base_DeviceStateResume
+             {
+             	/// <summary>
+                /// 
+                /// </summary>
+                 public const string @StateCode_Int=nameof(@StateCode_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @NodeId_Str=nameof(@NodeId_Str);
                     /// <summary>
                 /// 
                 /// </summary>
@@ -912,11 +939,51 @@ namespace SqlSchema
                     /// <summary>
                 /// 
                 /// </summary>
-                 public const string @TagName_Str=nameof(@TagName_Str);
+                 public const string @StateId_Str=nameof(@StateId_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @ID=nameof(@ID);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @CreateTime_Dt=nameof(@CreateTime_Dt);
                     /// <summary>
                 /// 
                 /// </summary>
                  public const string @Remark_Str=nameof(@Remark_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @ModifyTime_Dt=nameof(@ModifyTime_Dt);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @Duration_Int=nameof(@Duration_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @ModifyUser_Str=nameof(@ModifyUser_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @StartTime_Dt=nameof(@StartTime_Dt);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @OrgID_Int=nameof(@OrgID_Int);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @EndTime_Dt=nameof(@EndTime_Dt);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @Device_Str=nameof(@Device_Str);
+                    /// <summary>
+                /// 
+                /// </summary>
+                 public const string @CreateUser_Str=nameof(@CreateUser_Str);
                     
              }
              
@@ -3805,6 +3872,21 @@ namespace SqlSchema
                         OnPropertyChanged(nameof( AlarmType_Str));
                     }
                 }
+            }
+              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 _ModifyUser_Str;
                 /// <summary>
@@ -3835,21 +3917,6 @@ namespace SqlSchema
                         OnPropertyChanged(nameof( CreateUser_Str));
                     }
                 }
-            }
-              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 _AlarmDesc_Str;
                 /// <summary>
@@ -3873,33 +3940,33 @@ namespace SqlSchema
              /// </summary>
              public class Base_AlarmLog:ObservableObject
              {
-             	  private bool? _IsClosed_Bit;
+             	  private int? _OrgID_Int;
                 /// <summary>
                 /// 
                 /// </summary>
-                 public bool? IsClosed_Bit
+                 public int? OrgID_Int
                 {
-                get {return _IsClosed_Bit;}
+                get {return _OrgID_Int;}
                 set{
-                    if(value!=(_IsClosed_Bit))
+                    if(value!=(_OrgID_Int))
                     {
-                        _IsClosed_Bit=value;
-                        OnPropertyChanged(nameof( IsClosed_Bit));
+                        _OrgID_Int=value;
+                        OnPropertyChanged(nameof( OrgID_Int));
                     }
                 }
             }
-              private int? _OrgID_Int;
+              private bool? _IsClosed_Bit;
                 /// <summary>
                 /// 
                 /// </summary>
-                 public int? OrgID_Int
+                 public bool? IsClosed_Bit
                 {
-                get {return _OrgID_Int;}
+                get {return _IsClosed_Bit;}
                 set{
-                    if(value!=(_OrgID_Int))
+                    if(value!=(_IsClosed_Bit))
                     {
-                        _OrgID_Int=value;
-                        OnPropertyChanged(nameof( OrgID_Int));
+                        _IsClosed_Bit=value;
+                        OnPropertyChanged(nameof( IsClosed_Bit));
                     }
                 }
             }
@@ -3932,21 +3999,6 @@ namespace SqlSchema
                         OnPropertyChanged(nameof( ModifyTime_Dt));
                     }
                 }
-            }
-              private string _Helper_Str;
-                /// <summary>
-                /// 
-                /// </summary>
-                 public string Helper_Str
-                {
-                get {return _Helper_Str;}
-                set{
-                    if(value!=(_Helper_Str))
-                    {
-                        _Helper_Str=value;
-                        OnPropertyChanged(nameof( Helper_Str));
-                    }
-                }
             }
               private string _TriggedTime_Dt;
                 /// <summary>
@@ -3977,6 +4029,21 @@ namespace SqlSchema
                         OnPropertyChanged(nameof( Device_Str));
                     }
                 }
+            }
+              private string _Helper_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string Helper_Str
+                {
+                get {return _Helper_Str;}
+                set{
+                    if(value!=(_Helper_Str))
+                    {
+                        _Helper_Str=value;
+                        OnPropertyChanged(nameof( Helper_Str));
+                    }
+                }
             }
               private long? _Duration_Int;
                 /// <summary>
@@ -4022,6 +4089,51 @@ namespace SqlSchema
                         OnPropertyChanged(nameof( ID));
                     }
                 }
+            }
+              private string _AlarmCode_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string AlarmCode_Str
+                {
+                get {return _AlarmCode_Str;}
+                set{
+                    if(value!=(_AlarmCode_Str))
+                    {
+                        _AlarmCode_Str=value;
+                        OnPropertyChanged(nameof( AlarmCode_Str));
+                    }
+                }
+            }
+              private string _TagName_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string TagName_Str
+                {
+                get {return _TagName_Str;}
+                set{
+                    if(value!=(_TagName_Str))
+                    {
+                        _TagName_Str=value;
+                        OnPropertyChanged(nameof( TagName_Str));
+                    }
+                }
+            }
+              private string _AlarmId_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string AlarmId_Str
+                {
+                get {return _AlarmId_Str;}
+                set{
+                    if(value!=(_AlarmId_Str))
+                    {
+                        _AlarmId_Str=value;
+                        OnPropertyChanged(nameof( AlarmId_Str));
+                    }
+                }
             }
               private string _CreateUser_Str;
                 /// <summary>
@@ -4053,33 +4165,70 @@ namespace SqlSchema
                     }
                 }
             }
-              private string _AlarmCode_Str;
+              private string _Duration_Str;
                 /// <summary>
                 /// 
                 /// </summary>
-                 public string AlarmCode_Str
+                 public string Duration_Str
                 {
-                get {return _AlarmCode_Str;}
+                get {return _Duration_Str;}
                 set{
-                    if(value!=(_AlarmCode_Str))
+                    if(value!=(_Duration_Str))
                     {
-                        _AlarmCode_Str=value;
-                        OnPropertyChanged(nameof( AlarmCode_Str));
+                        _Duration_Str=value;
+                        OnPropertyChanged(nameof( Duration_Str));
                     }
                 }
             }
-              private string _AlarmId_Str;
+              private string _Remark_Str;
                 /// <summary>
                 /// 
                 /// </summary>
-                 public string AlarmId_Str
+                 public string Remark_Str
                 {
-                get {return _AlarmId_Str;}
+                get {return _Remark_Str;}
                 set{
-                    if(value!=(_AlarmId_Str))
+                    if(value!=(_Remark_Str))
                     {
-                        _AlarmId_Str=value;
-                        OnPropertyChanged(nameof( AlarmId_Str));
+                        _Remark_Str=value;
+                        OnPropertyChanged(nameof( Remark_Str));
+                    }
+                }
+            }
+            
+             }
+             /// <summary> 
+             /// 
+             /// </summary>
+             public class Base_DeviceStateResume:ObservableObject
+             {
+             	  private int? _StateCode_Int;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int? StateCode_Int
+                {
+                get {return _StateCode_Int;}
+                set{
+                    if(value!=(_StateCode_Int))
+                    {
+                        _StateCode_Int=value;
+                        OnPropertyChanged(nameof( StateCode_Int));
+                    }
+                }
+            }
+              private string _NodeId_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string NodeId_Str
+                {
+                get {return _NodeId_Str;}
+                set{
+                    if(value!=(_NodeId_Str))
+                    {
+                        _NodeId_Str=value;
+                        OnPropertyChanged(nameof( NodeId_Str));
                     }
                 }
             }
@@ -4098,18 +4247,48 @@ namespace SqlSchema
                     }
                 }
             }
-              private string _TagName_Str;
+              private string _StateId_Str;
                 /// <summary>
                 /// 
                 /// </summary>
-                 public string TagName_Str
+                 public string StateId_Str
                 {
-                get {return _TagName_Str;}
+                get {return _StateId_Str;}
                 set{
-                    if(value!=(_TagName_Str))
+                    if(value!=(_StateId_Str))
                     {
-                        _TagName_Str=value;
-                        OnPropertyChanged(nameof( TagName_Str));
+                        _StateId_Str=value;
+                        OnPropertyChanged(nameof( StateId_Str));
+                    }
+                }
+            }
+              private int _ID;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int ID
+                {
+                get {return _ID;}
+                set{
+                    if(value!=(_ID))
+                    {
+                        _ID=value;
+                        OnPropertyChanged(nameof( ID));
+                    }
+                }
+            }
+              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));
                     }
                 }
             }
@@ -4128,6 +4307,126 @@ namespace SqlSchema
                     }
                 }
             }
+              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 int? _Duration_Int;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public int? Duration_Int
+                {
+                get {return _Duration_Int;}
+                set{
+                    if(value!=(_Duration_Int))
+                    {
+                        _Duration_Int=value;
+                        OnPropertyChanged(nameof( Duration_Int));
+                    }
+                }
+            }
+              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 DateTime? _StartTime_Dt;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public DateTime? StartTime_Dt
+                {
+                get {return _StartTime_Dt;}
+                set{
+                    if(value!=(_StartTime_Dt))
+                    {
+                        _StartTime_Dt=value;
+                        OnPropertyChanged(nameof( StartTime_Dt));
+                    }
+                }
+            }
+              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 DateTime? _EndTime_Dt;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public DateTime? EndTime_Dt
+                {
+                get {return _EndTime_Dt;}
+                set{
+                    if(value!=(_EndTime_Dt))
+                    {
+                        _EndTime_Dt=value;
+                        OnPropertyChanged(nameof( EndTime_Dt));
+                    }
+                }
+            }
+              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 string _CreateUser_Str;
+                /// <summary>
+                /// 
+                /// </summary>
+                 public string CreateUser_Str
+                {
+                get {return _CreateUser_Str;}
+                set{
+                    if(value!=(_CreateUser_Str))
+                    {
+                        _CreateUser_Str=value;
+                        OnPropertyChanged(nameof( CreateUser_Str));
+                    }
+                }
+            }
             
              }
              /// <summary> 
@@ -4509,6 +4808,10 @@ public BaseTable Base_AlarmLog{get;private set;}
  /// <summary> 
  ///  
  /// </summary> 
+public BaseTable Base_DeviceStateResume{get;private set;}
+ /// <summary> 
+ ///  
+ /// </summary> 
 public BaseTable V_Base_AlarmLog{get;private set;}
 public DILDB(string server, string service, string username, string password):base(server, service, username, password)
 {
@@ -4527,6 +4830,7 @@ APP_TaiLing_ScanRecord=CreateTable("ID","APP_TaiLing_ScanRecord");
 APP_TaiLing_TaskManagement=CreateTable("ID","APP_TaiLing_TaskManagement");
 Base_AlarmCode=CreateTable("ID","Base_AlarmCode");
 Base_AlarmLog=CreateTable("ID","Base_AlarmLog");
+Base_DeviceStateResume=CreateTable("ID","Base_DeviceStateResume");
 V_Base_AlarmLog=CreateTable("ID","V_Base_AlarmLog");
 }
 #endregion
@@ -4597,12 +4901,17 @@ public BaseTable Base_AlarmLog{get;private set;}
  /// <summary> 
  ///  
  /// </summary> 
+public BaseTable Base_DeviceStateResume{get;private set;}
+ /// <summary> 
+ ///  
+ /// </summary> 
 public BaseTable V_Base_AlarmLog{get;private set;}
 private BaseDB innerDb = null;
 public DILDBV1(BaseDB db )
 {
                 innerDb = db;
                 SO = db.SO;
+                DatabaseType = db.DatabaseType;
                 DatabaseInfo = db.DatabaseInfo;
                 ServerName = db.ServerName;
 APP_TaiLing_DeviceManagement=innerDb.CreateTable("ID","APP_TaiLing_DeviceManagement");
@@ -4620,12 +4929,13 @@ APP_TaiLing_ScanRecord=innerDb.CreateTable("ID","APP_TaiLing_ScanRecord");
 APP_TaiLing_TaskManagement=innerDb.CreateTable("ID","APP_TaiLing_TaskManagement");
 Base_AlarmCode=innerDb.CreateTable("ID","Base_AlarmCode");
 Base_AlarmLog=innerDb.CreateTable("ID","Base_AlarmLog");
+Base_DeviceStateResume=innerDb.CreateTable("ID","Base_DeviceStateResume");
 V_Base_AlarmLog=innerDb.CreateTable("ID","V_Base_AlarmLog");
 }
 
-            public override BaseTable CreateTable(string id)
+            public override BaseTable CreateTable(string tableName)
             {
-                return innerDb.CreateTable(id);
+                return innerDb.CreateTable(tableName);
             }
 
             public override BaseTable CreateTable(string id, string tableName)

+ 1 - 1
SCADA_DAQ.DAL/SqlServer.tt

@@ -22,7 +22,7 @@
     string ttpath = this.Host.TemplateFile;
     string projectPath=Host.ResolveAssemblyReference("$(SolutionDir)");
     string outPath=Host.ResolveAssemblyReference("$(TargetDir)");
-    IDB db=new SQLDB("127.0.0.1","TL_DB","sa","M+123456");
+    IDB db=new SQLDB("10.255.254.250","TL_DB","sa","M+123456");
      //IDB db=new SQLDB("10.255.254.250","TL_DB","sa","M+123456");
     // IDB db=new OracleDB("127.0.0.1:1521","TL_DB","sa","123456");
     // IDB db=new MySQLDB("192.168.0.97:3306","ydsysdb","root","liangxi");

BIN
SCADA_DAQ/Data/QwPlatform.db