Test
Anonymous
java
08/22/2023 9:46 AM
1.1 KB
14
Indexable
if (!CollectionUtils.isEmpty(projectsWithCommercialStopEnabled)) {
Study projectWithMaxCommercialStop = Collections.max(projectsWithCommercialStopEnabled,
Comparator.comparingInt(Study::getCommercialStopDate));
retrofitPlanVesselDto.setCommercialStopDate(projectWithMaxCommercialStop.getCommercialStopDate());
if(Boolean.TRUE.equals(vessel.hasDryDockDate())){
int dryDockYear = vessel.getVesselCharacteristic().getDryDockDate().getYear();
if (dryDockYear < projectWithMaxCommercialStop.getCommercialStopDate()) {
retrofitPlanVesselDto.setNextDryDockDate(null);
retrofitPlanVesselDto.setCommercialStopDate(projectWithMaxCommercialStop.getCommercialStopDate());
}
}
}Editor is loading...