From bf394ab564362d56e3f44703525ed28a402f6350 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Fri, 12 Apr 2024 09:42:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=E5=B7=B2=E4=B8=8B=E5=8D=95=E7=9A=84=E9=A3=9E?= =?UTF-8?q?=E6=9C=BA=E4=B8=8D=E8=BF=9B=E8=A1=8C=E5=8F=96=E6=B6=88=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chint/domain/service/RouteRequestDomainService.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java index 39b59076..218d27be 100644 --- a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java +++ b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java @@ -125,15 +125,18 @@ public class RouteRequestDomainService { Map> collect = legs .stream() - .collect(Collectors.partitioningBy(leg -> leg.reloadStatus().getLegStatus().equals(LEG_STATUS_ORDERED) - && leg.getLegType().equals(LEG_TYPE_AIRPLANE))); + .collect(Collectors.partitioningBy(leg -> { + Integer legStatus = leg.reloadStatus().getLegStatus(); + return (legStatus.equals(LEG_STATUS_ORDERED) || legStatus.equals(LEG_STATUS_PAYED) || legStatus.equals(LEG_STATUS_FINISH)) + && leg.getLegType().equals(LEG_TYPE_AIRPLANE); + })); List orderedLegs = collect.get(true); if (!orderedLegs.isEmpty()) { it.reloadGenerateRequestLegs(orderedLegs); syncAdapter.of(it.getSupplier()).syncRouteRequest(it); it.addEvent(RouteRequestEvent.sync(it.getSupplier())); List notOrderLegs = collect.get(false); - notOrderLegs.forEach(leg->leg.addEvent(legEventFactory.creatLegEvent(LEG_EVENT_APPROVAL))); + notOrderLegs.forEach(leg -> leg.addEvent(legEventFactory.creatLegEvent(LEG_EVENT_APPROVAL))); } else { it.addEvent(RouteRequestEvent.cancel(it.getSupplier())); getLegInfoFromRouteOrder(it, routeOrder);