update loss chk

This commit is contained in:
Jay
2017-04-24 16:25:56 +08:00
parent a4b949bbfe
commit 27d2209ea2
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -131,8 +131,9 @@ router
let query = "select w.`name`, w.`mac` as wristband, \
coalesce(l.`name`, l2.`name`) as locname, \
coalesce(case when tmp2.`wlocrtloc` = 'NG' then null else tmp2.`wlocrtloc` end, ll.`devid`) as locid, \
ll.*\
from ??.?? w\
case when tmp2.`wlocrtloc` = 'NG' then 1 else 0 end as loss, \
ll.* \
from ??.?? w \
left join ??.?? tmp2 \
on tmp2.`wlocrtmac` = w.`mac` \
left join ??.?? ll \