Updated code for file detail in amendment

This commit is contained in:
nisha
2024-12-13 17:48:02 +05:30
parent 2b93145b5e
commit 709d40e032
2 changed files with 9 additions and 5 deletions

View File

@@ -376,10 +376,12 @@ public class ApplicationAmendmentRequestDao {
amendmentDocumentResponse.setFieldId(amendmentFieldRequest.getFieldId());
amendmentDocumentResponse.setNameValue(amendmentFieldRequest.getNameValue());
amendmentDocumentResponse.setValid(amendmentFieldRequest.getValid());
DocumentEntity documentEntity = documentService.validateDocument(Long.valueOf(amendmentFieldRequest.getFileValue()));
DocumentResponseBean responseBean = applicationEvaluationDao.createDocumentResponseBean(documentEntity);
amendmentDocumentResponse.setFileValue(responseBean);
amendmentDocumentResponse.setFileValue(null);
if(amendmentFieldRequest.getFileValue()!=null) {
DocumentEntity documentEntity = documentService.validateDocument(Long.valueOf(amendmentFieldRequest.getFileValue()));
DocumentResponseBean responseBean = applicationEvaluationDao.createDocumentResponseBean(documentEntity);
amendmentDocumentResponse.setFileValue(List.of(responseBean));
}
return amendmentDocumentResponse;
}

View File

@@ -2,11 +2,13 @@ package net.gepafin.tendermanagement.model.response;
import lombok.Data;
import java.util.List;
@Data
public class AmendmentDocumentResponse {
private String fieldId;
private String nameValue;
private DocumentResponseBean fileValue;
private List<DocumentResponseBean> fileValue;
private Boolean valid = false;
}