Done ticket GEPAFINBE-88

This commit is contained in:
harish
2024-11-11 16:33:19 +05:30
parent c2af1bddc4
commit 63c70f1d69
2 changed files with 9 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import net.gepafin.tendermanagement.model.request.FieldRequest;
import net.gepafin.tendermanagement.model.response.*;
import net.gepafin.tendermanagement.repositories.*;
import net.gepafin.tendermanagement.service.ApplicationService;
import net.gepafin.tendermanagement.service.CallService;
import net.gepafin.tendermanagement.service.UserService;
import net.gepafin.tendermanagement.util.Utils;
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
@@ -46,6 +47,8 @@ public class ApplicationEvaluationDao {
@Autowired
private UserService userService;
// @Autowired
// private CallService callService;
@Autowired
private EvaluationCriteriaRepository evaluationCriteriaRepository;
@@ -193,6 +196,7 @@ public class ApplicationEvaluationDao {
.findFirst()
.ifPresent(contentBean -> {
mappedField.setFieldLabel(getLabelForField(contentBean));
mappedField.setFieldName(contentBean.getName());
switch (contentBean.getName()) {
case "fileupload":
mapFileFieldDetails(mappedField, formFieldId, applicationForm.getId(), applicationId);
@@ -712,6 +716,7 @@ public class ApplicationEvaluationDao {
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
contentResponseBeans.stream().filter(bean -> bean.getId().equals(formFieldId)).findFirst().ifPresent(contentResponseBean -> {
String label = getLabel(contentResponseBean);
mappedField.setFieldName(contentResponseBean.getName());
mappedField.setFieldLabel(label);
switch (contentResponseBean.getName()) {
case "fileupload":
@@ -1007,7 +1012,7 @@ public class ApplicationEvaluationDao {
String label = getLabelFromSettings(contentResponseBean);
mappedField.setFieldLabel(label);
mappedField.setFieldName(contentResponseBean.getName());
boolean isCheckbox = "checkboxes".equals(contentResponseBean.getName());
boolean isFileUpload = "fileupload".equals(contentResponseBean.getName());
boolean isParagraph = "paragraph".equals(contentResponseBean.getName());
@@ -1290,6 +1295,8 @@ public class ApplicationEvaluationDao {
if (existingEntityOptional.isPresent()) {
ApplicationEvaluationEntity existingEntity = existingEntityOptional.get();
// UserEntity userEntity = userService.validateUser(application.getUserId());
// callService.validatePublishedCall(application.getCall().getId(), userEntity.getHub().getId());
application.setStatus(newStatus.getValue());
application = applicationRepository.save(application);
String statusType = application.getStatus();