[後端] 修改api錯誤, dbs改用巨蛋

This commit is contained in:
dev02 2023-04-20 13:31:10 +08:00
parent a38a4473dd
commit 693804320f
7 changed files with 100 additions and 91 deletions

View File

@ -578,6 +578,8 @@ namespace Backend.Controllers
-- OR ct.disaster_system_value != d.device_disaster";
}
if (!string.IsNullOrEmpty(post.Building_tag) && !string.IsNullOrEmpty(post.System_category) && !string.IsNullOrEmpty(post.System_tag))
{
string sql_temp = $@"
SELECT
ct.device_number AS check_temp_device_number,
@ -620,20 +622,20 @@ namespace Backend.Controllers
LEFT JOIN variable v2 ON v2.system_type = 'disaster' AND v2.system_value = ct.device_disaster
{{0}}
) ct
FULL JOIN (
LEFT JOIN (
SELECT
d.* ,
v.system_type,
v.system_key,
v.system_value,
(SELECT
STRING_AGG( ISNULL(system_value, ' '), ',')
GROUP_CONCAT( ifnull(system_value, ' '), ',')
FROM device_disaster dd
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
) AS device_disaster,
(SELECT
STRING_AGG( ISNULL(system_key, ' '), ',')
GROUP_CONCAT( ifnull(system_key, ' '), ',')
FROM device_disaster dd
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
@ -645,7 +647,7 @@ namespace Backend.Controllers
)d ON ct.device_number = d.device_number
{{2}}
ORDER BY d.device_number DESC
ORDER BY d.device_number DESC
";
var sql = string.Format(sql_temp, string.Format(sSubTableWhere, "ct"), string.Format(sSubTableWhere, "d"), sWhere);
@ -673,6 +675,7 @@ namespace Backend.Controllers
apiResult.Code = "0000";
apiResult.Data = deviceCheck;
}
}
catch (Exception exception)
{
apiResult.Code = "9999";

View File

@ -18,8 +18,8 @@
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}
@ -57,8 +57,8 @@
//"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpHFicuOA83OZeuWHBFdi/xpfEIklxyQ/wP75bEKwrdh+fXXgjmpc9cLX9GqbBC7eGw==", //
//"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpD06cJcRzpVx0+IAssROlE4MlzSDPojSI17+XkQIL9Eu" //
//"UrlSlot": "e1dUH6340WkFoHPJYq7IYQ==", // D2
"UrlSlot": "f9cDBTw5PCfbDTOt4Kwbew==", // slot:/Arena/H|
"UrlSlot": "e1dUH6340WkFoHPJYq7IYQ==", // D2
//"UrlSlot": "f9cDBTw5PCfbDTOt4Kwbew==", // slot:/Arena/H|
"ObixQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", // http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
"ObixHisBqlQuery": "7C/j7U8PmDqMxpb7f6gMpIDkLYyNwmXoqhx+N1G+fqQxEETrRbFLZfC7Sud5yX24CphfLlSUbfjft7gcP6v+gw==", // http://192.168.0.136:8082/obix/config/Program/ObixQuery/query/
"ObixHisUrlQuery": "7C/j7U8PmDqMxpb7f6gMpEVUZrrjJT0WiTUBn0FzipXfBFsxYAX3plIWBcJ+oZzW", // http://192.168.0.136:8081/obix/histories

View File

@ -17,7 +17,8 @@
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //
"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}

View File

@ -16,7 +16,10 @@
"MySqlDBConfig": {
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}

View File

@ -23,7 +23,9 @@
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //
"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
},