|
@@ -362,4 +362,19 @@
|
|
|
FROM sell_order
|
|
|
WHERE order_id_ = #{orderId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getSubjectChangeMonthReport" resultMap="com.ym.mec.biz.dal.dao.OperatingReportDao.OperatingReport"><![CDATA[
|
|
|
+ SELECT spo.organ_id_,
|
|
|
+ sc.cooperation_organ_id_,
|
|
|
+ SUM(spo.actual_amount_) income_total_,
|
|
|
+ SUM(sc.sell_amount_) sell_amount_,
|
|
|
+ SUM(sc.cost_margin_) sell_cost_
|
|
|
+ FROM student_payment_order spo
|
|
|
+ LEFT JOIN subject_change sc on sc.order_id_ = spo.id_
|
|
|
+ WHERE spo.status_ = 'SUCCESS'
|
|
|
+ AND spo.group_type_ = 'SUBJECT_CHANGE'
|
|
|
+ AND spo.create_time_ >= #{startTime}
|
|
|
+ AND spo.create_time_ <= #{endTime}
|
|
|
+ GROUP BY spo.organ_id_, sc.cooperation_organ_id_
|
|
|
+ ]]></select>
|
|
|
</mapper>
|