diff --git a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs index b15d7983..59254a03 100644 --- a/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs +++ b/Src/Dlhis.ScheduledTask/DeviceUploadLog/Services/Implements/DeviceUploadLogService.cs @@ -307,6 +307,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService var roomInfo = await _dormitoryRoomPowerSwitchApi.GetUserRoomInfoAsync(userCode); if (!roomInfo.MCB) { + _logger.LogInformation("MCB未开启, userCode:{userCode} directionType:{directionType}", userCode, directionType); return; } @@ -401,6 +402,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService room.PowerSwitch = false; // 断电 await _dbContext.UpdateAsync(room); await _dormitoryRoomPowerSwitchApi.SwitchAsync(new PowerSwitchRequest(room.RoomId, 0)); + _logger.LogInformation("房间下电{roomNo}", room.RoomNo); } } else @@ -411,6 +413,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService room.PowerSwitch = true; // 上电 await _dbContext.UpdateAsync(room); await _dormitoryRoomPowerSwitchApi.SwitchAsync(new PowerSwitchRequest(room.RoomId, 1)); + _logger.LogInformation("房间上电{roomNo}", room.RoomNo); } } }