Skip to content

Commit

Permalink
Bug fix regarding refactor (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahu-eGov authored Sep 7, 2021
1 parent d00ea74 commit 8ee00d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public Query buildQuerySearch(ProjectSearchCriteria projectSearchCriteria) {
}

if (!StringUtils.isEmpty(projectSearchCriteria.getExpenditureId())) {
criteria.and("eatId").is(projectSearchCriteria.getExpenditureId());
criteria.and("expenditureId").is(projectSearchCriteria.getExpenditureId());
}

if (!StringUtils.isEmpty(projectSearchCriteria.getDepartmentId())) {
criteria.and("departmentId").is(projectSearchCriteria.getDepartmentId());
if (!StringUtils.isEmpty(projectSearchCriteria.getGetDepartmentEntitytId())) {
criteria.and("departmentEntitytId").is(projectSearchCriteria.getGetDepartmentEntitytId());
}

if (projectSearchCriteria.getIds() != null && !projectSearchCriteria.getIds().isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public void validateProjectSearchRequest(ProjectSearchRequest projectSearchReque
"Length range [2-64]");
}

if (!StringUtils.isEmpty(projectSearchCriteria.getDepartmentId())
&& (projectSearchCriteria.getDepartmentId().length() < 2
|| projectSearchCriteria.getDepartmentId().length() > 64)) {
if (!StringUtils.isEmpty(projectSearchCriteria.getGetDepartmentEntitytId())
&& (projectSearchCriteria.getGetDepartmentEntitytId().length() < 2
|| projectSearchCriteria.getGetDepartmentEntitytId().length() > 64)) {

throw new CustomException(MasterDataConstants.DEPARTMENT_ID, "Department id length is invalid. " +
"Length range [2-64]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class ProjectSearchCriteria {
@JsonProperty("expenditureId")
private String expenditureId = null;

@JsonProperty("departmentId")
private String departmentId = null;
@JsonProperty("departmentEntitytId")
private String getDepartmentEntitytId = null;

@JsonProperty("locationId")
private String locationId = null;
Expand Down

0 comments on commit 8ee00d2

Please sign in to comment.