and a.biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%')
and a.biz_org_code LIKE CONCAT (#{bizOrgCode} ,'%')
</if>
</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="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>
<choose>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
...
@@ -316,6 +346,21 @@
...
@@ -316,6 +346,21 @@
<iftest="bizOrgCode!=null and bizOrgCode!=''">
<iftest="bizOrgCode!=null and bizOrgCode!=''">
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
and a.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
</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="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>
<choose>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level == '-0' ">and a.level is null</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
<whentest="level!=null and level != '-0'">and a.level = #{level}</when>
...
@@ -339,7 +384,43 @@
...
@@ -339,7 +384,43 @@
select * from wl_equipment_category where id = #{parentId}
select * from wl_equipment_category where id = #{parentId}