From c560649e37ab5a5bc29c47a3fa7309dc912b48cb Mon Sep 17 00:00:00 2001 From: 李天宇 <876263681@qq.com> Date: 星期五, 25 十月 2024 09:33:08 +0800 Subject: [PATCH] #update 修复wms库存明细统计bug,实现客户导出需求 --- src/main/java/com/zy/asrs/entity/LocDetl.java | 46 +++++++++++++++++----------------------------- 1 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/LocDetl.java b/src/main/java/com/zy/asrs/entity/LocDetl.java index 33fa2c6..b330cb9 100644 --- a/src/main/java/com/zy/asrs/entity/LocDetl.java +++ b/src/main/java/com/zy/asrs/entity/LocDetl.java @@ -6,16 +6,13 @@ import com.baomidou.mybatisplus.annotations.TableName; import com.core.common.Cools; import com.core.common.SpringUtils; -import com.core.exception.CoolException; import com.zy.asrs.service.LocMastService; +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; @@ -38,20 +35,20 @@ @ExcelProperty("鏁伴噺") private Double anfme; - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - @ExcelProperty("鍟嗗搧缂栧彿") + @ApiModelProperty(value= "鍝佸彿") + @ExcelProperty("鍝佸彿") private String matnr; - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - @ExcelProperty("鍟嗗搧鍚嶇О") + @ApiModelProperty(value= "鍝佸悕") + @ExcelProperty("鍝佸悕") private String maktx; @ApiModelProperty(value= "鎵瑰彿") - @ExcelProperty("鎵瑰彿") +// @ExcelProperty("鎵瑰彿") private String batch; @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @ExcelProperty("鍗曟嵁缂栧彿") +// @ExcelProperty("鍗曟嵁缂栧彿") @TableField("order_no") private String orderNo; @@ -64,10 +61,12 @@ @ApiModelProperty(value= "棰滆壊") private String color; - @ApiModelProperty(value= "鍝佺墝") + @ApiModelProperty(value= "绫诲瀷") + @ExcelProperty("绫诲瀷") private String brand; @ApiModelProperty(value= "鍗曚綅") + @ExcelProperty("鍗曚綅") private String unit; @ApiModelProperty(value= "鍗曚环") @@ -114,6 +113,7 @@ private String threeCode; @ApiModelProperty(value= "渚涘簲鍟�") + @ExcelProperty("渚涘簲鍟�") private String supp; @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") @@ -159,6 +159,10 @@ @ApiModelProperty(value= "澶囨敞") private String memo; + + @ApiModelProperty(value= "bom鍙�") + @TableField("bom_code") + private String bomCode; public String getLocNo$(){ LocMastService service = SpringUtils.getBean(LocMastService.class); @@ -235,7 +239,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 +255,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