|
|
@@ -1,751 +0,0 @@
|
|
|
-package com.uas.platform.b2c.prod.commodity.model;
|
|
|
-
|
|
|
-import com.uas.platform.b2c.core.utils.FastjsonUtils;
|
|
|
-import com.uas.platform.b2c.core.utils.NumberUtil;
|
|
|
-import com.uas.platform.core.model.Type;
|
|
|
-import org.apache.commons.collections.CollectionUtils;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
-
|
|
|
-import javax.persistence.Column;
|
|
|
-import javax.persistence.Entity;
|
|
|
-import javax.persistence.GeneratedValue;
|
|
|
-import javax.persistence.Id;
|
|
|
-import javax.persistence.Table;
|
|
|
-import javax.persistence.Transient;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-/**
|
|
|
- * Created by yujia on 2017/7/12.
|
|
|
- * 标准库上架信息model
|
|
|
- */
|
|
|
-@Entity
|
|
|
-@Table(name = "trade$prodstanputon")
|
|
|
-public class ProductStandardPutOnInfo {
|
|
|
-
|
|
|
-
|
|
|
- @GeneratedValue
|
|
|
- @Id
|
|
|
- @Column(name ="id")
|
|
|
- private Long id;
|
|
|
-
|
|
|
- /**
|
|
|
- * 产品型号
|
|
|
- */
|
|
|
- @Column(name = "pro_code")
|
|
|
- private String cmpCode;
|
|
|
-
|
|
|
- /**
|
|
|
- * 器件的uuid
|
|
|
- */
|
|
|
- @Column(name = "pro_codeuuid")
|
|
|
- private String codeUuid;
|
|
|
-
|
|
|
- /**
|
|
|
- * 英文品牌名
|
|
|
- */
|
|
|
- @Column(name = "pro_branden")
|
|
|
- private String brandEn;
|
|
|
-
|
|
|
- /**
|
|
|
- * 中文品牌名
|
|
|
- */
|
|
|
- @Column(name = "pro_brandcn")
|
|
|
- private String brandCn;
|
|
|
-
|
|
|
- /**
|
|
|
- * 品牌 id
|
|
|
- */
|
|
|
- @Column(name = "pro_brandid")
|
|
|
- private Long brandid;
|
|
|
-
|
|
|
- /**
|
|
|
- * 品牌 uuid
|
|
|
- */
|
|
|
- @Column(name = "pro_branduuid")
|
|
|
- private String branduuid;
|
|
|
- /**
|
|
|
- * 类目名称
|
|
|
- */
|
|
|
- @Column(name = "pro_kindcn")
|
|
|
- private String kindCn;
|
|
|
-
|
|
|
- /**
|
|
|
- * 英文名
|
|
|
- */
|
|
|
- @Column(name = "pro_kinden")
|
|
|
- private String kindEn;
|
|
|
-
|
|
|
- /**
|
|
|
- * 类目id
|
|
|
- */
|
|
|
- @Column(name = "pro_kindid")
|
|
|
- private Long kindid;
|
|
|
-
|
|
|
- /**
|
|
|
- * 封装规格
|
|
|
- */
|
|
|
- @Column(name = "pro_encapsulation")
|
|
|
- private String encapsulation;
|
|
|
-
|
|
|
- /**
|
|
|
- * 标准单位
|
|
|
- */
|
|
|
- @Column(name = "pro_unit")
|
|
|
- private String unit;
|
|
|
-
|
|
|
- /**
|
|
|
- * 包装:托盘、管装、卷带
|
|
|
- */
|
|
|
- @Column(name = "pro_packaging")
|
|
|
- private String packaging;
|
|
|
-
|
|
|
- /**
|
|
|
- * 包装数量
|
|
|
- */
|
|
|
- @Column(name = "pro_minpackqty")
|
|
|
- private Double minPackQty;
|
|
|
-
|
|
|
- /**
|
|
|
- * true 自营
|
|
|
- * 是否自营
|
|
|
- */
|
|
|
- @Column(name = "pro_selfSale", columnDefinition = "TINYINT(1)")
|
|
|
- private Boolean selfSale;
|
|
|
-
|
|
|
- /**
|
|
|
- * 生产日期
|
|
|
- */
|
|
|
- @Column(name = "pro_producedate")
|
|
|
- private String produceDate;
|
|
|
-
|
|
|
- /**
|
|
|
- * 最大交期
|
|
|
- */
|
|
|
- @Column(name = "pro_maxdelivery")
|
|
|
- private Short maxDelivery;
|
|
|
-
|
|
|
- /**
|
|
|
- * 最小交期
|
|
|
- */
|
|
|
- @Column(name = "pro_mindelivery")
|
|
|
- private Short minDelivery;
|
|
|
-
|
|
|
- /**
|
|
|
- * 起订量
|
|
|
- */
|
|
|
- @Column(name = "pro_minbuyqty")
|
|
|
- private Double minBuyQty;
|
|
|
-
|
|
|
- /**
|
|
|
- * 分段报价(List)
|
|
|
- */
|
|
|
- @Transient
|
|
|
- private List<GoodsQtyPrice> qtyPrices;
|
|
|
-
|
|
|
- /**
|
|
|
- * 分段报价(JSON串) eg:[{"start":0,"end":1000,"price":2.3,"taxPrice":2.5},...]
|
|
|
- */
|
|
|
- @Column(name = "go_qtyprice", length = 4000)
|
|
|
- private String qtyPrice;
|
|
|
-
|
|
|
- /**
|
|
|
- * 在售数量
|
|
|
- */
|
|
|
- @Column(name = "pro_onsale")
|
|
|
- private Double onSaleQty;
|
|
|
-
|
|
|
- /**
|
|
|
- * 锁库数
|
|
|
- */
|
|
|
- @Column(name = "pro_lockqty")
|
|
|
- private Double lockQty;
|
|
|
-
|
|
|
- /**
|
|
|
- * 可上架数量
|
|
|
- */
|
|
|
- @Column(name = "pro_availableonsale")
|
|
|
- private Double availableOnSale;
|
|
|
-
|
|
|
- /**
|
|
|
- * 仓库数量
|
|
|
- */
|
|
|
- @Column(name = "pro_repositoryqty")
|
|
|
- private Double repositoryQty;
|
|
|
-
|
|
|
- /**
|
|
|
- * 在售状态
|
|
|
- */
|
|
|
- @Column(name = "pro_onsalestatus")
|
|
|
- private Integer onSaleStatus;
|
|
|
-
|
|
|
- /**
|
|
|
- * 可上架数量是否变化
|
|
|
- */
|
|
|
- @Column(name = "pro_availableonsalestatus", columnDefinition = "TINYINT(1)")
|
|
|
- private Boolean availableOnSaleStatus;
|
|
|
-
|
|
|
- /**
|
|
|
- * 币别
|
|
|
- */
|
|
|
- @Column(name = "pro_currency")
|
|
|
- private String currency;
|
|
|
-
|
|
|
- /**
|
|
|
- * 产品库的id
|
|
|
- */
|
|
|
- @Column(name = "pro_productid")
|
|
|
- private Long productid;
|
|
|
-
|
|
|
- /**
|
|
|
- * 卖家的企业uu
|
|
|
- */
|
|
|
- @Column(name = "pro_enuu")
|
|
|
- private Long enuu;
|
|
|
-
|
|
|
- /**
|
|
|
- * 批次的信息
|
|
|
- */
|
|
|
- @Column(name = "pro_batch")
|
|
|
- private String goBatch;
|
|
|
-
|
|
|
- /**
|
|
|
- * 类型(1669 待入库, 1670 未上架, 601 在售(602 失效状态暂时也归这一类), 612 已下架)
|
|
|
- */
|
|
|
- @Column(name = "pro_status")
|
|
|
- private Integer status;
|
|
|
-
|
|
|
- /**
|
|
|
- * 图片的信息
|
|
|
- */
|
|
|
- @Column(name = "pro_img")
|
|
|
- private String img;
|
|
|
-
|
|
|
- /**
|
|
|
- * 创建日期
|
|
|
- */
|
|
|
- @Column(name = "pro_createtime")
|
|
|
- private Date createTime;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private Double editMinBuyQty;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private Short editMinDelivery;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private Short editMaxDelivery;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private List<GoodsQtyPrice> editQtyPrices;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private Boolean editIsSelfSale;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private Double editLockQty;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private String editImg;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private String storeuuid;
|
|
|
-
|
|
|
- @Transient
|
|
|
- private String storeName;
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo() {
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo(String cmpCode, String codeUuid, String brandEn, String brandCn, Long brandid, String branduuid, String kindCn, String kindEn, Long kindid, String encapsulation, String unit) {
|
|
|
- this.cmpCode = cmpCode;
|
|
|
- this.codeUuid = codeUuid;
|
|
|
- this.brandEn = brandEn;
|
|
|
- this.brandCn = brandCn;
|
|
|
- this.brandid = brandid;
|
|
|
- this.branduuid = branduuid;
|
|
|
- this.kindCn = kindCn;
|
|
|
- this.kindEn = kindEn;
|
|
|
- this.kindid = kindid;
|
|
|
- this.encapsulation = encapsulation;
|
|
|
- this.unit = unit;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo(Product product) {
|
|
|
- this.cmpCode = product.getCmpCode();
|
|
|
- this.codeUuid = product.getCmpUuId();
|
|
|
- this.brandEn = product.getPbranden();
|
|
|
- this.brandCn = product.getPbrand();
|
|
|
- this.branduuid = product.getPbranduuid();
|
|
|
- this.kindCn = product.getKind();
|
|
|
- this.kindEn = product.getKinden();
|
|
|
- this.kindid = product.getKindid();
|
|
|
- this.encapsulation = product.getEncapsulation();
|
|
|
- this.unit = product.getUnit();
|
|
|
- this.productid = product.getId();
|
|
|
- this.enuu = product.getEnUU();
|
|
|
- this.minPackQty = product.getMinPackQty();
|
|
|
- this.packaging = product.getPackaging();
|
|
|
- this.produceDate = product.getProduceDate();
|
|
|
- this.createTime = new Date();
|
|
|
- }
|
|
|
-
|
|
|
- public Long getId() {
|
|
|
- return id;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setId(Long id) {
|
|
|
- this.id = id;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCmpCode() {
|
|
|
- return cmpCode;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setCmpCode(String cmpCode) {
|
|
|
- this.cmpCode = cmpCode;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCodeUuid() {
|
|
|
- return codeUuid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setCodeUuid(String codeUuid) {
|
|
|
- this.codeUuid = codeUuid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Integer getStatus() {
|
|
|
- return status;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setStatus(Integer status) {
|
|
|
- this.status = status;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getBrandEn() {
|
|
|
- return brandEn;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setBrandEn(String brandEn) {
|
|
|
- this.brandEn = brandEn;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getBrandCn() {
|
|
|
- return brandCn;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setBrandCn(String brandCn) {
|
|
|
- this.brandCn = brandCn;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getBrandid() {
|
|
|
- return brandid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setBrandid(Long brandid) {
|
|
|
- this.brandid = brandid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getBranduuid() {
|
|
|
- return branduuid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setBranduuid(String branduuid) {
|
|
|
- this.branduuid = branduuid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getKindCn() {
|
|
|
- return kindCn;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setKindCn(String kindCn) {
|
|
|
- this.kindCn = kindCn;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getKindEn() {
|
|
|
- return kindEn;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setKindEn(String kindEn) {
|
|
|
- this.kindEn = kindEn;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getKindid() {
|
|
|
- return kindid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setKindid(Long kindid) {
|
|
|
- this.kindid = kindid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getEncapsulation() {
|
|
|
- return encapsulation;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEncapsulation(String encapsulation) {
|
|
|
- this.encapsulation = encapsulation;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getUnit() {
|
|
|
- return unit;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setUnit(String unit) {
|
|
|
- this.unit = unit;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getPackaging() {
|
|
|
- return packaging;
|
|
|
- }
|
|
|
-
|
|
|
- public void setPackaging(String packaging) {
|
|
|
- this.packaging = packaging;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getMinPackQty() {
|
|
|
- return minPackQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setMinPackQty(Double minPackQty) {
|
|
|
- this.minPackQty = minPackQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Boolean getSelfSale() {
|
|
|
- return selfSale;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setSelfSale(Boolean selfSale) {
|
|
|
- this.selfSale = selfSale;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getProduceDate() {
|
|
|
- return produceDate;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setProduceDate(String produceDate) {
|
|
|
- this.produceDate = produceDate;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Short getMaxDelivery() {
|
|
|
- return maxDelivery;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setMaxDelivery(Short maxDelivery) {
|
|
|
- this.maxDelivery = maxDelivery;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Short getMinDelivery() {
|
|
|
- return minDelivery;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setMinDelivery(Short minDelivery) {
|
|
|
- this.minDelivery = minDelivery;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getMinBuyQty() {
|
|
|
- return minBuyQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setMinBuyQty(Double minBuyQty) {
|
|
|
- this.minBuyQty = minBuyQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public List<GoodsQtyPrice> getQtyPrices() {
|
|
|
- if(!StringUtils.isEmpty(qtyPrice) && CollectionUtils.isEmpty(qtyPrices)) {
|
|
|
- qtyPrices = FastjsonUtils.fromJsonArray(qtyPrice, GoodsQtyPrice.class);
|
|
|
- }
|
|
|
- return qtyPrices;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setQtyPrices(List<GoodsQtyPrice> qtyPrices) {
|
|
|
- this.qtyPrices = qtyPrices;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getQtyPrice() {
|
|
|
- return qtyPrice;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setQtyPrice(String qtyPrice) {
|
|
|
- this.qtyPrice = qtyPrice;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getOnSaleQty() {
|
|
|
- return onSaleQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setOnSaleQty(Double onSaleQty) {
|
|
|
- this.onSaleQty = onSaleQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getLockQty() {
|
|
|
- return lockQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setLockQty(Double lockQty) {
|
|
|
- this.lockQty = lockQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getAvailableOnSale() {
|
|
|
- return availableOnSale;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setAvailableOnSale(Double availableOnSale) {
|
|
|
- this.availableOnSale = availableOnSale;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getRepositoryQty() {
|
|
|
- return repositoryQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setRepositoryQty(Double repositoryQty) {
|
|
|
- this.repositoryQty = repositoryQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Integer getOnSaleStatus() {
|
|
|
- return onSaleStatus;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setOnSaleStatus(Integer onSaleStatus) {
|
|
|
- this.onSaleStatus = onSaleStatus;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Boolean getAvailableOnSaleStatus() {
|
|
|
- return availableOnSaleStatus;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setAvailableOnSaleStatus(Boolean availableOnSaleStatus) {
|
|
|
- this.availableOnSaleStatus = availableOnSaleStatus;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCurrency() {
|
|
|
- return currency;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setCurrency(String currency) {
|
|
|
- this.currency = currency;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getProductid() {
|
|
|
- return productid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setProductid(Long productid) {
|
|
|
- this.productid = productid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Long getEnuu() {
|
|
|
- return enuu;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEnuu(Long enuu) {
|
|
|
- this.enuu = enuu;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getGoBatch() {
|
|
|
- return goBatch;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setGoBatch(String goBatch) {
|
|
|
- this.goBatch = goBatch;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getEditMinBuyQty() {
|
|
|
- return editMinBuyQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditMinBuyQty(Double editMinBuyQty) {
|
|
|
- this.editMinBuyQty = editMinBuyQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Short getEditMinDelivery() {
|
|
|
- return editMinDelivery;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditMinDelivery(Short editMinDelivery) {
|
|
|
- this.editMinDelivery = editMinDelivery;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Short getEditMaxDelivery() {
|
|
|
- return editMaxDelivery;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditMaxDelivery(Short editMaxDelivery) {
|
|
|
- this.editMaxDelivery = editMaxDelivery;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public List<GoodsQtyPrice> getEditQtyPrices() {
|
|
|
- return editQtyPrices;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditQtyPrices(List<GoodsQtyPrice> editQtyPrices) {
|
|
|
- this.editQtyPrices = editQtyPrices;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Boolean getEditIsSelfSale() {
|
|
|
- return editIsSelfSale;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditIsSelfSale(Boolean editIsSelfSale) {
|
|
|
- this.editIsSelfSale = editIsSelfSale;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Double getEditLockQty() {
|
|
|
- return editLockQty;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditLockQty(Double editLockQty) {
|
|
|
- this.editLockQty = editLockQty;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getImg() {
|
|
|
- return img;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setImg(String img) {
|
|
|
- this.img = img;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getEditImg() {
|
|
|
- return editImg;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setEditImg(String editImg) {
|
|
|
- this.editImg = editImg;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public String getStoreName() {
|
|
|
- return storeName;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setStoreName(String storeName) {
|
|
|
- this.storeName = storeName;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public Date getCreateTime() {
|
|
|
- return createTime;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setCreateTime(Date createTime) {
|
|
|
- this.createTime = createTime;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 验证数据是否已经被修改
|
|
|
- * @param data 需要比较的数据
|
|
|
- * @return false 不一致, true 一致
|
|
|
- */
|
|
|
- public Boolean validProductStandardPutOnInfoDataIsUpdate (ProductStandardPutOnInfo data) {
|
|
|
- if(!NumberUtil.objectCompare(this.selfSale, data.getSelfSale()) ||
|
|
|
- !NumberUtil.objectCompare(this.maxDelivery, data.getMaxDelivery()) ||
|
|
|
- !NumberUtil.objectCompare(this.minDelivery, data.getMinDelivery()) ||
|
|
|
- !NumberUtil.objectCompare(this.minBuyQty, data.getMinBuyQty()) ||
|
|
|
- !NumberUtil.objectCompare(this.qtyPrice, data.getQtyPrice()) ||
|
|
|
- NumberUtil.compare(this.lockQty, data.getLockQty()) != 0 ||
|
|
|
- NumberUtil.compare(this.onSaleQty, data.getOnSaleQty()) != 0 ||
|
|
|
- NumberUtil.compare(this.availableOnSale, data.getAvailableOnSale()) != 0 ||
|
|
|
- NumberUtil.compare(this.repositoryQty, data.getRepositoryQty()) != 0 ||
|
|
|
- !NumberUtil.objectCompare(this.img, data.getImg())) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- public String getStoreuuid() {
|
|
|
- return storeuuid;
|
|
|
- }
|
|
|
-
|
|
|
- public ProductStandardPutOnInfo setStoreuuid(String storeuuid) {
|
|
|
- this.storeuuid = storeuuid;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- public void convertToGoods(Goods goods) {
|
|
|
- goods.setImg(this.img);
|
|
|
- goods.setKindUuid(this.kindid);
|
|
|
- goods.setKindNameCn(this.kindCn);
|
|
|
- goods.setCode(this.cmpCode);
|
|
|
- goods.setUuid(this.codeUuid);
|
|
|
- goods.setBrandid(this.brandid);
|
|
|
- goods.setBrandNameEn(this.brandEn);
|
|
|
- goods.setBrandNameCn(this.brandCn);
|
|
|
- goods.setEncapsulation(this.encapsulation);
|
|
|
- goods.setPackaging(this.packaging);
|
|
|
- goods.setStoreid(this.storeuuid);
|
|
|
- goods.setMaxDelivery(this.maxDelivery);
|
|
|
- goods.setMinDelivery(this.minDelivery);
|
|
|
- goods.setMinBuyQty(this.minBuyQty);
|
|
|
- goods.setMinPackQty(this.getMinPackQty());
|
|
|
- goods.setQtyPrice(this.qtyPrice);
|
|
|
- goods.setReserve(this.getOnSaleQty());
|
|
|
- goods.setEnUU(this.getEnuu());
|
|
|
- goods.setCreatedDate(new Date());
|
|
|
- goods.setCurrencyName(this.currency);
|
|
|
- goods.setOriginal(Type.Goods_Original_Code.value());
|
|
|
- goods.setProduceDate(this.produceDate);
|
|
|
- goods.setProductid(this.productid);
|
|
|
- goods.setStandprodid(this.id);
|
|
|
- }
|
|
|
-
|
|
|
- public Double getFragmentStart(int i) {
|
|
|
- List<GoodsQtyPrice> qtyPrices = getQtyPrices();
|
|
|
- if(CollectionUtils.isNotEmpty(qtyPrices) && (i < qtyPrices.size())) {
|
|
|
- return this.qtyPrices.get(i).getStart();
|
|
|
- }else {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public Double getFragmentPrice(int i) {
|
|
|
- List<GoodsQtyPrice> qtyPrices = getQtyPrices();
|
|
|
- if(CollectionUtils.isNotEmpty(qtyPrices) && (i < qtyPrices.size())) {
|
|
|
- if("RMB".equals(currency)) {
|
|
|
- return qtyPrices.get(i).getRMBPrice();
|
|
|
- }else {
|
|
|
- return qtyPrices.get(i).getUSDPrice();
|
|
|
- }
|
|
|
- }else {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|