add iostatus name show

This commit is contained in:
Jay
2017-03-27 13:18:31 +08:00
parent c434a59910
commit 40fa771e43
3 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -243,16 +243,19 @@ router
res.db.database = config.db.db5;
res.db.connect();
let query = "select rt.* from ??.?? rt \
let query = "select rt.*, a.`name` as name from ??.?? rt \
left join ??.?? d \
on d.`node` = rt.`node` \
left join ??.?? i \
on i.`devuid` = d.`uid` and i.`type` = ? \
left join ??.?? a \
on a.`iouid` = i.`uid` \
and a.`portnum` = rt.`port`\
where \
d.`uid` = ? \
and rt.`type` = ? \
and i.`uid` is not null ";
let param = [config.db.db6, 'jcmbrt', config.db.db5, 'device', config.db.db5, 'iolist', arr.data.type, arr.data.id, arr.data.type];
let param = [config.db.db6, 'jcmbrt', config.db.db5, 'device', config.db.db5, 'iolist', arr.data.type, config.db.db5, 'aioset', arr.data.id, arr.data.type];
res.db.query(query, param, (err, row) => {
if (err) return n('ERR8000');