|
|
@@ -96,5 +96,43 @@
|
|
|
<select id="selectFinAccBillsPage" resultMap="finAccBillsResultMap">
|
|
|
select * from los_fin_acc_bills where is_deleted = 0
|
|
|
</select>
|
|
|
+ <select id="listFeeCountByCorp" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ corp_cn_name as corpCnName,
|
|
|
+ mblno as mblno,
|
|
|
+ SUM( amount_dr ) as amountDr,
|
|
|
+ SUM( amount_cr ) as amountCr,
|
|
|
+ SUM( amount_dr_usd ) as amountDrUsd,
|
|
|
+ SUM( amount_cr_usd ) as amountCrUsd,
|
|
|
+ SUM( amount_dr_loc ) as amountDrLoc,
|
|
|
+ SUM( amount_cr_loc ) as amountCrLoc,
|
|
|
+ SUM( stl_amount_dr ) as stlAmountDr,
|
|
|
+ SUM( stl_amount_cr ) as stlAmountCr,
|
|
|
+ SUM( stl_amount_dr_usd ) as stlAmountDrUsd,
|
|
|
+ SUM( stl_amount_cr_usd ) as stlAmountCrUsd,
|
|
|
+ SUM( stl_amount_cr_loc ) as stlAmountCrLoc,
|
|
|
+ SUM( stl_amount_dr_loc ) as stlAmountDrLoc
|
|
|
+ FROM
|
|
|
+ `los_fin_acc_bills`
|
|
|
+ WHERE
|
|
|
+ is_deleted = '0'
|
|
|
+ <if test='tenantId != null and tenantId != ""'>
|
|
|
+ and tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ <if test='dc != null and dc != ""'>
|
|
|
+ and account_dc = #{dc}
|
|
|
+ </if>
|
|
|
+ <if test='deptPid != null'>
|
|
|
+ and branch_id = #{deptPid}
|
|
|
+ </if>
|
|
|
+ <if test='postId != null and postId != ""'>
|
|
|
+ and team_id = #{postId}
|
|
|
+ </if>
|
|
|
+ <if test='corpId != null'>
|
|
|
+ and corp_id = #{corpId}
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ mblno
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|