自动化立体仓库 - WMS系统
skyouc
2 天以前 af8a669a028838d4896eb4167a6895551938dd29
src/main/java/com/zy/asrs/entity/Mat.java
@@ -7,7 +7,9 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.TagService;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zy.api.enums.MatLocType;
import com.zy.asrs.enums.ContainerType;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
@@ -54,6 +56,7 @@
     */
    @ApiModelProperty(value= "所属归类")
    @TableField("tag_id")
//    @ExcelProperty(value = "商品类型")
    private Long tagId;
    /**
@@ -75,35 +78,35 @@
     * 别名
     */
    @ApiModelProperty(value= "别名")
    @ExcelProperty(value = "别名")
//    @ExcelProperty(value = "别名")
    private String name;
    /**
     * 规格
     */
    @ApiModelProperty(value= "规格")
    @ExcelProperty(value = "规格")
    @ExcelProperty(value = "尺寸")
    private String specs;
    /**
     * 型号
     */
    @ApiModelProperty(value= "型号")
    @ExcelProperty(value = "型号")
//    @ExcelProperty(value = "型号")
    private String model;
    /**
     * 颜色
     */
    @ApiModelProperty(value= "颜色")
    @ExcelProperty(value = "颜色")
//    @ExcelProperty(value = "颜色")
    private String color;
    /**
     * 品牌
     */
    @ApiModelProperty(value= "品牌")
    @ExcelProperty(value = "品牌")
//    @ExcelProperty(value = "品牌")
    private String brand;
    /**
@@ -117,42 +120,42 @@
     * 单价
     */
    @ApiModelProperty(value= "单价")
    @ExcelProperty(value = "单价")
//    @ExcelProperty(value = "单价")
    private Double price;
    /**
     * sku
     */
    @ApiModelProperty(value= "sku")
    @ExcelProperty(value = "sku")
//    @ExcelProperty(value = "sku")
    private String sku;
    /**
     * 单位量
     */
    @ApiModelProperty(value= "单位量")
    @ExcelProperty(value = "单位量")
//    @ExcelProperty(value = "单位量")
    private Double units;
    /**
     * 条码
     */
    @ApiModelProperty(value= "条码")
    @ExcelProperty(value = "条码")
//    @ExcelProperty(value = "条码")
    private String barcode;
    /**
     * 产地
     */
    @ApiModelProperty(value= "产地")
    @ExcelProperty(value = "产地")
//    @ExcelProperty(value = "产地")
    private String origin;
    /**
     * 厂家
     */
    @ApiModelProperty(value= "厂家")
    @ExcelProperty(value = "厂家")
    @ExcelProperty(value = "公司")
    private String manu;
    /**
@@ -164,10 +167,10 @@
    private String manuDate;
    /**
     * 品项数
     * 品项数/最大组托数量
     */
    @ApiModelProperty(value= "品项数")
    @ExcelProperty(value = "品项数")
//    @ExcelProperty(value = "品项数")
    @TableField("item_num")
    private String itemNum;
@@ -175,7 +178,7 @@
     * 安全库存量
     */
    @ApiModelProperty(value= "安全库存量")
    @ExcelProperty(value = "安全库存量")
//    @ExcelProperty(value = "安全库存量")
    @TableField("safe_qty")
    private Double safeQty;
@@ -185,6 +188,11 @@
    @ApiModelProperty(value= "重量")
    @ExcelProperty(value = "重量")
    private Double weight;
    @ApiModelProperty(value= "最大组托上限")
    @ExcelProperty(value = "最大组托上限")
    @TableField("up_qty")
    private Double upQty;
    /**
     * 长度
@@ -197,14 +205,14 @@
     * 体积
     */
    @ApiModelProperty(value= "体积")
    @ExcelProperty(value = "体积")
//    @ExcelProperty(value = "体积")
    private Double volume;
    /**
     * 三方编码
     */
    @ApiModelProperty(value= "三方编码")
    @ExcelProperty(value = "三方编码")
    @ExcelProperty(value = "BS Code")
    @TableField("three_code")
    private String threeCode;
@@ -212,7 +220,7 @@
     * 供应商
     */
    @ApiModelProperty(value= "供应商")
    @ExcelProperty(value = "供应商")
//    @ExcelProperty(value = "供应商")
    private String supp;
    /**
@@ -235,7 +243,7 @@
     */
    @ApiModelProperty(value= "保质期")
    @TableField("dead_time")
    @ExcelProperty(value = "保质期")
//    @ExcelProperty(value = "保质期")
    private String deadTime;
    /**
@@ -243,7 +251,7 @@
     */
    @ApiModelProperty(value= "预警天数")
    @TableField("dead_warn")
    @ExcelProperty(value = "预警天数")
//    @ExcelProperty(value = "预警天数")
    private Integer deadWarn;
    /**
@@ -298,7 +306,13 @@
    @ApiModelProperty(value= "修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @ApiModelProperty("库位类型")
    @TableField("loc_type")
//    @ExcelProperty(value = "库位类型")
    private Long locType;
    /**
     * 备注
@@ -367,55 +381,28 @@
        this.memo = memo;
    }
//    Mat mat = new Mat(
//            null,    // 编号
//            null,    // 所属归类
//            null,    // 商品编号
//            null,    // 商品名称
//            null,    // 别名
//            null,    // 规格
//            null,    // 型号
//            null,    // 颜色
//            null,    // 品牌
//            null,    // 单位
//            null,    // 单价
//            null,    // sku
//            null,    // 单位量
//            null,    // 条码
//            null,    // 产地
//            null,    // 厂家
//            null,    // 生产日期
//            null,    // 品项数
//            null,    // 安全库存量
//            null,    // 重量
//            null,    // 长度
//            null,    // 体积
//            null,    // 三方编码
//            null,    // 供应商
//            null,    // 供应商编码
//            null,    // 是否批次
//            null,    // 保质期
//            null,    // 预警天数
//            null,    // 制购
//            null,    // 要求检验
//            null,    // 危险品
//            null,    // 状态[非空]
//            null,    // 添加人员
//            null,    // 添加时间
//            null,    // 修改人员
//            null,    // 修改时间
//            null    // 备注
//    );
    public String getTagId$(){
        TagService service = SpringUtils.getBean(TagService.class);
        Tag tag = service.selectById(this.tagId);
        if (!Cools.isEmpty(tag)){
            return String.valueOf(tag.getName());
        return MatLocType.getTagName(this.tagId + "");
    }
    public String getLocType$(){
        if (Cools.isEmpty(locType)) {
            return "料箱";
        }
        if (locType.equals(ContainerType.CONTAINER_TYPE_BOX.type)) {
            return ContainerType.CONTAINER_TYPE_BOX.desc;
        } else if (locType.equals(ContainerType.CONTAINER_TYPE_SALVER.type)) {
            return ContainerType.CONTAINER_TYPE_SALVER.desc;
        } else if (locType.equals(ContainerType.CONTAINER_TYPE_CAGE.type)) {
            return ContainerType.CONTAINER_TYPE_CAGE.desc;
        }
        return null;
    }
    public String getProType(){
        return MatLocType.getMatTag(this.tagId + "");
    }
    public String getBeBatch$(){
        if (null == this.beBatch){ return null; }
        switch (this.beBatch){