自动化立体仓库 - WMS系统
lty
昨天 d273bcbfb660a4872b8e41b8b4e53607f130f1bc
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
package com.zy.asrs.entity;
 
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.core.common.SpringUtils;
import com.zy.system.service.UserService;
import com.zy.system.entity.User;
 
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
 
@Data
@TableName("asr_bas_agv_mast_log")
public class BasAgvMastLog implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    private Long id;
 
    /**
     * WMS任务号
     */
    @ApiModelProperty(value= "WMS任务号")
    @TableId(value = "task_no", type = IdType.INPUT)
    @TableField("task_no")
    private Integer taskNo;
 
    /**
     * RGV任务号
     */
    @ApiModelProperty(value= "RGV任务号")
    private Long timestamp;
 
    /**
     * 源站点
     */
    @ApiModelProperty(value= "源站点")
    @TableField("source_sta_no")
    private Integer sourceStaNo;
 
    /**
     * 目的站点
     */
    @ApiModelProperty(value= "目的站点")
    @TableField("sta_no")
    private Integer staNo;
 
    /**
     * 源库位
     */
    @ApiModelProperty(value= "源库位")
    @TableField("source_loc_no")
    private String sourceLocNo;
 
    /**
     * 目的库位
     */
    @ApiModelProperty(value= "目的库位")
    @TableField("loc_no")
    private String locNo;
 
    /**
     * 优先级
     */
    @ApiModelProperty(value= "优先级")
    private Long priority;
 
    /**
     * 楼层
     */
    @ApiModelProperty(value= "楼层")
    @TableField("floor_no")
    private Integer floorNo;
 
    /**
     * 状态 0: 初始  1: 作业中  2: 完成  
     */
    @ApiModelProperty(value= "状态 0: 初始  1: 作业中  2: 完成  ")
    private Integer status;
 
    /**
     * 异常时间
     */
    @ApiModelProperty(value= "异常时间")
    @TableField("error_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date errorTime;
 
    /**
     * 异常信息
     */
    @ApiModelProperty(value= "异常信息")
    @TableField("error_memo")
    private String errorMemo;
 
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @TableField("appe_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date appeTime;
 
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @TableField("modi_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date modiTime;
 
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("modi_user")
    private String modiUser;
 
    @ApiModelProperty(value= "")
    @TableField("devp_id")
    private Integer devpId;
 
    @ApiModelProperty(value= "")
    @TableField("io_type")
    private Integer ioType;
 
    public BasAgvMastLog() {}
 
    public BasAgvMastLog(Integer taskNo,Long timestamp,Integer sourceStaNo,Integer staNo,String sourceLocNo,String locNo,Long priority,Integer floorNo,Integer status,Date errorTime,String errorMemo,Date appeTime,Date modiTime,String modiUser,Integer devpId,Integer ioType) {
        this.taskNo = taskNo;
        this.timestamp = timestamp;
        this.sourceStaNo = sourceStaNo;
        this.staNo = staNo;
        this.sourceLocNo = sourceLocNo;
        this.locNo = locNo;
        this.priority = priority;
        this.floorNo = floorNo;
        this.status = status;
        this.errorTime = errorTime;
        this.errorMemo = errorMemo;
        this.appeTime = appeTime;
        this.modiTime = modiTime;
        this.modiUser = modiUser;
        this.devpId = devpId;
        this.ioType = ioType;
    }
 
    public BasAgvMastLog(BasAgvMast basAgvMast) {
        if (basAgvMast != null) {
            this.taskNo = basAgvMast.getTaskNo();
            this.timestamp = basAgvMast.getTimestamp();
            this.sourceStaNo = basAgvMast.getSourceStaNo();
            this.staNo = basAgvMast.getStaNo();
            this.sourceLocNo = basAgvMast.getSourceLocNo();
            this.locNo = basAgvMast.getLocNo();
            this.priority = basAgvMast.getPriority();
            this.floorNo = basAgvMast.getFloorNo();
            this.status = basAgvMast.getStatus();
            this.appeTime = new Date();
            this.ioType = basAgvMast.getIoType();
        }
    }
 
//    BasAgvMastLog basAgvMastLog = new BasAgvMastLog(
//            null,    // WMS任务号[非空]
//            null,    // RGV任务号
//            null,    // 源站点
//            null,    // 目的站点
//            null,    // 源库位
//            null,    // 目的库位
//            null,    // 优先级
//            null,    // 楼层
//            null,    // 状态
//            null,    // 异常时间
//            null,    // 异常信息
//            null,    // 添加时间
//            null,    // 修改时间
//            null,    // 修改人员
//            null,    // 
//            null    // 
//    );
 
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 0:
                return "初始";
            case 1:
                return "作业中";
            case 2:
                return "完成";
            default:
                return String.valueOf(this.status);
        }
    }
 
    public String getErrorTime$(){
        if (Cools.isEmpty(this.errorTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime);
    }
 
    public String getAppeTime$(){
        if (Cools.isEmpty(this.appeTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
    }
 
    public String getModiTime$(){
        if (Cools.isEmpty(this.modiTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
    }
 
    public String getModiUser$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.modiUser);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
 
 
}