Resolved conflicts
This commit is contained in:
@@ -388,5 +388,6 @@ public class GepafinConstant {
|
||||
public static final String APPLICATION_PER_STATUS="applicationPerStatus";
|
||||
public static final String NON_EMPTY_TABLES="nonEmptyTables";
|
||||
public static final String VALIDATION_IN_TABLE = "validation.table.message";
|
||||
public static final String CALL_EXPIRED="call.expired";
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,9 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.MessageFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.ZipEntry;
|
||||
@@ -186,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));
|
||||
@@ -405,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());
|
||||
@@ -872,7 +876,7 @@ public class ApplicationDao {
|
||||
ApplicationRequest applicationRequest, Long callId, UserEntity userEntity) {
|
||||
CallEntity call = callService.validateCall(callId);
|
||||
UserWithCompanyEntity userWithCompanyEntity=companyService.getUserWithCompany(userEntity.getId(),companyEntity.getId());
|
||||
|
||||
checkCallEndDate(call);
|
||||
// call = callService.validatePublishedCall(call.getId());
|
||||
// checkIfApplicationExists(call, userWithCompanyEntity, userEntity);
|
||||
ApplicationEntity applicationEntity = createApplicationEntity(userEntity, call, userWithCompanyEntity);
|
||||
@@ -890,7 +894,7 @@ public class ApplicationDao {
|
||||
public ApplicationResponse updateApplicationStatus(HttpServletRequest request, Long applicationId, ApplicationStatusTypeEnum status) {
|
||||
|
||||
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||
|
||||
checkCallEndDate(applicationEntity.getCall());
|
||||
//cloned entity for old application data
|
||||
ApplicationEntity oldApplicationEntity = Utils.getClonedEntityForData(applicationEntity);
|
||||
|
||||
@@ -1119,7 +1123,7 @@ public class ApplicationDao {
|
||||
public ApplicationSignedDocumentResponse uploadSignedDocument(HttpServletRequest request, Long applicationId,
|
||||
MultipartFile file) {
|
||||
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||
|
||||
checkCallEndDate(applicationEntity.getCall());
|
||||
//cloned entity for old data
|
||||
ApplicationEntity oldApplicationData = Utils.getClonedEntityForData(applicationEntity);
|
||||
|
||||
@@ -1252,7 +1256,8 @@ public class ApplicationDao {
|
||||
|
||||
ApplicationEntity applicationEntity = validateApplication(applicationId);
|
||||
ApplicationEntity oldApplicationEntity = Utils.getClonedEntityForData(applicationEntity);
|
||||
|
||||
checkCallEndDate(applicationEntity.getCall());
|
||||
|
||||
UserEntity userEntity = userService.validateUser(applicationEntity.getUserId());
|
||||
validator.validateUserWithCompany(request, applicationEntity.getCompanyId());
|
||||
if (Boolean.FALSE.equals(ApplicationStatusTypeEnum.DRAFT.getValue().equals(applicationEntity.getStatus()))) {
|
||||
@@ -1516,4 +1521,21 @@ public class ApplicationDao {
|
||||
return predicates;
|
||||
|
||||
}
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -113,12 +113,21 @@ public class ApplicationEvaluationDao {
|
||||
@Autowired
|
||||
private ApplicationAmendmentRequestDao applicationAmendmentRequestDao;
|
||||
|
||||
@Autowired
|
||||
private HubService hubService;
|
||||
|
||||
private ApplicationEvaluationEntity convertToEntity(UserEntity user, ApplicationEvaluationRequest req, Long assignedApplciationId) {
|
||||
|
||||
ApplicationEvaluationEntity entity = new ApplicationEvaluationEntity();
|
||||
|
||||
AssignedApplicationsEntity assignedApplications = assignedApplicationsService.validateAssignedApplication(assignedApplciationId);
|
||||
ApplicationEntity application = applicationService.validateApplication(assignedApplications.getApplication().getId());
|
||||
|
||||
Long hubId = application.getHubId();
|
||||
HubEntity hub = hubService.valdateHub(hubId);
|
||||
|
||||
Long initialDays = (hub != null) ? hub.getEvaluationExpirationDays() : 0L;
|
||||
|
||||
entity.setApplicationId(application.getId());
|
||||
entity.setAssignedApplicationsEntity(assignedApplications);
|
||||
entity.setUserId(user.getId());
|
||||
@@ -128,7 +137,7 @@ public class ApplicationEvaluationDao {
|
||||
entity.setNote(req.getNote());
|
||||
entity.setMotivation(req.getMotivation());
|
||||
entity.setIsDeleted(false);
|
||||
entity.setInitialDays(30L);
|
||||
entity.setInitialDays(initialDays);
|
||||
entity.setRemainingDays(30L);
|
||||
entity.setSuspendedDays(0L);
|
||||
entity.setStartDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -63,4 +63,7 @@ public class HubEntity extends BaseEntity{
|
||||
|
||||
@Column(name = "AREA_CODE")
|
||||
private String areaCode;
|
||||
|
||||
@Column(name = "EVALUATION_EXPIRATION_DAYS")
|
||||
private Long evaluationExpirationDays;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -153,11 +153,17 @@ public class AmazonS3ServiceImpl implements AmazonS3Service {
|
||||
}
|
||||
}
|
||||
|
||||
private String decodeS3Key(String key) {
|
||||
return URLDecoder.decode(key, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UploadFileOnAmazonS3Response moveFile(String fileName, String oldPath, String newPath) {
|
||||
try {
|
||||
log.info("Original Paths - oldPath: {}, newPath: {}", oldPath, newPath);
|
||||
|
||||
oldPath = decodeS3Key(cleanOldPath(oldPath));
|
||||
newPath = cleanNewPath(oldPath, newPath);
|
||||
oldPath = cleanOldPath(oldPath);
|
||||
log.info("Moving file from {} to {} in bucket {}", oldPath, newPath, bucketName);
|
||||
|
||||
CopyObjectRequest copyRequest = new CopyObjectRequest(bucketName, oldPath, bucketName, newPath);
|
||||
|
||||
@@ -2229,4 +2229,23 @@
|
||||
<column name="date_rejected" type="TIMESTAMP WITHOUT TIME ZONE"></column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="16-01-2025_RK_173515" author="Rajesh Khore">
|
||||
<addColumn tableName="hub">
|
||||
<column name="evaluation_expiration_days" type="INTEGER"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="16-01-2025_RK_173616" author="Rajesh Khore">
|
||||
<update tableName="hub">
|
||||
<column name="evaluation_expiration_days" valueNumeric="999"/>
|
||||
<where>unique_uuid = 't7jh5wfg9QXylNaTZkPoE'</where>
|
||||
</update>
|
||||
|
||||
<update tableName="hub">
|
||||
<column name="evaluation_expiration_days" valueNumeric="30"/>
|
||||
<where>unique_uuid = 'p4lk3bcx1RStqTaIVVbXs'</where>
|
||||
</update>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
||||
@@ -351,3 +351,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.expired=Call has been expired.
|
||||
|
||||
@@ -304,7 +304,6 @@ beneficiary.call.duplicate = Una chiamata preferita con questo ID di chiamata e
|
||||
user.must.be.associated.with.company.to.create.application=Devi essere associato a un'azienda per poter presentare domanda per questa applicazione.
|
||||
company.id.required.for.preferred.call=ID azienda obbligatorio quando si richiedono solo chiamate preferite.
|
||||
response.days.not.null=I giorni di risposta non devono essere nulli e maggiori di zero.
|
||||
application.cannot.approved.or.rejected=La domanda non pu<70> essere approvata o rifiutata perch<63> l'emendamento <20> attivo.
|
||||
valid.vatnumber.message=Il numero di partita IVA <20> valido.
|
||||
application.cannot.approved.or.rejected=La domanda non pu? essere approvata o rifiutata perch? l'emendamento ? attivo.
|
||||
|
||||
@@ -342,4 +341,5 @@ 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 <20> obbligatorio durante l'approvazione della domanda.
|
||||
validation.table.message=I dati per il campo {0} non sono presenti.
|
||||
validation.table.message=I dati per il campo {0} non sono presenti.
|
||||
call.expired=La chiamata <20> scaduta.
|
||||
|
||||
Reference in New Issue
Block a user