From 713a36b3836d35875439f079b6dbc17b62c2c8cd Mon Sep 17 00:00:00 2001 From: chenzhihao <1798906853@qq.com> Date: Wed, 21 Jan 2026 11:06:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=95=99=E6=9C=8D=E5=8A=A1=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E6=94=B9=E4=B8=BA=2025-57?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BLV_Studio/BLV_Studio.vbproj | 2 +- BLV_Studio/EnergySavingAttribute.vb | 63 +++++++++++++------- BLV_Studio/FrmMain.Designer.vb | 2 +- BLV_Studio/FrmMain.resx | 34 +++++------ BLV_Studio/FrmMain.vb | 8 +-- BLV_Studio/Test/GridTest/ServiceAttribute.vb | 2 +- 6 files changed, 65 insertions(+), 46 deletions(-) diff --git a/BLV_Studio/BLV_Studio.vbproj b/BLV_Studio/BLV_Studio.vbproj index 4f47e84..1c8c1a1 100644 --- a/BLV_Studio/BLV_Studio.vbproj +++ b/BLV_Studio/BLV_Studio.vbproj @@ -35,7 +35,7 @@ 4.0.0.5 true index.html - 81 + 82 4.4.3.%2a false true diff --git a/BLV_Studio/EnergySavingAttribute.vb b/BLV_Studio/EnergySavingAttribute.vb index 692cb7b..0b5270d 100644 --- a/BLV_Studio/EnergySavingAttribute.vb +++ b/BLV_Studio/EnergySavingAttribute.vb @@ -41,23 +41,35 @@ Public Class EnergySavingAttribute End If Next G_DateStr = New Dictionary(Of String, List(Of (String, String))) - Dim tnli As List(Of (String, String)) - Dim strbuf As String() = datestr.Split(vbLf) - Dim cstrbutf As String() - For Each item In strbuf - cstrbutf = item.Trim().Split(",") - If G_DateStr.ContainsKey(cstrbutf(2)) Then - tnli = G_DateStr(cstrbutf(2)) - tnli.Add((cstrbutf(3), cstrbutf(4))) - Else - tnli = New List(Of (String, String)) - tnli.Add((cstrbutf(3), cstrbutf(4))) - G_DateStr.Add(cstrbutf(2), tnli) + If Not String.IsNullOrEmpty(datestr) Then + + Dim tnli As List(Of (String, String)) + Dim strbuf As String() = datestr.Split(vbLf) + Dim cstrbutf As String() + For Each item In strbuf + cstrbutf = item.Trim().Split(",") + If G_DateStr.ContainsKey(cstrbutf(2)) Then + tnli = G_DateStr(cstrbutf(2)) + tnli.Add((cstrbutf(3), cstrbutf(4))) + Else + tnli = New List(Of (String, String)) + tnli.Add((cstrbutf(3), cstrbutf(4))) + G_DateStr.Add(cstrbutf(2), tnli) + + End If + Next + Console.WriteLine(G_DateStr.Count) + Else + Dim tnli1 As New List(Of (String, String)) + 'tnli1.Add(("60", "全局亮度节能")) + Dim tnli2 As New List(Of (String, String)) + 'tnli2.Add(("1", "1")) + G_DateStr.Add(2, tnli1) + G_DateStr.Add(3, tnli2) + End If + - End If - Next - Console.WriteLine(G_DateStr.Count) ' 在 InitializeComponent() 调用之后添加任何初始化。 @@ -128,9 +140,11 @@ Public Class EnergySavingAttribute PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i) PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0" If li.Count > 0 Then + '默认勾选ta + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1 Else - PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0" + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60" End If If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then ncdic = dic(G_loopNameAddr.Keys(i)) @@ -149,9 +163,10 @@ Public Class EnergySavingAttribute PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i) PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0" If li.Count > 0 Then + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1 Else - PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0" + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60" End If If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then ncdic = dic(G_loopNameAddr.Keys(i)) @@ -170,9 +185,10 @@ Public Class EnergySavingAttribute PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i) PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0" If li.Count > 0 Then + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1 Else - PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0" + PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60" End If If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then ncdic = dic(G_loopNameAddr.Keys(i)) @@ -190,6 +206,7 @@ Public Class EnergySavingAttribute RatioInit.Cell(RatioInit.Rows - 1, 4).Text = G_loopNameAddr.Values(i) RatioInit.Cell(RatioInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i) If li.Count > 0 Then + '取回路地址第4到6位转成int类型 Dim Ginttype2 As Integer = Integer.Parse(G_loopNameAddr.Keys(i).Substring(3, 3)) '使用linq查询li中Item2为Ginttype2的项 取其Item1 @@ -197,7 +214,7 @@ Public Class EnergySavingAttribute RatioInit.Cell(RatioInit.Rows - 1, 9).Text = Gstr Else - RatioInit.Cell(RatioInit.Rows - 1, 9).Text = "0" + RatioInit.Cell(RatioInit.Rows - 1, 9).Text = "1" End If If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then ncdic = dic(G_loopNameAddr.Keys(i)) @@ -537,7 +554,7 @@ Public Class EnergySavingAttribute Dim Tli As List(Of Dictionary(Of String, Object)) = GetRatioInitLi() If IsNothing(Tli) Then 'MsgBox("上传失败") - Return + 'Return Else '将tli 添加到li中 li.AddRange(Tli) @@ -689,10 +706,11 @@ Public Class EnergySavingAttribute Return End If Else - MsgBox($"第{PowerInit.Cell(e.Row, 0).Text} 行 【公路】或节能比例 数据格式不正确,请输入数字!") + MsgBox($"第{PowerInit.Cell(e.Row, 0).Text} 行 【功率】或节能比例 数据格式不正确,请输入数字!") Return End If End If + End Sub Private Sub PowerInit_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles PowerInit.ComboDropDown @@ -716,10 +734,11 @@ Public Class EnergySavingAttribute MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常,【空调节能温差】数值范围为 1到15!") End If Else - MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常!") + 'MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常!") Return End If End If + End Sub Private Sub RatioInit_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles RatioInit.ComboDropDown If e.Row = 0 Then Return diff --git a/BLV_Studio/FrmMain.Designer.vb b/BLV_Studio/FrmMain.Designer.vb index 34b3dc1..96bfa8f 100644 --- a/BLV_Studio/FrmMain.Designer.vb +++ b/BLV_Studio/FrmMain.Designer.vb @@ -1017,7 +1017,7 @@ Partial Class FrmMain ' 'toopMax ' - Me.toopMax.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator18, Me.ToolStripButton6, Me.T_OpenfileXML, Me.ToolStripButton10, Me.ToolStripButton7, Me.ToolStripButton8, Me.ToolStripSeparator19, Me.ToolStripButton13, Me.ToolStripButton11, Me.ToolStripButton12, Me.ToolStripSeparator20, Me.ToolStripButton14, Me.ToolStripButton9, Me.ToolStripButton15, Me.ToolStripButton16, Me.ToolStripButton19, Me.ToolStripSeparator22, Me.Tablet_DeleteRow, Me.ToolStripButton3, Me.ToolStripButton5, Me.ToolStripButton18, Me.ToolStripButton21, Me.ToolStripButton22}) + Me.toopMax.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator18, Me.ToolStripButton6, Me.T_OpenfileXML, Me.ToolStripButton10, Me.ToolStripButton7, Me.ToolStripButton8, Me.ToolStripSeparator19, Me.ToolStripButton13, Me.ToolStripButton11, Me.ToolStripButton12, Me.ToolStripSeparator20, Me.ToolStripButton14, Me.ToolStripButton9, Me.ToolStripButton15, Me.ToolStripButton16, Me.ToolStripButton19, Me.ToolStripSeparator22, Me.Tablet_DeleteRow, Me.ToolStripButton3, Me.ToolStripButton21, Me.ToolStripButton5, Me.ToolStripButton18, Me.ToolStripButton22}) Me.toopMax.Location = New System.Drawing.Point(0, 0) Me.toopMax.Name = "toopMax" Me.toopMax.Size = New System.Drawing.Size(993, 40) diff --git a/BLV_Studio/FrmMain.resx b/BLV_Studio/FrmMain.resx index f42c8be..81c3438 100644 --- a/BLV_Studio/FrmMain.resx +++ b/BLV_Studio/FrmMain.resx @@ -179,7 +179,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABS - PgAAAk1TRnQBSQFMAgEBQgEAAWgBIwFoASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + PgAAAk1TRnQBSQFMAgEBQgEAAXABIwFwASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARABAQIAAQEBAAEIBgABRBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz @@ -896,6 +896,22 @@ sHCwR+gRcoQeITf4i62BVMoGkyc9KYpsf8vUCvyQ6Fod2Ogt4svidAanNTiWS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7hciM/ATGUcAAAAASUVORK5CYII= diff --git a/BLV_Studio/FrmMain.vb b/BLV_Studio/FrmMain.vb index aecc5f3..047f6b4 100644 --- a/BLV_Studio/FrmMain.vb +++ b/BLV_Studio/FrmMain.vb @@ -5120,10 +5120,10 @@ Public Class FrmMain Return End If Dim datestr As String = GetenergyConservationDev() - If String.IsNullOrEmpty(datestr) Then - MsgBox("未配置配置碳达人节能动作!") - Return - End If + 'If String.IsNullOrEmpty(datestr) Then + ' MsgBox("未配置配置碳达人节能动作!") + ' Return + 'End If Dim fromshow As New EnergySavingAttribute(aaa, roomtypeid, hotelid, Account, datestr, TvwMain.SelectedNode.Text) 'fromshow.Author = Account diff --git a/BLV_Studio/Test/GridTest/ServiceAttribute.vb b/BLV_Studio/Test/GridTest/ServiceAttribute.vb index 9063c02..a55b26b 100644 --- a/BLV_Studio/Test/GridTest/ServiceAttribute.vb +++ b/BLV_Studio/Test/GridTest/ServiceAttribute.vb @@ -50,7 +50,7 @@ Public Class ServiceAttribute For Each node In G_hostNode.Nodes fustr = "服务-" & node.LoopAddr '2025 12 29 CZH 增加 判断服务是否是 是在25 到48 且名称符合 "服务-服务号"的格式 符合则不 添加 - If node.LoopAddr >= 25 AndAlso node.LoopAddr <= 48 AndAlso fustr.Equals(node.Name) Then ' + If node.LoopAddr >= 25 AndAlso node.LoopAddr <= 57 AndAlso fustr.Equals(node.Name) Then ' Continue For End If Dic_1.Add($"{node.LoopAddr}:{node.Name }")