Explorar el Código

Api-scan-add-info-tbcode

new-feature
Viet.LeQ2 hace 1 año
padre
commit
a2cd392eac
Se han modificado 3 ficheros con 24 adiciones y 0 borrados
  1. BIN
      build/libs/smart-farm-0.0.1-SNAPSHOT.war
  2. +22
    -0
      src/main/java/vn/azteam/tpf/service/dto/TBCodeDetailsAndActivityDTO.java
  3. +2
    -0
      src/main/java/vn/azteam/tpf/service/impl/TBCodeDetailsImpl.java

BIN
build/libs/smart-farm-0.0.1-SNAPSHOT.war Ver fichero


+ 22
- 0
src/main/java/vn/azteam/tpf/service/dto/TBCodeDetailsAndActivityDTO.java Ver fichero

@@ -1,5 +1,7 @@
package vn.azteam.tpf.service.dto;

import vn.azteam.tpf.domain.TBCode;

import java.io.Serializable;
import java.util.List;

@@ -9,6 +11,10 @@ public class TBCodeDetailsAndActivityDTO implements Serializable {

private TBCodeDetailsDTO tbCodeDetailsDTO;

private String tbCodeValue;

private String tbCodeDescription;

private TBCropDTO tbCropDTO;
// Use for web only
private ActivityTimelineDTO activityTimeline;
@@ -55,4 +61,20 @@ public class TBCodeDetailsAndActivityDTO implements Serializable {
public void setDescription(String description) {
this.description = description;
}

public String getTbCodeValue() {
return tbCodeValue;
}

public void setTbCodeValue(String tbCodeValue) {
this.tbCodeValue = tbCodeValue;
}

public String getTbCodeDescription() {
return tbCodeDescription;
}

public void setTbCodeDescription(String tbCodeDescription) {
this.tbCodeDescription = tbCodeDescription;
}
}

+ 2
- 0
src/main/java/vn/azteam/tpf/service/impl/TBCodeDetailsImpl.java Ver fichero

@@ -121,6 +121,8 @@ public class TBCodeDetailsImpl implements TBCodeDetailsService {
TBCodeDetailsAndActivityDTO tbCodeDetailsAndActivityDTO = this.getCodeDetailDTOResponseEntity(tbCropMapper.toDto(tbCodeDetailsOptional.get().getTbCode().getTbCrop()), Pageable.unpaged(), true);
tbCodeDetailsAndActivityDTO.setTbCodeDetailsDTO(tBCodeDetailsMapper.toDto(tbCodeDetails));
tbCodeDetailsAndActivityDTO.setDescription(tbCode.getDescription());
tbCodeDetailsAndActivityDTO.setTbCodeValue(tbCode.getCode());
tbCodeDetailsAndActivityDTO.setTbCodeDescription(tbCode.getDescription());
return tbCodeDetailsAndActivityDTO;
} else {
throw new BadRequestAlertException("Scan code not found", "tb code details with code:", code);

Cargando…
Cancelar
Guardar