<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}))
and ((LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}) or (LEFT (a.equipment_type, #{inhierarchy}) = #{subCode}))
</if>
<choose>
<whentest="level == '-0' ">and a.level is null</when>
...
...
@@ -359,7 +359,7 @@
and a.custom_type is not null
</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}))
and ((LEFT (a.facilities_type, #{inhierarchy}) = #{subCode}) or (LEFT (a.equipment_type, #{inhierarchy}) = #{subCode}))
</if>
<choose>
<whentest="level == '-0' ">and a.level is null</when>