Browse Source

修改bug

Linsk 3 months ago
parent
commit
6e0c689016

+ 4 - 4
BLL/Dto/DataDto/AddDataDto.cs

@@ -11,8 +11,8 @@ namespace BLL.Dto.DataDto
         public DateTime InsertTime { get; set; }
         public DateTime InsertTime { get; set; }
         public string 脱脂喷淋泵压力值 { get; set; }
         public string 脱脂喷淋泵压力值 { get; set; }
 
 
-        public string 脱脂pH值 { get; set; }
-        public string 陶化pH值 { get; set; }
+        public string 脱脂PH值 { get; set; }
+        public string 陶化PH值 { get; set; }
 
 
         public string 粗洗喷淋泵压力值 { get; set; }
         public string 粗洗喷淋泵压力值 { get; set; }
 
 
@@ -24,8 +24,8 @@ namespace BLL.Dto.DataDto
 
 
         public string 固化炉测量温度 { get; set; }
         public string 固化炉测量温度 { get; set; }
 
 
-        public string 厂温度 { get; set; }
+        public string 厂温度 { get; set; }
 
 
-        public string 厂湿度 { get; set; }
+        public string 厂湿度 { get; set; }
     }
     }
 }
 }

+ 4 - 4
BLL/Dto/DataDto/QueryDataResultDto.cs

@@ -11,8 +11,8 @@ namespace BLL.Dto.DataDto
         public DateTime InsertTime { get; set; }
         public DateTime InsertTime { get; set; }
         public string 脱脂喷淋泵压力值 { get; set; }
         public string 脱脂喷淋泵压力值 { get; set; }
 
 
-        public string 脱脂pH值 { get; set; }
-        public string 陶化pH值 { get; set; }
+        public string 脱脂PH值 { get; set; }
+        public string 陶化PH值 { get; set; }
 
 
         public string 粗洗喷淋泵压力值 { get; set; }
         public string 粗洗喷淋泵压力值 { get; set; }
 
 
@@ -24,8 +24,8 @@ namespace BLL.Dto.DataDto
 
 
         public string 固化炉测量温度 { get; set; }
         public string 固化炉测量温度 { get; set; }
 
 
-        public string 厂温度 { get; set; }
+        public string 厂温度 { get; set; }
 
 
-        public string 厂湿度 { get; set; }
+        public string 厂湿度 { get; set; }
     }
     }
 }
 }

+ 16 - 9
Scada/FormMain.Designer.cs

@@ -187,6 +187,7 @@
             lbl_Humidness.Name = "lbl_Humidness";
             lbl_Humidness.Name = "lbl_Humidness";
             lbl_Humidness.Size = new Size(44, 27);
             lbl_Humidness.Size = new Size(44, 27);
             lbl_Humidness.TabIndex = 8;
             lbl_Humidness.TabIndex = 8;
+            lbl_Humidness.TagString = "厂房湿度";
             lbl_Humidness.Text = "60%";
             lbl_Humidness.Text = "60%";
             lbl_Humidness.MouseDown += Panel_MouseDown;
             lbl_Humidness.MouseDown += Panel_MouseDown;
             lbl_Humidness.MouseMove += Panel_MouseMove;
             lbl_Humidness.MouseMove += Panel_MouseMove;
@@ -200,6 +201,7 @@
             lbl_Temperature.Name = "lbl_Temperature";
             lbl_Temperature.Name = "lbl_Temperature";
             lbl_Temperature.Size = new Size(44, 27);
             lbl_Temperature.Size = new Size(44, 27);
             lbl_Temperature.TabIndex = 7;
             lbl_Temperature.TabIndex = 7;
+            lbl_Temperature.TagString = "厂房温度";
             lbl_Temperature.Text = "25℃";
             lbl_Temperature.Text = "25℃";
             lbl_Temperature.MouseDown += Panel_MouseDown;
             lbl_Temperature.MouseDown += Panel_MouseDown;
             lbl_Temperature.MouseMove += Panel_MouseMove;
             lbl_Temperature.MouseMove += Panel_MouseMove;
@@ -238,6 +240,7 @@
             // 
             // 
             // st_AlarmInfo
             // st_AlarmInfo
             // 
             // 
+            st_AlarmInfo.Active = true;
             st_AlarmInfo.BackColor = Color.Transparent;
             st_AlarmInfo.BackColor = Color.Transparent;
             st_AlarmInfo.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
             st_AlarmInfo.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
             st_AlarmInfo.Location = new Point(595, 9);
             st_AlarmInfo.Location = new Point(595, 9);
@@ -336,6 +339,7 @@
             lbl_ProducteCount.Name = "lbl_ProducteCount";
             lbl_ProducteCount.Name = "lbl_ProducteCount";
             lbl_ProducteCount.Size = new Size(80, 44);
             lbl_ProducteCount.Size = new Size(80, 44);
             lbl_ProducteCount.TabIndex = 2;
             lbl_ProducteCount.TabIndex = 2;
+            lbl_ProducteCount.TagString = "生产计数";
             lbl_ProducteCount.Text = "5000";
             lbl_ProducteCount.Text = "5000";
             // 
             // 
             // lbl_BadCount
             // lbl_BadCount
@@ -347,6 +351,7 @@
             lbl_BadCount.Name = "lbl_BadCount";
             lbl_BadCount.Name = "lbl_BadCount";
             lbl_BadCount.Size = new Size(80, 44);
             lbl_BadCount.Size = new Size(80, 44);
             lbl_BadCount.TabIndex = 4;
             lbl_BadCount.TabIndex = 4;
+            lbl_BadCount.TagString = "不良计数";
             lbl_BadCount.Text = "0067";
             lbl_BadCount.Text = "0067";
             // 
             // 
             // lb_BadCount
             // lb_BadCount
@@ -372,6 +377,7 @@
             lbl_Beat.Name = "lbl_Beat";
             lbl_Beat.Name = "lbl_Beat";
             lbl_Beat.Size = new Size(80, 44);
             lbl_Beat.Size = new Size(80, 44);
             lbl_Beat.TabIndex = 6;
             lbl_Beat.TabIndex = 6;
+            lbl_Beat.TagString = "生产节拍";
             lbl_Beat.Text = "060S";
             lbl_Beat.Text = "060S";
             // 
             // 
             // lb_Beat
             // lb_Beat
@@ -397,6 +403,7 @@
             lbl_TotalAlarm.Name = "lbl_TotalAlarm";
             lbl_TotalAlarm.Name = "lbl_TotalAlarm";
             lbl_TotalAlarm.Size = new Size(80, 44);
             lbl_TotalAlarm.Size = new Size(80, 44);
             lbl_TotalAlarm.TabIndex = 8;
             lbl_TotalAlarm.TabIndex = 8;
+            lbl_TotalAlarm.TagString = "累计报警";
             lbl_TotalAlarm.Text = "0221";
             lbl_TotalAlarm.Text = "0221";
             // 
             // 
             // lb_TotalAlarm
             // lb_TotalAlarm
@@ -456,9 +463,9 @@
             uiLabel15.ForeColor = Color.FromArgb(48, 48, 48);
             uiLabel15.ForeColor = Color.FromArgb(48, 48, 48);
             uiLabel15.Image = Properties.Resources.CPU信息;
             uiLabel15.Image = Properties.Resources.CPU信息;
             uiLabel15.ImageAlign = ContentAlignment.MiddleLeft;
             uiLabel15.ImageAlign = ContentAlignment.MiddleLeft;
-            uiLabel15.Location = new Point(235, 18);
+            uiLabel15.Location = new Point(231, 18);
             uiLabel15.Name = "uiLabel15";
             uiLabel15.Name = "uiLabel15";
-            uiLabel15.Size = new Size(132, 29);
+            uiLabel15.Size = new Size(121, 29);
             uiLabel15.TabIndex = 1;
             uiLabel15.TabIndex = 1;
             uiLabel15.Text = "CPU信息";
             uiLabel15.Text = "CPU信息";
             uiLabel15.TextAlign = ContentAlignment.MiddleRight;
             uiLabel15.TextAlign = ContentAlignment.MiddleRight;
@@ -470,9 +477,9 @@
             uiLabel16.ForeColor = Color.FromArgb(48, 48, 48);
             uiLabel16.ForeColor = Color.FromArgb(48, 48, 48);
             uiLabel16.Image = Properties.Resources.内存信息;
             uiLabel16.Image = Properties.Resources.内存信息;
             uiLabel16.ImageAlign = ContentAlignment.MiddleLeft;
             uiLabel16.ImageAlign = ContentAlignment.MiddleLeft;
-            uiLabel16.Location = new Point(426, 18);
+            uiLabel16.Location = new Point(438, 18);
             uiLabel16.Name = "uiLabel16";
             uiLabel16.Name = "uiLabel16";
-            uiLabel16.Size = new Size(132, 29);
+            uiLabel16.Size = new Size(120, 29);
             uiLabel16.TabIndex = 2;
             uiLabel16.TabIndex = 2;
             uiLabel16.Text = "内存信息";
             uiLabel16.Text = "内存信息";
             uiLabel16.TextAlign = ContentAlignment.MiddleRight;
             uiLabel16.TextAlign = ContentAlignment.MiddleRight;
@@ -518,11 +525,11 @@
             lbl_CPUInformation.BackColor = Color.Transparent;
             lbl_CPUInformation.BackColor = Color.Transparent;
             lbl_CPUInformation.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
             lbl_CPUInformation.Font = new Font("宋体", 12F, FontStyle.Regular, GraphicsUnit.Point, 134);
             lbl_CPUInformation.ForeColor = Color.FromArgb(48, 48, 48);
             lbl_CPUInformation.ForeColor = Color.FromArgb(48, 48, 48);
-            lbl_CPUInformation.Location = new Point(373, 22);
+            lbl_CPUInformation.Location = new Point(358, 22);
             lbl_CPUInformation.Name = "lbl_CPUInformation";
             lbl_CPUInformation.Name = "lbl_CPUInformation";
-            lbl_CPUInformation.Size = new Size(49, 29);
+            lbl_CPUInformation.Size = new Size(69, 29);
             lbl_CPUInformation.TabIndex = 6;
             lbl_CPUInformation.TabIndex = 6;
-            lbl_CPUInformation.Text = "60%";
+            lbl_CPUInformation.Text = "60.9%";
             // 
             // 
             // lbl_MemoryInformation
             // lbl_MemoryInformation
             // 
             // 
@@ -531,9 +538,9 @@
             lbl_MemoryInformation.ForeColor = Color.FromArgb(48, 48, 48);
             lbl_MemoryInformation.ForeColor = Color.FromArgb(48, 48, 48);
             lbl_MemoryInformation.Location = new Point(564, 22);
             lbl_MemoryInformation.Location = new Point(564, 22);
             lbl_MemoryInformation.Name = "lbl_MemoryInformation";
             lbl_MemoryInformation.Name = "lbl_MemoryInformation";
-            lbl_MemoryInformation.Size = new Size(49, 29);
+            lbl_MemoryInformation.Size = new Size(69, 29);
             lbl_MemoryInformation.TabIndex = 7;
             lbl_MemoryInformation.TabIndex = 7;
-            lbl_MemoryInformation.Text = "60%";
+            lbl_MemoryInformation.Text = "60.9%";
             // 
             // 
             // uiLabel21
             // uiLabel21
             // 
             // 

+ 11 - 8
Scada/FormMain.cs

@@ -42,7 +42,7 @@ namespace Scada
     { "参数模块", Globals.ServiceProvider.GetRequiredService<PageSystemParameterSet>() }
     { "参数模块", Globals.ServiceProvider.GetRequiredService<PageSystemParameterSet>() }
 };
 };
         private List<string> AlarmList = new List<string>();
         private List<string> AlarmList = new List<string>();
-        public FormMain(ILogger<FormMain> logger,UserManager userManager,AuthManager authManager,DataManager 
+        public FormMain(ILogger<FormMain> logger, UserManager userManager, AuthManager authManager, DataManager
             dataManager)
             dataManager)
         {
         {
             _logger = logger ?? throw new ArgumentNullException(nameof(logger));
             _logger = logger ?? throw new ArgumentNullException(nameof(logger));
@@ -87,13 +87,13 @@ namespace Scada
                 {
                 {
                     this.Invoke(async () =>
                     this.Invoke(async () =>
                     {
                     {
-                        this.lbl_Temperature.Text = Globals.DataDic[this.lb_Temperature.TagString].ToString() + "℃";
-                        this.lbl_Humidness.Text = Globals.DataDic[this.lb_Humidness.TagString].ToString() + "%";
+                        this.lbl_Temperature.Text = Globals.DataDic[this.lbl_Temperature.TagString].ToString() + "℃";
+                        this.lbl_Humidness.Text = Globals.DataDic[this.lbl_Humidness.TagString].ToString() + "%";
 
 
-                        this.lbl_ProducteCount.Text = Globals.DataDic[this.lb_ProducteCount.TagString].ToString();
-                        this.lbl_BadCount.Text = Globals.DataDic[this.lb_BadCount.TagString].ToString();
-                        this.lbl_Beat.Text = Globals.DataDic[this.lb_Beat.TagString].ToString();
-                        this.lbl_TotalAlarm.Text = Globals.DataDic[this.lb_TotalAlarm.TagString].ToString();
+                        this.lbl_ProducteCount.Text = Globals.DataDic[this.lbl_ProducteCount.TagString].ToString();
+                        this.lbl_BadCount.Text = Globals.DataDic[this.lbl_BadCount.TagString].ToString();
+                        this.lbl_Beat.Text = Globals.DataDic[this.lbl_Beat.TagString].ToString();
+                        this.lbl_TotalAlarm.Text = Globals.DataDic[this.lbl_TotalAlarm.TagString].ToString();
 
 
 
 
                         //CPU和内存
                         //CPU和内存
@@ -123,6 +123,7 @@ namespace Scada
                         {
                         {
                             this.st_AlarmInfo.Text = alarmInfo;
                             this.st_AlarmInfo.Text = alarmInfo;
                             this.st_AlarmInfo.ForeColor = Color.Red;
                             this.st_AlarmInfo.ForeColor = Color.Red;
+                            this.led_ProducteState.Color = Color.Red;
                             this.led_ProducteState.BlinkInterval = 500;
                             this.led_ProducteState.BlinkInterval = 500;
                             this.led_ProducteState.Blink = true;
                             this.led_ProducteState.Blink = true;
                         }
                         }
@@ -227,7 +228,7 @@ namespace Scada
                     //如果是报警变量,则添加到报警列表中
                     //如果是报警变量,则添加到报警列表中
                     AlarmList.Add(plcVarList[i].名称);
                     AlarmList.Add(plcVarList[i].名称);
                 }
                 }
-                
+
             }
             }
 
 
             _logger.LogInformation("初始化PLC客户端成功");
             _logger.LogInformation("初始化PLC客户端成功");
@@ -503,5 +504,7 @@ namespace Scada
         }
         }
 
 
         #endregion 控制权限
         #endregion 控制权限
+
+        
     }
     }
 }
 }

+ 1 - 1
Scada/UserControls/UserAlarmState.Designer.cs

@@ -73,7 +73,7 @@
             lbl_StateName.Size = new Size(54, 54);
             lbl_StateName.Size = new Size(54, 54);
             lbl_StateName.Style = Sunny.UI.UIStyle.Custom;
             lbl_StateName.Style = Sunny.UI.UIStyle.Custom;
             lbl_StateName.Symbol = 61683;
             lbl_StateName.Symbol = 61683;
-            lbl_StateName.SymbolColor = Color.Red;
+            lbl_StateName.SymbolColor = Color.Green;
             lbl_StateName.SymbolSize = 54;
             lbl_StateName.SymbolSize = 54;
             lbl_StateName.TabIndex = 1;
             lbl_StateName.TabIndex = 1;
             // 
             // 

+ 2 - 2
Scada/UserControls/UserAlarmState.cs

@@ -47,11 +47,11 @@ namespace Scada
                 state = value;
                 state = value;
                 if (state)
                 if (state)
                 {
                 {
-                    this.lbl_StateName.SymbolColor = Color.Red;
+                    this.lbl_StateName.SymbolColor = Color.Green;
                 }
                 }
                 else
                 else
                 {
                 {
-                    this.lbl_StateName.SymbolColor = Color.LimeGreen;
+                    this.lbl_StateName.SymbolColor = Color.Red;
                 }
                 }
             }
             }
         }
         }

+ 2 - 1
Scada/UserControls/UserDeviceState.Designer.cs

@@ -70,7 +70,8 @@
             light_State.Location = new Point(193, 3);
             light_State.Location = new Point(193, 3);
             light_State.MinimumSize = new Size(1, 1);
             light_State.MinimumSize = new Size(1, 1);
             light_State.Name = "light_State";
             light_State.Name = "light_State";
-            light_State.OffColor = Color.Red;
+            light_State.OffColor = Color.Green;
+            light_State.OnColor = Color.Red;
             light_State.Radius = 54;
             light_State.Radius = 54;
             light_State.Size = new Size(54, 54);
             light_State.Size = new Size(54, 54);
             light_State.TabIndex = 1;
             light_State.TabIndex = 1;