|
|
@@ -69,15 +69,41 @@ public class PurchaseInquiryDetail {
|
|
|
private String userCode;
|
|
|
|
|
|
/**
|
|
|
- * 产品
|
|
|
+ * 物料
|
|
|
*/
|
|
|
- @OneToOne(cascade = { CascadeType.REFRESH })
|
|
|
- @JoinColumn(name = "id_prid", insertable = false, updatable = false)
|
|
|
- private Product product;
|
|
|
+ @Transient
|
|
|
+ private ProductInfo product;
|
|
|
|
|
|
+ /**
|
|
|
+ * 物料ID
|
|
|
+ */
|
|
|
@Column(name = "id_prid")
|
|
|
private Long productId;
|
|
|
|
|
|
+ /**
|
|
|
+ * 物料名称
|
|
|
+ */
|
|
|
+ @Column(name = "id_prtitle")
|
|
|
+ private String productTitle;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 物料编号
|
|
|
+ */
|
|
|
+ @Column(name = "id_prcode")
|
|
|
+ private String productCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 物料规格
|
|
|
+ */
|
|
|
+ @Column(name = "id_prspec", length = 1000)
|
|
|
+ private String productSpec;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 物料单位
|
|
|
+ */
|
|
|
+ @Column(name = "id_prunit")
|
|
|
+ private String productUnit;
|
|
|
+
|
|
|
/**
|
|
|
* 币种
|
|
|
*/
|
|
|
@@ -332,14 +358,61 @@ public class PurchaseInquiryDetail {
|
|
|
this.inquiry = inquiry;
|
|
|
}
|
|
|
|
|
|
- public Product getProduct() {
|
|
|
+ public ProductInfo getProduct() {
|
|
|
+ if (product == null) {
|
|
|
+ product = new ProductInfo();
|
|
|
+ product.setId(productId);
|
|
|
+ product.setTitle(productTitle);
|
|
|
+ product.setCode(productCode);
|
|
|
+ product.setSpec(productSpec);
|
|
|
+ product.setUnit(productUnit);
|
|
|
+ }
|
|
|
return product;
|
|
|
}
|
|
|
|
|
|
- public void setProduct(Product product) {
|
|
|
+ public void setProduct(ProductInfo product) {
|
|
|
+ if (product != null) {
|
|
|
+ this.productId = product.getId();
|
|
|
+ this.productTitle = product.getTitle();
|
|
|
+ this.productCode = product.getCode();
|
|
|
+ this.productSpec = product.getSpec();
|
|
|
+ this.productUnit = product.getUnit();
|
|
|
+ }
|
|
|
this.product = product;
|
|
|
}
|
|
|
|
|
|
+ public String getProductTitle() {
|
|
|
+ return productTitle;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductTitle(String productTitle) {
|
|
|
+ this.productTitle = productTitle;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductCode() {
|
|
|
+ return productCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductCode(String productCode) {
|
|
|
+ this.productCode = productCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductSpec() {
|
|
|
+ return productSpec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductSpec(String productSpec) {
|
|
|
+ this.productSpec = productSpec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductUnit() {
|
|
|
+ return productUnit;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductUnit(String productUnit) {
|
|
|
+ this.productUnit = productUnit;
|
|
|
+ }
|
|
|
+
|
|
|
public Long getProductId() {
|
|
|
return productId;
|
|
|
}
|