Changes in response for end date and time

This commit is contained in:
nisha
2025-01-17 15:14:22 +05:30
parent ca5d93ae1c
commit 378d91f9e6
7 changed files with 16 additions and 4 deletions

View File

@@ -386,6 +386,6 @@ public class GepafinConstant {
public static final String COUNT="count"; public static final String COUNT="count";
public static final String APPLICATION_PER_CALL="applicationPerCall"; public static final String APPLICATION_PER_CALL="applicationPerCall";
public static final String APPLICATION_PER_STATUS="applicationPerStatus"; public static final String APPLICATION_PER_STATUS="applicationPerStatus";
public static final String CALL_END_DATE_PASSED="call.end.date.passed"; public static final String CALL_EXPIRED="call.expired";
} }

View File

@@ -188,6 +188,7 @@ public class ApplicationDao {
// callService.validatePublishedCall(formEntity.getCall().getId()); // callService.validatePublishedCall(formEntity.getCall().getId());
validateFormFields(applicationRequestBean,formEntity); validateFormFields(applicationRequestBean,formEntity);
ApplicationEntity applicationEntity = validateApplication(applicationId); ApplicationEntity applicationEntity = validateApplication(applicationId);
checkCallEndDate(applicationEntity.getCall());
validator.validateUserWithCompany(request, applicationEntity.getCompanyId()); validator.validateUserWithCompany(request, applicationEntity.getCompanyId());
if(Boolean.FALSE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.DRAFT.getValue()))) { if(Boolean.FALSE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.DRAFT.getValue()))) {
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.APPLICATION_NOT_IN_DRAFT_STATUS)); throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.APPLICATION_NOT_IN_DRAFT_STATUS));
@@ -407,6 +408,7 @@ public class ApplicationDao {
responseBean.setProgress(progress); responseBean.setProgress(progress);
responseBean.setCallTitle(applicationEntity.getCall().getName()); responseBean.setCallTitle(applicationEntity.getCall().getName());
responseBean.setCallEndDate(applicationEntity.getCall().getEndDate()); responseBean.setCallEndDate(applicationEntity.getCall().getEndDate());
responseBean.setCallEndTime(applicationEntity.getCall().getEndTime());
responseBean.setModifiedDate(applicationEntity.getCall().getUpdatedDate()); responseBean.setModifiedDate(applicationEntity.getCall().getUpdatedDate());
responseBean.setCallId(applicationEntity.getCall().getId()); responseBean.setCallId(applicationEntity.getCall().getId());
responseBean.setSubmissionDate(applicationEntity.getSubmissionDate()); responseBean.setSubmissionDate(applicationEntity.getSubmissionDate());
@@ -1530,7 +1532,7 @@ public class ApplicationDao {
if (now.isAfter(callEndDateTime)) { if (now.isAfter(callEndDateTime)) {
throw new CustomValidationException( throw new CustomValidationException(
Status.BAD_REQUEST, Status.BAD_REQUEST,
Translator.toLocale(GepafinConstant.CALL_END_DATE_PASSED) Translator.toLocale(GepafinConstant.CALL_EXPIRED)
); );
} }
} }

View File

@@ -296,6 +296,8 @@ public class FlowFormDao {
applicationDao.processForm(formEntity, applicationEntity)); applicationDao.processForm(formEntity, applicationEntity));
nextOrPreviousFormResponse.setCallId(applicationEntity.getCall().getId()); nextOrPreviousFormResponse.setCallId(applicationEntity.getCall().getId());
nextOrPreviousFormResponse.setCallTitle(applicationEntity.getCall().getName()); nextOrPreviousFormResponse.setCallTitle(applicationEntity.getCall().getName());
nextOrPreviousFormResponse.setCallEndDate(applicationEntity.getCall().getEndDate());
nextOrPreviousFormResponse.setCallEndTime(applicationEntity.getCall().getEndTime());
nextOrPreviousFormResponse.setCompanyId(applicationEntity.getCompanyId()); nextOrPreviousFormResponse.setCompanyId(applicationEntity.getCompanyId());
nextOrPreviousFormResponse.setCompanyName(company.getCompanyName()); nextOrPreviousFormResponse.setCompanyName(company.getCompanyName());

View File

@@ -5,6 +5,7 @@ import net.gepafin.tendermanagement.model.response.ApplicationFormFieldResponseB
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List; import java.util.List;
@Data @Data
@@ -18,6 +19,8 @@ public class ApplicationResponse{
private LocalDateTime callEndDate; private LocalDateTime callEndDate;
private LocalTime callEndTime;
private LocalDateTime modifiedDate; private LocalDateTime modifiedDate;
private Integer progress; private Integer progress;

View File

@@ -5,6 +5,7 @@ import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalTime;
@Data @Data
public class NextOrPreviousFormResponse { public class NextOrPreviousFormResponse {
@@ -20,6 +21,10 @@ public class NextOrPreviousFormResponse {
private Long completedSteps; private Long completedSteps;
private Long currentStep; private Long currentStep;
private LocalDateTime callEndDate;
private LocalTime callEndTime;
private Long companyId; private Long companyId;

View File

@@ -350,4 +350,4 @@ user.with.company.not.found = User with company not found for user or company.
user.action.fetched.successfully = User action details fetched successfully. user.action.fetched.successfully = User action details fetched successfully.
action.context.labels.fetched.successfully = Action Context Labels Fetched Successfully. action.context.labels.fetched.successfully = Action Context Labels Fetched Successfully.
amount.accepted.required=Amount accepted is required while approving the application. amount.accepted.required=Amount accepted is required while approving the application.
call.end.date.passed=Call end date and time has been passed. call.expired=Call has been expired.

View File

@@ -341,4 +341,4 @@ user.with.company.not.found = Utente con azienda non trovato per utente o aziend
user.action.fetched.successfully = Dettagli sull'azione dell'utente recuperati correttamente. user.action.fetched.successfully = Dettagli sull'azione dell'utente recuperati correttamente.
action.context.labels.fetched.successfully = Etichette del contesto dell'azione recuperate correttamente. action.context.labels.fetched.successfully = Etichette del contesto dell'azione recuperate correttamente.
amount.accepted.required=L'importo accettato � obbligatorio durante l'approvazione della domanda. amount.accepted.required=L'importo accettato � obbligatorio durante l'approvazione della domanda.
call.end.date.passed=La data e l'ora di fine della chiamata sono state trascorse. call.expired=La chiamata è scaduta.