AuxProperty.java 3.27 KB
package com.huaheng.api.erp.domain;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.pc.config.material.domain.Material;

public class AuxProperty {
    /**
     * 等级
     */
    @SerializedName("FAUXPROPID__FF100001")
    @Expose
    private ConvertObj level;
    private Boolean isLevel = false;

    /**
     * 色号
     */
    @SerializedName("FAUXPROPID__FF100002")
    @Expose
    private ConvertObj color;
    private Boolean isColor = false;

    /**
     * 包装
     */
    @SerializedName("FAUXPROPID__FF100003")
    @Expose
    private ConvertObj proPackaging;
    private Boolean isProPackaging = false;

    /**
     * 订单
     */
    @SerializedName("FAUXPROPID__FF100007")
    @Expose
    private ConvertObj productSchedule;
    private Boolean isProductSchedule = false;

    /**
     * 产品尺寸
     *
     */
    @SerializedName("FAUXPROPID__FF100008")
    @Expose
    private ConvertObj productSize;
    private Boolean isProductSize = false;

    public AuxProperty() {
    }

    public AuxProperty(Material material) {
        if(material!=null){
            if(StringUtils.isNotNull(material.getIsLevel())){
                if (material.getIsLevel()){
                    this.isLevel=material.getIsLevel();
                }
            }
            if(StringUtils.isNotNull(material.getIsColor())){
                if (material.getIsColor()){
                    this.isColor = material.getIsColor();
                }
            }
            if(StringUtils.isNotNull(material.getIsProPackaging())){
                if (material.getIsProPackaging()){
                    this.isProPackaging=material.getIsProPackaging();
                }
            }
            if(StringUtils.isNotNull(material.getIsProductSchedule())){
                if (material.getIsProductSchedule()){
                    this.isProductSchedule = material.getIsProductSchedule();
                }
            }
            if(StringUtils.isNotNull(material.getIsCustProductSize())){
                if (material.getIsCustProductSize()){
                    this.isProductSize=material.getIsCustProductSize();
                }
            }
        }

    }


    public ConvertObj getLevel() {
        return level;
    }

    public void setLevel(ConvertObj level) {
        if(this.isLevel){
            this.level = level;
        }
    }

    public ConvertObj getColor() {
        return color;
    }

    public void setColor(ConvertObj color) {
        if(isColor){
            this.color = color;
        }
    }

    public ConvertObj getProductSize() {
        return productSize;
    }

    public void setProductSize(ConvertObj productSize) {
        if(isProductSize){
            this.productSize = productSize;
        }
    }

    public ConvertObj getProPackaging() {
        return proPackaging;
    }

    public void setProPackaging(ConvertObj proPackaging) {
        if(isProPackaging){
            this.proPackaging = proPackaging;
        }
    }

    public ConvertObj getProductSchedule() {
        return productSchedule;
    }

    public void setProductSchedule(ConvertObj productSchedule) {
        if(isProductSchedule){
            this.productSchedule = productSchedule;
        }
    }
}