From fffcf8f632eb551f11d018184547ce01dcc4907f Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期一, 23 十二月 2024 08:13:58 +0800
Subject: [PATCH] 完善erp上报流程

---
 src/main/java/com/zy/asrs/entity/LocDetl.java |   83 ++++++++++++++++++++++++++++-------------
 1 files changed, 56 insertions(+), 27 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/LocDetl.java b/src/main/java/com/zy/asrs/entity/LocDetl.java
index 50f5573..40cfd0a 100644
--- a/src/main/java/com/zy/asrs/entity/LocDetl.java
+++ b/src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -3,19 +3,19 @@
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
-import com.core.exception.CoolException;
 import com.zy.asrs.service.LocMastService;
+import com.zy.asrs.service.LocOwnerService;
+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;
@@ -136,7 +136,7 @@
     private Integer source;
 
     @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
-    private Integer check;
+    private Integer inspect;
 
     @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
     private Integer danger;
@@ -160,13 +160,51 @@
     @ApiModelProperty(value= "澶囨敞")
     private String memo;
 
+    /**
+     * 鎷ユ湁鑰�
+     */
+    @ApiModelProperty(value= "鎷ユ湁鑰� 1: 鏉板厠   ")
+    private Integer owner;
+
+    /**
+     * 璐х墿褰㈡��:0锛氫唬閲囥��1锛氫粨鍌�
+     */
+    @ApiModelProperty(value= "璐х墿褰㈡��:0锛氫唬閲囥��1锛氫粨鍌�")
+    private Integer payment;
+
+    /**
+     * uuid鏃堕棿鎴�
+     */
+
+
+    public String getOwner$(){
+        LocOwnerService service = SpringUtils.getBean(LocOwnerService.class);
+        LocOwner locOwner = service.selectById(this.owner);
+        if (!Cools.isEmpty(locOwner)){
+            return String.valueOf(locOwner.getOwner());
+        }
+        return null;
+    }
+
+    public String getPayment$(){
+        if (null == this.payment){ return null; }
+        switch (this.payment){
+            case 1:
+                return "浠撳偍";
+            case 0:
+                return "浠i噰";
+            default:
+                return String.valueOf(this.payment);
+        }
+    }
+
     public String getLocNo$(){
         LocMastService service = SpringUtils.getBean(LocMastService.class);
         LocMast locMast = service.selectById(this.locNo);
         if (!Cools.isEmpty(locMast)){
             return String.valueOf(locMast.getLocNo());
         }
-        return null;
+        return this.locNo;
     }
 
     public String getBeBatch$(){
@@ -195,15 +233,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);
         }
     }
 
@@ -235,7 +273,6 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
     }
 
-
     public String getAppeUser$(){
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.selectById(this.appeUser);
@@ -252,23 +289,15 @@
         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 setOwner(Integer owner) {
+        if (Cools.isEmpty(owner) || owner == 0){
+            this.owner = 32;
         }
+        this.owner = owner;
+    }
+
+    public void sync(Object source) {
+        Synchro.Copy(source, this);
     }
 
 }

--
Gitblit v1.9.1