自动化立体仓库 - WCS系统
*
lsh
2025-04-28 0cf26d5f8c8c2c15645443e84566ffec72abfdf1
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
package com.zy.asrs.entity.param;
 
import io.swagger.models.auth.In;
import lombok.Data;
 
@Data
public class TaskCreateParam {
 
    //任务号
    private String taskNo;
 
    //任务类型
    private Integer ioType;
 
    //起点
    private String startPoint;
 
    //优先级
    private Integer taskPriority;
 
    //终点
    private String targetPoint;
 
    //是否空托盘            Y:是 N:否
    private String emptyContainer;
 
    //条码
    private String barcode;
 
    //备注
    private String memo;
    //堆垛机
    private Integer crn;
 
    public TaskCreateParam(){};
 
    public TaskCreateParam(String taskNo, Integer ioType, String barcode, String startPoint, Integer taskPriority, String targetPoint, String emptyContainer) {
        this.taskNo = taskNo;
        this.ioType = ioType;
        this.barcode = barcode;
        this.startPoint = startPoint;
        this.taskPriority = taskPriority;
        this.targetPoint = targetPoint;
        this.emptyContainer = emptyContainer;
    }
 
    public TaskCreateParam(String taskNo, Integer ioType, String startPoint, Integer taskPriority, String targetPoint, String emptyContainer, String barcode, String memo) {
        this.taskNo = taskNo;
        this.ioType = ioType;
        this.startPoint = startPoint;
        this.taskPriority = taskPriority;
        this.targetPoint = targetPoint;
        this.emptyContainer = emptyContainer;
        this.barcode = barcode;
        this.memo = memo;
    }
 
    public TaskCreateParam(WMSAndAGVInterfaceParam param){
        this.taskNo = param.getTaskNo();
        this.ioType = convertParamIoType(param.getTaskType());
        this.barcode = param.getContainerCode();
        this.taskPriority = param.getTaskPriority();
        this.startPoint = param.getSourceLocationCode();
        this.targetPoint = param.getTargetLocationCode();
        this.emptyContainer = param.getEmptyContainer();
        this.crn = param.getTaskTunnel();
    };
 
    public TaskCreateParam(CarryParam param, Integer crn){
        this.taskNo = param.getTaskNo();
        this.ioType = param.getIoType();
        this.barcode = param.getBarcode();
        this.taskPriority = param.getTaskPriority();
        this.startPoint = param.getStartPoint();
        this.targetPoint = param.getTargetPoint();
        this.emptyContainer = "N";
        this.crn = crn;
    };
 
 
    public static Integer convertParamIoType(String paramIoType){
        switch (paramIoType){
            case "RK":
                return 1;
            case "CK":
                return 2;
            case "YK":
                return 3;
            default:
                return 0;
        }
    }
 
    public void updateIoTyoe(Integer ioTypeOld){
        switch (ioTypeOld){
            case 1:
                this.ioType = 2;
                break;
            case 2:
                this.ioType = 3;
                break;
            case 3:
                this.ioType = 1;
                break;
            default:
                this.ioType = 3;
        }
    }
 
}