Browse Source

经营报表

zouxuan 2 years ago
parent
commit
cda7432431

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/OperatingReportNewMapper.xml

@@ -178,7 +178,7 @@
 		select id_ organ_id_,name_ organ_name_,#{month} month_ from organization where del_flag_ = 0 and tenant_id_ = 1
 	</select>
 	<select id="sumSellAmount" resultMap="OperatingReportNew">
-		select so.organ_id_,SUM(so.actual_amount_) sale_amount_,SUM(CASE WHEN so.status_ = 1 THEN 0 ELSE so.sell_cost_ END) sale_cost_ from sell_order so
+		select so.organ_id_,SUM(so.actual_amount_) sale_amount_,SUM(CASE WHEN so.status_ = 1 THEN 0 ELSE so.sell_cost_ * so.num_ END) sale_cost_ from sell_order so
 		left join student_payment_order spo ON spo.order_no_ = so.order_no_
 		left join music_group mg ON mg.id_ = spo.music_group_id_ AND spo.group_type_ = 'MUSIC'
 		LEFT JOIN organization o ON o.id_ = so.organ_id_