更新内容 tbl_roomvisitlogform 表新增两个字段,接口同步支持:

This commit is contained in:
zhihao
2025-12-26 17:18:40 +08:00
parent 205087d4fc
commit 1f35e8fc81
2 changed files with 52 additions and 12 deletions

View File

@@ -569,9 +569,11 @@ namespace UI.Controllers
/// </summary>
public class EquipmentInfo
{
public string EquipmentStatus { get; set; } // 设备状态
public string FaultDescription { get; set; } // 故障描述
public string DevName { get; set; } // 设备名称
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; }
}
private class RoomVisitLogFormRow
@@ -582,6 +584,8 @@ namespace UI.Controllers
public string FaultDescription { get; set; }
public string UpdateDate { get; set; }
public string DevName { get; set; }
public string EquipmentStatusType { get; set; }
public string EquipmentOnlineStatus { get; set; }
}
/// <summary>
@@ -616,7 +620,9 @@ namespace UI.Controllers
EquipmentStatus = equipment.EquipmentStatus,
FaultDescription = equipment.FaultDescription,
UpdateDate = updateDate,
DevName = equipment.DevName
DevName = equipment.DevName,
EquipmentStatusType = equipment.EquipmentStatusType,
EquipmentOnlineStatus = equipment.EquipmentOnlineStatus
}).ToList();
// 批量写入数据库
@@ -693,7 +699,7 @@ namespace UI.Controllers
}
// 构建完整的SQL查询语句
string sql = $"SELECT ID, HotelID, RoomNumber, EquipmentStatus, FaultDescription, UpdateDate, DevName FROM tbl_roomvisitlogform {whereClause} ORDER BY UpdateDate DESC";
string sql = $"SELECT ID, HotelID, RoomNumber, EquipmentStatus, FaultDescription, UpdateDate, DevName, EquipmentStatusType, EquipmentOnlineStatus FROM tbl_roomvisitlogform {whereClause} ORDER BY UpdateDate DESC";
// 执行查询
var result = SqlSugarBase.RcuDb.Ado.SqlQuery<dynamic>(sql, parameters);