some tidy up is all.
This commit is contained in:
@@ -97,28 +97,38 @@ public class ClientsApiResource {
|
|||||||
|
|
||||||
String extraCriteria = "";
|
String extraCriteria = "";
|
||||||
|
|
||||||
if (sqlSearch != null)
|
if (sqlSearch != null) {
|
||||||
extraCriteria = " and (" + sqlSearch + ")";
|
extraCriteria = " and (" + sqlSearch + ")";
|
||||||
|
}
|
||||||
|
|
||||||
if (officeId != null)
|
if (officeId != null) {
|
||||||
extraCriteria += " and office_id = " + officeId;
|
extraCriteria += " and office_id = " + officeId;
|
||||||
if (externalId != null)
|
}
|
||||||
extraCriteria += " and external_id like "
|
|
||||||
+ sqlEncodeString(externalId);
|
if (externalId != null) {
|
||||||
if (displayName != null)
|
extraCriteria += " and external_id like " + sqlEncodeString(externalId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (displayName != null) {
|
||||||
extraCriteria += " and concat(ifnull(firstname, ''), if(firstname > '',' ', '') , ifnull(lastname, '')) like "
|
extraCriteria += " and concat(ifnull(firstname, ''), if(firstname > '',' ', '') , ifnull(lastname, '')) like "
|
||||||
+ sqlEncodeString(displayName);
|
+ sqlEncodeString(displayName);
|
||||||
if (firstName != null)
|
}
|
||||||
extraCriteria += " and firstname like "
|
|
||||||
+ sqlEncodeString(firstName);
|
if (firstName != null) {
|
||||||
if (lastName != null)
|
extraCriteria += " and firstname like " + sqlEncodeString(firstName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastName != null) {
|
||||||
extraCriteria += " and lastname like " + sqlEncodeString(lastName);
|
extraCriteria += " and lastname like " + sqlEncodeString(lastName);
|
||||||
if(hierarchy != null){
|
}
|
||||||
|
|
||||||
|
if (hierarchy != null) {
|
||||||
extraCriteria += " and o.hierarchy like " + sqlEncodeString(hierarchy+"%");
|
extraCriteria += " and o.hierarchy like " + sqlEncodeString(hierarchy+"%");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(extraCriteria))
|
if (StringUtils.isNotBlank(extraCriteria)) {
|
||||||
extraCriteria = extraCriteria.substring(4);
|
extraCriteria = extraCriteria.substring(4);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info("extraCriteria; " + extraCriteria);
|
logger.info("extraCriteria; " + extraCriteria);
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,9 @@ public class LoansApiResource {
|
|||||||
convenienceDataRequired = true;
|
convenienceDataRequired = true;
|
||||||
|
|
||||||
charges = this.chargeReadPlatformService.retrieveLoanCharges(loanId);
|
charges = this.chargeReadPlatformService.retrieveLoanCharges(loanId);
|
||||||
|
if (CollectionUtils.isEmpty(charges)) {
|
||||||
|
charges = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<LoanProductLookup> productOptions = new ArrayList<LoanProductLookup>();
|
Collection<LoanProductLookup> productOptions = new ArrayList<LoanProductLookup>();
|
||||||
|
|||||||
Reference in New Issue
Block a user