Updated code
This commit is contained in:
@@ -252,7 +252,8 @@ public class ApplicationEvaluationDao {
|
||||
Optional<ApplicationFormFieldEntity> formFieldEntityOptional = applicationFormFieldRepository
|
||||
.findByFieldIdAndApplicationFormIdAndApplicationFormApplicationId(formFieldId, applicationFormId, applicationId);
|
||||
|
||||
if (formFieldEntityOptional.isPresent()) {
|
||||
if (formFieldEntityOptional.isPresent() && formFieldEntityOptional.get().getFieldValue()!=null && Boolean.FALSE.equals(formFieldEntityOptional.get()
|
||||
.getFieldValue().isEmpty())) {
|
||||
String[] documentIds = formFieldEntityOptional.get().getFieldValue().split(",");
|
||||
List<DocumentResponseBean> documentResponseBeans = new ArrayList<>();
|
||||
|
||||
@@ -795,6 +796,10 @@ public class ApplicationEvaluationDao {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
findFormFieldValue(applicationId, formFieldId).ifPresent(formField -> {
|
||||
Object value = formField.getFieldValue();
|
||||
if (value == null) {
|
||||
mappedField.setFieldValue(null);
|
||||
return;
|
||||
}
|
||||
List<String> labels = new ArrayList<>();
|
||||
if (value instanceof String) {
|
||||
String fieldValue = (String) value;
|
||||
@@ -1132,7 +1137,7 @@ public class ApplicationEvaluationDao {
|
||||
List<DocumentResponseBean> documentResponseBeans = new ArrayList<>();
|
||||
findFormFieldValue(applicationId, criteriaFormField.getFormFieldId()).ifPresent(formField -> {
|
||||
String fieldValue = formField.getFieldValue();
|
||||
if (fieldValue != null) {
|
||||
if (fieldValue != null && (Boolean.FALSE.equals(fieldValue.isEmpty()))) {
|
||||
String[] fieldValues = fieldValue.split(",");
|
||||
for (String value : fieldValues) {
|
||||
Long documentId = Long.valueOf(value.trim());
|
||||
@@ -1164,7 +1169,10 @@ public class ApplicationEvaluationDao {
|
||||
findFormFieldValue(applicationId, criteriaFormField.getFormFieldId()).ifPresent(formField -> {
|
||||
Object value = formField.getFieldValue();
|
||||
List<String> labels = new ArrayList<>();
|
||||
|
||||
if (value == null) {
|
||||
mappedField.setFieldValue(null);
|
||||
return;
|
||||
}
|
||||
if (value instanceof String) {
|
||||
List<?> parsedValue = parseJsonValue((String) value, objectMapper);
|
||||
addLabelsFromParsedValues(parsedValue, contentResponseBean, labels);
|
||||
@@ -1249,7 +1257,7 @@ public class ApplicationEvaluationDao {
|
||||
if (optionalFormField.isPresent()) {
|
||||
ApplicationFormFieldEntity formField = optionalFormField.get();
|
||||
|
||||
if (formField.getFieldValue() != null) {
|
||||
if (formField.getFieldValue() != null &&(Boolean.FALSE.equals(formField.getFieldValue().isEmpty()))) {
|
||||
FieldResponse fieldResponse = new FieldResponse();
|
||||
fieldResponse.setId(fieldId);
|
||||
String label = null;
|
||||
|
||||
Reference in New Issue
Block a user