自动化立体仓库 - WMS系统
lty
2025-06-13 9d38f2354b3a7267a2486d937bb7d256fcb949c1
src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -6,16 +6,14 @@
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 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;
@@ -38,16 +36,16 @@
    @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("批号")
    @ApiModelProperty(value= "序列码")
    @ExcelProperty("序列码")
    private String batch;
    @ApiModelProperty(value= "单据编号")
@@ -58,7 +56,7 @@
    @ApiModelProperty(value= "规格")
    private String specs;
    @ApiModelProperty(value= "型号")
    @ApiModelProperty(value= "批次")
    private String model;
    @ApiModelProperty(value= "颜色")
@@ -76,19 +74,19 @@
    @ApiModelProperty(value= "sku")
    private String sku;
    @ApiModelProperty(value= "单位量")
    @ApiModelProperty(value= "包数")
    private Double units;
    @ApiModelProperty(value= "条码")
    private String barcode;
    @ApiModelProperty(value= "产地")
    @ApiModelProperty(value= "物料状态")
    private String origin;
    @ApiModelProperty(value= "厂家")
    private String manu;
    @ApiModelProperty(value= "生产日期")
    @ApiModelProperty(value= "单据时间")
    @TableField("manu_date")
    private String manuDate;
@@ -159,6 +157,21 @@
    @ApiModelProperty(value= "备注")
    private String memo;
    @ApiModelProperty(value= "生产日期")
    @TableField("proddate")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date proddate;
    @ApiModelProperty(value= "到期日期")
    @TableField("deadline")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date deadline;
    @TableField("stock_freeze")
    @ApiModelProperty(value= "库存冻结{1:正常,0:冻结}")
    private Integer stockFreeze;
    public String getLocNo$(){
        LocMastService service = SpringUtils.getBean(LocMastService.class);
@@ -235,7 +248,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);
@@ -243,6 +255,18 @@
            return String.valueOf(user.getUsername());
        }
        return null;
    }
    public String getProddate$(){
        if (Cools.isEmpty(this.proddate)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd").format(this.proddate);
    }
    public String getDeadline$(){
        if (Cools.isEmpty(this.deadline)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd").format(this.deadline);
    }
    public String getAppeTime$(){
@@ -252,23 +276,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 sync(Object source) {
        Synchro.Copy(source, this);
    }
    public String getStockFreeze$() {
        if (Cools.isEmpty(this.stockFreeze)){
            return "";
        }
        return this.stockFreeze == 1 ? "正常" : "冻结";
    }
}