删除自动风复选框及相关功能、增加发布时附加回路上传、优化温控提示音组包方式
This commit is contained in:
@@ -561,8 +561,8 @@ Public Class EnergySavingAttribute
|
||||
li.AddRange(Tli)
|
||||
End If
|
||||
|
||||
|
||||
'插入数据到数据库
|
||||
API_LoopUpdateToServer(G_roomtypeid, li)
|
||||
''插入数据到数据库
|
||||
Deletetbl_room_type_circuit_powers(G_Hotelid, G_roomtypeid, li)
|
||||
GenerateTransactionInsertionStatements(G_Hotelid, G_roomtypeid, li)
|
||||
If API_AllocationBarCode(G_Hotelid, G_roomtypeid, li) Then
|
||||
@@ -572,6 +572,56 @@ Public Class EnergySavingAttribute
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function API_LoopUpdateToServer(roomtypeid As String, insertClunm As List(Of Dictionary(Of String, Object)))
|
||||
If IsNothing(insertClunm) AndAlso insertClunm.Count = 0 Then Return False
|
||||
Dim dic As New Dictionary(Of String, Object)
|
||||
dic.Add("roomtype_id", roomtypeid)
|
||||
Dim li As New List(Of Dictionary(Of String, Object))
|
||||
dic.Add("CarbonVIPList", li)
|
||||
For Each item In insertClunm
|
||||
If item.Values(2).ToString.Equals("1") Then
|
||||
Dim lidic As New Dictionary(Of String, Object)
|
||||
lidic.Add("ModalAddress", item.Values(4))
|
||||
lidic.Add("IsUploadBaoJing", True)
|
||||
li.Add(lidic)
|
||||
End If
|
||||
|
||||
Next
|
||||
Dim jsonString As String = String.Empty
|
||||
Dim jsonDatastr As String = JsonConvert.SerializeObject(dic)
|
||||
Try
|
||||
jsonString = HttpMothod.PostData2("https://www.boonlive-rcu.com/api/SaveRoomTypeModal_CarbonVIP", jsonDatastr)
|
||||
Catch ex As Exception
|
||||
MsgBox($"网络API调用错误,请联系管理员。")
|
||||
Return Nothing
|
||||
End Try
|
||||
'Console.WriteLine(jsonString)
|
||||
|
||||
If jsonString = Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim login As Dictionary(Of String, String)
|
||||
Try
|
||||
login = JsonConvert.DeserializeObject(Of Dictionary(Of String, String))(jsonString)
|
||||
If Not IsNothing(login) AndAlso login.ContainsKey("IsSuccess") Then
|
||||
If login.Item("IsSuccess").Equals("true") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return False
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'MsgBox($"Json数据转换错误,请联系管理员。详情 :Json data to AllocationAPI error")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
'插入数据到数据库
|
||||
Public Function Deletetbl_room_type_circuit_powers(hotelID As String, roomtypeid As String, insertClunm As List(Of Dictionary(Of String, Object))) As Boolean
|
||||
If IsNothing(insertClunm) AndAlso insertClunm.Count = 0 Then Return False
|
||||
|
||||
Reference in New Issue
Block a user