|
|
@ -24,14 +24,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
-- 获取单位类型与职务+分管信息树数据指定结点的信息
|
|
|
|
-- 获取单位类型与职务+分管信息树数据指定结点的信息
|
|
|
|
#sql("getOrgTypePrincipalshipByParentId")
|
|
|
|
#sql("getOrgTypePrincipalshipByParentId")
|
|
|
|
select t1.id,t1.code,t1.name,t1.parent_id as pid,t1.sort_id,t1.b_use,t1.is_school,t1.level,t1.bureau_level,
|
|
|
|
select t1.id,t1.code,t1.name,t1.parent_id as "pId",t1.sort_id,t1.b_use,t1.is_school,t1.level,t1.bureau_level,
|
|
|
|
(select count(1) from t_base_org_type_principalship as t2 where t2.parent_id=t1.id) as is_leaf
|
|
|
|
(select count(1) from t_base_org_type_principalship as t2 where t2.parent_id=t1.id) as is_leaf
|
|
|
|
from t_base_org_type_principalship as t1 where t1.parent_id=#para(0) and t1.b_use=1 order by sort_id
|
|
|
|
from t_base_org_type_principalship as t1 where t1.parent_id=#para(0) and t1.b_use=1 order by sort_id
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
|
|
-- 和上面的是一个东西,但要细分一下,比如幼儿园+中小学
|
|
|
|
-- 和上面的是一个东西,但要细分一下,比如幼儿园+中小学
|
|
|
|
#sql("getOrgTypePrincipalshipByParentIdAndBigType")
|
|
|
|
#sql("getOrgTypePrincipalshipByParentIdAndBigType")
|
|
|
|
select t1.id,t1.name,t1.parent_id as pid,t1.sort_id,t1.b_use,t1.is_school,t1.level,t1.bureau_level,
|
|
|
|
select t1.id,t1.name,t1.parent_id as "pId",t1.sort_id,t1.b_use,t1.is_school,t1.level,t1.bureau_level,
|
|
|
|
(select count(1) from t_base_org_type_principalship as t2 where t2.parent_id=t1.id) as is_leaf
|
|
|
|
(select count(1) from t_base_org_type_principalship as t2 where t2.parent_id=t1.id) as is_leaf
|
|
|
|
from t_base_org_type_principalship as t1 where t1.parent_id=#para(0) and t1.b_use=1
|
|
|
|
from t_base_org_type_principalship as t1 where t1.parent_id=#para(0) and t1.b_use=1
|
|
|
|
and t1.is_school=#para(1) order by sort_id asc
|
|
|
|
and t1.is_school=#para(1) order by sort_id asc
|
|
|
@ -49,7 +49,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-- 获取单位类型与职务+分管信息树数据指定结点下一级的数据ByCode
|
|
|
|
-- 获取单位类型与职务+分管信息树数据指定结点下一级的数据ByCode
|
|
|
|
#sql("getOrgTypePrincipalshipByParentparent_code")
|
|
|
|
#sql("getOrgTypePrincipalshipByParentparent_code")
|
|
|
|
select id,code,name,parent_id as pId,sort_id,b_use,is_school,level,bureau_level
|
|
|
|
select id,code,name,parent_id as "pId",sort_id,b_use,is_school,level,bureau_level
|
|
|
|
from t_base_org_type_principalship where code like ? and length(code)=length(?)+2 and b_use=1 order by sort_id
|
|
|
|
from t_base_org_type_principalship where code like ? and length(code)=length(?)+2 and b_use=1 order by sort_id
|
|
|
|
#end
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
|
|