Done Changes related to evaluation expiration days
This commit is contained in:
@@ -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()));
|
||||
|
||||
@@ -63,4 +63,7 @@ public class HubEntity extends BaseEntity{
|
||||
|
||||
@Column(name = "AREA_CODE")
|
||||
private String areaCode;
|
||||
|
||||
@Column(name = "EVALUATION_EXPIRATION_DAYS")
|
||||
private Long evaluationExpirationDays;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user