some tidy up is all.

This commit is contained in:
Keith Woodlock
2012-09-13 22:00:45 +01:00
parent 2d8ae7ae9e
commit 4717393816
2 changed files with 25 additions and 12 deletions
@@ -97,28 +97,38 @@ public class ClientsApiResource {
String extraCriteria = "";
if (sqlSearch != null)
if (sqlSearch != null) {
extraCriteria = " and (" + sqlSearch + ")";
}
if (officeId != null)
if (officeId != null) {
extraCriteria += " and office_id = " + officeId;
if (externalId != null)
extraCriteria += " and external_id like "
+ sqlEncodeString(externalId);
if (displayName != null)
}
if (externalId != null) {
extraCriteria += " and external_id like " + sqlEncodeString(externalId);
}
if (displayName != null) {
extraCriteria += " and concat(ifnull(firstname, ''), if(firstname > '',' ', '') , ifnull(lastname, '')) like "
+ sqlEncodeString(displayName);
if (firstName != null)
extraCriteria += " and firstname like "
+ sqlEncodeString(firstName);
if (lastName != null)
}
if (firstName != null) {
extraCriteria += " and firstname like " + sqlEncodeString(firstName);
}
if (lastName != null) {
extraCriteria += " and lastname like " + sqlEncodeString(lastName);
if(hierarchy != null){
}
if (hierarchy != null) {
extraCriteria += " and o.hierarchy like " + sqlEncodeString(hierarchy+"%");
}
if (StringUtils.isNotBlank(extraCriteria))
if (StringUtils.isNotBlank(extraCriteria)) {
extraCriteria = extraCriteria.substring(4);
}
logger.info("extraCriteria; " + extraCriteria);
@@ -224,6 +224,9 @@ public class LoansApiResource {
convenienceDataRequired = true;
charges = this.chargeReadPlatformService.retrieveLoanCharges(loanId);
if (CollectionUtils.isEmpty(charges)) {
charges = null;
}
}
Collection<LoanProductLookup> productOptions = new ArrayList<LoanProductLookup>();