|
|
@@ -115,7 +115,8 @@
|
|
|
su.dept_id as "deptId",
|
|
|
sd.name as "deptName",
|
|
|
bc.bank_account as "bankAccount",
|
|
|
- bc.bank_address as "bankAddress"
|
|
|
+ bc.bank_address as "bankAddress",
|
|
|
+ su.leader_name as "leaderName"
|
|
|
from sys_amount_auditing a
|
|
|
left join sys_user_account_history b on a.id = b.auditiing_id
|
|
|
left join sys_user su on su.id =a.user_id
|
|
|
@@ -233,4 +234,34 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="querySumAmount" resultType="java.math.BigDecimal">
|
|
|
+ select
|
|
|
+ sum(a.amount)
|
|
|
+ from sys_amount_auditing a
|
|
|
+ left join sys_user_account_history b on a.id = b.auditiing_id
|
|
|
+ left join sys_user su on su.id =a.user_id
|
|
|
+ <where>
|
|
|
+ <if test="vo.auditingStatus !=null and vo.auditingStatus != ''">
|
|
|
+ a.auditing_status=#{vo.auditingStatus}
|
|
|
+ </if>
|
|
|
+ <if test="vo.amountStatus !=null and vo.amountStatus != ''">
|
|
|
+ and a.amount_status=#{vo.amountStatus}
|
|
|
+ </if>
|
|
|
+ <if test="vo.id !=null and vo.id != ''">
|
|
|
+ and a.id=#{vo.id}
|
|
|
+ </if>
|
|
|
+ <if test="vo.mobile !=null and vo.mobile != ''">
|
|
|
+ and su.mobile=#{mobile}
|
|
|
+ </if>
|
|
|
+ <if test="vo.userName !=null and vo.userName != ''">
|
|
|
+ and su.name=#{userName}
|
|
|
+ </if>
|
|
|
+ <if test="vo.userId !=null and vo.userId != ''">
|
|
|
+ and a.user_id=#{userId}
|
|
|
+ </if>
|
|
|
+ <if test="vo.startTime !=null and vo.startTime != '' and vo.endTime !=null and vo.endTime!= '' ">
|
|
|
+ and DATE_FORMAT( a.create_time, '%Y-%m-%d') between DATE_FORMAT(#{startTime}, '%Y-%m-%d') and DATE_FORMAT(#{endTime}, '%Y-%m-%d')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|