| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | 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.LocOwnerService; |
| | | 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; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | @TableField("order_no") |
| | | @ExcelProperty({"单据", "单据编号"}) |
| | | private String orderNo; |
| | | |
| | | |
| | |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | @ExcelProperty({"单据", "数量"}) |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 作业数量 |
| | | * |
| | | * 1. 入库 : qty 👆 |
| | | * 1. 出库 : qty 👆 |
| | | * 入库 : 组托完成,组托档、工作档、入库完成数量 |
| | | * 出库 : 工作档、出库完成数量 |
| | | */ |
| | | @ApiModelProperty(value= "作业数量") |
| | | @TableField("work_qty") |
| | | @ExcelProperty({"单据", "作业数量"}) |
| | | private Double workQty; |
| | | |
| | | /** |
| | | * 完成数量 |
| | | * |
| | | * 入库 : qty 👆 |
| | | * 出库 : qty 👆 |
| | | */ |
| | | @ApiModelProperty(value= "完成数量") |
| | | @ExcelProperty({"单据", "完成数量"}) |
| | | private Double qty; |
| | | |
| | | /** |
| | | * 商品编码 |
| | | */ |
| | | @ApiModelProperty(value= "商品编码") |
| | | @ExcelProperty({"单据", "商品编码"}) |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @ApiModelProperty(value= "商品名称") |
| | | @ExcelProperty({"单据", "商品名称"}) |
| | | private String maktx; |
| | | |
| | | /** |
| | |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | @ExcelProperty({"单据", "规格"}) |
| | | private String specs; |
| | | |
| | | /** |
| | |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | @ExcelProperty({"单据", "重量"}) |
| | | private Double weight; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 拥有者 |
| | | */ |
| | | @ApiModelProperty(value= "拥有者 1: 杰克 ") |
| | | @ExcelProperty({"单据", "货主ID"}) |
| | | private Integer owner; |
| | | |
| | | /** |
| | | * 货物形态:0:代采、1:仓储 |
| | | */ |
| | | @ApiModelProperty(value= "货物形态:0:代采、1:仓储") |
| | | @ExcelProperty({"单据", "货物形态ID"}) |
| | | private Integer payment; |
| | | |
| | | /** |
| | | * uuid时间戳 |
| | | */ |
| | | @ApiModelProperty(value= "uuid") |
| | | @TableId(value = "uuid", type = IdType.ID_WORKER_STR) |
| | | @TableField("uuid") |
| | | private String uuid; |
| | | |
| | | //最大熔指 |
| | | private double fingerMeltingMin; |
| | | //最小熔指 |
| | | private double fingerMeltingMax; |
| | | //最大熔点 |
| | | private double fusingPointMin; |
| | | //最小熔点 |
| | | private double fusingPointMax; |
| | | //最大黄度 |
| | | private double yellownessMin; |
| | | //最大黄度 |
| | | private double yellownessMax; |
| | | //最小不透明度 |
| | | private double opacityMin; |
| | | //最大不透明度 |
| | | private double opacityMax; |
| | | |
| | | 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 "代采"; |
| | | default: |
| | | return String.valueOf(this.payment); |
| | | } |
| | | } |
| | | |
| | | 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 inspect, 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,int owner ,int payment,String uuid) { |
| | | this.orderId = orderId; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.owner = owner; |
| | | this.payment = payment; |
| | | this.uuid = uuid; |
| | | } |
| | | |
| | | public String getOrderId$(){ |
| | |
| | | } |
| | | |
| | | public Double getEnableQty() { |
| | | if (null != this.anfme && this.qty != null) { |
| | | return this.anfme - this.qty; |
| | | Double enableQty = null; |
| | | if (null != this.anfme && this.workQty != null) { |
| | | enableQty = this.anfme - this.workQty; |
| | | if (enableQty <0){ |
| | | enableQty = 0.0D; |
| | | } |
| | | |
| | | } |
| | | return null; |
| | | return enableQty; |
| | | } |
| | | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |