1.修改未还本金计算bug

This commit is contained in:
zhangbb 2019-08-21 16:23:59 +08:00
parent c32f6726c6
commit 9086ac808a

View File

@ -225,7 +225,7 @@ public class CreateFiveGradeDataAction {
+ " FROM lc_rent_plan lrp "
+ " LEFT JOIN (select sum(corpus) corpus,sum(corpus_adjust) corpus_adjust,CONTRACT_ID,PLAN_LIST from lc_rent_income group by CONTRACT_ID,PLAN_LIST ) lri ON lrp.PLAN_LIST = lri.PLAN_LIST and lri.CONTRACT_ID = lrp.CONTRACT_ID "
+ " left join lb_contract_info lci on lci.ID = lrp.CONTRACT_ID "
+ " where lrp.PLAN_DATE<'"+StringFunction.getTodayNow().substring(0, 10)+"' and (lrp.CORPUS - ifnull(lri.CORPUS,0) - ifnull(lri.CORPUS_ADJUST,0))>0 "
+ " where lrp.PLAN_DATE<'"+StringFunction.getTodayNow().substring(0, 10)+"' and (lrp.CORPUS - ifnull(lri.CORPUS,0) - ifnull(lri.CORPUS_ADJUST,0))>=0 "
+ " group by lci.ID) t1 "
+ " left join lc_calc_condition lcc on lcc.CONTRACT_ID = t1.ID "
+ " left join lb_contract_info lciv on lciv.id = t1.ID "