#
vincentlu
昨天 289c3501e04d2781c4b1592c5430a1c648307749
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
package com.zy.acs.manager.core.domain;
 
import com.zy.acs.framework.common.Cools;
import lombok.Data;
 
import java.util.List;
 
/**
 * Created by vincent on 2023/6/19
 */
@Data
public class PathDto {
 
    private String code;
 
    private Double direction;
 
    private boolean turn = false;
 
    public PathDto() {
    }
 
    public PathDto(String code, Double direction) {
        this.code = code;
        this.direction = direction;
    }
 
    public PathDto(String code, Double direction, boolean turn) {
        this.code = code;
        this.direction = direction;
        this.turn = turn;
    }
 
    public static void markTurn(List<PathDto> pathTrace, Double direction) {
        if (Cools.isEmpty(pathTrace) || direction == null) {
            return;
        }
        PathDto current = pathTrace.get(pathTrace.size() - 1);
        current.setDirection(direction);
        current.setTurn(true);
    }
 
 
}