自动化立体仓库 - WMS系统
lsh
2025-05-26 d61d4384e19580a32becb54e8e7f2287bed5469a
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;
@@ -73,7 +70,7 @@
    @ApiModelProperty(value= "产地")
    private String origin;
    @ApiModelProperty(value= "厂家")
    @ApiModelProperty(value= "唯一码")
    private String manu;
    @ApiModelProperty(value= "生产日期")
@@ -108,7 +105,7 @@
    @TableField("supp_code")
    private String suppCode;
    @ApiModelProperty(value= "是否批次 1: 是  0: 否  ")
    @ApiModelProperty(value= "agv任务下发 : 0:待下发 1:下发成功 2:任务完成")
    @TableField("be_batch")
    private Integer beBatch;
@@ -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);
    }
}