Applied validation for call in form
This commit is contained in:
@@ -91,6 +91,11 @@ public class FormDao {
|
|||||||
formRepository.delete(formEntity);
|
formRepository.delete(formEntity);
|
||||||
}
|
}
|
||||||
public List<FormResponseBean> getFormsByCallId(Long callId){
|
public List<FormResponseBean> getFormsByCallId(Long callId){
|
||||||
|
CallEntity callEntity=callService.getCallEntityById(callId);
|
||||||
|
if(callEntity== null){
|
||||||
|
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||||
|
Translator.toLocale(GepafinConstant.CALL_NOT_FOUND));
|
||||||
|
}
|
||||||
List<FormEntity> formEntities=formRepository.findByCallId(callId);
|
List<FormEntity> formEntities=formRepository.findByCallId(callId);
|
||||||
List<FormResponseBean> formResponseBeanList = formEntities.stream()
|
List<FormResponseBean> formResponseBeanList = formEntities.stream()
|
||||||
.map(req -> convertFormEntityToFormResponseBean(req))
|
.map(req -> convertFormEntityToFormResponseBean(req))
|
||||||
|
|||||||
Reference in New Issue
Block a user