Browse Source

Implement-post-create-tb-code

new-feature
Viet.LeQ2 2 years ago
parent
commit
ff67b7407b
2 changed files with 12 additions and 10 deletions
  1. +11
    -10
      src/main/java/vn/azteam/tpf/service/dto/TBCodeDTO.java
  2. +1
    -0
      src/main/java/vn/azteam/tpf/web/rest/TBCodeResource.java

+ 11
- 10
src/main/java/vn/azteam/tpf/service/dto/TBCodeDTO.java View File



import vn.azteam.tpf.domain.TBCodeDetails; import vn.azteam.tpf.domain.TBCodeDetails;
import vn.azteam.tpf.domain.TBCodeStatusEnum; import vn.azteam.tpf.domain.TBCodeStatusEnum;
import vn.azteam.tpf.domain.TBCrop;


import java.io.Serializable; import java.io.Serializable;
import java.time.Instant; import java.time.Instant;


private Long id; private Long id;


private Long tBCropId;
private TBCropDTO tbCrop;


private String code; private String code;




private Long deletedById; private Long deletedById;


private Set<TBCodeDetails> tbCodeDetails = new HashSet<>();
private Set<TBCodeDetailsDTO> tbCodeDetails = new HashSet<>();


public Long getId() { public Long getId() {
return id; return id;
this.deletedById = deletedById; this.deletedById = deletedById;
} }


public Set<TBCodeDetails> getTbCodeDetails() {
return tbCodeDetails;
public TBCropDTO getTbCrop() {
return tbCrop;
} }


public void setTbCodeDetails(Set<TBCodeDetails> tbCodeDetails) {
this.tbCodeDetails = tbCodeDetails;
public void setTbCrop(TBCropDTO tbCrop) {
this.tbCrop = tbCrop;
} }


public Long gettBCropId() {
return tBCropId;
public Set<TBCodeDetailsDTO> getTbCodeDetails() {
return tbCodeDetails;
} }


public void settBCropId(Long tBCropId) {
this.tBCropId = tBCropId;
public void setTbCodeDetails(Set<TBCodeDetailsDTO> tbCodeDetails) {
this.tbCodeDetails = tbCodeDetails;
} }
} }

+ 1
- 0
src/main/java/vn/azteam/tpf/web/rest/TBCodeResource.java View File



try { try {
TBCodeDTO tBCodeDTO = new TBCodeDTO(); TBCodeDTO tBCodeDTO = new TBCodeDTO();
tBCodeDTO.setTbCrop(tbCropDTO.get());
tBCodeDTO.setDescription(StringUtils.isNotBlank(tBCodeCreationDTO.getDescription()) ? tBCodeDTO.setDescription(StringUtils.isNotBlank(tBCodeCreationDTO.getDescription()) ?
tBCodeCreationDTO.getDescription() : ""); tBCodeCreationDTO.getDescription() : "");
tBCodeDTO.setQuantity(tBCodeCreationDTO.getQuantity()); tBCodeDTO.setQuantity(tBCodeCreationDTO.getQuantity());

Loading…
Cancel
Save