|
@@ -9,11 +9,13 @@
|
|
<resultMap type="com.ym.mec.biz.dal.entity.IndexBaseMonthData" id="IndexBaseMonthData">
|
|
<resultMap type="com.ym.mec.biz.dal.entity.IndexBaseMonthData" id="IndexBaseMonthData">
|
|
<result column="id_" property="id" />
|
|
<result column="id_" property="id" />
|
|
<result column="month_" property="month" />
|
|
<result column="month_" property="month" />
|
|
|
|
+ <result column="month_" property="monthStr" />
|
|
<result column="organ_id_" property="organId" />
|
|
<result column="organ_id_" property="organId" />
|
|
<result column="total_num_" property="totalNum" />
|
|
<result column="total_num_" property="totalNum" />
|
|
<result column="activate_num_" property="activateNum" />
|
|
<result column="activate_num_" property="activateNum" />
|
|
<result column="percent_" property="percent" />
|
|
<result column="percent_" property="percent" />
|
|
<result column="data_type_" property="dataType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
<result column="data_type_" property="dataType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
|
+ <result column="type_" property="orderType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
<result column="extend_info_" property="extendInfo"/>
|
|
<result column="extend_info_" property="extendInfo"/>
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
@@ -1329,6 +1331,32 @@
|
|
</if>
|
|
</if>
|
|
GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
|
|
GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getTotalAmountDataWithTimelyDetails" resultMap="IndexBaseMonthData">
|
|
|
|
+ SELECT spo.organ_id_,SUM(CASE WHEN spo.actual_amount_ IS NULL THEN 0 ELSE spo.actual_amount_ END +
|
|
|
|
+ CASE WHEN spo.balance_payment_amount_ IS NULL THEN 0 ELSE spo.balance_payment_amount_ END) total_num_,
|
|
|
|
+ SUM(CASE WHEN spo.actual_amount_ IS NULL THEN 0 ELSE spo.actual_amount_ END +
|
|
|
|
+ CASE WHEN spo.balance_payment_amount_ IS NULL THEN 0 ELSE spo.balance_payment_amount_ END) activate_num_,
|
|
|
|
+ SUM(CASE WHEN spo.actual_amount_ IS NULL THEN 0 ELSE spo.actual_amount_ END +
|
|
|
|
+ CASE WHEN spo.balance_payment_amount_ IS NULL THEN 0 ELSE spo.balance_payment_amount_ END) percent_,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') month_,spo.type_
|
|
|
|
+ FROM student_payment_order spo
|
|
|
|
+ WHERE spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
|
+ <if test="orderType != null">
|
|
|
|
+ AND FIND_IN_SET(spo.type_,#{orderType})
|
|
|
|
+ </if>
|
|
|
|
+ <if test="notOrderType != null">
|
|
|
|
+ AND spo.type_ NOT IN
|
|
|
|
+ <foreach collection="notOrderType" open="(" close=")" item="item" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
|
+ AND spo.organ_id_ IN
|
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
|
+ #{organId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY spo.type_,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
|
|
|
|
+ </select>
|
|
|
|
|
|
<sql id="queryTeacherServeInfoCondition">
|
|
<sql id="queryTeacherServeInfoCondition">
|
|
<where>
|
|
<where>
|