增加已同步行程筛选功能
This commit is contained in:
parent
e98af60faa
commit
16fd3c32c1
|
@ -17,6 +17,7 @@ import static com.chint.infrastructure.constant.LegConstant.*;
|
|||
import static com.chint.infrastructure.constant.OrderConstant.*;
|
||||
import static com.chint.infrastructure.constant.RouteConstant.APPROVAL_EVENT_PREPARE;
|
||||
import static com.chint.infrastructure.constant.RouteConstant.ORDER_STATUS_PREPARE;
|
||||
import static com.chint.infrastructure.constant.RouteRequestConstant.ROUTE_REQUEST_STATUS_SYNC;
|
||||
|
||||
@Service
|
||||
public class LegDomainService {
|
||||
|
@ -158,6 +159,16 @@ public class LegDomainService {
|
|||
if (supplierName.equals("CTrip")) {
|
||||
legItems = legItems.stream().filter(it -> !it.getLegType().equals(LEG_TYPE_TRAIN)).toList();
|
||||
}
|
||||
|
||||
List<Long> alreadySyncLegIds = routeOrder.getRouteRequestList()
|
||||
.stream()
|
||||
.filter(it -> it.reloadStatus().getStatus().equals(ROUTE_REQUEST_STATUS_SYNC))
|
||||
.flatMap(it -> it.getRouteRequestLegList().stream().map(RouteRequestLeg::getLegId))
|
||||
.toList();
|
||||
|
||||
legItems = legItems.stream()
|
||||
.filter(it -> !alreadySyncLegIds.contains(it.getLegId()))
|
||||
.toList();
|
||||
return legItems;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue