自动化立体仓库 - WMS系统
*
lsh
9 天以前 d9eeceed86c1ce43c73dda00a108595a078a8f3d
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
package com.zy.asrs.entity;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
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.asrs.service.BasJarMastStatusService;
import com.zy.asrs.entity.BasJarMastStatus;
 
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
 
@Data
@TableName("jar_wrk_mast_execute")
public class WrkMastExecute implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * 工作号
     */
    @ApiModelProperty(value= "工作号")
    @TableField("wrk_no")
    private Long wrkNo;
 
    /**
     * 入库源站点
     */
    @ApiModelProperty(value= "入库源站点")
    @TableField("enter_sta_no")
    private Integer enterStaNo;
 
    /**
     * 入库目标站点
     */
    @ApiModelProperty(value= "入库目标站点")
    @TableField("out_sta_no")
    private Integer outStaNo;
 
    /**
     * 入硫化罐站点
     */
    @ApiModelProperty(value= "入硫化罐站点")
    @TableField("jar_enter_sta_no")
    private Integer jarEnterStaNo;
 
    /**
     * 出硫化罐站点
     */
    @ApiModelProperty(value= "出硫化罐站点")
    @TableField("jar_out_sta_no")
    private Integer jarOutStaNo;
 
    /**
     * 设备ID
     */
    @ApiModelProperty(value= "设备ID")
    @TableField("jar_id")
    private Integer jarId;
 
    /**
     * 区域
     */
    @ApiModelProperty(value= "区域")
    @TableField("jar_regin")
    private Integer jarRegin;
 
    /**
     * 状态
     */
    @ApiModelProperty(value= "状态")
    private Integer status;
 
    /**
     * 穿梭板
     */
    @ApiModelProperty(value= "穿梭板")
    @TableField("ste_id")
    private Integer steId;
 
    /**
     * RGV
     */
    @ApiModelProperty(value= "RGV")
    @TableField("rgv_id")
    private Integer rgvId;
 
    /**
     * 作业时间
     */
    @ApiModelProperty(value= "作业时间")
    @TableField("io_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date ioTime;
 
    /**
     * 创建时间
     */
    @ApiModelProperty(value= "创建时间")
    @TableField("modi_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date modiTime;
 
    /**
     * 更新时间
     */
    @ApiModelProperty(value= "更新时间")
    @TableField("appe_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date appeTime;
 
    /**
     * 任务状态 0: 初始  1: 作业中  2: 完成  
     */
    @ApiModelProperty(value= "任务状态 0: 初始  1: 作业中  2: 完成  ")
    @TableField("wrk_type")
    private Integer wrkType;
 
    /**
     * 工作状态
     * 0:初始  wrk_sts
     * 1:RGV小车避让、2:避让完成、3:开门中、4:开门完成、5:更新完成    //io_type = 1、3
     * 1:RGV小车避让、2:避让完成、3:关门中、4:关门完成、5:更新完成    //io_type = 2、4
     * 1:RGV小车移动、2:RGV小车到位、3:rgv取货、4:rgv取货完成、5:Ste穿梭版入硫化罐、6:入罐完成、7:更新完成   //io_type = 5   STE  A面穿梭车
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版取货、4:取货完成等待下一步、5:Ste穿梭版放货至冷却池、6:放货完成、7:更新完成   //io_type = 6  STE  B面穿梭车
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 7  B=>C   、8 C=>B
     * 1:Ste穿梭版取放货中、2:放货完成等待下一步、3:输送线任务下发完成、4:更新完成   //io_type = 9   STE   末端输送线
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 10、11
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 10、11
     */
    @ApiModelProperty(value= "工作状态")
    @TableField("wrk_sts")
    private Integer wrkSts;
 
    /**
     * 任务类型 0: 未知  1: 开进料门  2: 关进料门  3: 开出料门  4: 关出料门  5: 入硫化罐  6: 入冷却槽  7: 穿梭车进冷却槽  B=>C  8: 穿梭车离开冷却槽 C=>B  9: 出冷却槽 10:A=>B 11:B=>A
     */
    @ApiModelProperty(value= "任务类型 0: 未知  1: 开进料门  2: 关进料门  3: 开出料门  4: 关出料门  5: 入硫化罐  6: 入冷却槽  7: 穿梭车进冷却槽  B=>C  8: 穿梭车离开冷却槽 C=>B  9: 出冷却槽 10:A=>B 11:B=>A ")
    @TableField("io_type")
    private Integer ioType;
 
    /**
     * 设备 0: 未知  1: 硫化罐  2: 冷却槽  
     */
    @ApiModelProperty(value= "设备 0: 未知  1: 硫化罐  2: 冷却槽  ")
    private Integer type;
 
    /**
     * 尾部穿梭板
     */
    @ApiModelProperty(value= "尾部穿梭板")
    @TableField("rgv_end_id")
    private Integer rgvEndId;
 
    public WrkMastExecute() {}
 
    public WrkMastExecute(Long wrkNo,Integer enterStaNo,Integer outStaNo,Integer jarEnterStaNo,Integer jarOutStaNo,Integer jarId,Integer jarRegin,Integer status,Integer steId,Integer rgvId,Date ioTime,Date modiTime,Date appeTime,Integer wrkType,Integer wrkSts,Integer ioType,Integer type,Integer rgvEndId) {
        this.wrkNo = wrkNo;
        this.enterStaNo = enterStaNo;
        this.outStaNo = outStaNo;
        this.jarEnterStaNo = jarEnterStaNo;
        this.jarOutStaNo = jarOutStaNo;
        this.jarId = jarId;
        this.jarRegin = jarRegin;
        this.status = status;
        this.steId = steId;
        this.rgvId = rgvId;
        this.ioTime = ioTime;
        this.modiTime = modiTime;
        this.appeTime = appeTime;
        this.wrkType = wrkType;
        this.wrkSts = wrkSts;
        this.ioType = ioType;
        this.type = type;
        this.rgvEndId = rgvEndId;
    }
 
//    WrkMastExecute wrkMastExecute = new WrkMastExecute(
//            null,    // 工作号[非空]
//            null,    // 入库源站点[非空]
//            null,    // 入库目标站点[非空]
//            null,    // 入硫化罐站点[非空]
//            null,    // 出硫化罐站点[非空]
//            null,    // 设备ID[非空]
//            null,    // 区域[非空]
//            null,    // 状态[非空]
//            null,    // 穿梭板[非空]
//            null,    // RGV[非空]
//            null,    // 作业时间
//            null,    // 创建时间
//            null,    // 更新时间
//            null,    // 任务状态[非空]
//            null,    // 工作状态[非空]
//            null,    // 任务类型[非空]
//            null,    // 设备[非空]
//            null    // 尾部穿梭板[非空]
//    );
 
    public String getIoTime$(){
        if (Cools.isEmpty(this.ioTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
    }
 
    public String getModiTime$(){
        if (Cools.isEmpty(this.modiTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
    }
 
    public String getAppeTime$(){
        if (Cools.isEmpty(this.appeTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
    }
 
    public String getWrkType$(){
        if (null == this.wrkType){ return null; }
        switch (this.wrkType){
            case 0:
                return "初始";
            case 1:
                return "作业中";
            case 2:
                return "完成";
            default:
                return String.valueOf(this.wrkType);
        }
    }
    /**
     * 工作状态
     * 0:初始  wrk_sts
     * 1:RGV小车避让、2:避让完成、3:开门中、4:开门完成、5:更新完成    //io_type = 1、3
     * 1:RGV小车避让、2:避让完成、3:关门中、4:关门完成、5:更新完成    //io_type = 2、4
     * 1:RGV小车移动、2:RGV小车到位、3:rgv取货、4:rgv取货完成、5:Ste穿梭版入硫化罐、6:入罐完成、7:更新完成   //io_type = 5   STE  A面穿梭车
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版取货、4:取货完成等待下一步、5:Ste穿梭版放货至冷却池、6:放货完成、7:更新完成   //io_type = 6  STE  B面穿梭车
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 7  B=>C   、8 C=>B
     * 1:Ste穿梭版取放货中、2:放货完成等待下一步、3:输送线任务下发完成、4:更新完成   //io_type = 9   STE   末端输送线
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 10、11
     * 1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版移动中、4:移动完成、5:更新完成   //io_type = 10、11
     */
    public String getWrkSts$(){
        try{
            if (Cools.isEmpty(this.wrkSts)){
                return this.wrkSts+":未知";
            }
            if (Cools.isEmpty(this.ioType)){
                return this.wrkSts.toString();
            } else if (this.ioType == 100){
                switch (this.wrkSts){
                    case 0:
                        return this.wrkSts+"、初始";
                    case 99:
                        return this.wrkSts+"、充电中";
                    case 100:
                        return this.wrkSts+"、充电完成";
                }
            } else {
                switch (this.wrkSts){
                    case 1:
                        switch (this.ioType){
                            case 9:
                                return this.wrkSts+"、Ste穿梭版取放货中";
                            default:
                                return this.wrkSts+"、RGV平衡车移动";
                        }
                    case 2:
                        switch (this.ioType){
                            case 9:
                                return this.wrkSts+"、Ste穿梭版放货完成等待下一步";
                            default:
                                return this.wrkSts+"、RGV平衡车到位";
                        }
                    case 3:
                        switch (this.ioType){
                            case 1:
                            case 3:
                                return this.wrkSts+"、硫化罐开门中";
                            case 2:
                            case 4:
                                return this.wrkSts+"、硫化罐关门中";
                            case 5:
                                return this.wrkSts+"、RGV平衡车取货";
                            case 6:
                                return this.wrkSts+"、Ste穿梭版取货";
                            case 9:
                                return this.wrkSts+"、输送线任务下发完成";
                            default:
                                return this.wrkSts+"、Ste穿梭版移动中";
                        }
                    case 4:
                        switch (this.ioType){
                            case 1:
                            case 3:
                                return this.wrkSts+"、硫化罐开门完成";
                            case 2:
                            case 4:
                                return this.wrkSts+"、硫化罐关门完成";
                            case 5:
                                return this.wrkSts+"、RGV平衡车取货完成";
                            case 6:
                                return this.wrkSts+"、Ste穿梭版取货完成";
                            case 9:
                                return this.wrkSts+"、更新完成";
                            default:
                                return this.wrkSts+"、Ste穿梭版移动完成";
                        }
                    case 5:
                        switch (this.ioType){
                            case 5:
                                return this.wrkSts+"、Ste穿梭版入硫化罐";
                            case 6:
                                return this.wrkSts+"、Ste穿梭版放货至冷却池";
                            default:
                                return this.wrkSts+"、更新完成";
                        }
                    case 6:
                        switch (this.ioType){
                            case 5:
                                return this.wrkSts+"、Ste穿梭版入硫化罐完成";
                            case 6:
                                return this.wrkSts+"、Ste穿梭版放货完成";
                            default:
                                return this.wrkSts+"、更新完成";
                        }
                    case 7:
                        switch (this.ioType){
                            default:
                                return this.wrkSts+"、更新完成";
                        }
                    default:
                        return this.wrkSts.toString();
                }
            }
        } catch (Exception e){
            return this.wrkSts+":未知==>异常:"+e.getMessage();
        }
        return this.wrkSts+":未知";
    }
 
    //任务类型 0: 未知  1: 开进料门  2: 关进料门  3: 开出料门  4: 关出料门  5: 入硫化罐  6: 入冷却槽  7: 穿梭车进冷却槽  B=>C  8: 穿梭车离开冷却槽 C=>B  9: 出冷却槽 10:A=>B 11:B=>A
 
    public String getIoType$(){
        if (null == this.ioType){ return "未知"; }
        switch (this.ioType){
            case 0:
                return "0.未知";
            case 1:
                return "1.开进料门";
            case 2:
                return "2.关进料门";
            case 3:
                return "3.开出料门";
            case 4:
                return "4.关出料门";
            case 5:
                return "5.入硫化罐";
            case 6:
                return "6.入冷却槽";
            case 7:
                return "7.B=>C";
            case 8:
                return "8.C=>B";
            case 9:
                return "9.出冷却槽";
            case 10:
                return "10.A=>B";
            case 11:
                return "11.B=>A";
            case 100:
                return "100.充电任务";
            default:
                return String.valueOf(this.ioType);
        }
    }
 
    public String getType$(){
        if (null == this.type){ return null; }
        switch (this.type){
            case 0:
                return "未知";
            case 1:
                return "硫化罐";
            case 2:
                return "冷却槽";
            default:
                return String.valueOf(this.type);
        }
    }
 
 
}