Explorar el Código

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

new-feature
Viet.LeQ2 hace 1 año
padre
commit
577513947c
Se han modificado 3 ficheros con 55 adiciones y 46 borrados
  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 Ver fichero

@@ -185,6 +185,9 @@ public class TBActivityTypeQueryService extends QueryService<TBActivityType> {
if (criteria.getIsGuidelineUsing() != null) {
specification = specification.and(buildSpecification(criteria.getIsGuidelineUsing(), TBActivityType_.isGuidelineUsing));
}
if (criteria.getIsAfterHarvest() != null) {
specification = specification.and(buildSpecification(criteria.getIsAfterHarvest(), TBActivityType_.isAfterHarvest));
}

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

+ 51
- 45
src/main/java/vn/azteam/tpf/service/dto/TBActivityTypeCriteria.java Ver fichero

@@ -1,15 +1,9 @@
package vn.azteam.tpf.service.dto;

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

import java.io.Serializable;
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
@@ -49,6 +43,8 @@ public class TBActivityTypeCriteria implements Serializable {

private BooleanFilter isGuidelineUsing;

private BooleanFilter isAfterHarvest;

public LongFilter getId() {
return id;
}
@@ -153,6 +149,14 @@ public class TBActivityTypeCriteria implements Serializable {
this.isGuidelineUsing = isGuidelineUsing;
}

public BooleanFilter getIsAfterHarvest() {
return isAfterHarvest;
}

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

@Override
public boolean equals(Object o) {
if (this == o) {
@@ -164,54 +168,56 @@ public class TBActivityTypeCriteria implements Serializable {
final TBActivityTypeCriteria that = (TBActivityTypeCriteria) o;
return
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
public int hashCode() {
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
public String toString() {
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 Ver fichero

@@ -38,7 +38,7 @@ public class TBActivityTypeDTO implements Serializable {

private Boolean isGuidelineUsing;

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

private List<String> deletedImages;


Cargando…
Cancelar
Guardar