Resolved Conflicts
This commit is contained in:
@@ -494,6 +494,8 @@ public class GepafinConstant {
|
|||||||
public static final String EMAIL_SUPPORT = "email_support";
|
public static final String EMAIL_SUPPORT = "email_support";
|
||||||
public static final String PHONE_SUPPORT = "phone_support";
|
public static final String PHONE_SUPPORT = "phone_support";
|
||||||
|
|
||||||
|
public static final String PDF_TRUE="PDF_TRUE";
|
||||||
|
public static final String PDF_FALSE="PDF_FALSE";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -186,8 +186,12 @@ public class ApplicationEvaluationDao {
|
|||||||
List<CallTargetAudienceChecklistEntity> checklistEntities = callTargetAudienceChecklistRepository
|
List<CallTargetAudienceChecklistEntity> checklistEntities = callTargetAudienceChecklistRepository
|
||||||
.findByCallIdAndLookupDataTypeAndIsDeletedFalse(call.getId(), LookUpDataEntity.LookUpDataTypeEnum.CHECKLIST.getValue());
|
.findByCallIdAndLookupDataTypeAndIsDeletedFalse(call.getId(), LookUpDataEntity.LookUpDataTypeEnum.CHECKLIST.getValue());
|
||||||
List<ApplicationFormEntity> applicationFormEntities = applicationFormRepository.findByApplicationId(entity.getApplicationId());
|
List<ApplicationFormEntity> applicationFormEntities = applicationFormRepository.findByApplicationId(entity.getApplicationId());
|
||||||
|
CompanyEntity company=companyService.validateCompany(entity.getAssignedApplicationsEntity().getApplication().getCompanyId());
|
||||||
|
|
||||||
setAmendmentDetails(entity,response);
|
setAmendmentDetails(entity,response);
|
||||||
|
|
||||||
|
response.setCompanyVatNumber(company.getVatNumber());
|
||||||
|
response.setCompanyCodiceAteco(company.getCodiceAteco());
|
||||||
setCriteriaResponses(entity, response, evaluationCriterias);
|
setCriteriaResponses(entity, response, evaluationCriterias);
|
||||||
setChecklistResponses(entity, response, checklistEntities);
|
setChecklistResponses(entity, response, checklistEntities);
|
||||||
setFieldResponses(entity, response, applicationFormEntities);
|
setFieldResponses(entity, response, applicationFormEntities);
|
||||||
@@ -261,27 +265,32 @@ public class ApplicationEvaluationDao {
|
|||||||
for (EvaluationDocumentRequest doc : docRequest) {
|
for (EvaluationDocumentRequest doc : docRequest) {
|
||||||
EvaluationDocumentResponse evaluationDocResponse = new EvaluationDocumentResponse();
|
EvaluationDocumentResponse evaluationDocResponse = new EvaluationDocumentResponse();
|
||||||
if (doc.getFileValue() != null) {
|
if (doc.getFileValue() != null) {
|
||||||
Long fileId = Long.valueOf(doc.getFileValue().toString());
|
if( Boolean.FALSE.equals(doc.getFileValue().isEmpty())) {
|
||||||
documentRepository.findByIdAndNotDeleted(fileId).ifPresent(documentEntity -> {
|
Long fileId = Long.valueOf(doc.getFileValue().toString());
|
||||||
DocumentResponseBean documentResponseBean = new DocumentResponseBean();
|
documentRepository.findByIdAndNotDeleted(fileId).ifPresent(documentEntity -> {
|
||||||
documentResponseBean.setId(documentEntity.getId());
|
DocumentResponseBean documentResponseBean = new DocumentResponseBean();
|
||||||
documentResponseBean.setName(documentEntity.getFileName());
|
documentResponseBean.setId(documentEntity.getId());
|
||||||
documentResponseBean.setType(DocumentTypeEnum.valueOf(documentEntity.getType()));
|
documentResponseBean.setName(documentEntity.getFileName());
|
||||||
documentResponseBean.setSource(DocumentSourceTypeEnum.valueOf(documentEntity.getSource()));
|
documentResponseBean.setType(DocumentTypeEnum.valueOf(documentEntity.getType()));
|
||||||
documentResponseBean.setSourceId(documentEntity.getSourceId());
|
documentResponseBean.setSource(DocumentSourceTypeEnum.valueOf(documentEntity.getSource()));
|
||||||
documentResponseBean.setFilePath(documentEntity.getFilePath());
|
documentResponseBean.setSourceId(documentEntity.getSourceId());
|
||||||
documentResponseBean.setCreatedDate(documentEntity.getCreatedDate());
|
documentResponseBean.setFilePath(documentEntity.getFilePath());
|
||||||
documentResponseBean.setUpdatedDate(documentEntity.getUpdatedDate());
|
documentResponseBean.setCreatedDate(documentEntity.getCreatedDate());
|
||||||
documentResponseBean.setDocumentAttachmentId(documentEntity.getDocumentAttachmentId());
|
documentResponseBean.setUpdatedDate(documentEntity.getUpdatedDate());
|
||||||
evaluationDocResponse.setFileValue(List.of(documentResponseBean));
|
documentResponseBean.setDocumentAttachmentId(documentEntity.getDocumentAttachmentId());
|
||||||
evaluationDocResponse.setNameValue(doc.getNameValue());
|
evaluationDocResponse.setFileValue(List.of(documentResponseBean));
|
||||||
evaluationDocResponse.setValid(doc.getValid());
|
});
|
||||||
evaluationDocResponse.setFieldId(doc.getFieldId());
|
}
|
||||||
});
|
else {
|
||||||
}
|
evaluationDocResponse.setFileValue(null);
|
||||||
if (evaluationDocResponse.getFileValue() == null) {
|
}
|
||||||
continue;
|
evaluationDocResponse.setNameValue(doc.getNameValue());
|
||||||
|
evaluationDocResponse.setValid(doc.getValid());
|
||||||
|
evaluationDocResponse.setFieldId(doc.getFieldId());
|
||||||
}
|
}
|
||||||
|
// if (evaluationDocResponse.getFileValue() == null) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
evaluationDocResponses.add(evaluationDocResponse);
|
evaluationDocResponses.add(evaluationDocResponse);
|
||||||
}
|
}
|
||||||
response.setEvaluationDocument(evaluationDocResponses);
|
response.setEvaluationDocument(evaluationDocResponses);
|
||||||
@@ -1150,6 +1159,7 @@ public class ApplicationEvaluationDao {
|
|||||||
call = callRepository.findCallEntityByApplicationId(applicationId);
|
call = callRepository.findCallEntityByApplicationId(applicationId);
|
||||||
assignedApplications = assignedApplicationsRepository.findByApplicationIdAndIsDeletedFalse(applicationId).orElse(null);
|
assignedApplications = assignedApplicationsRepository.findByApplicationIdAndIsDeletedFalse(applicationId).orElse(null);
|
||||||
}
|
}
|
||||||
|
CompanyEntity company=companyService.validateCompany(application.getCompanyId());
|
||||||
List<EvaluationCriteriaEntity> evaluationCriterias = evaluationCriteriaRepository
|
List<EvaluationCriteriaEntity> evaluationCriterias = evaluationCriteriaRepository
|
||||||
.findByCallIdAndLookupDataTypeAndIsDeletedFalse(call.getId(), LookUpDataEntity.LookUpDataTypeEnum.EVALUATION_CRITERIA.getValue());
|
.findByCallIdAndLookupDataTypeAndIsDeletedFalse(call.getId(), LookUpDataEntity.LookUpDataTypeEnum.EVALUATION_CRITERIA.getValue());
|
||||||
List<CallTargetAudienceChecklistEntity> checklistEntities = callTargetAudienceChecklistRepository
|
List<CallTargetAudienceChecklistEntity> checklistEntities = callTargetAudienceChecklistRepository
|
||||||
@@ -1168,6 +1178,8 @@ public class ApplicationEvaluationDao {
|
|||||||
response.setCallEndDate(callEndDate);
|
response.setCallEndDate(callEndDate);
|
||||||
response.setNumberOfCheck(call.getNumberOfCheck());
|
response.setNumberOfCheck(call.getNumberOfCheck());
|
||||||
response.setAppointmentTemplateId(call.getAppointmentTemplateId());
|
response.setAppointmentTemplateId(call.getAppointmentTemplateId());
|
||||||
|
response.setCompanyVatNumber(company.getVatNumber());
|
||||||
|
response.setCompanyCodiceAteco(company.getCodiceAteco());
|
||||||
setCriteriaResponses(entity, application.getId(), response, evaluationCriterias);
|
setCriteriaResponses(entity, application.getId(), response, evaluationCriterias);
|
||||||
setChecklistResponses(entity, application.getId(), response, checklistEntities);
|
setChecklistResponses(entity, application.getId(), response, checklistEntities);
|
||||||
setFileResponses(entity, application.getId(), response, applicationFormEntities);
|
setFileResponses(entity, application.getId(), response, applicationFormEntities);
|
||||||
@@ -1963,8 +1975,10 @@ public class ApplicationEvaluationDao {
|
|||||||
|
|
||||||
for (EvaluationDocumentRequest doc : docRequest) {
|
for (EvaluationDocumentRequest doc : docRequest) {
|
||||||
if (doc.getFileValue() != null) {
|
if (doc.getFileValue() != null) {
|
||||||
Long fileId = Long.valueOf(doc.getFileValue());
|
if(Boolean.FALSE.equals(doc.getFileValue().isEmpty())) {
|
||||||
documentService.validateDocument(fileId);
|
Long fileId = Long.valueOf(doc.getFileValue());
|
||||||
|
documentService.validateDocument(fileId);
|
||||||
|
}
|
||||||
existingDocs.add(doc);
|
existingDocs.add(doc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2234,6 +2248,7 @@ public class ApplicationEvaluationDao {
|
|||||||
private ApplicationEvaluationFormResponse processEvaluationForm(ApplicationEvaluationEntity evaluationEntity){
|
private ApplicationEvaluationFormResponse processEvaluationForm(ApplicationEvaluationEntity evaluationEntity){
|
||||||
|
|
||||||
Object convertedResponse = convertToResponse(evaluationEntity);
|
Object convertedResponse = convertToResponse(evaluationEntity);
|
||||||
|
CompanyEntity company=companyService.validateCompany(evaluationEntity.getAssignedApplicationsEntity().getApplication().getCompanyId());
|
||||||
|
|
||||||
ApplicationEvaluationFormResponse response = objectMapper.convertValue(convertedResponse, ApplicationEvaluationFormResponse.class);
|
ApplicationEvaluationFormResponse response = objectMapper.convertValue(convertedResponse, ApplicationEvaluationFormResponse.class);
|
||||||
EvaluationFormEntity evaluationFormEntity = evaluationFormRepository.findByCallIdAndIsDeletedFalse(evaluationEntity.getAssignedApplicationsEntity().getApplication().getCall().getId());
|
EvaluationFormEntity evaluationFormEntity = evaluationFormRepository.findByCallIdAndIsDeletedFalse(evaluationEntity.getAssignedApplicationsEntity().getApplication().getCall().getId());
|
||||||
@@ -2242,7 +2257,8 @@ public class ApplicationEvaluationDao {
|
|||||||
if (evaluationFormEntity != null) {
|
if (evaluationFormEntity != null) {
|
||||||
response.setApplicationEvaluationFormResponse(convertEvaluationFormToResponse(evaluationFormEntity, evaluationEntity));
|
response.setApplicationEvaluationFormResponse(convertEvaluationFormToResponse(evaluationFormEntity, evaluationEntity));
|
||||||
}
|
}
|
||||||
|
response.setCompanyVatNumber(company.getVatNumber());
|
||||||
|
response.setCompanyCodiceAteco(company.getCodiceAteco());
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import net.gepafin.tendermanagement.constants.GepafinConstant;
|
|||||||
import net.gepafin.tendermanagement.entities.*;
|
import net.gepafin.tendermanagement.entities.*;
|
||||||
import net.gepafin.tendermanagement.model.request.FieldLabelValuePairRequest;
|
import net.gepafin.tendermanagement.model.request.FieldLabelValuePairRequest;
|
||||||
import net.gepafin.tendermanagement.model.response.*;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
|
import net.gepafin.tendermanagement.repositories.DocumentRepository;
|
||||||
import net.gepafin.tendermanagement.repositories.HubRepository;
|
import net.gepafin.tendermanagement.repositories.HubRepository;
|
||||||
import net.gepafin.tendermanagement.service.CallService;
|
import net.gepafin.tendermanagement.service.CallService;
|
||||||
import net.gepafin.tendermanagement.util.PdfUtils;
|
import net.gepafin.tendermanagement.util.PdfUtils;
|
||||||
@@ -54,6 +55,9 @@ public class PdfDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private HubRepository hubRepository;
|
private HubRepository hubRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DocumentRepository documentRepository;
|
||||||
|
|
||||||
public static final Logger log = LoggerFactory.getLogger(PdfDao.class);
|
public static final Logger log = LoggerFactory.getLogger(PdfDao.class);
|
||||||
|
|
||||||
public byte[] generatePdf(HttpServletRequest request,Long applicationId) {
|
public byte[] generatePdf(HttpServletRequest request,Long applicationId) {
|
||||||
@@ -219,8 +223,10 @@ public class PdfDao {
|
|||||||
if (fieldValue.trim().equalsIgnoreCase("true")) {
|
if (fieldValue.trim().equalsIgnoreCase("true")) {
|
||||||
// Use images for tick and cross
|
// Use images for tick and cross
|
||||||
try {
|
try {
|
||||||
|
DocumentEntity documentEntity = documentRepository.findBySource(GepafinConstant.PDF_TRUE).get(0);
|
||||||
|
|
||||||
// img = Image.getInstance("true.jpg"); update code after cherry-pick
|
// img = Image.getInstance("true.jpg"); update code after cherry-pick
|
||||||
img = Image.getInstance("https://mementoresources.s3.eu-west-1.amazonaws.com/gepafin/true.png");
|
img = Image.getInstance(documentEntity.getFilePath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Error while uploading image for pdf for true");
|
log.error("Error while uploading image for pdf for true");
|
||||||
}
|
}
|
||||||
@@ -238,7 +244,9 @@ public class PdfDao {
|
|||||||
} else if (fieldValue.trim().equalsIgnoreCase("false")) {
|
} else if (fieldValue.trim().equalsIgnoreCase("false")) {
|
||||||
// Use images for tick and cross
|
// Use images for tick and cross
|
||||||
try {
|
try {
|
||||||
img = Image.getInstance("https://mementoresources.s3.eu-west-1.amazonaws.com/gepafin/false.png");
|
DocumentEntity documentEntity = documentRepository.findBySource(GepafinConstant.PDF_FALSE).get(0);
|
||||||
|
|
||||||
|
img = Image.getInstance(documentEntity.getFilePath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Error while uploading image for pdf for false");
|
log.error("Error while uploading image for pdf for false");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,5 +46,7 @@ public class ApplicationEvaluationFormResponse {
|
|||||||
private EvaluationVersionEnum evaluationVersion;
|
private EvaluationVersionEnum evaluationVersion;
|
||||||
private Long numberOfCheck;
|
private Long numberOfCheck;
|
||||||
private Long appointmentTemplateId;
|
private Long appointmentTemplateId;
|
||||||
|
private String companyVatNumber;
|
||||||
|
private String companyCodiceAteco;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,5 +47,7 @@ public class ApplicationEvaluationResponse {
|
|||||||
private Long numberOfCheck;
|
private Long numberOfCheck;
|
||||||
private Long appointmentTemplateId;
|
private Long appointmentTemplateId;
|
||||||
private EvaluationVersionEnum evaluationVersion;
|
private EvaluationVersionEnum evaluationVersion;
|
||||||
|
private String companyVatNumber;
|
||||||
|
private String companyCodiceAteco;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2660,5 +2660,19 @@
|
|||||||
<sqlFile dbms="postgresql"
|
<sqlFile dbms="postgresql"
|
||||||
path="db/dump/update_form_field_data_12-03-2025.sql"/>
|
path="db/dump/update_form_field_data_12-03-2025.sql"/>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
<changeSet id="18-03-2025_NK_181010" author="Nisha Kashyap">
|
||||||
|
<insert tableName="document">
|
||||||
|
<column name="file_name" value="GEPAFIN_PDF_TRUE.PNG"></column>
|
||||||
|
<column name="file_path" value="https://mementoresources.s3.eu-west-1.amazonaws.com/gepafin/local/template/true.png"></column>
|
||||||
|
<column name="type" value="IMAGE"></column>
|
||||||
|
<column name="source" value="PDF_TRUE"></column>
|
||||||
|
</insert>
|
||||||
|
<insert tableName="document">
|
||||||
|
<column name="file_name" value="GEPAFIN_PDF_FALSE.PNG"></column>
|
||||||
|
<column name="file_path" value="https://mementoresources.s3.eu-west-1.amazonaws.com/gepafin/local/template/false.png"></column>
|
||||||
|
<column name="type" value="IMAGE"></column>
|
||||||
|
<column name="source" value="PDF_FALSE"></column>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
Reference in New Issue
Block a user