Fixed call date and time check issue
This commit is contained in:
@@ -941,7 +941,7 @@ public class ApplicationDao {
|
||||
throw new CustomValidationException(Status.BAD_REQUEST, Translator.toLocale(GepafinConstant.APPLICATION_ALREADY_IN_PREVIOUS_STATUS));
|
||||
}
|
||||
if (status.equals(ApplicationStatusTypeEnum.SUBMIT) && Boolean.TRUE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.READY.getValue()))) {
|
||||
callService.validatePublishedCall(applicationEntity.getCall().getId(), userEntity.getHub().getId());
|
||||
// callService.validatePublishedCall(applicationEntity.getCall().getId(), userEntity.getHub().getId());
|
||||
Long protocolNumber = protocolDao.getProtocolNumber(userEntity.getHub());
|
||||
ProtocolEntity protocolEntity = protocolDao.createProtocolEntity(applicationEntity, protocolNumber, userEntity.getHub().getId(),true);
|
||||
applicationEntity.setProtocol(protocolEntity);
|
||||
@@ -1724,19 +1724,21 @@ public class ApplicationDao {
|
||||
|
||||
|
||||
public void checkCallEndDate(CallEntity call) {
|
||||
LocalDateTime now = DateTimeUtil.DateServerToUTC(LocalDateTime.now());
|
||||
|
||||
LocalDateTime callEndDateTime = LocalDateTime.of(
|
||||
call.getEndDate().toLocalDate(),
|
||||
call.getEndTime()
|
||||
);
|
||||
|
||||
if (now.isAfter(callEndDateTime)) {
|
||||
throw new CustomValidationException(
|
||||
Status.BAD_REQUEST,
|
||||
Translator.toLocale(GepafinConstant.CALL_EXPIRED)
|
||||
);
|
||||
}
|
||||
|
||||
callService.validatePublishedCall(call.getId(), call.getHub().getId());
|
||||
// LocalDateTime now = DateTimeUtil.DateServerToUTC(LocalDateTime.now());
|
||||
//
|
||||
// LocalDateTime callEndDateTime = LocalDateTime.of(
|
||||
// call.getEndDate().toLocalDate(),
|
||||
// call.getEndTime()
|
||||
// );
|
||||
//
|
||||
// if (now.isAfter(callEndDateTime)) {
|
||||
// throw new CustomValidationException(
|
||||
// Status.BAD_REQUEST,
|
||||
// Translator.toLocale(GepafinConstant.CALL_EXPIRED)
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
public void calculationProcessForFormula(ApplicationFormEntity applicationFormEntity, List<ContentResponseBean> contentResponseBeans, ApplicationFormFieldRequestBean applicationFormFieldRequestBean,FieldValidator fieldValidator) {
|
||||
|
||||
Reference in New Issue
Block a user