diff --git a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml index acc4ac83a..d48e0043c 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml @@ -262,8 +262,11 @@ where 1=1 - and tba.totalNoRecdPayMoney = ]]> 0 - and ( expiredNoRecdPayMoney = ]]> 0 or noRecdPayMoney = ]]> 0 ) + and tba.totalNoRecdPayMoney ]] 0 + and ( + ifnull( tbe.expiredNoRecdPayMoney, 0 ) ]] 0 + or (tba.recPayMoney - ifnull( tbc.recdPayMoney, 0 )) ]] 0 + )