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

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