fixed evaluation criteria issue

This commit is contained in:
rajesh
2024-11-08 20:30:09 +05:30
parent 469941ba4e
commit 4d1a1a9352
2 changed files with 53 additions and 36 deletions

View File

@@ -137,6 +137,9 @@ public class ApplicationDao {
@Autowired
private EmailNotificationDao emailNotificationDao;
@Autowired
private FormDao formDao;
public ApplicationResponseBean createApplication(HttpServletRequest request, ApplicationRequestBean applicationRequestBean, Long formId, Long applicationId) {
FormEntity formEntity = formService.validateForm(formId);
@@ -209,8 +212,10 @@ public class ApplicationDao {
ApplicationFormEntity applicationFormEntity,
List<ApplicationFormFieldResponseBean> applicationFormFieldResponseBeans) {
List<ContentResponseBean> contentResponseBeans = Utils.convertJsonStringToList(
applicationFormEntity.getForm().getContent(), ContentResponseBean.class);
// List<ContentResponseBean> contentResponseBeans = Utils.convertJsonStringToList(
// applicationFormEntity.getForm().getContent(), ContentResponseBean.class);
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(applicationFormEntity.getForm()).getContent();
for (ApplicationFormFieldEntity applicationFormFieldEntity : applicationFormFieldEntities) {
@@ -430,7 +435,8 @@ public class ApplicationDao {
private List<Long> validateFileUploadDocuments(ApplicationFormFieldRequestBean applicationFormFieldRequestBean, FormEntity formEntity) {
List<Long> documentIds=null;
List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
// List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
List<ContentResponseBean> contentResponseBeans=formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
for (ContentResponseBean contentResponseBean:contentResponseBeans){
if(Boolean.TRUE.equals(contentResponseBean.getName().equals("fileupload"))) {
if (contentResponseBean.getId().equals(applicationFormFieldRequestBean.getFieldId())) {
@@ -580,7 +586,8 @@ public class ApplicationDao {
formApplicationResponse.setId(formEntity.getId());
formApplicationResponse.setLabel(formEntity.getLabel());
formApplicationResponse.setCallId(formEntity.getCall().getId());
formApplicationResponse.setContent(Utils.convertJsonStringToList(formEntity.getContent(), ContentResponseBean.class));
// formApplicationResponse.setContent(Utils.convertJsonStringToList(formEntity.getContent(), ContentResponseBean.class)
formApplicationResponse.setContent(formDao.convertFormEntityToFormResponseBean(formEntity).getContent());
return formApplicationResponse;
}
@@ -649,7 +656,8 @@ public class ApplicationDao {
}
public void validateFormFields(ApplicationRequestBean request, FormEntity formEntity) {
List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
// List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
List<ContentResponseBean> contentResponseBeans=formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
List<ApplicationFormFieldRequestBean> requestFields = request.getFormFields();