|
@@ -104,19 +104,13 @@
|
|
|
|
|
|
|
|
<select id="SumBillBalance" resultType="java.util.Map">
|
|
<select id="SumBillBalance" resultType="java.util.Map">
|
|
|
SELECT
|
|
SELECT
|
|
|
- SUM(CASE WHEN bill_type = '收费' THEN Amount ELSE 0 END) AS ysAmount,
|
|
|
|
|
- SUM(CASE WHEN bill_type = '申请' THEN Amount ELSE 0 END) AS yfAmount
|
|
|
|
|
|
|
+ IFNULL( ROUND( SUM(CASE WHEN bill_type = '收费' THEN Amount - Settlement_Amount ELSE 0 END) / 10000, 2), 0) AS ysAmount,
|
|
|
|
|
+ IFNULL( ROUND( SUM(CASE WHEN bill_type = '申请' THEN Amount - Settlement_Amount ELSE 0 END) / 10000, 2), 0) AS yfAmount
|
|
|
FROM
|
|
FROM
|
|
|
finance_acc
|
|
finance_acc
|
|
|
<where>
|
|
<where>
|
|
|
is_deleted = 0
|
|
is_deleted = 0
|
|
|
and tenant_id = #{acc.tenantId}
|
|
and tenant_id = #{acc.tenantId}
|
|
|
- <if test='acc.createStartDate != null and acc.createStartDate != ""'>
|
|
|
|
|
- and create_time >= #{acc.createStartDate}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='acc.createEndDate != null and acc.createEndDate != ""'>
|
|
|
|
|
- and create_time <= #{acc.createEndDate}
|
|
|
|
|
- </if>
|
|
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|