Merge remote-tracking branch 'origin/ap007' into ap007
This commit is contained in:
commit
749f06091d
@ -18,7 +18,7 @@ public class ParamDataUtils {
|
||||
* @return
|
||||
*/
|
||||
public static String queryBcEnumType(String codeNo, String itemNo, String extend){
|
||||
if(StringUtils.isNotEmpty(extend) && "marry".equals(codeNo) && "01".equals(codeNo)){//婚姻状况 : 已婚 01
|
||||
if(StringUtils.isNotEmpty(extend) && "marry".equals(codeNo) && "01".equals(itemNo)){//婚姻状况 : 已婚 01
|
||||
/**
|
||||
* 00001 已婚无子女
|
||||
* 00006 已婚有子女
|
||||
|
||||
@ -5,6 +5,7 @@ import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.dict.als.manage.CodeManager;
|
||||
import com.ample.esb.bean.amp.*;
|
||||
import com.ample.esb.bean.esb.MessageAppHead;
|
||||
import com.ample.esb.bean.esb.MessageBody;
|
||||
@ -185,15 +186,21 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
li.setSubsityTypeCode("");
|
||||
//年利率(产品利率)
|
||||
String productRate = ProductParamUtil.getProductParameterValue(boLpit.getAttribute("PRODUCT_ID").toString(),"PRD0350","product_rate","ProductRate");
|
||||
if("".equals(productRate)){
|
||||
BizObject boLcsit = JBOFactory.createBizObjectQuery(LC_CALC_SUBSECTION_INFO_TEMP.CLASS_NAME,"FLOWUNID=:flowunid").setParameter("flowunid",flowUnid).getSingleResult(false);
|
||||
productRate = boLcsit.getAttribute("DISCOUNT_RATE").toString();
|
||||
}
|
||||
BigDecimal interestRate = new BigDecimal(productRate).divide(new BigDecimal("100"),4,BigDecimal.ROUND_HALF_UP);
|
||||
li.setInterestRate(interestRate.toString());
|
||||
|
||||
//首付比例(综合)
|
||||
double firstRatio = boLcct.getAttribute("ALL_FIRST_PAYMENT_RATIO").getDouble()/100;
|
||||
li.setDownPaymentPercentage(new BigDecimal(firstRatio).setScale(4,BigDecimal.ROUND_HALF_UP).toString());
|
||||
//总首付金额
|
||||
li.setDownPaymentTotalAmount(boLcct.getAttribute("ALL_FIRST_PAYMENT").toString());
|
||||
li.setFinanceAmountUnit("");
|
||||
li.setFinanceAmountTotal("");
|
||||
String finaAmountTotal = boLcct.getAttribute("CLEAN_LEASE_MONEY").toString();
|
||||
li.setFinanceAmountTotal(finaAmountTotal);
|
||||
//期数
|
||||
li.setTerms(boLcct.getAttribute("INCOME_NUMBER").toString());
|
||||
List<BizObject> boLrps = JBOFactory.createBizObjectQuery(LC_RENT_PLAN_TEMP.CLASS_NAME,"select o.interest,o.rent from o where o.FLOWUNID=:flowunid").setParameter("flowunid",flowUnid).getResultList(false);
|
||||
@ -247,7 +254,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
li.setAssetPurpose("乘用车".equals(carType)?"TCC":"TCF");
|
||||
li.setBalloonPercentage("");
|
||||
li.setBalloonAmount("");
|
||||
String financedAmtPct = new BigDecimal(boLcct.getAttribute("CLEAN_LEASE_MONEY").toString()).divide(new BigDecimal(boLcct.getAttribute("TOTAL_ALL").toString()),4,BigDecimal.ROUND_HALF_UP).toString();
|
||||
String financedAmtPct = new BigDecimal(finaAmountTotal).divide(new BigDecimal(boLcct.getAttribute("TOTAL_ALL").toString()),4,BigDecimal.ROUND_HALF_UP).toString();
|
||||
li.setFinancedAmtPct(financedAmtPct);
|
||||
li.setRentalCalculationMtd("");
|
||||
//客户承担利率
|
||||
@ -301,7 +308,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
svt.setVinNumber("");
|
||||
svt.setEngineNumber("");
|
||||
//车辆用途
|
||||
svt.setPurpose("");
|
||||
svt.setPurpose(ParamDataUtils.queryBcEnumType("car_use_type",bo.getAttribute("car_use_type").toString()));
|
||||
svt.setComments("");
|
||||
svt.setTransmission("");
|
||||
svt.setIsAffiliated("");
|
||||
@ -319,7 +326,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
vi.setSingleVehicleTypes(SingleVehicleTypes);
|
||||
return vi;
|
||||
}
|
||||
public CustomerInfo getCustomerInfo() throws JBOException {
|
||||
public CustomerInfo getCustomerInfo() throws Exception {
|
||||
CustomerInfo ci = null;
|
||||
BizObject boCit = JBOFactory.createBizObjectQuery(CUSTOMER_INFO_TEMP.CLASS_NAME,"FLOWUNID=:flowunid").setParameter("flowunid",flowUnid).getSingleResult(false);
|
||||
String customerType = boCit.getAttribute("customertype").toString();
|
||||
@ -353,7 +360,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
ci.setCheckedType("2");
|
||||
return ci;
|
||||
}
|
||||
public CustomerInfo getCustomerInfoOfPerson() throws JBOException {
|
||||
public CustomerInfo getCustomerInfoOfPerson() throws Exception {
|
||||
CustomerInfo ci = new CustomerInfo();
|
||||
BizObject boCat = JBOFactory.createBizObjectQuery(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME,"FLOWUNID=:flowunid").setParameter("flowunid",flowUnid).getSingleResult(false);
|
||||
|
||||
@ -361,7 +368,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
String chName = boCpt.getAttribute("FULLNAME").toString();
|
||||
String idCardNum = boCpt.getAttribute("CERTID").toString();
|
||||
String genderCode = ParamDataUtils.queryBcEnumType("sex",boCpt.getAttribute("SEX").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boCpt.getAttribute("MARRIAGE").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boCpt.getAttribute("MARRIAGE").toString(),boCpt.getAttribute("childrens_number").toString());
|
||||
String residentialStatusCode = ParamDataUtils.queryBcEnumType("Property_type",boCpt.getAttribute("Property_type").toString());
|
||||
String MonthlyIncome = boCpt.getAttribute("FAMILYMONTHINCOME").toString();
|
||||
String phoneCellPhone01 = boCpt.getAttribute("mobile").toString();
|
||||
@ -389,9 +396,10 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
String empPositionCode = ParamDataUtils.queryBcEnumType("duties",boCpt.getAttribute("OCCUPATION").toString());
|
||||
String highestEducation = ParamDataUtils.queryBcEnumType("Education",boCpt.getAttribute("EDUEXPERIENCE").toString());
|
||||
String CardTermBeginDate = boCpt.getAttribute("start_idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = boCpt.getAttribute("idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = idDateConvert(boCpt.getAttribute("idexpiry").toString());
|
||||
|
||||
String nationId = ParamDataUtils.queryBcEnumType("nation",boCpt.getAttribute("NATIONALITY").toString());
|
||||
String localResidentFlag = ParamDataUtils.queryBcEnumType("spouse_hukou",boCpt.getAttribute("shukou").toString());
|
||||
|
||||
ci.setChName(chName);
|
||||
//证件类型
|
||||
@ -430,7 +438,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
ci.setPhoneHome(phoneHome);
|
||||
ci.setPhoneOffice(phoneOffice);
|
||||
ci.setBankStatementStatusCode("");
|
||||
ci.setLocalResidentFlag("");
|
||||
ci.setLocalResidentFlag(localResidentFlag);
|
||||
ci.setLocalApplicantFlag("");
|
||||
ci.setVipCust("");
|
||||
//重复申请客户(0:否1:是)
|
||||
@ -496,10 +504,10 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
ci.setIdCardTermEndDate(CardTermEndDate);
|
||||
ci.setOpenBankMobileNo(openBankMobileNo);
|
||||
ci.setNationId(nationId);
|
||||
ci.setQueryReason("23");
|
||||
ci.setQueryReason(CodeManager.getItemName("pboc_query_strategy","qryReason_lessee"));
|
||||
return ci;
|
||||
}
|
||||
public Coborrowers getCoborrowers() throws JBOException {
|
||||
public Coborrowers getCoborrowers() throws Exception {
|
||||
Coborrowers cos = new Coborrowers();
|
||||
if(boCft==null){
|
||||
return cos;
|
||||
@ -509,13 +517,13 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
cos.setCoborrower(coborrowerList);
|
||||
return cos;
|
||||
}
|
||||
public Coborrower getCoborrower() throws JBOException {
|
||||
public Coborrower getCoborrower() throws Exception {
|
||||
Coborrower co = new Coborrower();
|
||||
String idTypeCode = ParamDataUtils.queryBcEnumType("CertType",boCft.getAttribute("CERTTYPE").toString());
|
||||
String chName = boCft.getAttribute("name").toString();
|
||||
String idCardNum = boCft.getAttribute("CERTID").toString();
|
||||
String genderCode = ParamDataUtils.queryBcEnumType("sex",boCft.getAttribute("SEX").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boCft.getAttribute("marry_type").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boCft.getAttribute("marry_type").toString(),boCft.getAttribute("childrens_number").toString());
|
||||
String residentialStatusCode = ParamDataUtils.queryBcEnumType("Property_type",boCft.getAttribute("residential_status").toString());
|
||||
String MonthlyIncome = boCft.getAttribute("smincome").toString();
|
||||
String phoneCellPhone01 = boCft.getAttribute("tel").toString();
|
||||
@ -541,12 +549,13 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
String empPositionCode = ParamDataUtils.queryBcEnumType("duties",boCft.getAttribute("sposition").toString());
|
||||
String highestEducation = ParamDataUtils.queryBcEnumType("Education",boCft.getAttribute("education_level").toString());
|
||||
String CardTermBeginDate = boCft.getAttribute("start_idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = boCft.getAttribute("idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = idDateConvert(boCft.getAttribute("idexpiry").toString());
|
||||
String nationId = ParamDataUtils.queryBcEnumType("nation",boCft.getAttribute("nation").toString());
|
||||
String censusRegAddrId = boCft.getAttribute("id_address_id").toString();
|
||||
BizObject boCens = this.getAddressById(censusRegAddrId);
|
||||
String censusRegAddr = boCens.getAttribute("full_address").toString();
|
||||
String relationshipCode = ParamDataUtils.queryBcEnumType("personContact",boCft.getAttribute("ASSURE_RELATION").toString());
|
||||
String localResidentFlag = ParamDataUtils.queryBcEnumType("spouse_hukou",boCpt.getAttribute("shukou").toString());
|
||||
|
||||
co.setChName(chName);
|
||||
//证件类型
|
||||
@ -585,7 +594,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
co.setPhoneHome(phoneHome);
|
||||
co.setPhoneOffice(phoneOffice);
|
||||
co.setBankStatementStatusCode("");
|
||||
co.setLocalResidentFlag("");
|
||||
co.setLocalResidentFlag(localResidentFlag);
|
||||
co.setLocalApplicantFlag("");
|
||||
co.setVipCust("");
|
||||
//重复申请客户(0:否1:是)
|
||||
@ -658,10 +667,10 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
//共借人编号(目前系统只有一个共借人,默认填1)
|
||||
co.setBorrowerId("1");
|
||||
//征信查询原因
|
||||
co.setQueryReason("23");
|
||||
co.setQueryReason(CodeManager.getItemName("pboc_query_strategy","qryReason_jointApplicant"));
|
||||
return co;
|
||||
}
|
||||
public GuarantorInfo getGuarantorInfo() throws JBOException {
|
||||
public GuarantorInfo getGuarantorInfo() throws Exception {
|
||||
GuarantorInfo gi = new GuarantorInfo();
|
||||
List<Guar> gis = new ArrayList<>();
|
||||
for(BizObject boLgu : boLguts){
|
||||
@ -673,7 +682,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
}
|
||||
return gi;
|
||||
}
|
||||
public Guar getGuar(BizObject boLgu) throws JBOException {
|
||||
public Guar getGuar(BizObject boLgu) throws Exception {
|
||||
String certType = boLgu.getAttribute("CERTTYPE").toString();
|
||||
Guar gr = null;
|
||||
if(certType.startsWith("Ind")){
|
||||
@ -699,13 +708,13 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
gr.setCheckedType("2");
|
||||
return gr;
|
||||
}
|
||||
public Guar getGuarOfPerson(BizObject boLgu) throws JBOException {
|
||||
public Guar getGuarOfPerson(BizObject boLgu) throws Exception {
|
||||
Guar gr = new Guar();
|
||||
String idTypeCode = ParamDataUtils.queryBcEnumType("CertType",boLgu.getAttribute("CERTTYPE").toString());
|
||||
String chName = boLgu.getAttribute("FULLNAME").toString();
|
||||
String idCardNum = boLgu.getAttribute("CERTID").toString();
|
||||
String genderCode = ParamDataUtils.queryBcEnumType("sex",boLgu.getAttribute("SEX").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boLgu.getAttribute("Marital_status").toString());
|
||||
String maritalStatusCode = ParamDataUtils.queryBcEnumType("marry",boLgu.getAttribute("Marital_status").toString(),boLgu.getAttribute("childrens_number").toString());
|
||||
String residentialStatusCode = ParamDataUtils.queryBcEnumType("Property_type",boLgu.getAttribute("residential_status").toString());
|
||||
String MonthlyIncome = boLgu.getAttribute("Major_monthly_income").toString();
|
||||
String phoneCellPhone01 = boLgu.getAttribute("MOBILE").toString();
|
||||
@ -731,12 +740,13 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
String empPositionCode = ParamDataUtils.queryBcEnumType("duties",boLgu.getAttribute("TITLE").toString());
|
||||
String highestEducation = ParamDataUtils.queryBcEnumType("Education",boLgu.getAttribute("education_level").toString());
|
||||
String CardTermBeginDate = boLgu.getAttribute("start_idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = boLgu.getAttribute("idexpiry").toString().replace("/","-");
|
||||
String CardTermEndDate = idDateConvert(boLgu.getAttribute("idexpiry").toString());
|
||||
String nationId = ParamDataUtils.queryBcEnumType("nation",boLgu.getAttribute("nation").toString());
|
||||
String censusRegAddrId = boLgu.getAttribute("id_address_id").toString();
|
||||
BizObject boCens = this.getAddressById(censusRegAddrId);
|
||||
String censusRegAddr = boCens.getAttribute("full_address").toString();
|
||||
String relationshipCode = ParamDataUtils.queryBcEnumType("personContact",boLgu.getAttribute("ASSURE_RELATION").toString());
|
||||
String localResidentFlag = ParamDataUtils.queryBcEnumType("spouse_hukou",boCpt.getAttribute("shukou").toString());
|
||||
|
||||
gr.setChName(chName);
|
||||
//证件类型
|
||||
@ -775,7 +785,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
gr.setPhoneHome(phoneHome);
|
||||
gr.setPhoneOffice(phoneOffice);
|
||||
gr.setBankStatementStatusCode("");
|
||||
gr.setLocalResidentFlag("");
|
||||
gr.setLocalResidentFlag(localResidentFlag);
|
||||
gr.setLocalApplicantFlag("");
|
||||
gr.setVipCust("");
|
||||
//重复申请客户(0:否1:是)
|
||||
@ -843,7 +853,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
//与主借人关系
|
||||
gr.setRelationshipCode(relationshipCode);
|
||||
//征信查询原因
|
||||
gr.setQueryReason("23");
|
||||
gr.setQueryReason(CodeManager.getItemName("pboc_query_strategy","qryReason_guarantor"));
|
||||
return gr;
|
||||
}
|
||||
public ContInfo getContInfo() throws JBOException {
|
||||
@ -853,13 +863,15 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
Contr contr = new Contr();
|
||||
contr.setContNum("1");
|
||||
contr.setChName(boCpt.getAttribute("EMERGENCY_CONTACT_PERSON").toString());
|
||||
contr.setRelationshipCode(boCpt.getAttribute("EMPLOYRECORD").toString());
|
||||
String relationshipCode1 = ParamDataUtils.queryBcEnumType("personContact",boCpt.getAttribute("EMPLOYRECORD").toString());
|
||||
contr.setRelationshipCode(relationshipCode1);
|
||||
contr.setCellPhone(boCpt.getAttribute("EMERGENCY_CONTACT_TEL").toString());
|
||||
|
||||
Contr contr2 = new Contr();
|
||||
contr2.setContNum("2");
|
||||
contr2.setChName(boCpt.getAttribute("INTRO").toString());
|
||||
contr2.setRelationshipCode(boCpt.getAttribute("EDUDEGREE").toString());
|
||||
String relationshipCode2 = ParamDataUtils.queryBcEnumType("personContact",boCpt.getAttribute("EDUDEGREE").toString());
|
||||
contr2.setRelationshipCode(relationshipCode2);
|
||||
contr2.setCellPhone(boCpt.getAttribute("REMARK").toString());
|
||||
|
||||
contrs.add(contr);
|
||||
@ -1047,8 +1059,11 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
BizObject boLpc = JBOFactory.createBizObjectQuery(LC_PROJ_CONDITION.CLASS_NAME,"PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID",projectId).getSingleResult(false);
|
||||
String cleanLeaseMoney = boLpc.getAttribute("CLEAN_LEASE_MONEY").toString();
|
||||
String cautionMoney =boLpc.getAttribute("CAUTION_MONEY").toString();
|
||||
BizObject boLri = JBOFactory.createBizObjectQuery(LC_RENT_INCOME.CLASS_NAME,"select ifnull(sum(rent),0) as v.rentIncome from O where ROLL_BACK=0 and PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID",projectId).getSingleResult(false);
|
||||
BizObject boLri = JBOFactory.createBizObjectQuery(LC_RENT_INCOME.CLASS_NAME,"select sum(rent) as v.rentIncome from O where ROLL_BACK=0 and PROJECT_ID=:PROJECT_ID").setParameter("PROJECT_ID",projectId).getSingleResult(false);
|
||||
String rentIncome = boLri.getAttribute("rentIncome").toString();
|
||||
if("".equals(rentIncome)){
|
||||
continue;
|
||||
}
|
||||
amount = new BigDecimal(cleanLeaseMoney).subtract(new BigDecimal(cautionMoney)).subtract(new BigDecimal(rentIncome)).add(amount);
|
||||
}
|
||||
|
||||
@ -1086,6 +1101,15 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
return projectSet;
|
||||
}
|
||||
|
||||
public String idDateConvert(String date){
|
||||
if("2100/12/31".equals(date)){
|
||||
date = "0000-00-00";
|
||||
}else{
|
||||
date = date.replace("/","-");
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
public String getFlowUnid() {
|
||||
return flowUnid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user