|
@@ -881,4 +881,46 @@
|
|
|
WHERE spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') = #{dayStr}
|
|
|
GROUP BY spo.organ_id_
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getFinancePayDataWithTimely" resultMap="IndexBaseMonthData">
|
|
|
+ SELECT SUM(fe.amount_) total_num_,SUM(fe.amount_) activate_num_,SUM(fe.amount_) percent_,fe.organ_id_,DATE_FORMAT(fe.create_time_,'%Y-%m-%d') month_
|
|
|
+ FROM financial_expenditure fe
|
|
|
+ WHERE DATE_FORMAT(fe.create_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ AND del_flag_ = 0
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND fe.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ GROUP BY DATE_FORMAT(fe.create_time_,'%Y-%m-%d')
|
|
|
+ </select>
|
|
|
+ <select id="getFinanceBalanceDataWithTimely" resultMap="IndexBaseMonthData">
|
|
|
+ SELECT spo.organ_id_,SUM(spo.balance_payment_amount_) total_num_,
|
|
|
+ SUM(spo.balance_payment_amount_) activate_num_,
|
|
|
+ SUM(spo.balance_payment_amount_) percent_,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') month_
|
|
|
+ FROM student_payment_order spo
|
|
|
+ WHERE spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND spo.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
|
|
|
+ </select>
|
|
|
+ <select id="getFinanceActualDataWithTimely" resultMap="IndexBaseMonthData">
|
|
|
+ SELECT spo.organ_id_,SUM(spo.actual_amount_) total_num_,
|
|
|
+ SUM(spo.actual_amount_) activate_num_,
|
|
|
+ SUM(spo.actual_amount_) percent_,DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') month_
|
|
|
+ FROM student_payment_order spo
|
|
|
+ WHERE spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND spo.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ GROUP BY DATE_FORMAT(spo.pay_time_,'%Y-%m-%d')
|
|
|
+ </select>
|
|
|
</mapper>
|