#ZH
野心家
2025-05-28 880794f63e27b64ae03c40afc55a34928d090d57
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
package com.zy.asrs.entity.param;
 
import lombok.Data;
 
@Data
public class CarryParam {
    //工作号
    private String taskNo;
 
    //入出库类型
    private Integer ioType;
 
    //优先级
    private Integer taskPriority;
 
    //容器编码
    private String barcode;
 
    //起点
    private String startPoint;
 
    //目标点
    private String targetPoint;
 
    //备注
    private String meno;
 
    public void updateLocNo(){
        startPoint = getPut(startPoint);
        targetPoint = getPut(targetPoint);
    }
    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;
        }
    }
 
    public String getPut(String point){
        String[] split = point.split("-");
        if (split.length == 5){
//            String locNo = String.format("%02d", ) +
//                    String.format("%03d", split[3]) +
//                    String.format("%02d", split[4]);
            return split[2]+"0"+split[3]+split[4];
        } else {
            return point;
        }
    }
 
    public static String zerofill(String msg, Integer count){
        if (msg.length() == count){
            return msg;
        } else if (msg.length() > count){
            return msg.substring(0, 16);
        } else {
            StringBuilder msgBuilder = new StringBuilder(msg);
            for (int i = 0; i<count-msg.length(); i++){
                msgBuilder.insert(0,"0");
            }
            return msgBuilder.toString();
        }
    }
 
}