mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
新增管理端账户消费趋势统计接口、生产端账户总额数据接口
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.cf.imes.module.system.dal.mysql.funds.organamount.OrganAmountMapper">
|
||||
<sql id="dateFormat">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(create_time), '-', QUARTER(create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@MONTH.getValue()">
|
||||
,CONCAT(YEAR(create_time), '-', MONTH(create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@WEEK.getValue()">
|
||||
,CONCAT(YEAR(create_time), '-', MONTH(create_time), '-', WEEK(create_time, 1)) AS date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.module.executor.enums.OrderStatisticsUnit@DAY.getValue()">
|
||||
,CONCAT(YEAR(create_time), '-', MONTH(create_time), '-', DAY(create_time)) as date
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectOrganIncomeExpenseTrendGroupByCreateTime"
|
||||
resultType="com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganAmountGroupByCreateTimeRespVO">
|
||||
select sum(cash_amount_change) as amount
|
||||
<include refid="dateFormat"/>
|
||||
from income_expense_details
|
||||
where organ_id = #{organId}
|
||||
and create_time between #{req.createTime[0]} and #{req.createTime[1]}
|
||||
GROUP BY date
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user