From 2b5368a26558f6d7239d0c994b410ff81b2715c4 Mon Sep 17 00:00:00 2001 From: tenwaPC Date: Wed, 14 Aug 2019 14:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=8F=E9=94=80=E5=95=86?= =?UTF-8?q?=E4=BA=94=E7=BA=A7=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/project/commbusiness/CreateFiveGradeDataAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/CreateFiveGradeDataAction.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/CreateFiveGradeDataAction.java index 3902d8e47..7f34b4229 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/CreateFiveGradeDataAction.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/CreateFiveGradeDataAction.java @@ -186,11 +186,12 @@ public class CreateFiveGradeDataAction { double sumOverdueMoney = 0.00; String sql = " SELECT sum(lrp."+type+" - ifnull(lri."+type+",0) - ifnull(lri."+type+"_ADJUST,0)) sumovermoney " + " 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 (select sum("+type+") "+type+",sum("+type+"_adjust) "+type+"_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 " + " @fivegrade@ " + " where lci.distributor_id = '"+distributorNo+"' @overdue@ " + " group by lci.distributor_id "; + if(true==isOverdue){ sql=sql.replaceAll("@overdue@", "and lrp.PLAN_DATE<'"+StringFunction.getTodayNow().substring(0, 10)+"'"); }else{