[後端] 修改device getAlarm
This commit is contained in:
parent
9026166004
commit
86548b7fb6
@ -618,12 +618,12 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
|
|
||||||
|
|
||||||
var device_amount_sql = $@"SELECT
|
var device_amount_sql = $@"SELECT
|
||||||
d.building_guid,
|
d.device_building_tag,
|
||||||
COUNT(*) AS device_amount
|
COUNT(*) AS device_amount
|
||||||
FROM device d
|
FROM device d
|
||||||
WHERE d.deleted = 0
|
WHERE d.deleted = 0
|
||||||
AND d.device_number IN @devices
|
AND d.device_number IN @devices
|
||||||
GROUP BY d.building_guid";
|
GROUP BY d.device_building_tag";
|
||||||
alarmObj.buildingAlarmDeviceAmount = await frontendRepository.GetAllAsync<BuildingAlarmDeviceAmount>(device_amount_sql, new { devices = alarmObj.alarmorion.Select(x => x.device_number).ToList() });
|
alarmObj.buildingAlarmDeviceAmount = await frontendRepository.GetAllAsync<BuildingAlarmDeviceAmount>(device_amount_sql, new { devices = alarmObj.alarmorion.Select(x => x.device_number).ToList() });
|
||||||
|
|
||||||
apiResult.Data = alarmObj;
|
apiResult.Data = alarmObj;
|
||||||
|
Loading…
Reference in New Issue
Block a user