| | |
| | | sdd.dict_label typeName, |
| | | ifnull(sum(income_money),0) account |
| | | FROM account_income ai |
| | | left join sys_dict_data sdd on ai.income_type = sdd.dict_value and sdd.dict_type='income_types' |
| | | where |
| | | 1=1 |
| | | LEFT JOIN sys_dict_data sdd ON ai.income_type = sdd.dict_value AND sdd.dict_type = 'income_types' |
| | | WHERE 1=1 |
| | | <if test="dateQueryDto.entryDateStart != null and dateQueryDto.entryDateStart != '' "> |
| | | AND income_date >= DATE_FORMAT(#{dateQueryDto.entryDateStart},'%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 |