Updated code for file detail in amendment
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user