|
@@ -296,12 +296,13 @@
|
|
|
WHERE
|
|
|
m.del_flag_ = 0
|
|
|
AND m.is_lock_ = 0
|
|
|
+ AND m.status_ = 'OVER'
|
|
|
AND m.organ_id_ IS NOT NULL
|
|
|
<if test="groupType!=null">
|
|
|
AND m.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
<if test="month!=null and month!=''">
|
|
|
- AND (DATE_FORMAT(m.create_time_, '%Y-%m') <= #{month} OR YEAR(m.create_time_)=3000)
|
|
|
+ AND DATE_FORMAT(m.class_date_, '%Y-%m') <= #{month}
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
m.organ_id_
|
|
@@ -336,7 +337,7 @@
|
|
|
<select id="getStudentConversionData" resultMap="IndexBaseMonthData">
|
|
|
SELECT
|
|
|
mg.organ_id_,
|
|
|
- CONCAT( DATE_FORMAT( NOW(), '%Y-%m' ), '-01' ) month_,
|
|
|
+ CONCAT( #{month}, '-01' ) month_,
|
|
|
COUNT( DISTINCT sr.user_id_ ) total_num_,
|
|
|
COUNT( DISTINCT IF((cssp.group_type_='PRACTICE' AND pg.type_='CHARGE') OR cssp.group_type_='VIP', cssp.user_id_, NULL) ) activate_num_,
|
|
|
TRUNCATE(COUNT( DISTINCT IF((cssp.group_type_='PRACTICE' AND pg.type_='CHARGE') OR cssp.group_type_='VIP', cssp.user_id_, NULL) )/COUNT( DISTINCT sr.user_id_ )*100, 2) percent_
|