2025-11-20 09:50:21 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Net;
|
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
|
using Models;
|
|
|
|
|
|
using Models.ModelItems;
|
|
|
|
|
|
using Services.Manager;
|
|
|
|
|
|
using static Services.Manager.SyncAllFromOutterDB;
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using Models.ApiModei;
|
|
|
|
|
|
using NLog;
|
2025-12-22 17:47:19 +08:00
|
|
|
|
using Services.Tool;
|
|
|
|
|
|
using Common;
|
2025-11-20 09:50:21 +08:00
|
|
|
|
|
|
|
|
|
|
namespace UI.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
public class UpgradeController : Controller
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 基础URL
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly string baseUrl = "https://www.boonlive-rcu.com/api/";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 新添加的方法,用于获取设备信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="hotelId"></param>
|
|
|
|
|
|
/// <param name="roomTypeId"></param>
|
|
|
|
|
|
/// <param name="roomNumber"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost()]
|
|
|
|
|
|
public async Task<ActionResult> GetDeviceInfo(int hotelId, int roomTypeId, string roomNumber)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 初始化HttpClient
|
|
|
|
|
|
using (var httpClient = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 构建请求URL
|
|
|
|
|
|
var url = baseUrl + "webChatLoadHostByRoomType";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 构建表单数据
|
|
|
|
|
|
FormUrlEncodedContent formData = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(roomNumber))
|
|
|
|
|
|
{
|
|
|
|
|
|
formData = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("hotelid", hotelId.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("roomTypeID", roomTypeId.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("roomNumber", roomNumber)
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
formData = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("hotelid", hotelId.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("roomTypeID", roomTypeId.ToString())
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 发送POST请求
|
|
|
|
|
|
HttpResponseMessage response = await httpClient.PostAsync(url, formData);
|
|
|
|
|
|
|
|
|
|
|
|
// 确保请求成功
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 读取返回的字符串
|
|
|
|
|
|
string responseString = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
|
|
|
|
|
|
// 将字符串转换为ActionResult并返回
|
|
|
|
|
|
return Content(responseString, "application/json");
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
// 如果请求失败,返回错误信息
|
|
|
|
|
|
return new HttpStatusCodeResult(HttpStatusCode.BadRequest, "检索设备信息失败。");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-23 16:09:42 +08:00
|
|
|
|
public static Logger logger = LogManager.GetCurrentClassLogger();
|
2025-11-20 09:50:21 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调用微信升级接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roomTypeID">房型ID</param>
|
|
|
|
|
|
/// <param name="hostidLists">升级的设备ID列表</param>
|
|
|
|
|
|
/// <param name="upgradefileName">升级文件名字</param>
|
|
|
|
|
|
/// <returns>返回调用结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> WebChatUpgrade(int roomTypeID, string hostidLists, string upgradefileName)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
var parameters = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("roomTypeID", roomTypeID.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("hostid_lists", hostidLists),
|
|
|
|
|
|
new KeyValuePair<string, string>("upgradefileName", upgradefileName)
|
|
|
|
|
|
});
|
|
|
|
|
|
//logger.Error("hostlist:"+hostidLists);
|
|
|
|
|
|
var response = await client.PostAsync(baseUrl + "WebChatUpgrade", parameters);
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new Exception("调用升级接口失败,状态码:" + response.StatusCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询升级进度
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="hostUpdateID">升级的设备ID号</param>
|
|
|
|
|
|
/// <returns>返回查询结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> QueryUpdateHostStatus(int hotelID, int roomTypeID)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 构建带参数的 URL
|
|
|
|
|
|
var queryParams = new Dictionary<string, string>
|
|
|
|
|
|
{
|
|
|
|
|
|
{ "HotelID", hotelID.ToString() },
|
|
|
|
|
|
{ "roomTypeID", roomTypeID.ToString() }
|
|
|
|
|
|
};
|
|
|
|
|
|
string requestUrl = $"{baseUrl}QueryUpdateHostStatus";
|
|
|
|
|
|
var encodedContent = new FormUrlEncodedContent(queryParams);
|
|
|
|
|
|
var response = await client.PostAsync(requestUrl, encodedContent);
|
|
|
|
|
|
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new Exception($"调用接口失败,状态码:{response.StatusCode}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取文件名
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="hotel_id"></param>
|
|
|
|
|
|
/// <param name="room_type_id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost()]
|
|
|
|
|
|
public ActionResult GetFileName(int hotel_id, int room_type_id)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var db = SqlSugarBase.RcuDb;
|
|
|
|
|
|
List<TBL_ROOM_TYPE_LIST> roomList = SqlSugarBase.RcuDb.Queryable<TBL_ROOM_TYPE_LIST>().Where(it => it.HOTEL_OLD_ID == hotel_id && it.ROOM_TYPE_OLD_ID == room_type_id && it.IsDel != 1).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
List<FileName_DTO> files = new List<FileName_DTO>();
|
|
|
|
|
|
FileName_DTO dto = new FileName_DTO();
|
|
|
|
|
|
if (roomList != null && roomList.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var item in roomList)
|
|
|
|
|
|
{
|
|
|
|
|
|
dto.HOTEL_OLD_ID = item.HOTEL_OLD_ID;
|
|
|
|
|
|
dto.ROOM_TYPE_OLD_ID = item.ROOM_TYPE_OLD_ID;
|
|
|
|
|
|
dto.CONFIG_BIN = item.CONFIG_BIN;
|
|
|
|
|
|
dto.App_Cfg_For_L2 = item.App_Cfg_For_L2;
|
|
|
|
|
|
dto.App_Cfg_For_L4 = item.App_Cfg_For_L4;
|
|
|
|
|
|
dto.Hex_Code_For_L2 = item.Hex_Code_For_L2;
|
|
|
|
|
|
dto.Hex_Code_For_L4 = item.Hex_Code_For_L4;
|
|
|
|
|
|
dto.APPTYPE = item.APPTYPE;
|
|
|
|
|
|
dto.Cfg_Type = item.Cfg_Type;
|
|
|
|
|
|
dto.LUNCHER_HEX = item.LUNCHER_HEX;
|
|
|
|
|
|
files.Add(dto);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return Json(files);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询更新主机进度条接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="hostIDList">主机ID列表</param>
|
|
|
|
|
|
/// <returns>返回调用结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<ActionResult> ForwardQueryUpdateHostProgressBar(string hostIDList)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 将hostIDList字符串反序列化为List<int>,因为你的原始方法接受的是List<int>
|
|
|
|
|
|
|
|
|
|
|
|
// 创建参数字典
|
|
|
|
|
|
var parameters = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("HostIDList", hostIDList)
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 发送POST请求
|
|
|
|
|
|
var response = await client.PostAsync(baseUrl + "QueryUpdateHostProgressBar", parameters);
|
|
|
|
|
|
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 读取响应内容并返回
|
|
|
|
|
|
string responseBody = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
return Content(responseBody, "application/json");
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
// 处理错误情况
|
|
|
|
|
|
throw new Exception("调用查询更新主机进度条接口失败,状态码:" + response.StatusCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 微信调用灯光控制接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="jsonData">灯光控制参数对象</param>
|
|
|
|
|
|
/// <returns>返回原始接口的JSON响应</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> SetRCULight(RCULight jsonData)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 将对象序列化为JSON字符串
|
|
|
|
|
|
string jsonString = JsonConvert.SerializeObject(jsonData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 发送POST请求
|
|
|
|
|
|
var response = await client.GetAsync(baseUrl + "SetRCULight?jsonData=" + jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// 处理响应
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"接口调用失败,状态码:{response.StatusCode},错误信息:{errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取房间类型和模组列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="jsonData"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
/// <exception cref="Exception"></exception>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> GetRoomTypeAndModalsListLog(HostInfo jsonData)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 将对象序列化为JSON字符串
|
|
|
|
|
|
string jsonString = JsonConvert.SerializeObject(jsonData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 发送POST请求
|
|
|
|
|
|
var response = await client.GetAsync(baseUrl + "GetRoomTypeAndModalsListLog?jsonData=" + jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// 处理响应
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"接口调用失败,状态码:{response.StatusCode},错误信息:{errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取文件名
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Data">参数对象</param>
|
|
|
|
|
|
/// <returns>返回原始接口的JSON响应</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> GetFirmwareName(UpLoadRoom Data)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 将对象序列化为JSON字符串
|
|
|
|
|
|
//string jsonString = JsonConvert.SerializeObject(jsonData);
|
|
|
|
|
|
//var response0 = await client.PostAsync("http://rcu-data.blv-oa.com/OTApi/GainFileName" + PostAsync);
|
|
|
|
|
|
var parameters1 = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("RoomTypeid", Data.RoomTypeID.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("DataType", "1")
|
|
|
|
|
|
});
|
|
|
|
|
|
// 发送POST请求
|
|
|
|
|
|
var response1 = await client.PostAsync("http://rcu-data.blv-oa.com/OTApi/GainFileName", parameters1);
|
|
|
|
|
|
var parameters2 = new FormUrlEncodedContent(new[]
|
|
|
|
|
|
{
|
|
|
|
|
|
new KeyValuePair<string, string>("RoomTypeid", Data.RoomTypeID.ToString()),
|
|
|
|
|
|
new KeyValuePair<string, string>("DataType", "2")
|
|
|
|
|
|
});
|
|
|
|
|
|
var response2 = await client.PostAsync("http://rcu-data.blv-oa.com/OTApi/GainFileName", parameters2);
|
|
|
|
|
|
|
|
|
|
|
|
// 处理响应
|
|
|
|
|
|
if (response1.IsSuccessStatusCode && response2.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
return await response1.Content.ReadAsStringAsync() + "@" + await response2.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response1.Content.ReadAsStringAsync() + await response2.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"接口调用失败,状态码:{response1.StatusCode.ToString() + response2.StatusCode.ToString()},错误信息:{errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调用RCU空调接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestData"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
/// <exception cref="Exception"></exception>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> SetRCUAir(RCUAirRequest requestData)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 1. 序列化请求对象为JSON
|
|
|
|
|
|
string jsonString = JsonConvert.SerializeObject(requestData);
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 正确编码JSON字符串
|
|
|
|
|
|
string encodedJson = Uri.EscapeDataString(jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 构建完整的GET请求URL
|
|
|
|
|
|
string apiUrl = $"{baseUrl}SetRCUAir?jsonData={encodedJson}";
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
// 4. 发送GET请求
|
|
|
|
|
|
var response = await client.GetAsync(apiUrl);
|
|
|
|
|
|
|
|
|
|
|
|
// 5. 处理响应
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"接口调用失败: HTTP {response.StatusCode} - {errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new Exception($"请求发送失败: {ex.Message}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调用SetRCUService接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestData">服务控制请求参数</param>
|
|
|
|
|
|
/// <returns>操作结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> SetRCUService(RCUServiceRequest requestData)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 1. 序列化请求对象为JSON
|
|
|
|
|
|
string jsonString = JsonConvert.SerializeObject(requestData);
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 正确编码JSON字符串
|
|
|
|
|
|
string encodedJson = Uri.EscapeDataString(jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 构建完整的GET请求URL
|
|
|
|
|
|
string apiUrl = $"{baseUrl}SetRCUService?jsonData={encodedJson}";
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
// 4. 发送GET请求
|
|
|
|
|
|
var response = await client.GetAsync(apiUrl);
|
|
|
|
|
|
|
|
|
|
|
|
// 5. 处理响应
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"服务控制失败: HTTP {response.StatusCode} - {errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new Exception($"请求发送失败: {ex.Message}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 调用SetRCUCurtain接口控制窗帘
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestData">窗帘控制请求参数</param>
|
|
|
|
|
|
/// <returns>操作结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<string> SetRCUCurtain(RCUCurtainRequest requestData)
|
|
|
|
|
|
{
|
|
|
|
|
|
using (var client = new HttpClient())
|
|
|
|
|
|
{
|
|
|
|
|
|
// 1. 序列化请求对象为JSON
|
|
|
|
|
|
string jsonString = JsonConvert.SerializeObject(requestData);
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 正确编码JSON字符串
|
|
|
|
|
|
string encodedJson = Uri.EscapeDataString(jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 构建完整的GET请求URL
|
|
|
|
|
|
string apiUrl = $"{baseUrl}SetRCUCurtain?jsonData={encodedJson}";
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
// 4. 发送GET请求
|
|
|
|
|
|
var response = await client.GetAsync(apiUrl);
|
|
|
|
|
|
|
|
|
|
|
|
// 5. 处理响应
|
|
|
|
|
|
if (response.IsSuccessStatusCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
throw new Exception($"窗帘控制失败: HTTP {response.StatusCode} - {errorContent}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new Exception($"请求发送失败: {ex.Message}");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-22 17:47:19 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取房间地址状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="roomAddressStatus"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public ActionResult GetRoomAddressStatus(int Code, string RoomNum)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2025-12-23 14:30:26 +08:00
|
|
|
|
if (string.IsNullOrWhiteSpace(RoomNum))
|
2025-12-22 17:47:19 +08:00
|
|
|
|
{
|
2025-12-23 14:30:26 +08:00
|
|
|
|
Response.TrySkipIisCustomErrors = true;
|
2025-12-22 17:47:19 +08:00
|
|
|
|
Response.StatusCode = (int)HttpStatusCode.BadRequest;
|
2025-12-23 14:30:26 +08:00
|
|
|
|
return Json(new { Status = 0, Message = "请求参数不能为空" }, JsonRequestBehavior.AllowGet);
|
2025-12-22 17:47:19 +08:00
|
|
|
|
}
|
2025-11-20 09:50:21 +08:00
|
|
|
|
|
2025-12-23 14:30:26 +08:00
|
|
|
|
string code = Code.ToString();
|
|
|
|
|
|
string RoomNumVal = RoomNum;
|
2025-12-22 17:47:19 +08:00
|
|
|
|
string key = $"WXFault_{code}_{RoomNumVal}";
|
|
|
|
|
|
var result = CSRedisCacheHelper.HMGetAll(key);
|
|
|
|
|
|
|
|
|
|
|
|
if (result != null && result.Count > 0)
|
|
|
|
|
|
{
|
2025-12-23 14:30:26 +08:00
|
|
|
|
return Json(new { Status = 1, Message = "获取成功", Data = result }, JsonRequestBehavior.AllowGet);
|
2025-12-22 17:47:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2025-12-23 14:30:26 +08:00
|
|
|
|
// 业务层未找到数据:不返回 HTTP 404,避免 IIS 自定义 404 页覆盖 JSON
|
|
|
|
|
|
return Json(new { Status = 1, Message = "未找到数据", Data = result }, JsonRequestBehavior.AllowGet);
|
2025-12-22 17:47:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
logger.Error(ex, "GetRoomAddressStatus error");
|
2025-12-23 14:30:26 +08:00
|
|
|
|
Response.TrySkipIisCustomErrors = true;
|
2025-12-22 17:47:19 +08:00
|
|
|
|
Response.StatusCode = (int)HttpStatusCode.InternalServerError;
|
2025-12-23 14:30:26 +08:00
|
|
|
|
return Json(new { Status = -1, Message = "服务器错误", Detail = ex.Message }, JsonRequestBehavior.AllowGet);
|
2025-12-22 17:47:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-23 16:09:42 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询设备列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HttpPost()]
|
2025-12-24 19:43:39 +08:00
|
|
|
|
public ActionResult QueryDeviceList(int HotelID, int RoomTypeID)
|
2025-12-23 16:09:42 +08:00
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
string str = string.Format(@"SELECT `ID`
|
|
|
|
|
|
,`UpdateTime`
|
|
|
|
|
|
,`HotelID`
|
|
|
|
|
|
,`RoomTypeID`
|
|
|
|
|
|
,`DevName`
|
|
|
|
|
|
,`DevAddr`
|
|
|
|
|
|
,`Process`
|
|
|
|
|
|
FROM `blv_rcu_db`.`tbl_configured_devlist`
|
2025-12-24 19:43:39 +08:00
|
|
|
|
where `HotelID` ={0} and `RoomTypeID`={1};", HotelID, RoomTypeID);
|
2025-12-23 16:09:42 +08:00
|
|
|
|
var Data = SqlSugarBase.RcuDb.SqlQueryable<RCUDBData>(str).ToList();
|
2025-12-24 19:43:39 +08:00
|
|
|
|
return Json(new { Status=1,Data=Data},JsonRequestBehavior.AllowGet);
|
2025-12-23 16:09:42 +08:00
|
|
|
|
}
|
2025-12-24 19:43:39 +08:00
|
|
|
|
catch (Exception ex)
|
2025-12-23 16:09:42 +08:00
|
|
|
|
{
|
2025-12-24 19:43:39 +08:00
|
|
|
|
return Json(new { Status = -1, Message = "服务器错误", Detail = ex.Message } ,JsonRequestBehavior.AllowGet);
|
2025-12-23 16:09:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 巡检
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="requestData"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
/// <exception cref="Exception"></exception>
|
2025-12-25 13:47:07 +08:00
|
|
|
|
//[HttpPost]
|
|
|
|
|
|
//public async Task<string> SetRCUService(RCUCurtainRequest requestData)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// using (var client = new HttpClient())
|
|
|
|
|
|
// {
|
|
|
|
|
|
// // 1. 序列化请求对象为JSON
|
|
|
|
|
|
// string jsonString = JsonConvert.SerializeObject(requestData);
|
|
|
|
|
|
|
|
|
|
|
|
// // 2. 正确编码JSON字符串
|
|
|
|
|
|
// string encodedJson = Uri.EscapeDataString(jsonString);
|
|
|
|
|
|
|
|
|
|
|
|
// // 3. 构建完整的GET请求URL
|
|
|
|
|
|
// string apiUrl = $"{baseUrl}SetRCUService?jsonData={encodedJson}";
|
|
|
|
|
|
|
|
|
|
|
|
// try
|
|
|
|
|
|
// {
|
|
|
|
|
|
// // 4. 发送GET请求
|
|
|
|
|
|
// var response = await client.GetAsync(apiUrl);
|
|
|
|
|
|
|
|
|
|
|
|
// // 5. 处理响应
|
|
|
|
|
|
// if (response.IsSuccessStatusCode)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// return await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
// }
|
|
|
|
|
|
// else
|
|
|
|
|
|
// {
|
|
|
|
|
|
// var errorContent = await response.Content.ReadAsStringAsync();
|
|
|
|
|
|
// throw new Exception($"服务信息控制失败: HTTP {response.StatusCode} - {errorContent}");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// catch (Exception ex)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// throw new Exception($"请求发送失败: {ex.Message}");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
2025-12-23 16:09:42 +08:00
|
|
|
|
|
2025-12-24 19:40:49 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备信息类
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class EquipmentInfo
|
|
|
|
|
|
{
|
2025-12-26 17:18:40 +08:00
|
|
|
|
public string EquipmentStatus { get; set; }
|
|
|
|
|
|
public string FaultDescription { get; set; }
|
|
|
|
|
|
public string DevName { get; set; }
|
|
|
|
|
|
public string EquipmentStatusType { get; set; }
|
|
|
|
|
|
public string EquipmentOnlineStatus { get; set; }
|
2025-12-24 19:40:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-25 09:23:00 +08:00
|
|
|
|
private class RoomVisitLogFormRow
|
|
|
|
|
|
{
|
|
|
|
|
|
public string HotelID { get; set; }
|
|
|
|
|
|
public string RoomNumber { get; set; }
|
|
|
|
|
|
public string EquipmentStatus { get; set; }
|
|
|
|
|
|
public string FaultDescription { get; set; }
|
|
|
|
|
|
public string UpdateDate { get; set; }
|
|
|
|
|
|
public string DevName { get; set; }
|
2025-12-26 17:18:40 +08:00
|
|
|
|
public string EquipmentStatusType { get; set; }
|
|
|
|
|
|
public string EquipmentOnlineStatus { get; set; }
|
2025-12-25 09:23:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-24 19:40:49 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 写入房间设备访问日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="HotelID">酒店ID</param>
|
|
|
|
|
|
/// <param name="RoomNumber">房号</param>
|
|
|
|
|
|
/// <param name="EquipmentList">设备信息列表</param>
|
|
|
|
|
|
/// <returns>返回操作结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public ActionResult WriteRoomVisitLog(string HotelID, string RoomNumber, List<EquipmentInfo> EquipmentList)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(HotelID) || string.IsNullOrWhiteSpace(RoomNumber))
|
|
|
|
|
|
{
|
|
|
|
|
|
return Json(new { Status = 0, Message = "酒店ID和房号不能为空" }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (EquipmentList == null || EquipmentList.Count == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Json(new { Status = 0, Message = "设备信息列表不能为空" }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 创建日志列表
|
|
|
|
|
|
string updateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
2025-12-25 09:23:00 +08:00
|
|
|
|
var logList = EquipmentList.Select(equipment => new RoomVisitLogFormRow
|
2025-12-24 19:40:49 +08:00
|
|
|
|
{
|
2025-12-25 09:23:00 +08:00
|
|
|
|
HotelID = HotelID,
|
|
|
|
|
|
RoomNumber = RoomNumber,
|
|
|
|
|
|
EquipmentStatus = equipment.EquipmentStatus,
|
|
|
|
|
|
FaultDescription = equipment.FaultDescription,
|
|
|
|
|
|
UpdateDate = updateDate,
|
2025-12-26 17:18:40 +08:00
|
|
|
|
DevName = equipment.DevName,
|
|
|
|
|
|
EquipmentStatusType = equipment.EquipmentStatusType,
|
|
|
|
|
|
EquipmentOnlineStatus = equipment.EquipmentOnlineStatus
|
2025-12-25 09:23:00 +08:00
|
|
|
|
}).ToList();
|
2025-12-24 19:40:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 批量写入数据库
|
2025-12-25 09:23:00 +08:00
|
|
|
|
var insertCount = SqlSugarBase.RcuDb.Insertable(logList)
|
|
|
|
|
|
.AS("tbl_roomvisitlogform")
|
|
|
|
|
|
.ExecuteCommand();
|
2025-12-24 19:40:49 +08:00
|
|
|
|
|
2025-12-25 09:23:00 +08:00
|
|
|
|
return Json(new { Status = 1, Message = "写入成功", Count = insertCount }, JsonRequestBehavior.AllowGet);
|
2025-12-24 19:40:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
logger.Error(ex, "WriteRoomVisitLog error");
|
|
|
|
|
|
return Json(new { Status = -1, Message = "写入失败", Detail = ex.Message }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询房间设备访问日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="HotelID">酒店ID</param>
|
|
|
|
|
|
/// <param name="RoomNumber">房号</param>
|
|
|
|
|
|
/// <param name="StartTime">开始时间(格式:yyyy-MM-dd HH:mm:ss)</param>
|
|
|
|
|
|
/// <param name="EndTime">结束时间(格式:yyyy-MM-dd HH:mm:ss)</param>
|
|
|
|
|
|
/// <returns>返回查询结果</returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public ActionResult QueryRoomVisitLog(string HotelID, string RoomNumber, string StartTime = null, string EndTime = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(HotelID) || string.IsNullOrWhiteSpace(RoomNumber))
|
|
|
|
|
|
{
|
|
|
|
|
|
return Json(new { Status = 0, Message = "酒店ID和房号不能为空" }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 构建查询条件
|
|
|
|
|
|
string whereClause = "WHERE HotelID = @HotelID AND RoomNumber = @RoomNumber";
|
2025-12-25 09:23:00 +08:00
|
|
|
|
var parameters = new Dictionary<string, object>
|
|
|
|
|
|
{
|
|
|
|
|
|
{ "HotelID", HotelID },
|
|
|
|
|
|
{ "RoomNumber", RoomNumber }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
DateTime startDateTime = default(DateTime);
|
|
|
|
|
|
DateTime endDateTime = default(DateTime);
|
|
|
|
|
|
bool hasStart = !string.IsNullOrWhiteSpace(StartTime);
|
|
|
|
|
|
bool hasEnd = !string.IsNullOrWhiteSpace(EndTime);
|
|
|
|
|
|
|
|
|
|
|
|
if (hasStart && !DateTime.TryParse(StartTime, out startDateTime))
|
|
|
|
|
|
{
|
|
|
|
|
|
return Json(new { Status = 0, Message = "StartTime 格式错误,应为 yyyy-MM-dd HH:mm:ss" }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (hasEnd && !DateTime.TryParse(EndTime, out endDateTime))
|
|
|
|
|
|
{
|
|
|
|
|
|
return Json(new { Status = 0, Message = "EndTime 格式错误,应为 yyyy-MM-dd HH:mm:ss" }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
2025-12-24 19:40:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 如果提供了开始时间和结束时间,则添加时间范围条件
|
2025-12-25 09:23:00 +08:00
|
|
|
|
if (hasStart && hasEnd)
|
2025-12-24 19:40:49 +08:00
|
|
|
|
{
|
|
|
|
|
|
whereClause += " AND UpdateDate BETWEEN @StartTime AND @EndTime";
|
2025-12-25 09:23:00 +08:00
|
|
|
|
parameters["StartTime"] = startDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
parameters["EndTime"] = endDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (hasStart)
|
|
|
|
|
|
{
|
|
|
|
|
|
whereClause += " AND UpdateDate >= @StartTime";
|
|
|
|
|
|
parameters["StartTime"] = startDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (hasEnd)
|
|
|
|
|
|
{
|
|
|
|
|
|
whereClause += " AND UpdateDate <= @EndTime";
|
|
|
|
|
|
parameters["EndTime"] = endDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
2025-12-24 19:40:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 构建完整的SQL查询语句
|
2025-12-26 17:18:40 +08:00
|
|
|
|
string sql = $"SELECT ID, HotelID, RoomNumber, EquipmentStatus, FaultDescription, UpdateDate, DevName, EquipmentStatusType, EquipmentOnlineStatus FROM tbl_roomvisitlogform {whereClause} ORDER BY UpdateDate DESC";
|
2025-12-24 19:40:49 +08:00
|
|
|
|
|
|
|
|
|
|
// 执行查询
|
|
|
|
|
|
var result = SqlSugarBase.RcuDb.Ado.SqlQuery<dynamic>(sql, parameters);
|
|
|
|
|
|
|
|
|
|
|
|
return Json(new { Status = 1, Message = "查询成功", Data = result }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
logger.Error(ex, "QueryRoomVisitLog error");
|
|
|
|
|
|
return Json(new { Status = -1, Message = "查询失败", Detail = ex.Message }, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-23 16:09:42 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public class RCUDBData
|
|
|
|
|
|
{
|
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
|
public string UpdateTime { get; set; }
|
|
|
|
|
|
public string HotelID { get; set; }
|
|
|
|
|
|
public string RoomTypeID { get; set; }
|
|
|
|
|
|
public string DevName { get; set; }
|
|
|
|
|
|
public string DevAddr { get; set; }
|
|
|
|
|
|
public string Process { get; set; }
|
2025-12-22 17:47:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
public class RoomAddressStatus
|
|
|
|
|
|
{
|
|
|
|
|
|
public string RoomNum { get; set; }
|
|
|
|
|
|
public int Code { get; set; }
|
|
|
|
|
|
}
|
2025-11-20 09:50:21 +08:00
|
|
|
|
// 服务控制请求参数类
|
|
|
|
|
|
public class RCUServiceRequest
|
|
|
|
|
|
{
|
|
|
|
|
|
public string roomNumber { get; set; } // 房号
|
|
|
|
|
|
public string code { get; set; } // 编号
|
|
|
|
|
|
public string creatDate { get; set; } // 创建日期
|
|
|
|
|
|
public string modalAddress { get; set; } // 设备地址
|
|
|
|
|
|
public int status { get; set; } // 状态:1=开,2=关
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 空调控制
|
|
|
|
|
|
public class RCUAirRequest
|
|
|
|
|
|
{
|
|
|
|
|
|
public string roomNumber { get; set; }
|
|
|
|
|
|
public string code { get; set; }
|
|
|
|
|
|
public string creatDate { get; set; }
|
|
|
|
|
|
public string modalAddress { get; set; }
|
|
|
|
|
|
public int? onOff { get; set; } // 使用可空类型表示可选参数
|
|
|
|
|
|
public int? temperature { get; set; } // 16~32
|
|
|
|
|
|
public int? fanSpeed { get; set; } // 0自动,1低速,2中速,3高速
|
|
|
|
|
|
public int? mode { get; set; } // 0自动,1制冷,2制热,3送风
|
|
|
|
|
|
public int? valve { get; set; } // 1开,2关
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 窗帘控制请求参数类
|
|
|
|
|
|
public class RCUCurtainRequest
|
|
|
|
|
|
{
|
|
|
|
|
|
public string roomNumber { get; set; } // 房号
|
|
|
|
|
|
public string code { get; set; } // 编号
|
|
|
|
|
|
public string creatDate { get; set; } // 创建日期
|
|
|
|
|
|
public string modalAddress { get; set; } // 回路地址
|
|
|
|
|
|
public int status { get; set; } // 状态:1=开,2=关,6=停止
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class UpLoadRoom
|
|
|
|
|
|
{
|
|
|
|
|
|
public int RoomTypeID { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 灯光控制参数对象
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class RCULight
|
|
|
|
|
|
{
|
|
|
|
|
|
public string roomNumber { get; set; }
|
|
|
|
|
|
public string code { get; set; }
|
|
|
|
|
|
public string creatDate { get; set; }
|
|
|
|
|
|
public string status { get; set; }
|
|
|
|
|
|
public string modalAddress { get; set; }
|
|
|
|
|
|
public string brightness { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class HostInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
public string code { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 文件名数据传输对象
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class FileName_DTO
|
|
|
|
|
|
{
|
|
|
|
|
|
public int HOTEL_OLD_ID { get; set; }
|
|
|
|
|
|
public int ROOM_TYPE_OLD_ID { get; set; }
|
|
|
|
|
|
public string CONFIG_BIN { get; set; }
|
|
|
|
|
|
public string App_Cfg_For_L2 { get; set; }
|
|
|
|
|
|
public string App_Cfg_For_L4 { get; set; }
|
|
|
|
|
|
public string Hex_Code_For_L2 { get; set; }
|
|
|
|
|
|
public string Hex_Code_For_L4 { get; set; }
|
|
|
|
|
|
public string APPTYPE { get; set; }
|
|
|
|
|
|
public string Cfg_Type { get; set; }
|
|
|
|
|
|
public string LUNCHER_HEX { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|