fix:取消查询行程规划单的事件检查

This commit is contained in:
lulz1 2024-07-12 13:46:49 +08:00
parent 3bca3cbb97
commit c62a6f661a
1 changed files with 14 additions and 15 deletions

View File

@ -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);