fix:优化行程节点变更原因的获取逻辑

This commit is contained in:
lulz1 2024-07-01 08:58:25 +08:00
parent 8ad0807067
commit 4a75189756
1 changed files with 4 additions and 5 deletions

View File

@ -254,11 +254,10 @@ public class Leg implements Serializable, EventManageable {
// 添加变更理由 // 添加变更理由
this.eventList this.eventList.stream()
.stream()
.filter(legEvent -> legEvent.getEventType().equals(LEG_EVENT_CHANGE)) .filter(legEvent -> legEvent.getEventType().equals(LEG_EVENT_CHANGE))
.max(Comparator.comparingLong(LegEvent::getLegEventId)) .max(Comparator.comparing(LegEvent::getHappenTime))
.ifPresent(legEvent -> this.changeReason = legEvent.getExtension()); .ifPresent(latestChangeEvent -> this.changeReason = latestChangeEvent.getExtension());
if (this.legApprovalEventList == null || this.legApprovalEventList.isEmpty()) { if (this.legApprovalEventList == null || this.legApprovalEventList.isEmpty()) {
this.legApprovalStatus = LEG_APPROVAL_STATUS_NOT; this.legApprovalStatus = LEG_APPROVAL_STATUS_NOT;