自动化立体仓库 - WMS系统
LSH
2023-12-07 a05096d54b4b348fa7b91efed10db87018b8ffba
src/main/java/com/zy/asrs/entity/WaitPakin.java
@@ -3,13 +3,10 @@
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.core.common.Cools;
import com.core.exception.CoolException;
import com.zy.common.utils.Synchro;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -36,6 +33,9 @@
    @ApiModelProperty(value= "商品名称")
    private String maktx;
    /*
     * 徐工汉云上饶江铜:木箱编码
     * */
    @ApiModelProperty(value= "批号")
    private String batch;
@@ -46,12 +46,18 @@
    @ApiModelProperty(value= "规格")
    private String specs;
    /*
     * 徐工汉云上饶江铜:批次
     * */
    @ApiModelProperty(value= "型号")
    private String model;
    @ApiModelProperty(value= "颜色")
    private String color;
    /*
     * 徐工汉云上饶江铜:木箱类型
     * */
    @ApiModelProperty(value= "品牌")
    private String brand;
@@ -70,6 +76,9 @@
    @ApiModelProperty(value= "条码")
    private String barcode;
    /*
     * 徐工汉云上饶江铜:木箱位置
     * */
    @ApiModelProperty(value= "产地")
    private String origin;
@@ -155,6 +164,13 @@
    @ApiModelProperty(value= "备注")
    private String memo;
    /**
     * 卷信息ID
     */
    @ApiModelProperty(value= "卷信息ID")
    @TableField("roll_up")
    private Long rollUp;
    public String getBeBatch$(){
        if (null == this.beBatch){ return null; }
        switch (this.beBatch){
@@ -219,23 +235,7 @@
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
    }
    public void sync(Object dest) {
        try {
            BeanInfo sourceBean = Introspector.getBeanInfo(this.getClass(),Object.class);
            PropertyDescriptor[] sourceProperty = sourceBean.getPropertyDescriptors();
            BeanInfo destBean = Introspector.getBeanInfo(dest.getClass(),Object.class);
            PropertyDescriptor[] destProperty = destBean.getPropertyDescriptors();
            for (PropertyDescriptor propertyDescriptor : sourceProperty) {
                for (PropertyDescriptor descriptor : destProperty) {
                    if (propertyDescriptor.getName().equals(descriptor.getName()) && propertyDescriptor.getPropertyType() == descriptor.getPropertyType()) {
                        descriptor.getWriteMethod().invoke(dest, propertyDescriptor.getReadMethod().invoke(this));
                        break;
                    }
                }
            }
        } catch (Exception e) {
            throw new CoolException("属性复制失败:" + e.getMessage());
        }
    public void sync(Object source) {
        Synchro.Copy(source, this);
    }
}