风控中台-优化工作地址为空时系统报错问题
This commit is contained in:
parent
e258892b7b
commit
936f21d63e
@ -385,7 +385,6 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
int ageInYear = DateUtils.yearDiffByDate(idBirthday,nowDay);
|
||||
int ageInMonth = DateUtils.monthDiffByDate(idBirthday,nowDay);
|
||||
String workAddressId = boCpt.getAttribute("work_address_id").getString();
|
||||
|
||||
BizObject boRai = this.getAddressById(workAddressId);
|
||||
String workProvinceCode = boRai.getAttribute("province_code").toString();
|
||||
String workCityCode = boRai.getAttribute("city_code").toString();
|
||||
@ -1017,8 +1016,24 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
}
|
||||
|
||||
public BizObject getAddressById(String addressId) throws JBOException {
|
||||
BizObject boRai = null;
|
||||
|
||||
if(addressId==null || "".equals(addressId)){
|
||||
boRai.setAttributeValue("province_code","");
|
||||
boRai.setAttributeValue("city_code","");
|
||||
boRai.setAttributeValue("district_code","");
|
||||
boRai.setAttributeValue("address_detail","¿ÕµØÖ·");
|
||||
return boRai;
|
||||
}
|
||||
BizObjectManager rcAddressInfo = JBOFactory.getBizObjectManager(RC_ADDRESS_INFO.CLASS_NAME);
|
||||
BizObject boRai = rcAddressInfo.createQuery("address_id=:id").setParameter("id", addressId).getSingleResult(false);
|
||||
boRai = rcAddressInfo.createQuery("address_id=:id").setParameter("id", addressId).getSingleResult(false);
|
||||
|
||||
if(boRai == null){
|
||||
boRai.setAttributeValue("province_code","");
|
||||
boRai.setAttributeValue("city_code","");
|
||||
boRai.setAttributeValue("district_code","");
|
||||
boRai.setAttributeValue("address_detail","δ²éµÃµØÖ·");
|
||||
}
|
||||
return boRai;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user