fix: 功能优化完善,日常支出统计。

This commit is contained in:
tianyongbao
2024-10-22 11:12:13 +08:00
parent 7ea2857dfb
commit 24694dae2b
4 changed files with 151 additions and 0 deletions

View File

@@ -238,4 +238,32 @@
to_char(a.create_time,
'yyyy-MM-dd')
</select>
<select id="selectDailyExpensesDateList" parameterType="AccountsDealRecordDto" resultMap="AccountsDealRecordResult">
select
sum(a.amount) as amount ,
to_char(a.create_time,
'yyyy-MM-dd') as dateStr
from
accounts_deal_record a
<where>
a.del_flag = '0'
and a.deal_type = '2'
and a.deal_category = '1'
<if test="endTime!=null and endTime !=''">
and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd')
</if>
<if test="startTime!=null and startTime !=''">
and to_char(a.create_time, 'yyyy-MM-dd')>=#{startTime}
</if>
</where>
<!-- 数据范围过滤 -->
${params.dataScope}
group by
to_char(a.create_time,
'yyyy-MM-dd')
order by
to_char(a.create_time,
'yyyy-MM-dd') desc
</select>
</mapper>