|
@@ -309,7 +309,6 @@
|
|
|
<select id="getRepairGoodsSellGroupMonthReport"
|
|
|
resultMap="com.ym.mec.biz.dal.dao.OperatingReportDao.OperatingReport"><![CDATA[
|
|
|
SELECT spo.organ_id_,
|
|
|
- SUM(so.actual_amount_) income_total_,
|
|
|
SUM(so.actual_amount_) sell_amount_,
|
|
|
SUM(so.sell_cost_) sellCost
|
|
|
FROM student_payment_order spo
|
|
@@ -321,6 +320,20 @@
|
|
|
GROUP BY spo.organ_id_
|
|
|
]]></select>
|
|
|
|
|
|
+ <!-- 获取分部学校的收入支出(维修、商品销售订单) -->
|
|
|
+ <select id="getRepairGoodsSellGroupIncome"
|
|
|
+ resultMap="com.ym.mec.biz.dal.dao.OperatingReportDao.OperatingReport"><![CDATA[
|
|
|
+ SELECT spo.organ_id_,
|
|
|
+ SUM(spo.actual_amount_) income_total_
|
|
|
+ FROM student_payment_order spo
|
|
|
+ WHERE spo.status_ = 'SUCCESS'
|
|
|
+ AND spo.group_type_ IN ('REPAIR', 'GOODS_SELL')
|
|
|
+ AND spo.create_time_ >= #{startTime}
|
|
|
+ AND spo.create_time_ <= #{endTime}
|
|
|
+ GROUP BY spo.organ_id_
|
|
|
+ ]]></select>
|
|
|
+
|
|
|
+
|
|
|
<!-- 获取订单的销售列表 -->
|
|
|
<select id="getOrderSellOrder" resultMap="SellOrder">
|
|
|
SELECT *
|