From 8f0d649d83de955cfcbf38ebdbfc90a70c6ac547 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期三, 11 十月 2023 10:24:28 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/bfasrs6' into bfasrs6 --- src/main/java/com/zy/asrs/entity/OrderDetl.java | 73 +++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java index ad19b6d..f79f0b6 100644 --- a/src/main/java/com/zy/asrs/entity/OrderDetl.java +++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java @@ -6,17 +6,17 @@ 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.LocDetlService; +import com.zy.asrs.service.LocOwnerService; +import com.zy.asrs.service.OrderDetlService; import com.zy.asrs.service.OrderService; +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 org.springframework.format.annotation.DateTimeFormat; -import java.beans.BeanInfo; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; @@ -77,9 +77,9 @@ private String maktx; /** - * 鎵瑰彿 + * 搴忓垪鐮� */ - @ApiModelProperty(value= "鎵瑰彿") + @ApiModelProperty(value= "搴忓垪鐮�") private String batch; /** @@ -238,7 +238,7 @@ * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer check; + private Integer inspect; /** * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� @@ -288,9 +288,18 @@ @ApiModelProperty(value= "澶囨敞") private String memo; + /** + * 搴撳瓨姹囨�绘暟閲� + */ + @TableField(exist=false) + private Double sum; + + @ApiModelProperty(value= "瀹㈡埛淇℃伅ID") + private Long owner; + public OrderDetl() {} - public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double length, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer check, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { + public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double length, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { this.orderId = orderId; this.orderNo = orderNo; this.anfme = anfme; @@ -322,7 +331,7 @@ this.deadTime = deadTime; this.deadWarn = deadWarn; this.source = source; - this.check = check; + this.inspect = inspect; this.danger = danger; this.status = status; this.createBy = createBy; @@ -331,6 +340,16 @@ this.updateTime = updateTime; this.memo = memo; } + + 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 getOrderId$(){ OrderService service = SpringUtils.getBean(OrderService.class); @@ -367,15 +386,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); } } @@ -442,24 +461,16 @@ return null; } - 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); } - + public Double getSum(){ + LocDetlService service = SpringUtils.getBean(LocDetlService.class); + if (!Cools.isEmpty(this.getMatnr())) { + return service.selectSumByMatnr(this.getMatnr()); + } else { + return null; + } + } } -- Gitblit v1.9.1