风控中台-重新发起评分后删除人工判定结果

This commit is contained in:
zhanglei@ap-leasing.com.cn 2023-09-20 11:41:52 +08:00
parent 2834907249
commit af40473011
4 changed files with 45 additions and 3 deletions

View File

@ -56,7 +56,7 @@
var curUserId = "<%=userId%>";
var result = RunJavaMethodTrans("com.ample.esb.controller.AmpController","ampDo","flowUnid="+flowUnid+",operatorId="+curUserId);
alert(result);
self.location.reload();
}
function afs(){
var projectNo = "<%=projectNo%>";

View File

@ -18,6 +18,7 @@ public class AmpController {
AmpService as = new AmpServiceImpl(map);
Transaction tran = as.transactionDo();
String result = resultAnalysis(tran);
as.resetFraudTakenCode();
return result;
}

View File

@ -4,5 +4,6 @@ import com.ample.esb.bean.amp.ApplicationTitle;
public interface AmpService extends EsbServise{
ApplicationTitle getApplicationTitle() throws Exception;
void resetFraudTakenCode();
}

View File

@ -17,8 +17,10 @@ import com.ample.esb.util.DateUtils;
import com.ample.esb.util.XstreamUtil;
import jbo.app.tenwa.calc.*;
import jbo.app.tenwa.customer.*;
import jbo.com.tenwa.entity.comm.flow.CUSTOMER_HISTORY_INFO_TEMP;
import jbo.com.tenwa.lease.comm.*;
import jbo.oti.RC_ADDRESS_INFO;
import jbo.oti.RC_SCORE_RESULT;
import jbo.prd.PRD_SPECIFIC_LIBRARY;
import jbo.sys.FLOW_TASK;
@ -32,6 +34,23 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
setFlowUnid(map.get("flowUnid"));
setOperatorId(map.get("operatorId"));
}
public void resetFraudTakenCode(){
BizObjectManager bom = null;
BizObject boRsr = null;
try {
bom = JBOFactory.getBizObjectManager(RC_SCORE_RESULT.CLASS_NAME);
boRsr = bom.createQuery("flow_no=:flow_no").setParameter("flow_no",flowUnid).getSingleResult(true);
if(boRsr==null){
return;
}
boRsr.setAttributeValue("fraud_taken_code","");
boRsr.setAttributeValue("update_time", DateUtils.dateTimeNowCore());
bom.saveObject(boRsr);
} catch (JBOException e) {
e.printStackTrace();
}
}
@Override
public MessageEsbHead esbHead() {
MessageEsbHead head = new MessageEsbHead();
@ -273,8 +292,8 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
li.setCalcDealerSubsidyAmt(interestRate.subtract(new BigDecimal(yearRate)).doubleValue());
li.setCalcManufacturerSubsidyAmt(makerInterestTotal);
li.setCarCount(boLects.size());
li.setExposuresNumber(exposures());
li.setExposureAmount(exposuresAmount());
li.setExposuresNumber(getExposuresNumber());
li.setExposureAmount(getExposuresAmount());
li.setCarRealDownPaymentRatio(boLcct.getAttribute("FIRST_PAYMENT_RATIO").toString());
li.setCarRealDownPaymentAmt(boLcct.getAttribute("FIRST_PAYMENT").toString());
li.setFinancingRatio(1.0-boLcct.getAttribute("FIRST_PAYMENT_RATIO").getDouble());
@ -682,6 +701,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
}
gis.add(gr);
}
gi.setGuars(gis);
return gi;
}
public Guar getGuar(BizObject boLgu) throws Exception {
@ -1120,6 +1140,26 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
return projectSet;
}
public int getExposuresNumber() throws JBOException {
BigDecimal count = new BigDecimal("0");
for(BizObject boChit : getExposures()){
count = count.add(new BigDecimal(boChit.getAttribute("CLIENTBUYNUMBER").toString()));
}
return count.intValue();
}
public List<BizObject> getExposures() throws JBOException {
List<BizObject> boChits = JBOFactory.createBizObjectQuery(CUSTOMER_HISTORY_INFO_TEMP.CLASS_NAME,"FLOWUNID=:flowunid ").setParameter("flowunid",flowUnid).getResultList(false);
System.out.println(boChits.size());
return boChits;
}
public String getExposuresAmount() throws JBOException {
BigDecimal amount = new BigDecimal("0");
for(BizObject boChit : getExposures()){
amount = amount.add(new BigDecimal(boChit.getAttribute("EXPOSURE").toString()));
}
return amount.toString();
}
public String idDateConvert(String date){
if("2100/12/31".equals(date)){
date = "0000-00-00";