<iftest="treeId != null and treeId != '' and treeId == -5">
and a.custom_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId != -3 and treeId != -1 and treeId != -2 and treeId != -4 and treeId != -5">
and (a.facilities_type = #{treeId} or a.equipment_type = #{treeId})
</if>
<iftest="subCode!=null and subCode!='' and subCode!=' ' and treeId != null and treeId != '' and treeId != -3 and treeId != -1 and treeId != -2 and treeId != -4 and treeId != -5">
and ((LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}) or (LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}))
</if>
...
...
@@ -325,7 +326,10 @@
ELSE
'5级'
END )AS level,
key_parts_type,
custom_type,
equipment_type,
facilities_type,
a.risk_desc
from
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
...
...
@@ -354,9 +358,6 @@
<iftest="treeId != null and treeId != '' and treeId == -5">
and a.custom_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId != -3 and treeId != -1 and treeId != -2 and treeId != -4 and treeId != -5">
and (a.facilities_type = #{treeId} or a.equipment_type = #{treeId})
</if>
<iftest="subCode!=null and subCode!='' and subCode!=' ' and treeId != null and treeId != '' and treeId != -3 and treeId != -1 and treeId != -2 and treeId != -4 and treeId != -5">
and ((LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}) or (LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}))