|
|
@@ -7,9 +7,9 @@
|
|
|
<!-- 保存组织信息 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveBusinessOrgInfo" parameterType="Map">
|
|
|
insert into business_org(
|
|
|
- org_name,operate,parent_org_id,description,org_level,store_id,b_id,org_id,belong_community_id
|
|
|
+ org_name,operate,parent_org_id,description,org_level,store_id,b_id,org_id,belong_community_id,allow_operation
|
|
|
) values (
|
|
|
- #{orgName},#{operate},#{parentOrgId},#{description},#{orgLevel},#{storeId},#{bId},#{orgId},#{belongCommunityId}
|
|
|
+ #{orgName},#{operate},#{parentOrgId},#{description},#{orgLevel},#{storeId},#{bId},#{orgId},#{belongCommunityId},#{allowOperation}
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
@@ -18,7 +18,8 @@
|
|
|
<select id="getBusinessOrgInfo" parameterType="Map" resultType="Map">
|
|
|
select t.org_name,t.org_name orgName,t.operate,t.parent_org_id,t.parent_org_id
|
|
|
parentOrgId,t.description,t.org_level,t.org_level orgLevel,t.store_id,t.store_id storeId,t.b_id,t.b_id
|
|
|
- bId,t.org_id,t.org_id orgId,t.belong_community_id ,t.belong_community_id belongCommunityId
|
|
|
+ bId,t.org_id,t.org_id orgId,t.belong_community_id ,t.belong_community_id belongCommunityId,
|
|
|
+ t.allow_operation ,t.allow_operation allowOperation
|
|
|
from business_org t
|
|
|
where 1 =1
|
|
|
<if test="orgName !=null and orgName != ''">
|
|
|
@@ -48,6 +49,9 @@
|
|
|
<if test="belongCommunityId !=null and belongCommunityId != ''">
|
|
|
and t.belong_community_id= #{belongCommunityId}
|
|
|
</if>
|
|
|
+ <if test="allowOperation !=null and allowOperation != ''">
|
|
|
+ and t.allow_operation= #{allowOperation}
|
|
|
+ </if>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
@@ -55,8 +59,8 @@
|
|
|
<!-- 保存组织信息至 instance表中 add by wuxw 2018-07-03 -->
|
|
|
<insert id="saveOrgInfoInstance" parameterType="Map">
|
|
|
insert into u_org(
|
|
|
- org_name,parent_org_id,description,org_level,status_cd,store_id,b_id,org_id,belong_community_id
|
|
|
- ) select t.org_name,t.parent_org_id,t.description,t.org_level,'0',t.store_id,t.b_id,t.org_id,t.belong_community_id
|
|
|
+ org_name,parent_org_id,description,org_level,status_cd,store_id,b_id,org_id,belong_community_id,allow_operation
|
|
|
+ ) select t.org_name,t.parent_org_id,t.description,t.org_level,'0',t.store_id,t.b_id,t.org_id,t.belong_community_id,t.allow_operation
|
|
|
from business_org t
|
|
|
where 1=1
|
|
|
<if test="orgName !=null and orgName != ''">
|
|
|
@@ -84,6 +88,9 @@
|
|
|
<if test="belongCommunityId !=null and belongCommunityId != ''">
|
|
|
and t.belong_community_id= #{belongCommunityId}
|
|
|
</if>
|
|
|
+ <if test="allowOperation !=null and allowOperation != ''">
|
|
|
+ and t.allow_operation= #{allowOperation}
|
|
|
+ </if>
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
@@ -93,7 +100,8 @@
|
|
|
select t.org_name,t.org_name orgName,t.parent_org_id,t.parent_org_id
|
|
|
parentOrgId,t.description,t.org_level,t.org_level orgLevel,td.name orgLevelName,t.status_cd,t.status_cd
|
|
|
statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.org_id,t.org_id orgId,uo.org_name parentOrgName,
|
|
|
- t.belong_community_id ,t.belong_community_id belongCommunityId
|
|
|
+ t.belong_community_id ,t.belong_community_id belongCommunityId,
|
|
|
+ t.allow_operation ,t.allow_operation allowOperation
|
|
|
from u_org t,t_dict td,u_org uo
|
|
|
where 1 =1
|
|
|
and t.org_level = td.status_cd
|
|
|
@@ -128,6 +136,9 @@
|
|
|
<if test="belongCommunityId !=null and belongCommunityId != ''">
|
|
|
and t.belong_community_id= #{belongCommunityId}
|
|
|
</if>
|
|
|
+ <if test="allowOperation !=null and allowOperation != ''">
|
|
|
+ and t.allow_operation= #{allowOperation}
|
|
|
+ </if>
|
|
|
<if test="page != -1 and page != null ">
|
|
|
limit #{page}, #{row}
|
|
|
</if>
|
|
|
@@ -159,6 +170,9 @@
|
|
|
<if test="storeId !=null and storeId != ''">
|
|
|
, t.store_id= #{storeId}
|
|
|
</if>
|
|
|
+ <if test="allowOperation !=null and allowOperation != ''">
|
|
|
+ , t.allow_operation= #{allowOperation}
|
|
|
+ </if>
|
|
|
where 1=1
|
|
|
<if test="bId !=null and bId != ''">
|
|
|
and t.b_id= #{bId}
|
|
|
@@ -206,7 +220,9 @@
|
|
|
<if test="belongCommunityId !=null and belongCommunityId != ''">
|
|
|
and t.belong_community_id= #{belongCommunityId}
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="allowOperation !=null and allowOperation != ''">
|
|
|
+ and t.allow_operation= #{allowOperation}
|
|
|
+ </if>
|
|
|
|
|
|
</select>
|
|
|
<!-- 查询上级组织信息 -->
|