From dd5a31d7eb01fa754a37f5cdcc7f7d2ba7397600 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期二, 31 十二月 2024 09:25:53 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/entity/WrkDetl.java | 43 +++++++++++++++++-------------------------- 1 files changed, 17 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/WrkDetl.java b/src/main/java/com/zy/asrs/entity/WrkDetl.java index bd1f873..dc93a16 100644 --- a/src/main/java/com/zy/asrs/entity/WrkDetl.java +++ b/src/main/java/com/zy/asrs/entity/WrkDetl.java @@ -4,15 +4,12 @@ import com.baomidou.mybatisplus.annotations.TableName; import com.core.common.Cools; import com.core.common.SpringUtils; -import com.core.exception.CoolException; +import com.zy.common.utils.Synchro; import com.zy.system.entity.User; import com.zy.system.service.UserService; 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; @@ -230,7 +227,7 @@ * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer check; + private Integer inspect; /** * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� @@ -272,6 +269,15 @@ @ApiModelProperty(value= "澶囨敞") private String memo; + @ApiModelProperty(value= "棰勭暀1") + private String temp1; + @ApiModelProperty(value= "棰勭暀1") + private String temp2; + @ApiModelProperty(value= "棰勭暀1") + private String temp3; + @ApiModelProperty(value= "棰勭暀1") + private String temp4; + public String getIoTime$(){ if (Cools.isEmpty(this.ioTime)){ return ""; @@ -305,15 +311,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); } } @@ -361,23 +367,8 @@ 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