fix:取消查询行程规划单的事件检查
This commit is contained in:
parent
3bca3cbb97
commit
c62a6f661a
|
@ -548,21 +548,20 @@ public class OrderQuery {
|
|||
List<Leg> legItems = routeOrder.getLegItems();
|
||||
if (legItems != null && !legItems.isEmpty()) {
|
||||
//这里使用领域事件进行检查leg的订单状态 ,用户每次想要查看行程都会进行一次检查
|
||||
if (routeOrder.getApprovalStatusCode() != APPROVAL_EVENT_PREPARE) {
|
||||
legItems.forEach(leg -> legDomainService.legCheckOrder(leg));
|
||||
}
|
||||
|
||||
List<LegEvent> eventList = routeOrder.getLegItems().stream().flatMap(it -> it.getEventList().stream())
|
||||
.filter(it -> it.getLegId() == null)
|
||||
.toList();
|
||||
if (!eventList.isEmpty()) {
|
||||
ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
|
||||
if (approveOrderNo != null && approveOrderNo.getActualOrderNo() != null) {
|
||||
routeRepository.save(routeOrder);
|
||||
} else {
|
||||
routeRepository.saveTempRouteOrder(routeOrder, 15L);
|
||||
}
|
||||
}
|
||||
// if (routeOrder.getApprovalStatusCode() != APPROVAL_EVENT_PREPARE) {
|
||||
// legItems.forEach(leg -> legDomainService.legCheckOrder(leg));
|
||||
// }
|
||||
// List<LegEvent> eventList = routeOrder.getLegItems().stream().flatMap(it -> it.getEventList().stream())
|
||||
// .filter(it -> it.getLegId() == null)
|
||||
// .toList();
|
||||
// if (!eventList.isEmpty()) {
|
||||
// ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
|
||||
// if (approveOrderNo != null && approveOrderNo.getActualOrderNo() != null) {
|
||||
// routeRepository.save(routeOrder);
|
||||
// } else {
|
||||
// routeRepository.saveTempRouteOrder(routeOrder, 15L);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (legDomainService.checkLocation(legItems)) {
|
||||
routeRepository.reloadRouteOrderInCache(routeOrder);
|
||||
|
|
Loading…
Reference in New Issue