Updated code for evaluation-v2(call)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user