|
@@ -19,7 +19,7 @@
|
19
|
19
|
td_raw_device t
|
20
|
20
|
LEFT JOIN td_device s ON t.device_kind = s.device_type
|
21
|
21
|
AND t.device_no = s.device_no AND s.`status` > -1
|
22
|
|
- LEFT JOIN ta_machinery m ON s.machinery_id = m.machinery_id
|
|
22
|
+ LEFT JOIN ta_machinery m ON s.machinery_id = m.machinery_id AND m.`status` > -1
|
23
|
23
|
WHERE 1 = 1
|
24
|
24
|
<if test="deviceType != null and deviceType != ''">
|
25
|
25
|
AND t.device_kind = #{deviceType}
|
|
@@ -50,6 +50,7 @@
|
50
|
50
|
WHERE
|
51
|
51
|
t.location IS NOT NULL
|
52
|
52
|
AND t.status > -1
|
|
53
|
+ AND s.status > -1
|
53
|
54
|
AND t.device_type IN
|
54
|
55
|
<foreach collection="typeList" index="index" item="item" open="(" separator="," close=")">
|
55
|
56
|
#{item}
|