瀏覽代碼

Implement-post-create-tb-code

new-feature
Viet.LeQ2 2 年之前
父節點
當前提交
ff67b7407b
共有 2 個文件被更改,包括 12 次插入10 次删除
  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 查看文件

@@ -2,6 +2,7 @@ package vn.azteam.tpf.service.dto;

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

import java.io.Serializable;
import java.time.Instant;
@@ -12,7 +13,7 @@ public class TBCodeDTO implements Serializable {

private Long id;

private Long tBCropId;
private TBCropDTO tbCrop;

private String code;

@@ -38,7 +39,7 @@ public class TBCodeDTO implements Serializable {

private Long deletedById;

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

public Long getId() {
return id;
@@ -144,19 +145,19 @@ public class TBCodeDTO implements Serializable {
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 查看文件

@@ -136,6 +136,7 @@ public class TBCodeResource {

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

Loading…
取消
儲存