| | |
| | | <if test="accountIncome.entryDateStart != null and accountIncome.entryDateStart != '' "> |
| | | AND income_date >= DATE_FORMAT(#{accountIncome.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="accountIncome.customerName != null and accountIncome.customerName != '' "> |
| | | AND customer_name like CONCAT('%',#{accountIncome.customerName},'%') |
| | | </if> |
| | | |
| | | <if test="accountIncome.invoiceNumber != null and accountIncome.invoiceNumber != '' "> |
| | | AND invoice_number like CONCAT('%',#{accountIncome.invoiceNumber},'%') |
| | | </if> |
| | | <if test="accountIncome.entryDateEnd != null and accountIncome.entryDateEnd != '' "> |
| | | AND income_date <= DATE_FORMAT(#{accountIncome.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | |
| | | <if test="dateQueryDto.entryDateEnd != null and dateQueryDto.entryDateEnd != '' "> |
| | | AND income_date <= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | group by income_type |
| | | GROUP BY sdd.dict_label, ai.income_type |
| | | </select> |
| | | <select id="report1" resultType="java.math.BigDecimal"> |
| | | 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 |
| | | |