复制运行计划bug修改
This commit is contained in:
parent
070dd06805
commit
636432d6f9
@ -482,7 +482,7 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
RunPlanVO planVO = getRunPlanById(planId);
|
||||
MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId());
|
||||
if (Objects.nonNull(inputData.getDepartureInterval())) {
|
||||
String max = planVO.getTripList().stream().map(RunPlanTripVO::getServiceNumber).max(Comparator.naturalOrder()).orElse("0");
|
||||
String max = planVO.getTripList().stream().map(RunPlanTripVO::getServiceNumber).max(Comparator.comparingInt(Integer::parseInt)).orElse("0");
|
||||
// 当前已有最大服务号
|
||||
int maxServiceNumber = Integer.parseInt(max);
|
||||
inputData.setServiceNumber(String.format("%03d", ++maxServiceNumber));
|
||||
@ -538,7 +538,7 @@ public class RunPlanDraftService implements IRunPlanDraftService {
|
||||
// 数据校验
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(serviceConfig.getTimes() > 0 && serviceConfig.getIntervals() >= 30);
|
||||
RunPlanVO planVO = getRunPlanById(planId);
|
||||
String max = planVO.getTripList().stream().map(RunPlanTripVO::getServiceNumber).max(Comparator.naturalOrder()).orElse("");
|
||||
String max = planVO.getTripList().stream().map(RunPlanTripVO::getServiceNumber).max(Comparator.comparingInt(Integer::parseInt)).orElse("");
|
||||
// 查询最大服务号
|
||||
int maxServiceNumber = Integer.parseInt(max);
|
||||
List<RunPlanTripVO> tripVOList = planVO.getTripList().stream()
|
||||
|
Loading…
Reference in New Issue
Block a user