|
@@ -60,9 +60,39 @@
|
|
|
|
|
|
<if test="name!=null">and a.name like concat('%',#{name},'%')</if>
|
|
<if test="name!=null">and a.name like concat('%',#{name},'%')</if>
|
|
<if test="companyId!=null">and a.company_org_id=#{companyId}</if>
|
|
<if test="companyId!=null">and a.company_org_id=#{companyId}</if>
|
|
|
|
+ <include refid="permissionCondition"></include>
|
|
order by a.create_date desc
|
|
order by a.create_date desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+ <sql id="permissionCondition">
|
|
|
|
+ <if test="userCondition.tenantId != null">and a.tenant_id = #{userCondition.tenantId}</if>
|
|
|
|
+ <if test="userCondition.userType!=null and userCondition.userType!=-999 and userCondition.userType!=-9999 and userCondition.programItems != null and userCondition.programItems.size() > 0">
|
|
|
|
+ <if test="userCondition.permissionType == 5 or userCondition.permissionType == 2">
|
|
|
|
+ and ( a.dept_org_id in
|
|
|
|
+ <foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
|
|
+ #{item.orgId}
|
|
|
|
+ </foreach>
|
|
|
|
+ or
|
|
|
|
+ a.company_org_id in
|
|
|
|
+ <foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
|
|
+ #{item.orgId}
|
|
|
|
+ </foreach>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userCondition.permissionType == 4 or userCondition.permissionType == 3">
|
|
|
|
+ and a.dept_org_id in
|
|
|
|
+ <foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
|
|
+ #{item.orgId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userCondition.permissionType == 1">
|
|
|
|
+ and a.company_org_id in
|
|
|
|
+ <foreach collection="userCondition.programItems" item="item" open="(" close=")" separator=",">
|
|
|
|
+ #{item.orgId}
|
|
|
|
+ </foreach>
|
|
|
|
+ and (a.dept_org_id is null or a.dept_org_id =0)
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ </sql>
|
|
|
|
|
|
<select id="getFeeInfo" resultType="com.zcxk.rmcp.pay.entity.pay.PayBaseWaterprice">
|
|
<select id="getFeeInfo" resultType="com.zcxk.rmcp.pay.entity.pay.PayBaseWaterprice">
|
|
select p.feename, p.feetype, p.price,p.id,dict.label from pay_base_waterproperty w
|
|
select p.feename, p.feetype, p.price,p.id,dict.label from pay_base_waterproperty w
|