fix():报文模板值添加
parent
cada95d11f
commit
a507bb3e73
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>VehicleSimulation</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<version>1.0.5</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
|
|
|
@ -274,10 +274,10 @@ public class VehicleInstance {
|
|||
// 获取当前定位点
|
||||
PositionModel currentPositionModel = positionQueue.poll();
|
||||
if (currentPositionModel == null) {
|
||||
return "表示当前定位点已经跑完,需要其他操作";
|
||||
return "表示当前定位点已经跑完,请选择其他路径";
|
||||
}
|
||||
// 两点之间的距离
|
||||
BigDecimal distance = VehicleUtils.distance(lastPositionModel, currentPositionModel);
|
||||
BigDecimal distance = VehicleUtils.distance(Objects.requireNonNull(lastPositionModel), currentPositionModel);
|
||||
// 车辆总里程 相加
|
||||
vehicleData.setMileage(vehicleData.getMileage().add(distance));
|
||||
// 定位点填写
|
||||
|
|
Loading…
Reference in New Issue