and a.biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%')
</if>
<iftest="treeId != null and treeId != '' and treeId == -1">
and a.facilities_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId == -2">
and a.equipment_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId == -4">
and a.key_parts_type is not null
</if>
<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>
<choose>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
<iftest="treeId != null and treeId != '' and treeId == -1">
and a.facilities_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId == -2">
and a.equipment_type is not null
</if>
<iftest="treeId != null and treeId != '' and treeId == -4">
and a.key_parts_type is not null
</if>
<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>
<choose>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
...
...
@@ -339,7 +383,39 @@
select * from wl_equipment_category where id = #{parentId}