rev:返回点校验

This commit is contained in:
2025-07-24 17:09:59 +08:00
parent 74c955d4c5
commit 7ea49920bc

View File

@@ -72,6 +72,12 @@ public class TaskManageServiceImpl implements TaskManageService {
} }
List<Station> staList = whereJson.getJSONArray("data").toJavaList(Station.class); List<Station> staList = whereJson.getJSONArray("data").toJavaList(Station.class);
// 判断前端参数是否有返回点
boolean move = staList.stream()
.anyMatch(row -> row.getAction_type().equals("Move"));
if (!move) {
// 取返回点 // 取返回点
Station breakPoint = stationService.getOne( Station breakPoint = stationService.getOne(
new QueryWrapper<Station>().lambda() new QueryWrapper<Station>().lambda()
@@ -81,6 +87,7 @@ public class TaskManageServiceImpl implements TaskManageService {
throw new BadRequestException("请先设置返回点!"); throw new BadRequestException("请先设置返回点!");
} }
staList.add(breakPoint); staList.add(breakPoint);
}
// 任务id // 任务id
String task_id = ""; String task_id = "";