Updated code

This commit is contained in:
nishainnogent
2024-09-29 21:33:23 +05:30
parent c30106a63b
commit 328726d12f

View File

@@ -211,8 +211,7 @@ public class ApplicationDao {
ApplicationResponse responseBean = new ApplicationResponse(); ApplicationResponse responseBean = new ApplicationResponse();
List<FlowEdgesEntity> flowEdgesList = flowEdgesRepository.findByCallId(applicationEntity.getCall().getId()); List<FlowEdgesEntity> flowEdgesList = flowEdgesRepository.findByCallId(applicationEntity.getCall().getId());
Long totalFormSteps = flowFormDao.calculateTotalSteps(flowEdgesList); Long totalFormSteps = flowFormDao.calculateTotalSteps(flowEdgesList);
List<ApplicationFormEntity> applicationFormList = applicationFormRepository.findByApplicationId(applicationEntity.getId()); Long completedSteps= Long.valueOf(flowFormDao.getCompletedSteps(applicationEntity));
Long completedSteps=(Long.valueOf(applicationFormList.size()));
Integer progress=calculateProgress(totalFormSteps,completedSteps); Integer progress=calculateProgress(totalFormSteps,completedSteps);
responseBean.setId(applicationEntity.getId()); responseBean.setId(applicationEntity.getId());
responseBean.setProgress(progress); responseBean.setProgress(progress);