From 757f103f37d83dfb55bb49b3df0b805cb520d4f7 Mon Sep 17 00:00:00 2001 From: zwl <1051256694@qq.com> Date: 星期六, 11 十月 2025 15:28:26 +0800 Subject: [PATCH] 第三版 --- src/main/java/com/zy/asrs/entity/WaitPakin.java | 62 +++++++++++------------------- 1 files changed, 23 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/WaitPakin.java b/src/main/java/com/zy/asrs/entity/WaitPakin.java index 22fcbdb..72aa8c1 100644 --- a/src/main/java/com/zy/asrs/entity/WaitPakin.java +++ b/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,11 +17,19 @@ private static final long serialVersionUID = 1L; + @ApiModelProperty(value= "RCS浠诲姟") + @TableField("item_num") + private String itemNum; + @ApiModelProperty(value= "鎵樼洏鏉$爜") private String zpallet; @ApiModelProperty(value= "鏁伴噺") private Double anfme; + + @ApiModelProperty(value= "agv浠诲姟涓嬪彂 锛� 0锛氬緟涓嬪彂 1锛氫笅鍙戞垚鍔� 2锛氫换鍔″畬鎴�") + @TableField("be_batch") + private Integer beBatch; @ApiModelProperty(value= "搴撲綅鍙�") @TableField("loc_no") @@ -73,16 +78,12 @@ @ApiModelProperty(value= "浜у湴") private String origin; - @ApiModelProperty(value= "鍘傚") + @ApiModelProperty(value= "鍞竴鐮�") private String manu; @ApiModelProperty(value= "鐢熶骇鏃ユ湡") @TableField("manu_date") private String manuDate; - - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") @TableField("safe_qty") @@ -108,10 +109,6 @@ @TableField("supp_code") private String suppCode; - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - @ApiModelProperty(value= "淇濊川鏈�") @TableField("dead_time") private String deadTime; @@ -124,7 +121,7 @@ private Integer source; @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer check; + private Integer inspect; @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") private Integer danger; @@ -158,10 +155,13 @@ public String getBeBatch$(){ if (null == this.beBatch){ return null; } switch (this.beBatch){ - case 1: - return "鏄�"; case 0: - return "鍚�"; + return "绛夊緟鍛煎彨agv"; + case 1: + return "鍛煎彨agv鍏ュ簱鎼繍鎴愬姛"; + case 2: + return "agv鍏ュ簱鎼繍鎴愬姛"; + default: return String.valueOf(this.beBatch); } @@ -181,15 +181,15 @@ } } - public String getCheck$(){ - if (null == this.check){ return null; } - switch (this.check){ + public String getInspect$(){ + if (null == this.inspect){ return null; } + switch (this.inspect){ case 1: return "鏄�"; case 0: return "鍚�"; default: - return String.valueOf(this.check); + return String.valueOf(this.inspect); } } @@ -219,23 +219,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); } - } -- Gitblit v1.9.1