自动化立体仓库 - WCS系统
*
lsh
4 天以前 8740b1c94ffd20b54b95962df886e43f722911c5
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
package com.zy.core.model.protocol;
 
import lombok.Data;
 
/**
 * Created by IX on 2025/02/21
 */
@Data
public class TaskProtocol {
    private volatile String taskNoDirection; // 任务号(主属性)
    private volatile Long taskNo; // 任务号(主属性)
    private volatile Long targetPosition = 0L; // 目标位置
 
    private volatile int isRunning = 0; // 运行状态  0:初始  1:等待执行  2:执行中 3:执行中断 4:完结
 
    private volatile int taskStatus = 0; //作业模式  0:行走  1:取  2:放
 
    private volatile boolean direction; // 执行方向(面朝轨道 定位值左小右大)  true:左   false:右
 
    public TaskProtocol(){}
 
    public TaskProtocol(Long taskNo, Long targetPosition, int isRunning, int taskStatus, boolean direction) {
        this.taskNo = taskNo;
        this.targetPosition = targetPosition;
        this.isRunning = isRunning;
        this.taskStatus = taskStatus;
        this.direction = direction;
    }
 
    public TaskProtocol(TaskProtocol taskProtocol) {
        this.taskNo = taskProtocol.getTaskNo();
        this.targetPosition = taskProtocol.getTargetPosition();
        this.taskStatus = taskProtocol.getTaskStatus();
        this.direction = taskProtocol.direction;
    }
 
 
    public String gettaskNoDirection$(Long taskNo,int taskStatus){
        String taskStatusStr = "Walk";
        switch (taskStatus){
            case 1:
                taskStatusStr = "Tack";
            case 2:
                taskStatusStr = "Put";
        }
        return taskNo+"_"+taskStatusStr;
    }
}