同步功能添加对已下单的飞机不进行取消同步
This commit is contained in:
parent
ac4edd598d
commit
bf394ab564
|
@ -125,15 +125,18 @@ public class RouteRequestDomainService {
|
||||||
|
|
||||||
Map<Boolean, List<Leg>> collect = legs
|
Map<Boolean, List<Leg>> collect = legs
|
||||||
.stream()
|
.stream()
|
||||||
.collect(Collectors.partitioningBy(leg -> leg.reloadStatus().getLegStatus().equals(LEG_STATUS_ORDERED)
|
.collect(Collectors.partitioningBy(leg -> {
|
||||||
&& leg.getLegType().equals(LEG_TYPE_AIRPLANE)));
|
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<Leg> orderedLegs = collect.get(true);
|
List<Leg> orderedLegs = collect.get(true);
|
||||||
if (!orderedLegs.isEmpty()) {
|
if (!orderedLegs.isEmpty()) {
|
||||||
it.reloadGenerateRequestLegs(orderedLegs);
|
it.reloadGenerateRequestLegs(orderedLegs);
|
||||||
syncAdapter.of(it.getSupplier()).syncRouteRequest(it);
|
syncAdapter.of(it.getSupplier()).syncRouteRequest(it);
|
||||||
it.addEvent(RouteRequestEvent.sync(it.getSupplier()));
|
it.addEvent(RouteRequestEvent.sync(it.getSupplier()));
|
||||||
List<Leg> notOrderLegs = collect.get(false);
|
List<Leg> 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 {
|
} else {
|
||||||
it.addEvent(RouteRequestEvent.cancel(it.getSupplier()));
|
it.addEvent(RouteRequestEvent.cancel(it.getSupplier()));
|
||||||
getLegInfoFromRouteOrder(it, routeOrder);
|
getLegInfoFromRouteOrder(it, routeOrder);
|
||||||
|
|
Loading…
Reference in New Issue