diff --git a/UI/Controllers/UpgradeController.cs b/UI/Controllers/UpgradeController.cs
index 55a8575..facd4bf 100644
--- a/UI/Controllers/UpgradeController.cs
+++ b/UI/Controllers/UpgradeController.cs
@@ -563,6 +563,109 @@ namespace UI.Controllers
}
}
+ ///
+ /// 设备信息类
+ ///
+ public class EquipmentInfo
+ {
+ public string EquipmentStatus { get; set; } // 设备状态
+ public string FaultDescription { get; set; } // 故障描述
+ public string DevName { get; set; } // 设备名称
+ }
+
+ ///
+ /// 写入房间设备访问日志
+ ///
+ /// 酒店ID
+ /// 房号
+ /// 设备信息列表
+ /// 返回操作结果
+ [HttpPost]
+ public ActionResult WriteRoomVisitLog(string HotelID, string RoomNumber, List 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);
+ }
+
+ // 创建日志列表
+ var logList = new List