diff --git a/BLV_Studio/EnergySavingAttribute.vb b/BLV_Studio/EnergySavingAttribute.vb index a035e59..692cb7b 100644 --- a/BLV_Studio/EnergySavingAttribute.vb +++ b/BLV_Studio/EnergySavingAttribute.vb @@ -32,7 +32,7 @@ Public Class EnergySavingAttribute G_loopNameAddr = New Dictionary(Of String, String) G_ReportingScenario = nReportingScenario - Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning + Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning(True) For Each item In li If G_loopNameAddr.ContainsKey(item.ModalAddress) Then Continue For @@ -57,6 +57,7 @@ Public Class EnergySavingAttribute End If Next + Console.WriteLine(G_DateStr.Count) ' 在 InitializeComponent() 调用之后添加任何初始化。 @@ -118,7 +119,7 @@ Public Class EnergySavingAttribute Gcstr = G_loopNameAddr.Keys(i).Substring(0, 3) Integer.TryParse(Gcstr, Ginttype) Select Case Ginttype - Case 24 'pwm调光 + Case 24, 1 'pwm调光 、继电器 li = G_DateStr(2.ToString) PowerInit.AddItem("") PowerInit.Cell(PowerInit.Rows - 1, 2).Text = G_Hotelid @@ -221,6 +222,7 @@ Public Class EnergySavingAttribute RatioInit.Cell(RatioInit.Rows - 1, 12).Text = ncdic("heat_loss") RatioInit.Cell(RatioInit.Rows - 1, 13).Text = ncdic("remark") End If + End Select Next End Sub @@ -373,6 +375,7 @@ Public Class EnergySavingAttribute '遍历每一列 dic = New Dictionary(Of String, Object) dic.Add("type", 1) + dic.Add("is_carbon", 0) If RatioInit.Cell(i, 1).Text.Equals("1") Then dic.Add("push_state", 1) Else @@ -472,11 +475,14 @@ Public Class EnergySavingAttribute '遍历每一列 dic = New Dictionary(Of String, Object) dic.Add("type", 0) + dic.Add("is_carbon", 0) If PowerInit.Cell(i, 1).Text.Equals("1") Then dic.Add("push_state", 1) Else dic.Add("push_state", 0) End If + + For j As Integer = 4 To PowerInit.Cols - 1 '判断是否为空 Dim str As String = PowerInit.Cell(i, j).Text diff --git a/BLV_Studio/FrmMain.resx b/BLV_Studio/FrmMain.resx index 068dd1c..f42c8be 100644 --- a/BLV_Studio/FrmMain.resx +++ b/BLV_Studio/FrmMain.resx @@ -179,7 +179,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABS - PgAAAk1TRnQBSQFMAgEBQgEAAWABIwFgASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + PgAAAk1TRnQBSQFMAgEBQgEAAWgBIwFoASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARABAQIAAQEBAAEIBgABRBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz diff --git a/BLV_Studio/My Project/AssemblyInfo.vb b/BLV_Studio/My Project/AssemblyInfo.vb index 0bc4c10..cb95d80 100644 --- a/BLV_Studio/My Project/AssemblyInfo.vb +++ b/BLV_Studio/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices '通过使用 "*",如下所示: ' - - + + diff --git a/BLV_Studio/Test/GridTest/ReportingScenario.vb b/BLV_Studio/Test/GridTest/ReportingScenario.vb index ea077cc..2754b2f 100644 --- a/BLV_Studio/Test/GridTest/ReportingScenario.vb +++ b/BLV_Studio/Test/GridTest/ReportingScenario.vb @@ -1,4 +1,5 @@ -Imports FlexCell +Imports BLV_Studio.TableInteraction +Imports FlexCell Public Class ReportingScenario @@ -56,9 +57,13 @@ Public Class ReportingScenario #Region "数据处理" - Public Function getDateDisposeRuning() As List(Of MDevNodeMessage) - Return DateDisposeRuning(Tgrd, TDevicemodel) + Public Function getDateDisposeRuning(Optional hide As Boolean = False) As List(Of MDevNodeMessage) + Return DateDisposeRuning(Tgrd, TDevicemodel, hide) End Function + + + + Public Function getDevloop() As Dictionary(Of String, String) Dim dic As New Dictionary(Of String, String) Dim devAddr, NodeLoop As String @@ -79,9 +84,9 @@ Public Class ReportingScenario Next Next - Return Dic + Return dic End Function - Public Function DateDisposeRuning(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel)) As List(Of MDevNodeMessage) + Public Function DateDisposeRuning(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel), Optional hide As Boolean = False) As List(Of MDevNodeMessage) If IsNothing(_grd) Then Return Nothing Dim ACtabRange As CtabRange Dim rt As New RoomTypeConfig(RoomTypeID) @@ -149,7 +154,9 @@ Public Class ReportingScenario End If If DevNode.Name.ToUpper.Equals(NCtabRange.devname.ToUpper) Then '找到当前设备的当前节点 For k = NCtabRange.fc To NCtabRange.lc '遍历当前节点下属回路集合 - If _grd.Column(k).Visible = True Then '过滤隐藏的回路 + '判断是否过滤隐藏回路 + + If _grd.Column(k).Visible = True OrElse hide Then '过滤隐藏的回路 NodeLoopname = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeAnother, k).Text.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("?", "").Replace("!", "").Replace("`", "") If DevNode.Nodes.Count = 1 Then NodeLoop = 0