Changes in response for end date and time
This commit is contained in:
@@ -386,6 +386,6 @@ public class GepafinConstant {
|
||||
public static final String COUNT="count";
|
||||
public static final String APPLICATION_PER_CALL="applicationPerCall";
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@ public class ApplicationDao {
|
||||
// callService.validatePublishedCall(formEntity.getCall().getId());
|
||||
validateFormFields(applicationRequestBean,formEntity);
|
||||
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||
checkCallEndDate(applicationEntity.getCall());
|
||||
validator.validateUserWithCompany(request, applicationEntity.getCompanyId());
|
||||
if(Boolean.FALSE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.DRAFT.getValue()))) {
|
||||
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.setCallTitle(applicationEntity.getCall().getName());
|
||||
responseBean.setCallEndDate(applicationEntity.getCall().getEndDate());
|
||||
responseBean.setCallEndTime(applicationEntity.getCall().getEndTime());
|
||||
responseBean.setModifiedDate(applicationEntity.getCall().getUpdatedDate());
|
||||
responseBean.setCallId(applicationEntity.getCall().getId());
|
||||
responseBean.setSubmissionDate(applicationEntity.getSubmissionDate());
|
||||
@@ -1530,7 +1532,7 @@ public class ApplicationDao {
|
||||
if (now.isAfter(callEndDateTime)) {
|
||||
throw new CustomValidationException(
|
||||
Status.BAD_REQUEST,
|
||||
Translator.toLocale(GepafinConstant.CALL_END_DATE_PASSED)
|
||||
Translator.toLocale(GepafinConstant.CALL_EXPIRED)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,6 +296,8 @@ public class FlowFormDao {
|
||||
applicationDao.processForm(formEntity, applicationEntity));
|
||||
nextOrPreviousFormResponse.setCallId(applicationEntity.getCall().getId());
|
||||
nextOrPreviousFormResponse.setCallTitle(applicationEntity.getCall().getName());
|
||||
nextOrPreviousFormResponse.setCallEndDate(applicationEntity.getCall().getEndDate());
|
||||
nextOrPreviousFormResponse.setCallEndTime(applicationEntity.getCall().getEndTime());
|
||||
nextOrPreviousFormResponse.setCompanyId(applicationEntity.getCompanyId());
|
||||
nextOrPreviousFormResponse.setCompanyName(company.getCompanyName());
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.gepafin.tendermanagement.model.response.ApplicationFormFieldResponseB
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -18,6 +19,8 @@ public class ApplicationResponse{
|
||||
|
||||
private LocalDateTime callEndDate;
|
||||
|
||||
private LocalTime callEndTime;
|
||||
|
||||
private LocalDateTime modifiedDate;
|
||||
|
||||
private Integer progress;
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Data
|
||||
public class NextOrPreviousFormResponse {
|
||||
@@ -21,6 +22,10 @@ public class NextOrPreviousFormResponse {
|
||||
|
||||
private Long currentStep;
|
||||
|
||||
private LocalDateTime callEndDate;
|
||||
|
||||
private LocalTime callEndTime;
|
||||
|
||||
private Long companyId;
|
||||
|
||||
private String companyName;
|
||||
|
||||
@@ -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.
|
||||
action.context.labels.fetched.successfully = Action Context Labels Fetched Successfully.
|
||||
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.
|
||||
|
||||
@@ -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.
|
||||
action.context.labels.fetched.successfully = Etichette del contesto dell'azione recuperate correttamente.
|
||||
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.
|
||||
Reference in New Issue
Block a user