Browse Source

Update-api-search-tb-activity-type-with-value-isAfterHarvest

new-feature
Viet.LeQ2 1 year ago
parent
commit
577513947c
3 changed files with 55 additions and 46 deletions
  1. +3
    -0
      src/main/java/vn/azteam/tpf/service/TBActivityTypeQueryService.java
  2. +51
    -45
      src/main/java/vn/azteam/tpf/service/dto/TBActivityTypeCriteria.java
  3. +1
    -1
      src/main/java/vn/azteam/tpf/service/dto/TBActivityTypeDTO.java

+ 3
- 0
src/main/java/vn/azteam/tpf/service/TBActivityTypeQueryService.java View File

if (criteria.getIsGuidelineUsing() != null) { if (criteria.getIsGuidelineUsing() != null) {
specification = specification.and(buildSpecification(criteria.getIsGuidelineUsing(), TBActivityType_.isGuidelineUsing)); specification = specification.and(buildSpecification(criteria.getIsGuidelineUsing(), TBActivityType_.isGuidelineUsing));
} }
if (criteria.getIsAfterHarvest() != null) {
specification = specification.and(buildSpecification(criteria.getIsAfterHarvest(), TBActivityType_.isAfterHarvest));
}


// if (currentUser.getCustomerId() != null) { // if (currentUser.getCustomerId() != null) {
// List<Long> activityTypeIds = tBCustomerHasCropTypeQueryService.getActivityTypeIdsByCustomerId(currentUser.getCustomerId()); // List<Long> activityTypeIds = tBCustomerHasCropTypeQueryService.getActivityTypeIdsByCustomerId(currentUser.getCustomerId());

+ 51
- 45
src/main/java/vn/azteam/tpf/service/dto/TBActivityTypeCriteria.java View File

package vn.azteam.tpf.service.dto; package vn.azteam.tpf.service.dto;


import io.github.jhipster.service.filter.*;

import java.io.Serializable; import java.io.Serializable;
import java.util.Objects; import java.util.Objects;
import io.github.jhipster.service.filter.BooleanFilter;
import io.github.jhipster.service.filter.DoubleFilter;
import io.github.jhipster.service.filter.Filter;
import io.github.jhipster.service.filter.FloatFilter;
import io.github.jhipster.service.filter.IntegerFilter;
import io.github.jhipster.service.filter.LongFilter;
import io.github.jhipster.service.filter.StringFilter;
import io.github.jhipster.service.filter.InstantFilter;


/** /**
* Criteria class for the TBActivityType entity. This class is used in TBActivityTypeResource to * Criteria class for the TBActivityType entity. This class is used in TBActivityTypeResource to


private BooleanFilter isGuidelineUsing; private BooleanFilter isGuidelineUsing;


private BooleanFilter isAfterHarvest;

public LongFilter getId() { public LongFilter getId() {
return id; return id;
} }
this.isGuidelineUsing = isGuidelineUsing; this.isGuidelineUsing = isGuidelineUsing;
} }


public BooleanFilter getIsAfterHarvest() {
return isAfterHarvest;
}

public void setIsAfterHarvest(BooleanFilter isAfterHarvest) {
this.isAfterHarvest = isAfterHarvest;
}

@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
final TBActivityTypeCriteria that = (TBActivityTypeCriteria) o; final TBActivityTypeCriteria that = (TBActivityTypeCriteria) o;
return return
Objects.equals(id, that.id) && Objects.equals(id, that.id) &&
Objects.equals(name, that.name) &&
Objects.equals(description, that.description) &&
Objects.equals(isCanDelete, that.isCanDelete) &&
Objects.equals(urlLogo, that.urlLogo) &&
Objects.equals(createdDate, that.createdDate) &&
Objects.equals(modifiedDate, that.modifiedDate) &&
Objects.equals(deletedDate, that.deletedDate) &&
Objects.equals(deletedById, that.deletedById) &&
Objects.equals(createdById, that.createdById) &&
Objects.equals(modifiedById, that.modifiedById) &&
Objects.equals(isGuidelineUsing, that.isGuidelineUsing) &&
Objects.equals(customerId, that.customerId);
Objects.equals(name, that.name) &&
Objects.equals(description, that.description) &&
Objects.equals(isCanDelete, that.isCanDelete) &&
Objects.equals(urlLogo, that.urlLogo) &&
Objects.equals(createdDate, that.createdDate) &&
Objects.equals(modifiedDate, that.modifiedDate) &&
Objects.equals(deletedDate, that.deletedDate) &&
Objects.equals(deletedById, that.deletedById) &&
Objects.equals(createdById, that.createdById) &&
Objects.equals(modifiedById, that.modifiedById) &&
Objects.equals(isGuidelineUsing, that.isGuidelineUsing) &&
Objects.equals(isAfterHarvest, that.isAfterHarvest) &&
Objects.equals(customerId, that.customerId);
} }


@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash( return Objects.hash(
id,
name,
description,
isCanDelete,
urlLogo,
createdDate,
modifiedDate,
deletedDate,
deletedById,
createdById,
modifiedById,
isGuidelineUsing,
customerId
id,
name,
description,
isCanDelete,
urlLogo,
createdDate,
modifiedDate,
deletedDate,
deletedById,
createdById,
modifiedById,
isGuidelineUsing,
isAfterHarvest,
customerId
); );
} }


@Override @Override
public String toString() { public String toString() {
return "TBActivityTypeCriteria{" + return "TBActivityTypeCriteria{" +
(id != null ? "id=" + id + ", " : "") +
(name != null ? "name=" + name + ", " : "") +
(description != null ? "description=" + description + ", " : "") +
(isCanDelete != null ? "isCanDelete=" + isCanDelete + ", " : "") +
(urlLogo != null ? "urlLogo=" + urlLogo + ", " : "") +
(createdDate != null ? "createdDate=" + createdDate + ", " : "") +
(modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
(deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
(deletedById != null ? "deletedById=" + deletedById + ", " : "") +
(createdById != null ? "createdById=" + createdById + ", " : "") +
(modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
(customerId != null ? "customerId=" + customerId + ", " : "") +
(id != null ? "id=" + id + ", " : "") +
(name != null ? "name=" + name + ", " : "") +
(description != null ? "description=" + description + ", " : "") +
(isCanDelete != null ? "isCanDelete=" + isCanDelete + ", " : "") +
(urlLogo != null ? "urlLogo=" + urlLogo + ", " : "") +
(createdDate != null ? "createdDate=" + createdDate + ", " : "") +
(modifiedDate != null ? "modifiedDate=" + modifiedDate + ", " : "") +
(deletedDate != null ? "deletedDate=" + deletedDate + ", " : "") +
(deletedById != null ? "deletedById=" + deletedById + ", " : "") +
(createdById != null ? "createdById=" + createdById + ", " : "") +
(modifiedById != null ? "modifiedById=" + modifiedById + ", " : "") +
(customerId != null ? "customerId=" + customerId + ", " : "") +
"}"; "}";
} }



+ 1
- 1
src/main/java/vn/azteam/tpf/service/dto/TBActivityTypeDTO.java View File



private Boolean isGuidelineUsing; private Boolean isGuidelineUsing;


private Boolean isAfterHarvest = Boolean.FALSE;
private Boolean isAfterHarvest;


private List<String> deletedImages; private List<String> deletedImages;



Loading…
Cancel
Save