|
@@ -183,7 +183,7 @@
|
|
|
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'
|
|
|
where (mg.musical_instruments_provide_status_ = 1 AND mg.musical_instruments_provide_time_ = #{month}) OR
|
|
|
- (DATE_FORMAT(so.create_ime_,'%Y-%m') = #{month} AND (mg.musical_instruments_provide_status_ IS NULL OR mg.musical_instruments_provide_status_ = 1))
|
|
|
+ (DATE_FORMAT(spo.pay_time_,'%Y-%m') = #{month} AND (mg.musical_instruments_provide_status_ IS NULL OR mg.musical_instruments_provide_status_ = 1))
|
|
|
group by so.organ_id_
|
|
|
</select>
|
|
|
<select id="sumCloudCourseAmount" resultType="java.util.Map">
|
|
@@ -222,7 +222,7 @@
|
|
|
</select>
|
|
|
<select id="sumFixedCosts" resultType="java.util.Map">
|
|
|
select fe.organ_id_ 'key',SUM(amount_) 'value' from financial_expenditure fe
|
|
|
- where DATE_FORMAT(fe.create_time_,'%Y-%m') = #{month} AND fee_project_ IN (1,2,4,5) AND process_id_ = 28 group by fe.organ_id_;
|
|
|
+ where DATE_FORMAT(fe.create_time_,'%Y-%m') = #{month} AND fee_project_ IN (1,2,3,4,5) AND process_id_ = 28 group by fe.organ_id_;
|
|
|
</select>
|
|
|
<select id="sumCloudPreAmount" resultType="java.util.Map">
|
|
|
select cto.organ_id_ 'key',TRUNCATE(SUM(operating_amount_ / (TIMESTAMPDIFF(DAY,cto.start_time_,cto.end_time_) + 1) *
|
|
@@ -336,7 +336,7 @@
|
|
|
<select id="sumMaintenanceAmount" resultType="java.util.Map">
|
|
|
select spo.organ_id_ 'key',SUM(spod.price_) 'value' from student_payment_order_detail spod
|
|
|
left join student_payment_order spo ON spo.id_ = spod.payment_order_id_
|
|
|
- where spod.type_ = 'MAINTENANCE' AND DATE_FORMAT(spod.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
|
|
|
+ where spod.type_ IN ('MAINTENANCE','REPAIR') AND DATE_FORMAT(spod.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
|
|
|
group by spo.organ_id_
|
|
|
</select>
|
|
|
<select id="sumLossCloudAmount" resultType="java.util.Map">
|