update pom and fix status
This commit is contained in:
parent
f0db67d3e0
commit
604ec09f78
|
@ -217,16 +217,16 @@ public class WordFileTransformerService implements FileTransformerClient {
|
|||
buildPlanSectionField(planEntity, document, fieldModel);
|
||||
}
|
||||
}
|
||||
|
||||
final boolean isFinalized = planEntity.getStatus() != null && planEntity.getStatus().equals(PlanStatus.Finalized);
|
||||
|
||||
final boolean isFinalized = planEntity.getStatus() != null && planEntity.getStatus().getInternalStatus() != null && planEntity.getStatus().getInternalStatus().equals(PlanStatus.Finalized);
|
||||
final boolean isPublic = planEntity.getPublicAfter() != null && planEntity.getPublicAfter().isAfter(Instant.now());
|
||||
|
||||
|
||||
List<DescriptionModel> descriptions = planEntity.getDescriptions() == null ? new ArrayList<>() : planEntity.getDescriptions().stream()
|
||||
.filter(item -> item.getStatus() != DescriptionStatus.Canceled)
|
||||
.filter(item -> !isPublic && !isFinalized || item.getStatus() == DescriptionStatus.Finalized)
|
||||
.filter(item -> item.getStatus()!= null && item.getStatus().getInternalStatus() != null && item.getStatus().getInternalStatus() != DescriptionStatus.Canceled)
|
||||
.filter(item -> !isPublic && !isFinalized || (item.getStatus().getInternalStatus() != null && item.getStatus().getInternalStatus() == DescriptionStatus.Finalized))
|
||||
.filter(item -> item.getSectionId().equals(sectionModel.getId()))
|
||||
.sorted(Comparator.comparing(DescriptionModel::getCreatedAt)).toList();
|
||||
|
||||
|
||||
if (!descriptions.isEmpty()) {
|
||||
buildSectionDescriptions(document, descriptions);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue