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 {
|
||||
@@ -20,6 +21,10 @@ public class NextOrPreviousFormResponse {
|
||||
private Long completedSteps;
|
||||
|
||||
private Long currentStep;
|
||||
|
||||
private LocalDateTime callEndDate;
|
||||
|
||||
private LocalTime callEndTime;
|
||||
|
||||
private Long companyId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user