| | |
| | | <if test="accountIncome.incomeType != null and accountIncome.incomeType != '' "> |
| | | AND income_type = #{accountIncome.incomeType} |
| | | </if> |
| | | <if test="accountIncome.incomeMethod != null and accountIncome.incomeMethod != '' "> |
| | | <if test="accountIncome.incomeMethodLabel != null and accountIncome.incomeMethodLabel != ''"> |
| | | AND ( |
| | | ( |
| | | business_type = 1 |
| | | AND income_method in |
| | | <foreach collection="accountIncome.receiptPaymentMethodList" item="method" open="(" separator="," close=")"> |
| | | #{method} |
| | | </foreach> |
| | | ) |
| | | OR |
| | | ( |
| | | business_type is null |
| | | AND income_method in |
| | | <foreach collection="accountIncome.paymentMethodList" item="method" open="(" separator="," close=")"> |
| | | #{method} |
| | | </foreach> |
| | | ) |
| | | ) |
| | | </if> |
| | | <if test="(accountIncome.incomeMethodLabel == null or accountIncome.incomeMethodLabel == '') and accountIncome.incomeMethod != null and accountIncome.incomeMethod != '' "> |
| | | AND income_method = #{accountIncome.incomeMethod} |
| | | </if> |
| | | </select> |
| | |
| | | IFNULL(SUM(income_money), 0) AS amount |
| | | FROM account_income |
| | | WHERE income_date BETWEEN #{startDate} AND #{endDate} |
| | | AND business_type = 1 |
| | | # AND business_type = 1 |
| | | GROUP BY dateStr |
| | | ORDER BY dateStr |
| | | |