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{