fix sql
This commit is contained in:
parent
8b547da780
commit
c480e9ef3d
@ -29,7 +29,7 @@ namespace Backend.Controllers
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sqlString = @$"select building_guid as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY A.priority ASC, A.created_at DESC";
|
var sqlString = @$"select building_guid as Value, full_name as Name from building a where a.deleted = 0 and a.status = 0 ORDER BY a.priority ASC, a.created_at DESC";
|
||||||
KeyValue = await backendRepository.GetAllAsync<KeyValue>(sqlString);
|
KeyValue = await backendRepository.GetAllAsync<KeyValue>(sqlString);
|
||||||
|
|
||||||
apiResult.Code = "0000";
|
apiResult.Code = "0000";
|
||||||
|
@ -179,7 +179,7 @@ namespace Backend.Controllers
|
|||||||
dk.device_close_flashing,
|
dk.device_close_flashing,
|
||||||
dk.device_error_flashing,
|
dk.device_error_flashing,
|
||||||
(SELECT
|
(SELECT
|
||||||
STRING_AGG( ISNULL(system_key, ' '), ',')
|
GROUP_CONCAT( IFNULL(system_key, ' '), ',')
|
||||||
FROM device_disaster dd
|
FROM device_disaster dd
|
||||||
JOIN variable v ON v.deleted = 0 AND v.system_type = 'disaster' AND v.system_value = dd.device_system_value
|
JOIN variable v ON v.deleted = 0 AND v.system_type = 'disaster' AND v.system_value = dd.device_system_value
|
||||||
WHERE dd.device_guid = d.device_guid
|
WHERE dd.device_guid = d.device_guid
|
||||||
|
Loading…
Reference in New Issue
Block a user