Updated code for evaluation-v2(call)

This commit is contained in:
Piyush
2025-01-24 19:33:47 +05:30
parent e64d10add6
commit 0ebd33e544
26 changed files with 214 additions and 36 deletions

View File

@@ -149,17 +149,20 @@ public class EvaluationFormDao {
}
public List<EvaluationFormResponseBean> getEvaluationFormsByCallId(CallEntity callEntity){
if(callEntity== null){
public EvaluationFormResponseBean getEvaluationFormByCallId(CallEntity callEntity) {
if (callEntity == null) {
throw new CustomValidationException(Status.VALIDATION_ERROR,
Translator.toLocale(GepafinConstant.CALL_NOT_FOUND));
}
List<EvaluationFormEntity> formEntities= evaluationFormRepository.findByCallIdAndIsDeletedFalse(callEntity.getId());
List<EvaluationFormResponseBean> formResponseBeanList = formEntities.stream()
.map(req -> convertEvaluationFormEntityToEvaluationFormResponseBean(req))
.collect(Collectors.toList());
return formResponseBeanList;
EvaluationFormEntity formEntity = evaluationFormRepository
.findByCallIdAndIsDeletedFalse(callEntity.getId());
if(formEntity!=null)
return convertEvaluationFormEntityToEvaluationFormResponseBean(formEntity);
else return null;
}
public String setContentResponseBean(List<ContentRequestBean> contentRequestBeans){
String stringContentRequest = Utils.convertListToJsonString(contentRequestBeans);
List<ContentRequestBean> cloneContentRequestBeans = Utils.convertJsonStringToList(stringContentRequest, ContentRequestBean.class);