Browse Source

批量删除物料 处理

wangdy 8 years ago
parent
commit
ea95af3d58

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ProductDao.java

@@ -137,7 +137,7 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
      * @param standard 是否是标准的信息
      * @return 返回所属该公司的产品信息
      */
-    @Query(value = "select p from products p left join product$private pp on pp.pr_id = p.pr_id where " +
+    @Query(value = "select p.* from products p left join product$private pp on pp.pr_id = p.pr_id where " +
             "p.pr_enuu=:enuu and p.pr_pcmpcode is not null and p.pr_pbranden is not null and p.pr_standard = :standard and pp.pr_b2cenabled = :enabled", nativeQuery = true)
     List<Product> findProductByEnuuAndStandardAndEnabled(@Param("enuu") Long enuu, @Param("standard") Integer standard, @Param("enabled") Integer enabled);
 

+ 166 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/ProductReplace.java

@@ -0,0 +1,166 @@
+package com.uas.platform.b2c.prod.commodity.model;
+
+import javax.persistence.*;
+import java.util.Date;
+
+/**
+ * 存贮商城替代物料
+ */
+@Entity
+@Table(name = "product$replace")
+public class ProductReplace {
+
+    @Id
+    @GeneratedValue
+    @Column(name = "id")
+    private Long id;
+
+    /**
+     * 用户uu
+     */
+    @Column(name = "ptr_useruu")
+    private Long userUU;
+
+    /**
+     * 物料id
+     */
+    @Column(name = "ptr_prid")
+    private Long productId;
+
+    /**
+     * 原型号型号
+     */
+    @Column(name = "p_cmpcode" ,length = 800)
+    private String pCmpcode;
+
+    /**
+     * 原品牌品牌
+     */
+    @Column(name = "p_pbranden")
+    private String pBranden;
+
+    /**
+     * 可替代型号
+     */
+    @Column(name = "ptr_cmpcode" ,length = 800)
+    private String ptrCmpcode;
+
+    /**
+     * 可替代品牌
+     */
+    @Column(name = "ptr_pbranden")
+    private String ptrBranden;
+
+    /**
+     * UUID 标准料号
+     * @return
+     */
+    @Column(name = "ptr_cmpuuid")
+    private String ptrCmpUuId;
+
+    /**
+     * 可替代品牌(uuid)
+     */
+    @Column(name = "ptr_pbranduuid")
+    private String ptrBrandUuid;
+
+    /**
+     * 创建时间
+     */
+    @Column(name = "ptr_createtime")
+    private Date time;
+
+    /**
+     * 序号
+     */
+    @Column(name = "ptr_detno")
+    private Short detno;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUserUU() {
+        return userUU;
+    }
+
+    public void setUserUU(Long userUU) {
+        this.userUU = userUU;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public String getpCmpcode() {
+        return pCmpcode;
+    }
+
+    public void setpCmpcode(String pCmpcode) {
+        this.pCmpcode = pCmpcode;
+    }
+
+    public String getpBranden() {
+        return pBranden;
+    }
+
+    public void setpBranden(String pBranden) {
+        this.pBranden = pBranden;
+    }
+
+    public String getPtrCmpcode() {
+        return ptrCmpcode;
+    }
+
+    public void setPtrCmpcode(String ptrCmpcode) {
+        this.ptrCmpcode = ptrCmpcode;
+    }
+
+    public String getPtrBranden() {
+        return ptrBranden;
+    }
+
+    public void setPtrBranden(String ptrBranden) {
+        this.ptrBranden = ptrBranden;
+    }
+
+    public String getPtrCmpUuId() {
+        return ptrCmpUuId;
+    }
+
+    public void setPtrCmpUuId(String ptrCmpUuId) {
+        this.ptrCmpUuId = ptrCmpUuId;
+    }
+
+    public String getPtrBrandUuid() {
+        return ptrBrandUuid;
+    }
+
+    public void setPtrBrandUuid(String ptrBrandUuid) {
+        this.ptrBrandUuid = ptrBrandUuid;
+    }
+
+    public Date getTime() {
+        return time;
+    }
+
+    public void setTime(Date time) {
+        this.time = time;
+    }
+
+    public Short getDetno() {
+        return detno;
+    }
+
+    public void setDetno(Short detno) {
+        this.detno = detno;
+    }
+}