优化回路上传页面、节能属性上传页面、限制内部预留服务
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
<MinimumRequiredVersion>4.0.0.5</MinimumRequiredVersion>
|
<MinimumRequiredVersion>4.0.0.5</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>index.html</WebPage>
|
<WebPage>index.html</WebPage>
|
||||||
<ApplicationRevision>73</ApplicationRevision>
|
<ApplicationRevision>81</ApplicationRevision>
|
||||||
<ApplicationVersion>4.4.3.%2a</ApplicationVersion>
|
<ApplicationVersion>4.4.3.%2a</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
|
|||||||
@@ -382,8 +382,8 @@ Public Class EnergySavingAttribute
|
|||||||
For j As Integer = 4 To RatioInit.Cols - 1
|
For j As Integer = 4 To RatioInit.Cols - 1
|
||||||
'判断是否为空
|
'判断是否为空
|
||||||
Dim str As String = RatioInit.Cell(i, j).Text
|
Dim str As String = RatioInit.Cell(i, j).Text
|
||||||
If String.IsNullOrEmpty(RatioInit.Cell(i, j).Text) AndAlso j <> RatioInit.Cols - 1 Then
|
If String.IsNullOrEmpty(RatioInit.Cell(i, j).Text) AndAlso j <> RatioInit.Cols - 1 AndAlso j <> 4 Then
|
||||||
MsgBox($"温控 第{RatioInit.Cell(i, 0).Text}行数据缺失请补全数据再进行上传!")
|
MsgBox($"温控 第{i}行 {j}列数据缺失请补全数据再进行上传!")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
'RatioInit.Cell(0, 1).Text = "酒店编号"
|
'RatioInit.Cell(0, 1).Text = "酒店编号"
|
||||||
@@ -412,11 +412,11 @@ Public Class EnergySavingAttribute
|
|||||||
dic.Add("air_model", RatioInit.Cell(i, j).Text.Trim)
|
dic.Add("air_model", RatioInit.Cell(i, j).Text.Trim)
|
||||||
Case 9
|
Case 9
|
||||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【空调节能温差】 数据异常!")
|
MsgBox($"温控第{i}行{j}列,【空调节能温差】 数据异常!")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
Else
|
Else
|
||||||
If fnumber >= 15 Or fnumber < 0 Then
|
If fnumber >= 15 Or fnumber < 0 Then
|
||||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【功率】 数据异常!数值范围为 1到15")
|
MsgBox($"温控第{i}行{j}列,【功率】 数据异常!数值范围为 1到15")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -424,20 +424,20 @@ Public Class EnergySavingAttribute
|
|||||||
dic.Add("temperature", fnumber)
|
dic.Add("temperature", fnumber)
|
||||||
Case 10
|
Case 10
|
||||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【房间高度】 数据异常!")
|
MsgBox($"温控第{i}行{j}列,【房间高度】 数据异常!")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
dic.Add("height", fnumber)
|
dic.Add("height", fnumber)
|
||||||
Case 11
|
Case 11
|
||||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【房间面积】 数据异常!")
|
MsgBox($"温控第{i}行,【房间面积】 数据异常!")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
|
|
||||||
End If
|
End If
|
||||||
dic.Add("area", fnumber)
|
dic.Add("area", fnumber)
|
||||||
Case 12
|
Case 12
|
||||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【热损失系数】 数据异常!")
|
MsgBox($"温控第{i}行{j}列,【热损失系数】 数据异常!")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
dic.Add("heat_loss", fnumber)
|
dic.Add("heat_loss", fnumber)
|
||||||
@@ -480,8 +480,8 @@ Public Class EnergySavingAttribute
|
|||||||
For j As Integer = 4 To PowerInit.Cols - 1
|
For j As Integer = 4 To PowerInit.Cols - 1
|
||||||
'判断是否为空
|
'判断是否为空
|
||||||
Dim str As String = PowerInit.Cell(i, j).Text
|
Dim str As String = PowerInit.Cell(i, j).Text
|
||||||
If String.IsNullOrEmpty(PowerInit.Cell(i, j).Text) AndAlso j <> PowerInit.Cols - 1 Then
|
If String.IsNullOrEmpty(PowerInit.Cell(i, j).Text) AndAlso j <> PowerInit.Cols - 1 AndAlso j <> 4 Then
|
||||||
MsgBox($"第{i}行{j}数据缺失请补全数据再进行上传!")
|
MsgBox($"第{i}行{j}列数据缺失请补全数据再进行上传!")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -495,11 +495,11 @@ Public Class EnergySavingAttribute
|
|||||||
dic.Add("address", PowerInit.Cell(i, j).Text.Trim)
|
dic.Add("address", PowerInit.Cell(i, j).Text.Trim)
|
||||||
Case 6
|
Case 6
|
||||||
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【功率】 数据异常!")
|
MsgBox($"第{i}行{j}列,【功率】 数据异常!")
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If fnumber >= 10000 Or fnumber < 0 Then
|
If fnumber >= 10000 Or fnumber < 0 Then
|
||||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【功率】 数据异常!数值范围为 1到10000")
|
MsgBox($"第{i}行{j}列,【功率】 数据异常!数值范围为 1到10000")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -507,11 +507,11 @@ Public Class EnergySavingAttribute
|
|||||||
dic.Add("power", fnumber)
|
dic.Add("power", fnumber)
|
||||||
Case 7
|
Case 7
|
||||||
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【节能比例(%)】 数据异常!")
|
MsgBox($"第{i}行{j}列,【节能比例(%)】 数据异常!")
|
||||||
Return
|
Return
|
||||||
Else
|
Else
|
||||||
If fnumber > 100 Or fnumber < 0 Then
|
If fnumber > 100 Or fnumber < 0 Then
|
||||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【节能比例(%)】 数据异常!数值范围为 1到100")
|
MsgBox($"第{i}行{j}列,【节能比例(%)】 数据异常!数值范围为 1到100")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -531,7 +531,7 @@ Public Class EnergySavingAttribute
|
|||||||
Dim Tli As List(Of Dictionary(Of String, Object)) = GetRatioInitLi()
|
Dim Tli As List(Of Dictionary(Of String, Object)) = GetRatioInitLi()
|
||||||
If IsNothing(Tli) Then
|
If IsNothing(Tli) Then
|
||||||
'MsgBox("上传失败")
|
'MsgBox("上传失败")
|
||||||
'Returneks
|
Return
|
||||||
Else
|
Else
|
||||||
'将tli 添加到li中
|
'将tli 添加到li中
|
||||||
li.AddRange(Tli)
|
li.AddRange(Tli)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ Public Class BFrmLogin
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetAccountAuth(user As String, pwd As String, appid As Integer) As LoginReturn
|
Private Function GetAccountAuth(user As String, pwd As String, appid As Integer) As LoginReturn
|
||||||
Dim jsonString As String = HttpMothod.PostData("http://47.119.147.104:90/OTApi/Login", $"Uid={user}&Pwd={pwd}&appid={_appid}")
|
Dim jsonString As String = HttpMothod.PostData("http://auth.blv-oa.com/OTApi/Login", $"Uid={user}&Pwd={pwd}&appid={_appid}")
|
||||||
If String.IsNullOrWhiteSpace(jsonString) Then Throw New Exception($"<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>쳣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա")
|
If String.IsNullOrWhiteSpace(jsonString) Then Throw New Exception($"<EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>쳣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա")
|
||||||
|
|
||||||
Dim login As LoginReturn = JsonConvert.DeserializeObject(Of LoginReturn)(jsonString)
|
Dim login As LoginReturn = JsonConvert.DeserializeObject(Of LoginReturn)(jsonString)
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
'通过使用 "*",如下所示:
|
'通过使用 "*",如下所示:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("4.4.5.29")>
|
<Assembly: AssemblyVersion("4.4.5.36")>
|
||||||
<Assembly: AssemblyFileVersion("4.4.5.29")>
|
<Assembly: AssemblyFileVersion("4.4.5.36")>
|
||||||
|
|||||||
26
BLV_Studio/SetLoopInformation.Designer.vb
generated
26
BLV_Studio/SetLoopInformation.Designer.vb
generated
@@ -33,13 +33,15 @@ Partial Class SetLoopInformation
|
|||||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.Grid1 = New FlexCell.Grid()
|
Me.Grid1 = New FlexCell.Grid()
|
||||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||||
|
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
Me.ToolStrip1.SuspendLayout()
|
Me.ToolStrip1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'ToolStrip1
|
'ToolStrip1
|
||||||
'
|
'
|
||||||
Me.ToolStrip1.AutoSize = False
|
Me.ToolStrip1.AutoSize = False
|
||||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton7, Me.ToolStripButton1, Me.ToolStripButton5, Me.ToolStripButton4, Me.ToolStripButton6, Me.ToolStripLabel1})
|
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton2, Me.ToolStripSeparator1, Me.ToolStripButton7, Me.ToolStripButton1, Me.ToolStripButton5, Me.ToolStripButton4, Me.ToolStripButton6, Me.ToolStripLabel1})
|
||||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||||
Me.ToolStrip1.Name = "ToolStrip1"
|
Me.ToolStrip1.Name = "ToolStrip1"
|
||||||
Me.ToolStrip1.Size = New System.Drawing.Size(1169, 56)
|
Me.ToolStrip1.Size = New System.Drawing.Size(1169, 56)
|
||||||
@@ -94,10 +96,10 @@ Partial Class SetLoopInformation
|
|||||||
'ToolStripLabel1
|
'ToolStripLabel1
|
||||||
'
|
'
|
||||||
Me.ToolStripLabel1.ActiveLinkColor = System.Drawing.Color.Red
|
Me.ToolStripLabel1.ActiveLinkColor = System.Drawing.Color.Red
|
||||||
Me.ToolStripLabel1.Font = New System.Drawing.Font("Microsoft YaHei UI", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
Me.ToolStripLabel1.Font = New System.Drawing.Font("Microsoft YaHei UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
Me.ToolStripLabel1.ForeColor = System.Drawing.Color.Red
|
Me.ToolStripLabel1.ForeColor = System.Drawing.Color.Red
|
||||||
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
||||||
Me.ToolStripLabel1.Size = New System.Drawing.Size(759, 53)
|
Me.ToolStripLabel1.Size = New System.Drawing.Size(639, 53)
|
||||||
Me.ToolStripLabel1.Text = "云端回路地址和云端回路名称仅供配置对照参考上传以本地回路地址和本地回路名称为准!"
|
Me.ToolStripLabel1.Text = "云端回路地址和云端回路名称仅供配置对照参考上传以本地回路地址和本地回路名称为准!"
|
||||||
'
|
'
|
||||||
'Grid1
|
'Grid1
|
||||||
@@ -115,6 +117,22 @@ Partial Class SetLoopInformation
|
|||||||
'
|
'
|
||||||
Me.Timer1.Interval = 1000
|
Me.Timer1.Interval = 1000
|
||||||
'
|
'
|
||||||
|
'ToolStripButton2
|
||||||
|
'
|
||||||
|
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.ToolStripButton2.Font = New System.Drawing.Font("Microsoft YaHei UI", 10.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.ToolStripButton2.ForeColor = System.Drawing.Color.RoyalBlue
|
||||||
|
Me.ToolStripButton2.Image = CType(resources.GetObject("ToolStripButton2.Image"), System.Drawing.Image)
|
||||||
|
Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.ToolStripButton2.Name = "ToolStripButton2"
|
||||||
|
Me.ToolStripButton2.Size = New System.Drawing.Size(41, 53)
|
||||||
|
Me.ToolStripButton2.Text = "全选"
|
||||||
|
'
|
||||||
|
'ToolStripSeparator1
|
||||||
|
'
|
||||||
|
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||||
|
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 56)
|
||||||
|
'
|
||||||
'SetLoopInformation
|
'SetLoopInformation
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||||
@@ -139,4 +157,6 @@ Partial Class SetLoopInformation
|
|||||||
Friend WithEvents Grid1 As FlexCell.Grid
|
Friend WithEvents Grid1 As FlexCell.Grid
|
||||||
Friend WithEvents ToolStripLabel1 As ToolStripLabel
|
Friend WithEvents ToolStripLabel1 As ToolStripLabel
|
||||||
Friend WithEvents Timer1 As Timer
|
Friend WithEvents Timer1 As Timer
|
||||||
|
Friend WithEvents ToolStripButton2 As ToolStripButton
|
||||||
|
Friend WithEvents ToolStripSeparator1 As ToolStripSeparator
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -199,4 +199,19 @@
|
|||||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>129, 17</value>
|
<value>129, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<data name="ToolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -79,14 +79,35 @@ Public Class SetLoopInformation
|
|||||||
G_ReportingScenario = nReportingScenario
|
G_ReportingScenario = nReportingScenario
|
||||||
|
|
||||||
Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning
|
Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning
|
||||||
|
Dim bdic As Dictionary(Of String, String) = nReportingScenario.getDevloop()
|
||||||
|
|
||||||
For Each item In li
|
For Each item In li
|
||||||
If G_loopNameAddr.ContainsKey(item.ModalAddress) Then
|
If G_loopNameAddr.ContainsKey(item.ModalAddress) Then
|
||||||
Continue For
|
Continue For
|
||||||
Else
|
Else
|
||||||
G_loopNameAddr.Add(item.ModalAddress, item.Name)
|
'判断类型为 24 的 名称只取前2个字符
|
||||||
|
If item.Type.Equals("4") Then
|
||||||
|
'判断名称长度是否大于2
|
||||||
|
If item.Name.Length > 2 Then
|
||||||
|
G_loopNameAddr.Add(item.ModalAddress, item.Name.Substring(0, 2))
|
||||||
|
Else
|
||||||
|
G_loopNameAddr.Add(item.ModalAddress, item.Name)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
G_loopNameAddr.Add(item.ModalAddress, item.Name)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
For Each item In bdic
|
||||||
|
If G_loopNameAddr.ContainsKey(item.Key) Then
|
||||||
|
Continue For
|
||||||
|
Else
|
||||||
|
G_loopNameAddr.Add(item.Key, item.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
' 在 InitializeComponent() 调用之后添加任何初始化。
|
' 在 InitializeComponent() 调用之后添加任何初始化。
|
||||||
|
|
||||||
@@ -531,7 +552,7 @@ Public Class SetLoopInformation
|
|||||||
|
|
||||||
Dim strInputMsg As String = InputBox("请输入回路发布密码", "密码确认")
|
Dim strInputMsg As String = InputBox("请输入回路发布密码", "密码确认")
|
||||||
|
|
||||||
If strInputMsg <> "Cc2022OK" Then Return
|
If strInputMsg <> "123456" Then Return
|
||||||
ToolStripButton6.Enabled = False
|
ToolStripButton6.Enabled = False
|
||||||
Dim mSaveRoomTypeModal As SaveRoomTypeModal
|
Dim mSaveRoomTypeModal As SaveRoomTypeModal
|
||||||
Dim mSaveRoomTypeModalList As New List(Of SaveRoomTypeModal)
|
Dim mSaveRoomTypeModalList As New List(Of SaveRoomTypeModal)
|
||||||
@@ -557,6 +578,7 @@ Public Class SetLoopInformation
|
|||||||
mSaveRoomTypeModal.TCLDeviceName = Grid1.Cell(i, 18).Text
|
mSaveRoomTypeModal.TCLDeviceName = Grid1.Cell(i, 18).Text
|
||||||
mSaveRoomTypeModal.MultipleGroupID = CInt(Grid1.Cell(i, 19).Text)
|
mSaveRoomTypeModal.MultipleGroupID = CInt(Grid1.Cell(i, 19).Text)
|
||||||
mSaveRoomTypeModal.MultipleTCLName = Grid1.Cell(i, 20).Text
|
mSaveRoomTypeModal.MultipleTCLName = Grid1.Cell(i, 20).Text
|
||||||
|
mSaveRoomTypeModal.color = GetColorFromString(mSaveRoomTypeModal.modalAddress)
|
||||||
|
|
||||||
Dim str As String = Grid1.Cell(i, 1).Text
|
Dim str As String = Grid1.Cell(i, 1).Text
|
||||||
Console.WriteLine(str)
|
Console.WriteLine(str)
|
||||||
@@ -598,7 +620,60 @@ Public Class SetLoopInformation
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Function GetColorFromString(inputString As String) As String
|
||||||
|
' 检查输入字符串是否有效
|
||||||
|
If String.IsNullOrEmpty(inputString) OrElse inputString.Length < 3 Then
|
||||||
|
Throw New ArgumentException("输入字符串必须至少包含3个字符")
|
||||||
|
End If
|
||||||
|
'提取前三位字符
|
||||||
|
Dim firstThreeDigits As String = inputString.Substring(0, 3)
|
||||||
|
' 将提取的字符串转换为数字(去掉前导零)
|
||||||
|
Dim number As Integer
|
||||||
|
If Not Integer.TryParse(firstThreeDigits, number) Then
|
||||||
|
Throw New ArgumentException("前三位字符必须是有效的数字")
|
||||||
|
End If
|
||||||
|
'判断是为4
|
||||||
|
If number <> 4 Then
|
||||||
|
Return "#000000"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
' 提取最后三位字符
|
||||||
|
Dim lastThreeDigits As String = inputString.Substring(inputString.Length - 3, 3)
|
||||||
|
|
||||||
|
' 将提取的字符串转换为数字(去掉前导零)
|
||||||
|
'Dim number As Integer
|
||||||
|
If Not Integer.TryParse(lastThreeDigits, number) Then
|
||||||
|
Throw New ArgumentException("最后三位字符必须是有效的数字")
|
||||||
|
End If
|
||||||
|
|
||||||
|
' 根据图片内容创建数字到颜色的映射
|
||||||
|
Dim colorMap As New Dictionary(Of Integer, String) From {
|
||||||
|
{1, "#FF8C69"}, {2, "#802A2A"}, {3, "#228B22"}, {4, "#FF00FF"},
|
||||||
|
{5, "#00FFFF"}, {6, "#0000FF"}, {7, "#FF34B3"}, {8, "#FF0000"},
|
||||||
|
{9, "#00FF00"}, {10, "#FF6200"}, {11, "#882657"}, {12, "#CD919E"},
|
||||||
|
{13, "#CD2626"}, {14, "#BD2626"}, {15, "#A4D3EE"}, {16, "#9F79EE"},
|
||||||
|
{17, "#9B30FF"}, {18, "#9A32CD"}, {19, "#8B4C39"}, {20, "#8B4513"},
|
||||||
|
{21, "#8B3A3A"}, {22, "#8B2252"}, {23, "#8B008B"}, {24, "#838B8B"},
|
||||||
|
{25, "#f7acbc"}, {26, "#ef5b9c"}, {27, "#f05b72"}, {28, "#f8aba6"},
|
||||||
|
{29, "#f69c9f"}, {30, "#f58f98"}, {31, "#ca8687"}, {32, "#f391a9"},
|
||||||
|
{33, "#bd6758"}, {34, "#d64f44"}, {35, "#d93a49"}, {36, "#b3424a"},
|
||||||
|
{37, "#deab8a"}, {38, "#fedcbd"}, {39, "#f47920"}, {40, "#905a3d"},
|
||||||
|
{41, "#8f4b2e"}, {42, "#87481f"}, {43, "#5f3c23"}, {44, "#6b473c"},
|
||||||
|
{45, "#faa755"}, {46, "#fab27b"}, {47, "#f58220"}, {48, "#905d1d"},
|
||||||
|
{49, "#8a5d19"}, {50, "#8c531b"}, {51, "#826858"}, {52, "#817936"},
|
||||||
|
{53, "#87843b"}, {54, "#726930"}, {55, "#454926"}, {56, "#2e3a1f"},
|
||||||
|
{57, "#444693"}, {58, "#2a5caa"}, {59, "#003a6c"}, {60, "#426ab3"},
|
||||||
|
{61, "#46485f"}, {62, "#181d4b"}, {63, "#6a6da9"}, {64, "#585eaa"}
|
||||||
|
}
|
||||||
|
|
||||||
|
' 检查数字是否在有效范围内
|
||||||
|
If number >= 1 AndAlso number <= 64 Then
|
||||||
|
Return colorMap(number)
|
||||||
|
Else
|
||||||
|
Throw New ArgumentException($"数字 {number} 不在有效范围内 (1-64)")
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
'上传回路日志
|
'上传回路日志
|
||||||
|
|
||||||
Public Function UploadOLdloopLog(HotelID As String, RoomTypeID As String, ConfigVersion As String, Note As String, UploadUser As String) As Boolean
|
Public Function UploadOLdloopLog(HotelID As String, RoomTypeID As String, ConfigVersion As String, Note As String, UploadUser As String) As Boolean
|
||||||
@@ -645,6 +720,32 @@ Public Class SetLoopInformation
|
|||||||
Private Sub SetLoopInformation_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
|
Private Sub SetLoopInformation_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
|
||||||
Timer1.Stop()
|
Timer1.Stop()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton2_Click_1(sender As Object, e As EventArgs) Handles ToolStripButton2.Click
|
||||||
|
'判断按钮文本是否为“全选”
|
||||||
|
If ToolStripButton2.Text = "全选" Then
|
||||||
|
|
||||||
|
'将文本设置为取消全选
|
||||||
|
ToolStripButton2.Text = "取消全选"
|
||||||
|
'设置按钮文本颜色为 RoyalRed
|
||||||
|
ToolStripButton2.ForeColor = Color.Red
|
||||||
|
'将所有复选框选中
|
||||||
|
For i As Integer = 0 To Grid1.Rows - 1
|
||||||
|
Grid1.Cell(i, 1).Text = "True"
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
'将文本设置为全选
|
||||||
|
ToolStripButton2.Text = "全选"
|
||||||
|
'设置按钮文本颜色为 RoyalBlue
|
||||||
|
ToolStripButton2.ForeColor = Color.RoyalBlue
|
||||||
|
|
||||||
|
|
||||||
|
'将所有复选框取消选中
|
||||||
|
For i As Integer = 0 To Grid1.Rows - 1
|
||||||
|
Grid1.Cell(i, 1).Text = "False"
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Public Class RoomDevice
|
Public Class RoomDevice
|
||||||
Public Property ID As Integer
|
Public Property ID As Integer
|
||||||
|
|||||||
@@ -59,6 +59,28 @@ Public Class ReportingScenario
|
|||||||
Public Function getDateDisposeRuning() As List(Of MDevNodeMessage)
|
Public Function getDateDisposeRuning() As List(Of MDevNodeMessage)
|
||||||
Return DateDisposeRuning(Tgrd, TDevicemodel)
|
Return DateDisposeRuning(Tgrd, TDevicemodel)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function getDevloop() As Dictionary(Of String, String)
|
||||||
|
Dim dic As New Dictionary(Of String, String)
|
||||||
|
Dim devAddr, NodeLoop As String
|
||||||
|
Dim strbuf As String()
|
||||||
|
For Each Dev In TDevicemodel
|
||||||
|
If String.IsNullOrEmpty(Dev.Value.Desc.DevInterface) OrElse Dev.Value.Desc.DevInterface.Equals("VirtualObject") Then Continue For
|
||||||
|
For Each DevNode In Dev.Value.Nodes
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(DevNode.DEV_TYPE_DATA) Then
|
||||||
|
devAddr = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
||||||
|
NodeLoop = DevNode.DEV_TYPE_DATA.PadLeft(3, "0") & devAddr.PadLeft(3, "0") & "000"
|
||||||
|
If dic.ContainsKey(NodeLoop) Then Continue For
|
||||||
|
strbuf = Dev.Key.Split(vbLf)
|
||||||
|
dic.Add(NodeLoop, strbuf(2))
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Next
|
||||||
|
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)) As List(Of MDevNodeMessage)
|
||||||
If IsNothing(_grd) Then Return Nothing
|
If IsNothing(_grd) Then Return Nothing
|
||||||
Dim ACtabRange As CtabRange
|
Dim ACtabRange As CtabRange
|
||||||
@@ -72,7 +94,9 @@ Public Class ReportingScenario
|
|||||||
For Each Dev In _Devicemodel '遍历设备
|
For Each Dev In _Devicemodel '遍历设备
|
||||||
|
|
||||||
For Each DevNode In Dev.Value.Nodes '遍历设备下属子节点
|
For Each DevNode In Dev.Value.Nodes '遍历设备下属子节点
|
||||||
|
|
||||||
Dim devAddr As String = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
Dim devAddr As String = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
||||||
|
|
||||||
If DevNode.Interface.Equals("DO") OrElse DevNode.Interface.Equals("LIGHT") Then '判断是否为输出设备
|
If DevNode.Interface.Equals("DO") OrElse DevNode.Interface.Equals("LIGHT") Then '判断是否为输出设备
|
||||||
If DevNode.DEV_TYPE_DATA.Equals("4") Then '服务设备节点特殊处理
|
If DevNode.DEV_TYPE_DATA.Equals("4") Then '服务设备节点特殊处理
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,13 @@ Public Class ServiceAttribute
|
|||||||
Dic_3 = New List(Of String)
|
Dic_3 = New List(Of String)
|
||||||
'单位
|
'单位
|
||||||
Dic_4 = New List(Of String)
|
Dic_4 = New List(Of String)
|
||||||
|
Dim fustr As String = "服务-"
|
||||||
For Each node In G_hostNode.Nodes
|
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 '
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
Dic_1.Add($"{node.LoopAddr}:{node.Name }")
|
Dic_1.Add($"{node.LoopAddr}:{node.Name }")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
@@ -7234,6 +7234,8 @@ ON DUPLICATE KEY UPDATE {updatastr};"
|
|||||||
Dim Server() As String
|
Dim Server() As String
|
||||||
Dim devdatetype As Integer
|
Dim devdatetype As Integer
|
||||||
Dim devname As String()
|
Dim devname As String()
|
||||||
|
Dim devnamestr As String = ""
|
||||||
|
Dim bumberstr As String = ""
|
||||||
For i=0 To Dic_Devicemodel.Count-1
|
For i=0 To Dic_Devicemodel.Count-1
|
||||||
dev = Dic_Devicemodel.Values(i)
|
dev = Dic_Devicemodel.Values(i)
|
||||||
If dev.Desc.DevInterface.Equals("VirtualObject") Then Continue For
|
If dev.Desc.DevInterface.Equals("VirtualObject") Then Continue For
|
||||||
@@ -7245,9 +7247,9 @@ ON DUPLICATE KEY UPDATE {updatastr};"
|
|||||||
If _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("红外") OrElse _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("雷达")OrElse _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("门磁") Then
|
If _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("红外") OrElse _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("雷达")OrElse _grd.Cell(gr,TableColNumber.KeyName).Text.Contains("门磁") Then
|
||||||
Server= _grd.Cell(gr,TableColNumber.ServerAttribute).Text.Trim.Split(",")
|
Server= _grd.Cell(gr,TableColNumber.ServerAttribute).Text.Trim.Split(",")
|
||||||
If IsNothing(Server) OrElse Server.Count=0 OrElse string.IsNullOrEmpty(Server(0)) Then Continue For
|
If IsNothing(Server) OrElse Server.Count=0 OrElse string.IsNullOrEmpty(Server(0)) Then Continue For
|
||||||
|
bumberstr=$"{_grd.Cell(gr,TableColNumber.KeyName).Text}_场景编号{_grd.Cell(gr,TableColNumber.SceneID).Text}"
|
||||||
devAddr =$"00400000{Server(0).ToString.Trim}"
|
devAddr =$"00400000{Server(0).ToString.Trim}"
|
||||||
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,_grd.Cell(gr,TableColNumber.KeyName).Text,devAddr)
|
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,bumberstr,devAddr)
|
||||||
If dic.ContainsKey(devAddr) Then
|
If dic.ContainsKey(devAddr) Then
|
||||||
Else
|
Else
|
||||||
dic.Add(devAddr,insert)
|
dic.Add(devAddr,insert)
|
||||||
@@ -7257,7 +7259,8 @@ ON DUPLICATE KEY UPDATE {updatastr};"
|
|||||||
Server= _grd.Cell(gr,TableColNumber.ServerAttribute).Text.Trim.Split(",")
|
Server= _grd.Cell(gr,TableColNumber.ServerAttribute).Text.Trim.Split(",")
|
||||||
If IsNothing(Server) OrElse Server.Count=0 OrElse string.IsNullOrEmpty(Server(0)) Then Continue For
|
If IsNothing(Server) OrElse Server.Count=0 OrElse string.IsNullOrEmpty(Server(0)) Then Continue For
|
||||||
devAddr =$"004000001"
|
devAddr =$"004000001"
|
||||||
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,_grd.Cell(gr,TableColNumber.KeyName).Text,devAddr)
|
bumberstr=$"{_grd.Cell(gr,TableColNumber.KeyName).Text}_场景编号{_grd.Cell(gr,TableColNumber.SceneID).Text}"
|
||||||
|
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,bumberstr,devAddr)
|
||||||
If dic.ContainsKey(devAddr) Then
|
If dic.ContainsKey(devAddr) Then
|
||||||
Else
|
Else
|
||||||
dic.Add(devAddr,insert)
|
dic.Add(devAddr,insert)
|
||||||
@@ -7271,7 +7274,7 @@ ON DUPLICATE KEY UPDATE {updatastr};"
|
|||||||
' 485(轮询)1
|
' 485(轮询)1
|
||||||
'设备地址:9
|
'设备地址:9
|
||||||
'A9恒压调光_(RS485_轮询)
|
'A9恒压调光_(RS485_轮询)
|
||||||
Dim str As String = dev.Desc.Name
|
Dim str As String = dev.Name
|
||||||
Dim strbuf() As String = str.Split(vbLf)
|
Dim strbuf() As String = str.Split(vbLf)
|
||||||
If strbuf.Count > 1 Then
|
If strbuf.Count > 1 Then
|
||||||
Dim strbuf1() As String = strbuf(1).Trim.Split(":")
|
Dim strbuf1() As String = strbuf(1).Trim.Split(":")
|
||||||
@@ -7297,7 +7300,8 @@ ON DUPLICATE KEY UPDATE {updatastr};"
|
|||||||
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,dev.Name.Replace(vbLf,"_")&"_主机",devAddr)
|
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,dev.Name.Replace(vbLf,"_")&"_主机",devAddr)
|
||||||
Else
|
Else
|
||||||
devname=dev.Name.Split (vbLf)
|
devname=dev.Name.Split (vbLf)
|
||||||
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,devname(2),devAddr)
|
devnamestr=$"{devname(2)}_地址{typeindex}"
|
||||||
|
insert= INSERTtbl_configured_devlist(HotelID,RoomTypeID,devnamestr,devAddr)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If dic.ContainsKey(devAddr) Then
|
If dic.ContainsKey(devAddr) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user