|
@@ -227,14 +227,14 @@
|
|
<select id="getBillTotal" resultType="com.winhc.repal.model.bo.HomeReceivableBO">
|
|
<select id="getBillTotal" resultType="com.winhc.repal.model.bo.HomeReceivableBO">
|
|
SELECT
|
|
SELECT
|
|
<if test="repalBillStatus == null">
|
|
<if test="repalBillStatus == null">
|
|
- IFNULL(SUM(bill.RECEIVABLE), 0) AS billMoney
|
|
|
|
|
|
+ IFNULL(SUM(bill.RECEIVABLE), 0) AS billMoney,
|
|
IFNULL(SUM(bill.RECEIPT), 0) AS receiptMoney,
|
|
IFNULL(SUM(bill.RECEIPT), 0) AS receiptMoney,
|
|
IFNULL(SUM(bill.TOTAL_MONEY), 0) AS totalBillMoney,
|
|
IFNULL(SUM(bill.TOTAL_MONEY), 0) AS totalBillMoney,
|
|
- IFNULL(COUNT(bill.ID), 0) AS billCount,
|
|
|
|
|
|
+ IFNULL(COUNT(bill.ID), 0) AS billCount
|
|
</if>
|
|
</if>
|
|
<if test="repalBillStatus == 2">
|
|
<if test="repalBillStatus == 2">
|
|
IFNULL(SUM(bill.RECEIPT), 0) AS overdueTotal,
|
|
IFNULL(SUM(bill.RECEIPT), 0) AS overdueTotal,
|
|
- IFNULL(COUNT(bill.ID), 0) AS overdueTotalCount,
|
|
|
|
|
|
+ IFNULL(COUNT(bill.ID), 0) AS overdueTotalCount
|
|
</if>
|
|
</if>
|
|
FROM REPAL_BILL AS bill
|
|
FROM REPAL_BILL AS bill
|
|
<if test="userId != null">
|
|
<if test="userId != null">
|
|
@@ -242,7 +242,7 @@
|
|
</if>
|
|
</if>
|
|
WHERE bill.REPAL_BOOK_ID = #{repalBookId}
|
|
WHERE bill.REPAL_BOOK_ID = #{repalBookId}
|
|
<if test="repalBillStatus == 2">
|
|
<if test="repalBillStatus == 2">
|
|
- bill.repalBillStatus = 2
|
|
|
|
|
|
+ AND bill.REPAL_BILL_STATUS = 2
|
|
</if>
|
|
</if>
|
|
AND bill.REPAL_BILL_TYPE = #{repalBillType}
|
|
AND bill.REPAL_BILL_TYPE = #{repalBillType}
|
|
<if test="userId != null">
|
|
<if test="userId != null">
|