From 0da19d473d89bb812610501809481fdf6c2c4756 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 24 三月 2026 20:53:13 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi
---
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTestPlanServiceImpl.java | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTestPlanServiceImpl.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTestPlanServiceImpl.java
index 31f0b1b..3259ec5 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTestPlanServiceImpl.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTestPlanServiceImpl.java
@@ -170,24 +170,35 @@
}
List<XpTestPlanPoint> planPoints = xpTestPlanPointService.lambdaQuery()
.eq(XpTestPlanPoint::getTestPlanId, id)
- .orderByAsc(XpTestPlanPoint::getSortOrder)
.list();
List<Long> pointIds = planPoints.stream()
- .map(XpTestPlanPoint::getTestPointId)
+ .map(XpTestPlanPoint::getStartTestPointId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
+ List<Long> pointIds1 = planPoints.stream()
+ .map(XpTestPlanPoint::getEndTestPointId)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toList());
+ pointIds.addAll(pointIds1);
Map<Long, XpTestPoint> pointMap = CollUtil.isNotEmpty(pointIds)
? xpTestPointService.listByIds(pointIds).stream()
.collect(Collectors.toMap(XpTestPoint::getId, v -> v))
: Collections.emptyMap();
List<XpTestPlanPointVO> pointList = planPoints.stream().map(planPoint -> {
XpTestPlanPointVO vo = new XpTestPlanPointVO();
- vo.setPointId(planPoint.getTestPointId());
- vo.setSortOrder(planPoint.getSortOrder());
- XpTestPoint point = pointMap.get(planPoint.getTestPointId() == null ? null : planPoint.getTestPointId().longValue());
+ vo.setStartTestPointId(planPoint.getStartTestPointId());
+ vo.setEndTestPointId(planPoint.getEndTestPointId());
+ vo.setStopFlag(planPoint.getStopFlag());
+ vo.setTestOrderType(planPoint.getTestOrderType());
+ XpTestPoint point = pointMap.get(planPoint.getStartTestPointId() == null ? null : planPoint.getStartTestPointId().longValue());
if (point != null) {
- vo.setPointName(point.getPointName());
- vo.setPointAddress(point.getPointAddress());
+ vo.setStartTestPointName(point.getPointName());
+ vo.setStartTestPointAddress(point.getPointAddress());
+ }
+ XpTestPoint point1 = pointMap.get(planPoint.getEndTestPointId() == null ? null : planPoint.getEndTestPointId().longValue());
+ if (point != null) {
+ vo.setEndTestPointName(point1.getPointName());
+ vo.setEndTestPointAddress(point1.getPointAddress());
}
return vo;
}).collect(Collectors.toList());
@@ -288,13 +299,10 @@
}
Set<Long> pointIdSet = new HashSet<>();
for (XpTestPlanAddDTO.TestPlanPointDTO pointDTO : pointList) {
- if (pointDTO.getPointId() == null || pointDTO.getSortOrder() == null || pointDTO.getStopFlag() == null) {
+ if (pointDTO.getStartTestPointId() == null || pointDTO.getEndTestPointId() == null) {
throw new ServiceException("点位参数不完整", I18nKeyConstant.CRUISE_PLAN_POINT_INCOMPLETE);
}
- if (pointDTO.getStopFlag() != 0 && pointDTO.getStopFlag() != 1) {
- throw new ServiceException("点位停车标识不合法", I18nKeyConstant.CRUISE_PLAN_STOP_FLAG_INVALID);
- }
- if (!pointIdSet.add(pointDTO.getPointId())) {
+ if (!pointIdSet.add(pointDTO.getStartTestPointId()) || !pointIdSet.add(pointDTO.getEndTestPointId())) {
throw new ServiceException("点位ID重复", I18nKeyConstant.CRUISE_PLAN_POINT_DUPLICATE);
}
}
@@ -353,9 +361,8 @@
for (XpTestPlanAddDTO.TestPlanPointDTO pointDTO : pointList) {
XpTestPlanPoint point = new XpTestPlanPoint();
point.setTestPlanId(planId);
- point.setTestPlanId(pointDTO.getPointId());
- point.setSortOrder(pointDTO.getSortOrder());
- point.setStopFlag(pointDTO.getStopFlag());
+ point.setStartTestPointId(pointDTO.getStartTestPointId());
+ point.setEndTestPointId(pointDTO.getEndTestPointId());
result.add(point);
}
return result;
--
Gitblit v1.7.1