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) {
|
||||
|
||||
@@ -221,7 +221,9 @@ public class FormDao {
|
||||
.validateCustom(value, fieldValidatorBean.getCustom(), fieldId); // Add the custom validation here
|
||||
if (fieldValidatorBean.getCustom() != null && fieldValidatorBean.getCustom().equals(GepafinConstant.IS_PIVA)) {
|
||||
String error = validateVatNumber(value, fieldValidatorBean.getCustom(), fieldId);
|
||||
validator.addError(error);
|
||||
if(error != null) {
|
||||
validator.addError(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
validator.validate();
|
||||
|
||||
Reference in New Issue
Block a user