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);
|
}
|
|
|
}
|