mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
xml导入-版一
This commit is contained in:
+20
-5
@@ -30,16 +30,16 @@
|
||||
|
||||
<sql id="dateFormat">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', QUARTER(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', QUARTER(o.update_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', FLOOR((DayOfMonth(o.order_date)-1)/7)+1) AS date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', FLOOR((DayOfMonth(o.update_time)-1)/7)+1) AS date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
|
||||
,CONCAT(YEAR(o.order_date), '-', MONTH(o.order_date), '-', DAY(o.order_date)) as date
|
||||
,CONCAT(YEAR(o.update_time), '-', MONTH(o.update_time), '-', DAY(o.update_time)) as date
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -53,10 +53,25 @@
|
||||
group by date;
|
||||
</select>
|
||||
|
||||
<sql id="dateCreate">
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@QUARTER.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', QUARTER(o.create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@MONTH.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time)) as date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@WEEK.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', FLOOR((DayOfMonth(o.create_time)-1)/7)+1) AS date
|
||||
</if>
|
||||
<if test="req.unit != null and req.unit == @com.cf.imes.framework.common.enums.OrderStatisticsUnit@DAY.getValue()">
|
||||
,CONCAT(YEAR(o.create_time), '-', MONTH(o.create_time), '-', DAY(o.create_time)) as date
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectOrgCountAddByOrderDate"
|
||||
resultType="com.cf.imes.module.system.api.organ.dto.OrgStatisticsIsLapseRespDTO">
|
||||
select count(o.id) as orgCount
|
||||
<include refid="dateFormat"/>
|
||||
<include refid="dateCreate"/>
|
||||
from system_organization o
|
||||
where o.create_time between #{req.createTime[0]} and #{req.createTime[1]}
|
||||
and o.deleted = 0
|
||||
|
||||
Reference in New Issue
Block a user