Updated code
This commit is contained in:
@@ -243,11 +243,11 @@ public class FlowFormDao {
|
||||
.map(FlowEdgesEntity::getSourceId)
|
||||
.toList();
|
||||
|
||||
List<FormEntity> previousForms = formRepository.findByIdIn(previousFormIds);
|
||||
List<ApplicationFormEntity> applicationFormEntities=applicationFormRepository.findByFormIdInAndApplicationId(previousFormIds,applicationEntity.getId());
|
||||
|
||||
previousForms.sort(Comparator.comparing(FormEntity::getCreatedDate).reversed());
|
||||
applicationFormEntities.sort(Comparator.comparing(ApplicationFormEntity::getCreatedDate).reversed());
|
||||
|
||||
return previousForms.isEmpty() ? null : previousForms.get(0).getId();
|
||||
return applicationFormEntities.isEmpty() ? null : applicationFormEntities.get(0).getForm().getId();
|
||||
}
|
||||
public NextOrPreviousFormResponse getnextOrPreviousForm(ApplicationEntity applicationEntity, Long formId,
|
||||
FormActionEnum action) {
|
||||
|
||||
Reference in New Issue
Block a user