|
@@ -1349,13 +1349,13 @@
|
|
|
FROM organization o
|
|
|
LEFT JOIN financial_expenditure fe ON o.id_ = fe.organ_id_ AND fe.tenant_id_ = o.tenant_id_
|
|
|
AND DATE_FORMAT(fe.create_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate} AND fe.del_flag_ = 0
|
|
|
+ WHERE o.tenant_id_ = #{tenantId}
|
|
|
<if test="organIds!=null and organIds.size()>0">
|
|
|
- AND fe.organ_id_ IN
|
|
|
+ AND o.id_ IN
|
|
|
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
#{organId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- WHERE o.tenant_id_ = #{tenantId}
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
<select id="getFinanceBalanceDataWithTimely" resultMap="IndexBaseMonthData">
|
|
@@ -1378,13 +1378,13 @@
|
|
|
FROM organization o
|
|
|
LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
|
|
|
AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ WHERE o.tenant_id_ = #{tenantId}
|
|
|
<if test="organIds!=null and organIds.size() > 0">
|
|
|
- AND spo.organ_id_ IN
|
|
|
+ AND o.id_ IN
|
|
|
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
#{organId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- WHERE o.tenant_id_ = #{tenantId}
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
<select id="getFinanceActualDataWithTimely" resultMap="IndexBaseMonthData">
|
|
@@ -1406,13 +1406,13 @@
|
|
|
FROM organization o
|
|
|
LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
|
|
|
AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ WHERE o.tenant_id_ = #{tenantId}
|
|
|
<if test="organIds!=null and organIds.size()>0">
|
|
|
- AND spo.organ_id_ IN
|
|
|
+ AND o.id_ IN
|
|
|
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
#{organId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- WHERE o.tenant_id_ = #{tenantId}
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
<select id="getTotalAmountDataWithTimely" resultMap="IndexBaseMonthData">
|
|
@@ -1439,13 +1439,13 @@
|
|
|
FROM organization o
|
|
|
LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND o.tenant_id_ = spo.tenant_id_
|
|
|
AND spo.status_ = 'SUCCESS' AND DATE_FORMAT(spo.pay_time_,'%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
|
|
+ WHERE o.tenant_id_ = #{tenantId}
|
|
|
<if test="organIds!=null and organIds.size()>0">
|
|
|
- AND spo.organ_id_ IN
|
|
|
+ AND o.id_ IN
|
|
|
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
#{organId}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- WHERE o.tenant_id_ = #{tenantId}
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
<select id="getTotalAmountDataWithTimelyDetails" resultMap="IndexBaseMonthData">
|
|
@@ -1498,6 +1498,12 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
WHERE o.tenant_id_ = #{tenantId}
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND o.id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
|
|
@@ -1561,6 +1567,12 @@
|
|
|
GROUP BY spo.organ_id_
|
|
|
)c ON c.organ_id_ = o.id_
|
|
|
WHERE o.tenant_id_ = #{tenantId}
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND o.id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
|
|
@@ -1625,6 +1637,12 @@
|
|
|
GROUP BY spo.organ_id_,spo.type_
|
|
|
)c ON c.organ_id_ = o.id_
|
|
|
WHERE o.tenant_id_ = #{tenantId}
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND o.id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
GROUP BY o.id_ ORDER BY percent_ DESC
|
|
|
</select>
|
|
|
|