自动化立体仓库 - WMS系统
ZY
2024-12-18 184a0722e53f64f40ddb2c88f11f26941f565a8c
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;
@@ -20,7 +17,7 @@
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value= "托盘条码")
    @ApiModelProperty(value= "货架条码")
    private String zpallet;
    @ApiModelProperty(value= "数量")
@@ -30,13 +27,13 @@
    @TableField("loc_no")
    private String locNo;
    @ApiModelProperty(value= "商品编号")
    @ApiModelProperty(value= "物料号")
    private String matnr;
    @ApiModelProperty(value= "商品名称")
    @ApiModelProperty(value= "物料号")
    private String maktx;
    @ApiModelProperty(value= "批号")
    @ApiModelProperty(value= "序列码")
    private String batch;
    @ApiModelProperty(value= "单据编号")
@@ -46,7 +43,7 @@
    @ApiModelProperty(value= "规格")
    private String specs;
    @ApiModelProperty(value= "型号")
    @ApiModelProperty(value= "批次")
    private String model;
    @ApiModelProperty(value= "颜色")
@@ -64,19 +61,19 @@
    @ApiModelProperty(value= "sku")
    private String sku;
    @ApiModelProperty(value= "单位量")
    @ApiModelProperty(value= "包数")
    private Double units;
    @ApiModelProperty(value= "条码")
    private String barcode;
    @ApiModelProperty(value= "产地")
    @ApiModelProperty(value= "物料状态")
    private String origin;
    @ApiModelProperty(value= "厂家")
    private String manu;
    @ApiModelProperty(value= "生产日期")
    @ApiModelProperty(value= "单据时间")
    @TableField("manu_date")
    private String manuDate;
@@ -219,23 +216,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);
    }
}