自动化立体仓库 - WMS系统
skyouc
3 天以前 5a77719594f0a2c9ef17b3a6d5c1e2f4e5d4e092
src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -1,24 +1,29 @@
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.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.BasProcessProceduresService;
import com.zy.asrs.service.BasQualityTestingService;
import com.zy.asrs.service.OrderService;
import com.zy.common.model.DetlDto;
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.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@Data
@TableName("man_order_detl")
@@ -44,6 +49,7 @@
     * 单据编号
     */
    @ApiModelProperty(value= "单据编号")
    @ExcelProperty(index = 0, value = "单号")
    @TableField("order_no")
    private String orderNo;
@@ -52,6 +58,7 @@
     * 数量
     */
    @ApiModelProperty(value= "数量")
    @ExcelProperty(value = "数量")
    private Double anfme;
    /**
@@ -77,30 +84,35 @@
     * 商品编码
     */
    @ApiModelProperty(value= "商品编码")
    @ExcelProperty(value = "商品编码")
    private String matnr;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    @ExcelProperty(value = "商品名称")
    private String maktx;
    /**
     * 批号
     */
    @ApiModelProperty(value= "批号")
    @ExcelProperty(value = "批号")
    private String batch;
    /**
     * 规格
     */
    @ApiModelProperty(value= "规格")
    @ExcelProperty(value = "规格")
    private String specs;
    /**
     * 型号
     */
    @ApiModelProperty(value= "型号")
    @ExcelProperty(value = "型号")
    private String model;
    /**
@@ -113,12 +125,14 @@
     * 品牌
     */
    @ApiModelProperty(value= "品牌")
    @ExcelProperty(value = "品牌")
    private String brand;
    /**
     * 单位
     */
    @ApiModelProperty(value= "单位")
    @ExcelProperty(value = "单位")
    private String unit;
    /**
@@ -143,6 +157,7 @@
     * 条码
     */
    @ApiModelProperty(value= "条码")
    @ExcelProperty(value = "SN码")
    private String barcode;
    /**
@@ -176,6 +191,7 @@
     */
    @ApiModelProperty(value= "安全库存量")
    @TableField("safe_qty")
    @ExcelProperty(value = "归零阀值")
    private Double safeQty;
    /**
@@ -195,6 +211,7 @@
     * 体积
     */
    @ApiModelProperty(value= "体积")
    @ExcelProperty(value = "km/cm")
    private Double volume;
    /**
@@ -607,9 +624,28 @@
        }
    }
    public String getBoxType1$(){
        BasProcessProceduresService service = SpringUtils.getBean(BasProcessProceduresService.class);
        BasProcessProcedures processProcedures = service.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", this.boxType1));
        if (!Cools.isEmpty(processProcedures)){
            return String.valueOf(processProcedures.getBoxSpecs());
        }
        return this.boxType1;
    }
    public String getBoxType2$(){
        BasQualityTestingService service = SpringUtils.getBean(BasQualityTestingService.class);
        BasQualityTesting basQualityTesting = service.selectOne(new EntityWrapper<BasQualityTesting>().eq("box_type", this.boxType1));
        if (!Cools.isEmpty(basQualityTesting)){
            return String.valueOf(basQualityTesting.getBoxSpecs());
        }
        return this.boxType1;
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
        if (!Objects.isNull(source)) {
            BeanUtils.copyProperties(source, this);
        }
    }
}