Browse Source

1.反结账逻辑限制,删除中间表

heqinwei 7 years ago
parent
commit
2283640923

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/StatsinfoMapper.xml

@@ -39,9 +39,9 @@
                 #{si_yearmonth,jdbcType=INTEGER},
             </if>
             <if test="si_amount_pay != null" >
-                select sum(pd_amount) from paybalancedet left join paybalance on pd_pbid=pb_id
+                (select sum(pd_amount) from paybalancedet left join paybalance on pd_pbid=pb_id
                 where paybalance.companyId= #{companyid,jdbcType=INTEGER}
-                and pd_ym=#{si_yearmonth,jdbcType=INTEGER} and pb_statuscode='AUDITED',
+                and pd_ym=#{si_yearmonth,jdbcType=INTEGER} and pb_statuscode='AUDITED'),
             </if>
             <if test="si_amount_otherpay != null" >
                 (select sum(os_amount) from othspendings RIGHT JOIN othspendingsdetail on os_id = osd_osid