优化回路上传页面、节能属性上传页面、限制内部预留服务
This commit is contained in:
@@ -382,8 +382,8 @@ Public Class EnergySavingAttribute
|
||||
For j As Integer = 4 To RatioInit.Cols - 1
|
||||
'判断是否为空
|
||||
Dim str As String = RatioInit.Cell(i, j).Text
|
||||
If String.IsNullOrEmpty(RatioInit.Cell(i, j).Text) AndAlso j <> RatioInit.Cols - 1 Then
|
||||
MsgBox($"温控 第{RatioInit.Cell(i, 0).Text}行数据缺失请补全数据再进行上传!")
|
||||
If String.IsNullOrEmpty(RatioInit.Cell(i, j).Text) AndAlso j <> RatioInit.Cols - 1 AndAlso j <> 4 Then
|
||||
MsgBox($"温控 第{i}行 {j}列数据缺失请补全数据再进行上传!")
|
||||
Return Nothing
|
||||
End If
|
||||
'RatioInit.Cell(0, 1).Text = "酒店编号"
|
||||
@@ -412,11 +412,11 @@ Public Class EnergySavingAttribute
|
||||
dic.Add("air_model", RatioInit.Cell(i, j).Text.Trim)
|
||||
Case 9
|
||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【空调节能温差】 数据异常!")
|
||||
MsgBox($"温控第{i}行{j}列,【空调节能温差】 数据异常!")
|
||||
Return Nothing
|
||||
Else
|
||||
If fnumber >= 15 Or fnumber < 0 Then
|
||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【功率】 数据异常!数值范围为 1到15")
|
||||
MsgBox($"温控第{i}行{j}列,【功率】 数据异常!数值范围为 1到15")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
@@ -424,20 +424,20 @@ Public Class EnergySavingAttribute
|
||||
dic.Add("temperature", fnumber)
|
||||
Case 10
|
||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【房间高度】 数据异常!")
|
||||
MsgBox($"温控第{i}行{j}列,【房间高度】 数据异常!")
|
||||
Return Nothing
|
||||
End If
|
||||
dic.Add("height", fnumber)
|
||||
Case 11
|
||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【房间面积】 数据异常!")
|
||||
MsgBox($"温控第{i}行,【房间面积】 数据异常!")
|
||||
Return Nothing
|
||||
|
||||
End If
|
||||
dic.Add("area", fnumber)
|
||||
Case 12
|
||||
If Not Double.TryParse(RatioInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"温控第{RatioInit.Cell(i, 0).Text}行,【热损失系数】 数据异常!")
|
||||
MsgBox($"温控第{i}行{j}列,【热损失系数】 数据异常!")
|
||||
Return Nothing
|
||||
End If
|
||||
dic.Add("heat_loss", fnumber)
|
||||
@@ -480,8 +480,8 @@ Public Class EnergySavingAttribute
|
||||
For j As Integer = 4 To PowerInit.Cols - 1
|
||||
'判断是否为空
|
||||
Dim str As String = PowerInit.Cell(i, j).Text
|
||||
If String.IsNullOrEmpty(PowerInit.Cell(i, j).Text) AndAlso j <> PowerInit.Cols - 1 Then
|
||||
MsgBox($"第{i}行{j}数据缺失请补全数据再进行上传!")
|
||||
If String.IsNullOrEmpty(PowerInit.Cell(i, j).Text) AndAlso j <> PowerInit.Cols - 1 AndAlso j <> 4 Then
|
||||
MsgBox($"第{i}行{j}列数据缺失请补全数据再进行上传!")
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -495,11 +495,11 @@ Public Class EnergySavingAttribute
|
||||
dic.Add("address", PowerInit.Cell(i, j).Text.Trim)
|
||||
Case 6
|
||||
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【功率】 数据异常!")
|
||||
MsgBox($"第{i}行{j}列,【功率】 数据异常!")
|
||||
Return
|
||||
Else
|
||||
If fnumber >= 10000 Or fnumber < 0 Then
|
||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【功率】 数据异常!数值范围为 1到10000")
|
||||
MsgBox($"第{i}行{j}列,【功率】 数据异常!数值范围为 1到10000")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
@@ -507,11 +507,11 @@ Public Class EnergySavingAttribute
|
||||
dic.Add("power", fnumber)
|
||||
Case 7
|
||||
If Not Double.TryParse(PowerInit.Cell(i, j).Text.Trim, fnumber) Then
|
||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【节能比例(%)】 数据异常!")
|
||||
MsgBox($"第{i}行{j}列,【节能比例(%)】 数据异常!")
|
||||
Return
|
||||
Else
|
||||
If fnumber > 100 Or fnumber < 0 Then
|
||||
MsgBox($"第{PowerInit.Cell(i, 0).Text}行,【节能比例(%)】 数据异常!数值范围为 1到100")
|
||||
MsgBox($"第{i}行{j}列,【节能比例(%)】 数据异常!数值范围为 1到100")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
@@ -531,7 +531,7 @@ Public Class EnergySavingAttribute
|
||||
Dim Tli As List(Of Dictionary(Of String, Object)) = GetRatioInitLi()
|
||||
If IsNothing(Tli) Then
|
||||
'MsgBox("上传失败")
|
||||
'Returneks
|
||||
Return
|
||||
Else
|
||||
'将tli 添加到li中
|
||||
li.AddRange(Tli)
|
||||
|
||||
Reference in New Issue
Block a user