diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index 0dc7b34..8134147 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -618,12 +618,12 @@ namespace FrontendWebApi.ApiControllers var device_amount_sql = $@"SELECT - d.building_guid, + d.device_building_tag, COUNT(*) AS device_amount FROM device d WHERE d.deleted = 0 AND d.device_number IN @devices - GROUP BY d.building_guid"; + GROUP BY d.device_building_tag"; alarmObj.buildingAlarmDeviceAmount = await frontendRepository.GetAllAsync(device_amount_sql, new { devices = alarmObj.alarmorion.Select(x => x.device_number).ToList() }); apiResult.Data = alarmObj;