From 0ffe00fa94ca496d7d1398a05675b0c20d9b55ac Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Sat, 22 Sep 2018 11:05:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=B9=E4=BA=94=E7=BA=A7=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=202.=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BB=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BC=A0=E7=BB=9F=E4=BA=94=E7=BA=A7=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/etc/jbo/jbo_customer.xml | 1 + .../AutoFiveGradeClassification.java | 38 +++---------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml index eaadfe004..3d6e7fc4f 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml @@ -2651,6 +2651,7 @@ + diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java index 68de42dd7..17b9928dd 100644 --- a/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/AutoFiveGradeClassification.java @@ -91,14 +91,8 @@ public class AutoFiveGradeClassification implements Job { JBOTransaction tx=null; try { tx= JBOFactory.createJBOTransaction(); -// int a=0;//ͬ -// int b=0;//עͬ -// int c=0;//μͬ -// int d=0;//ɺͬ -// int e=0;//ʧͬ BizObjectManager lccsManager = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_STATUS.CLASS_NAME); BizObjectManager lciManager = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME); -// BizObjectManager five_grade = JBOFactory.getBizObjectManager(LB_FIVE_GRADE_SUMMARY.CLASS_NAME); BizObjectManager five_gr = JBOFactory.getBizObjectManager(LB_FIVE_GRADE.CLASS_NAME); tx.join(lccsManager); tx.join(lciManager); @@ -107,16 +101,14 @@ public class AutoFiveGradeClassification implements Job { if(lccss.size()>0){ for(BizObject lccs:lccss){ String FIVE_GRADE; - BizObject lci = lciManager.createQuery("ID=:id ").setParameter("id",lccs.getAttribute("CONTRACT_ID").getString()).getSingleResult(false); + BizObject lci = lciManager.createQuery("ID=:id and businesstype is not null").setParameter("id",lccs.getAttribute("CONTRACT_ID").getString()).getSingleResult(false); String productId = lci.getAttribute("PRODUCT_ID").getString(); + String businessType = lci.getAttribute(LB_CONTRACT_INFO.BUSINESSTYPE).getString(); if(productId!=null){ //0.ȡڴ String overday = OverdueProjectCache.getOverDays(lccs.getAttribute("CONTRACT_ID").getString(), lccs.getAttribute("PAYMENT_NUMBER").getString()); -// Integer overdays=Integer.parseInt(overday.replaceAll("\\.0", "")); -// String outlist = OverdueProjectCache.getOutList(lccs.getAttribute("CONTRACT_ID").getString(), lccs.getAttribute("PAYMENT_NUMBER").getString()); -// outlist=outlist.replaceAll("\\.0", ""); //1.ȡȼ - String fiveGrade = getFiveConfig(overday);//ProductParamUtil.getFiveGradeClassification(productId, overdays); + String fiveGrade = getFiveConfig(overday,businessType);//ProductParamUtil.getFiveGradeClassification(productId, overdays); //2.״̬() lccsManager.createQuery("update o set FIVE_GRADE='"+fiveGrade+"',FIVE_GRADE_DATE=:fivegradedate where CONTRACT_ID=:id ") .setParameter("fivegradedate",DateAssistant.getToday()).setParameter("id",lccs.getAttribute("CONTRACT_ID").getString()).executeUpdate(); @@ -134,28 +126,8 @@ public class AutoFiveGradeClassification implements Job { fgbo.setAttributeValue("INPUTTIME", DateAssistant.getToday()); five_gr.saveObject(fgbo); } - //3.Ըȼͳ -// switch(fiveGrade){ -// case "ClassifyResult01":a++;break; -// case "ClassifyResult02":b++;break; -// case "ClassifyResult03":c++;break; -// case "ClassifyResult04":d++;break; -// case "ClassifyResult05":e++;break; -// } } } - //ܱ -// BizObject bo=five_grade.newObject(); -// bo.setAttributeValue("EXCUTE_DATE", DateAssistant.getToday()); -// bo.setAttributeValue("CONTRACT_TOTAL",a+b+c+d+e); -// bo.setAttributeValue("NORMAL_CONTRACT",a); -// bo.setAttributeValue("ATTENTION_CONTRACT",b); -// bo.setAttributeValue("SECONDARY_CONTRACT",c); -// bo.setAttributeValue("SUSPECT_CONTRACT",d); -// bo.setAttributeValue("LOSS_CONTRACT",e); -// bo.setAttributeValue("DEMO",DateAssistant.getToday()+",Զ"); -// bo.setAttributeValue("INPUTUSERID","admin"); -// five_grade.saveObject(bo); } tx.commit(); } catch (Exception e) { @@ -174,8 +146,8 @@ public class AutoFiveGradeClassification implements Job { - public String getFiveConfig(String overDays) throws JBOException{ - BizObject gradeConfg = JBOFactory.getBizObjectManager(LM_GRADE_CLASSIFICATION.CLASS_NAME).createQuery(overDays+" BETWEEN overdue_loan_min and overdue_loan_max").getSingleResult(false); + public String getFiveConfig(String overDays,String businessType) throws JBOException{ + BizObject gradeConfg = JBOFactory.getBizObjectManager(LM_GRADE_CLASSIFICATION.CLASS_NAME).createQuery(overDays+" BETWEEN overdue_loan_min and overdue_loan_max and businesstype='"+businessType+"'").getSingleResult(false); if(gradeConfg!=null){ return gradeConfg.getAttribute(LM_GRADE_CLASSIFICATION.loan_result).getString(); }else{