Resolved conflicts

This commit is contained in:
nisha
2025-02-24 18:10:28 +05:30
72 changed files with 1278 additions and 181 deletions

View File

@@ -200,7 +200,7 @@ public class FieldValidator {
public FieldValidator validateCustomTableValidation(String value, String customRule, String fieldId, ContentResponseBean contentResponseBean) {
if (customRule == null || value == null) {
if (customRule == null ) {
return this; // No custom rule to validate
}
@@ -226,6 +226,7 @@ public class FieldValidator {
.findFirst() // Get the first matching result
.orElse(null); // Default to null if no match
if (tableType!=null){
try {
Object object = PdfUtils.extractRows(value);;
@@ -291,6 +292,22 @@ public class FieldValidator {
//
// }
boolean hasAtLeastOneNonEmptyPredefinedFalse = fieldValueList.stream()
.anyMatch(field -> stateFieldMap.entrySet().stream()
.filter(entry -> Boolean.FALSE.equals(entry.getValue())) // Check only predefined: false fields
.anyMatch(entry -> {
Object fieldValue = field.get(entry.getKey());
return fieldValue != null && !StringUtils.isEmpty(fieldValue.toString());
})
);
if (!hasAtLeastOneNonEmptyPredefinedFalse) {
errors.add(MessageFormat.format(
Translator.toLocale(GepafinConstant.VALIDATION_IN_TABLE),
fieldId));
}
} catch (Exception e) {
}
}

View File

@@ -61,7 +61,7 @@ public class UserActionAspect {
handleSuccessResponse((ResponseEntity<?>) result, storedUserActionId == null ? userActionId : storedUserActionId);
}
} catch (Exception ex) {
log.error("Exception occurred: ", ex);
// log.error("Exception occurred: ", ex);
handleError(ex, getUserActionIdFromRequest(request));
throw ex;
} finally {

View File

@@ -785,5 +785,7 @@ public class Utils {
return input.matches("-?\\d+(\\.\\d+)?");
}
public static boolean isValidBoolean(String value) {
return "true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value);
}
}