修改一些BUG

BUG1,给天猫上传的设备名字如何为空,天猫就会报错。2 网页上显示的 门开门关,其实本质上是 门磁,现在直接 用门磁的值来表示门开门关
This commit is contained in:
2025-12-31 14:19:59 +08:00
parent f9fe3a36e6
commit 7be877418c
5 changed files with 35 additions and 12 deletions

View File

@@ -890,13 +890,23 @@ namespace WebSite.Controllers
else
{
scene = RoomTypeSceneManager.Get(int.Parse(sceneID));
HttpContext.Cache.Insert(KKK, scene, null, Cache.NoAbsoluteExpiration, new TimeSpan(0, 30, 0));
if (scene != null)
{
HttpContext.Cache.Insert(KKK, scene, null, Cache.NoAbsoluteExpiration, new TimeSpan(0, 30, 0));
}
}
if (scene == null)
{
return Json(new { IsSuccess = false, Result = "房号[" + roomNumber + "]无效的场景" }, JsonRequestBehavior.AllowGet);
}
LightControlManager.ApplyScene(host, scene);
//LightControlManager.ApplyScene(host, scene);
string repeat = Guid.NewGuid().ToString("N");
for (int i = 0; i < 3; i++)
{
Thread.Sleep(200);
// LightControlManager.ApplyScene(host, scene);
LightControlManager.ApplyScene_Repeat(repeat, host, scene);
}
SaveSystemLog(AuthorityID, HttpContext.InnerLanguage("SceneControl"), string.Format("打开客房{0}{1}场景", roomNumber, scene.Name), true, "api", hotelID);