From af38a600e8e90a22d80230510f7890177bd1df01 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 10 Oct 2025 15:00:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A2=9E=E5=8A=A0log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/DeviceUploadLogService.cs | 3 +++ 1 file changed, 3 insertions(+) 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); } } }