|
@@ -364,17 +364,16 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getSubjectChangeMonthReport" resultMap="com.ym.mec.biz.dal.dao.OperatingReportDao.OperatingReport"><![CDATA[
|
|
<select id="getSubjectChangeMonthReport" resultMap="com.ym.mec.biz.dal.dao.OperatingReportDao.OperatingReport"><![CDATA[
|
|
- SELECT spo.organ_id_,
|
|
|
|
|
|
+ SELECT sc.organ_id_,
|
|
sc.cooperation_organ_id_,
|
|
sc.cooperation_organ_id_,
|
|
SUM(spo.actual_amount_) income_total_,
|
|
SUM(spo.actual_amount_) income_total_,
|
|
SUM(sc.sell_amount_) sell_amount_,
|
|
SUM(sc.sell_amount_) sell_amount_,
|
|
SUM(sc.cost_margin_) sell_cost_
|
|
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_
|
|
|
|
|
|
+ FROM subject_change sc
|
|
|
|
+ LEFT JOIN student_payment_order spo ON spo.id_ = sc.order_id_
|
|
|
|
+ WHERE sc.status_ = 2
|
|
|
|
+ AND sc.sell_time_ >= #{startTime}
|
|
|
|
+ AND sc.sell_time_ <= #{endTime}
|
|
|
|
+ GROUP BY sc.organ_id_, sc.cooperation_organ_id_
|
|
]]></select>
|
|
]]></select>
|
|
</mapper>
|
|
</mapper>
|