自动化立体仓库 - WMS系统
skyouc
6 小时以前 42206b6e31138d5be6d22bb4bba22e03ffe107aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.zy.asrs.entity;
 
import com.baomidou.mybatisplus.annotations.TableField;
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zy.asrs.enums.CommonEnum;
import com.zy.asrs.enums.ContainerType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.io.Serializable;
import java.util.Date;
 
@Data
@Accessors(chain = true)
@TableName("asr_bas_container")
public class BasContainer implements Serializable {
 
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @ApiModelProperty(value= "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 容器编码
     */
    @ApiModelProperty(value= "容器编码")
    private String barcode;
 
    @ApiModelProperty("容器类型")
    private Long type;
 
    @ApiModelProperty("是否混放")
    @TableField("flag_mix")
    private Integer flagMix;
 
    @ApiModelProperty("最大混放种类")
    private Integer mixMax;
 
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
 
    @ApiModelProperty("修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
 
    public BasContainer() {}
 
    public BasContainer(String barcode) {
        this.barcode = barcode;
    }
 
 
    public String getType$() {
        if (Cools.isEmpty(type)) {
            return "料箱";
        }
        if (type.equals(ContainerType.CONTAINER_TYPE_BOX.type)) {
            return ContainerType.CONTAINER_TYPE_BOX.desc;
        } else if (type.equals(ContainerType.CONTAINER_TYPE_SALVER.type)) {
            return ContainerType.CONTAINER_TYPE_SALVER.desc;
        } else if (type.equals(ContainerType.CONTAINER_TYPE_CAGE.type)) {
            return ContainerType.CONTAINER_TYPE_CAGE.desc;
        }
        return null;
    }
 
    public String getFlagMix$() {
        if (Cools.isEmpty(flagMix)) {
            return null;
        }
        if (flagMix.equals(CommonEnum.COMMON_ENUM_N.type)) {
            return CommonEnum.COMMON_ENUM_N.desc;
        } else if (flagMix.equals(CommonEnum.COMMON_ENUM_Y.type)) {
            return CommonEnum.COMMON_ENUM_Y.desc;
        }
        return null;
    }
 
}