|
@@ -157,6 +157,58 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="querySum" resultType="com.ydtech.modules.admin.model.po.SysUserAccount">
|
|
|
|
|
+ select
|
|
|
|
|
+ a.user_id as id,
|
|
|
|
|
+ a.user_id,
|
|
|
|
|
+ a.handling_fee,
|
|
|
|
|
+ a.documentary,
|
|
|
|
|
+ a.promotion,
|
|
|
|
|
+ a.create_time,
|
|
|
|
|
+ a.handling_amount_withdrawal,
|
|
|
|
|
+ a.handling_amount_account,
|
|
|
|
|
+ a.handling_amount_payment,
|
|
|
|
|
+ a.documentary_amount_withdrawal,
|
|
|
|
|
+ a.documentary_amount_account,
|
|
|
|
|
+ a.documentary_amount_payment,
|
|
|
|
|
+ a.promotion_amount_withdrawal,
|
|
|
|
|
+ a.promotion_amount_account,
|
|
|
|
|
+ a.promotion_amount_payment,
|
|
|
|
|
+ b.dept_id as deptId,
|
|
|
|
|
+ b.name as name,
|
|
|
|
|
+ sd.name as deptName,
|
|
|
|
|
+ a.sum_amount,
|
|
|
|
|
+ a.sum_amount_withdrawal,
|
|
|
|
|
+ a.sum_amount_account,
|
|
|
|
|
+ a.sum_amount_payment,
|
|
|
|
|
+ sd.management_source as managementSource,
|
|
|
|
|
+ role.role_id as roleId
|
|
|
|
|
+ from
|
|
|
|
|
+ sys_user_account a
|
|
|
|
|
+ left join sys_user b on a.user_id = b.id
|
|
|
|
|
+ left join sys_dept sd on sd.id = b.dept_id
|
|
|
|
|
+ left join sys_user_role role on role.user_id = a.user_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="sysUserAccountVo.userId != null and sysUserAccountVo.userId != ''">
|
|
|
|
|
+ and a.user_id = #{sysUserAccountVo.userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sysUserAccountVo.name != null and sysUserAccountVo.name != ''">
|
|
|
|
|
+ and b.name = #{sysUserAccountVo.name}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sysUserAccountVo.deptId != null and sysUserAccountVo.deptId != ''">
|
|
|
|
|
+ and b.dept_id like concat(#{sysUserAccountVo.deptId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sysUserAccountVo.userName != null and sysUserAccountVo.userName != ''">
|
|
|
|
|
+ and b.name = #{sysUserAccountVo.userName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="sysUserAccountVo.bankNumber != null and sysUserAccountVo.bankNumber != ''">
|
|
|
|
|
+ and c.bank_number = #{sysUserAccountVo.bankNumber}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<select id="getGroupById" resultType="java.math.BigDecimal">
|
|
<select id="getGroupById" resultType="java.math.BigDecimal">
|
|
|
select sum(sum_amount) from sys_user_account WHERE user_id in (
|
|
select sum(sum_amount) from sys_user_account WHERE user_id in (
|
|
|
select id from sys_user where manager_id = #{userId} or id = #{userId}
|
|
select id from sys_user where manager_id = #{userId} or id = #{userId}
|