Resolved conflict
This commit is contained in:
@@ -355,7 +355,22 @@ public class GepafinConstant {
|
|||||||
public static final String NOTIFICATION_DELETED_SUCCESSFULLY="notification.deleted.successfully";
|
public static final String NOTIFICATION_DELETED_SUCCESSFULLY="notification.deleted.successfully";
|
||||||
public static final String NOTIFICATION_UPDATED_SUCCESSFULLY="notification.updated.successfully";
|
public static final String NOTIFICATION_UPDATED_SUCCESSFULLY="notification.updated.successfully";
|
||||||
public static final String USER_WITH_COMPANY_NOT_FOUND = "user.with.company.not.found";
|
public static final String USER_WITH_COMPANY_NOT_FOUND = "user.with.company.not.found";
|
||||||
|
public static final String STATUS = "status";
|
||||||
|
public static final String CALL="call";
|
||||||
|
public static final String TITLE="title";
|
||||||
|
public static final String MESSAGE="message";
|
||||||
|
public static final String HUB_ID="hubId";
|
||||||
|
public static final String ID="id";
|
||||||
|
public static final String IS_DELETED="isDeleted";
|
||||||
|
public static final String COMPANY_ID="companyId";
|
||||||
|
public static final String COMMENTS="comments";
|
||||||
|
public static final String DESCRIPTION_LONG="descriptionLong";
|
||||||
|
public static final String DESCRIPTION_SHORT="descriptionShort";
|
||||||
|
public static final String HUB="hub";
|
||||||
|
public static final String NAME="name";
|
||||||
|
|
||||||
|
public static final String USER_ACTION_FETCHED_SUCCESSFULLY = "user.action.fetched.successfully";
|
||||||
|
public static final String ACTION_CONTEXT_LABELS_FETCHED_SUCCESSFULLY = "action.context.labels.fetched.successfully";
|
||||||
//action log response
|
//action log response
|
||||||
public static final String STATUS_CODE_STRING = "statusCode";
|
public static final String STATUS_CODE_STRING = "statusCode";
|
||||||
public static final String GET_STATUS_CODE_STRING = "status";
|
public static final String GET_STATUS_CODE_STRING = "status";
|
||||||
@@ -364,6 +379,13 @@ public class GepafinConstant {
|
|||||||
public static final String SUM="sum";
|
public static final String SUM="sum";
|
||||||
public static final String MULTIPLY="multiply";
|
public static final String MULTIPLY="multiply";
|
||||||
public static final String NUMERIC="numeric";
|
public static final String NUMERIC="numeric";
|
||||||
|
public static final String AMOUNT_ACCEPTED_REQUIRED_WHILE_APPROVING_APPLICATION="amount.accepted.required";
|
||||||
|
public static final String CALL_NAME="callName";
|
||||||
|
public static final String NUMBER_OF_APPLICATIONS="numberOfApplications";
|
||||||
|
public static final String COUNT="count";
|
||||||
|
public static final String APPLICATION_PER_CALL="applicationPerCall";
|
||||||
|
public static final String APPLICATION_PER_STATUS="applicationPerStatus";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package net.gepafin.tendermanagement.dao;
|
package net.gepafin.tendermanagement.dao;
|
||||||
|
|
||||||
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
|
import jakarta.persistence.criteria.Root;
|
||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.config.jwt.TokenProvider;
|
import net.gepafin.tendermanagement.config.jwt.TokenProvider;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.entities.*;
|
import net.gepafin.tendermanagement.entities.*;
|
||||||
import net.gepafin.tendermanagement.entities.SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum;
|
import net.gepafin.tendermanagement.entities.SystemEmailTemplatesEntity.SystemEmailTemplatesEntityTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.*;
|
import net.gepafin.tendermanagement.enums.*;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationFormFieldRequestBean;
|
import net.gepafin.tendermanagement.model.request.*;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
|
||||||
import net.gepafin.tendermanagement.model.request.EmailLogRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.VersionHistoryRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.response.*;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
|
import net.gepafin.tendermanagement.model.util.SortBy;
|
||||||
import net.gepafin.tendermanagement.repositories.*;
|
import net.gepafin.tendermanagement.repositories.*;
|
||||||
import net.gepafin.tendermanagement.service.AmazonS3Service;
|
import net.gepafin.tendermanagement.service.AmazonS3Service;
|
||||||
import net.gepafin.tendermanagement.service.ApplicationEvaluationService;
|
import net.gepafin.tendermanagement.service.ApplicationEvaluationService;
|
||||||
@@ -37,6 +35,8 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -47,6 +47,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -54,6 +55,8 @@ import java.util.stream.Collectors;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class ApplicationDao {
|
public class ApplicationDao {
|
||||||
|
|
||||||
@@ -423,6 +426,10 @@ public class ApplicationDao {
|
|||||||
if(applicationEntity.getProtocol() != null) {
|
if(applicationEntity.getProtocol() != null) {
|
||||||
responseBean.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
responseBean.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
||||||
}
|
}
|
||||||
|
responseBean.setAmountAccepted(applicationEntity.getAmountAccepted());
|
||||||
|
responseBean.setAmountRequested(applicationEntity.getAmountRequested());
|
||||||
|
responseBean.setDateAccepted(applicationEntity.getDateAccepted());
|
||||||
|
responseBean.setDateRejected(applicationEntity.getDateRejected());
|
||||||
return responseBean;
|
return responseBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,6 +449,10 @@ public class ApplicationDao {
|
|||||||
response.setCallId(entity.getCall().getId());
|
response.setCallId(entity.getCall().getId());
|
||||||
response.setCreatedDate(entity.getCreatedDate());
|
response.setCreatedDate(entity.getCreatedDate());
|
||||||
response.setUpdatedDate(entity.getUpdatedDate());
|
response.setUpdatedDate(entity.getUpdatedDate());
|
||||||
|
response.setAmountAccepted(entity.getAmountAccepted());
|
||||||
|
response.setAmountRequested(entity.getAmountRequested());
|
||||||
|
response.setDateAccepted(entity.getDateAccepted());
|
||||||
|
response.setDateRejected(entity.getDateRejected());
|
||||||
if(entity.getProtocol() != null) {
|
if(entity.getProtocol() != null) {
|
||||||
response.setProtocolNumber(entity.getProtocol().getProtocolNumber());
|
response.setProtocolNumber(entity.getProtocol().getProtocolNumber());
|
||||||
}
|
}
|
||||||
@@ -480,6 +491,30 @@ public class ApplicationDao {
|
|||||||
List<Long> newDocumentIds = validateFileUploadDocuments(applicationFormFieldRequestBean, formEntity);
|
List<Long> newDocumentIds = validateFileUploadDocuments(applicationFormFieldRequestBean, formEntity);
|
||||||
validateFileUploadDocuments(applicationFormFieldRequestBean, formEntity);
|
validateFileUploadDocuments(applicationFormFieldRequestBean, formEntity);
|
||||||
VersionActionTypeEnum actionType = VersionActionTypeEnum.INSERT;
|
VersionActionTypeEnum actionType = VersionActionTypeEnum.INSERT;
|
||||||
|
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
||||||
|
|
||||||
|
contentResponseBeans.stream()
|
||||||
|
.filter(content -> "numberinput".equals(content.getName()))
|
||||||
|
.map(ContentResponseBean::getSettings)
|
||||||
|
.flatMap(List::stream)
|
||||||
|
.filter(setting -> "isRequestedAmount".equals(setting.getName()) && Boolean.TRUE.equals(setting.getValue()))
|
||||||
|
.findFirst()
|
||||||
|
.ifPresent(setting -> {
|
||||||
|
Object fieldValue = applicationFormFieldRequestBean.getFieldValue();
|
||||||
|
if(fieldValue!=null) {
|
||||||
|
if (fieldValue instanceof String) {
|
||||||
|
try {
|
||||||
|
BigDecimal amountRequested = new BigDecimal((String) fieldValue);
|
||||||
|
applicationFormEntity.getApplication().setAmountRequested(amountRequested);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
throw new IllegalArgumentException("Field value is not a valid number: " + fieldValue, e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("Field value is not a String: " + fieldValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
ApplicationFormFieldEntity oldApplicationFormFieldData = null;
|
ApplicationFormFieldEntity oldApplicationFormFieldData = null;
|
||||||
|
|
||||||
@@ -811,6 +846,10 @@ public class ApplicationDao {
|
|||||||
applicationGetResponseBean.setCallId(applicationEntity.getCall().getId());
|
applicationGetResponseBean.setCallId(applicationEntity.getCall().getId());
|
||||||
applicationGetResponseBean.setCallTitle(applicationEntity.getCall().getName());
|
applicationGetResponseBean.setCallTitle(applicationEntity.getCall().getName());
|
||||||
applicationGetResponseBean.setCompanyId(applicationEntity.getCompanyId());
|
applicationGetResponseBean.setCompanyId(applicationEntity.getCompanyId());
|
||||||
|
applicationGetResponseBean.setAmountAccepted(applicationEntity.getAmountAccepted());
|
||||||
|
applicationGetResponseBean.setAmountRequested(applicationEntity.getAmountRequested());
|
||||||
|
applicationGetResponseBean.setDateAccepted(applicationEntity.getDateAccepted());
|
||||||
|
applicationGetResponseBean.setDateRejected(applicationEntity.getDateRejected());
|
||||||
if(applicationEntity.getProtocol() != null) {
|
if(applicationEntity.getProtocol() != null) {
|
||||||
applicationGetResponseBean.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
applicationGetResponseBean.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
||||||
}
|
}
|
||||||
@@ -870,7 +909,7 @@ public class ApplicationDao {
|
|||||||
ProtocolEntity protocolEntity = protocolDao.createProtocolEntity(applicationEntity, protocolNumber, userEntity.getHub().getId(),true);
|
ProtocolEntity protocolEntity = protocolDao.createProtocolEntity(applicationEntity, protocolNumber, userEntity.getHub().getId(),true);
|
||||||
applicationEntity.setProtocol(protocolEntity);
|
applicationEntity.setProtocol(protocolEntity);
|
||||||
applicationEntity.setStatus(ApplicationStatusTypeEnum.SUBMIT.getValue());
|
applicationEntity.setStatus(ApplicationStatusTypeEnum.SUBMIT.getValue());
|
||||||
applicationEntity.setSubmissionDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
applicationEntity.setSubmissionDate(protocolEntity.getCreatedDate());
|
||||||
applicationEntity = applicationRepository.save(applicationEntity);
|
applicationEntity = applicationRepository.save(applicationEntity);
|
||||||
Map<String ,String> placeHolders=notificationDao.sendNotificationToBeneficiary(applicationEntity,NotificationTypeEnum.APPLICATION_SUBMISSION);
|
Map<String ,String> placeHolders=notificationDao.sendNotificationToBeneficiary(applicationEntity,NotificationTypeEnum.APPLICATION_SUBMISSION);
|
||||||
notificationDao.sendNotificationToSuperUser(applicationEntity,placeHolders,NotificationTypeEnum.APPLICATION_SUBMISSION);
|
notificationDao.sendNotificationToSuperUser(applicationEntity,placeHolders,NotificationTypeEnum.APPLICATION_SUBMISSION);
|
||||||
@@ -1354,4 +1393,127 @@ public class ApplicationDao {
|
|||||||
throw new RuntimeException("Error while creating ZIP file", e);
|
throw new RuntimeException("Error while creating ZIP file", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PageableResponseBean<List<ApplicationResponse>> getAllApplicationByPagination(UserEntity userEntity, Long callId, Long companyId, ApplicationPageableRequestBean applicationPageableRequestBean) {
|
||||||
|
Integer pageNo = null;
|
||||||
|
Integer pageLimit = null;
|
||||||
|
if (applicationPageableRequestBean.getGlobalFilters() != null) {
|
||||||
|
pageNo = applicationPageableRequestBean.getGlobalFilters().getPage();
|
||||||
|
pageLimit = applicationPageableRequestBean.getGlobalFilters().getLimit();
|
||||||
|
}
|
||||||
|
if (pageLimit == null || pageLimit <= 0) {
|
||||||
|
pageLimit = GepafinConstant.DEFAULT_PAGE_LIMIT;
|
||||||
|
}
|
||||||
|
if (pageNo == null || pageNo <= 0) {
|
||||||
|
pageNo = GepafinConstant.DEFAULT_PAGE;
|
||||||
|
}
|
||||||
|
Specification<ApplicationEntity> spec = search(callId, companyId, applicationPageableRequestBean, userEntity);
|
||||||
|
Page<ApplicationEntity> entityPage = applicationRepository.findAll(spec, PageRequest.of(pageNo - 1, pageLimit));
|
||||||
|
// Prepare the response
|
||||||
|
|
||||||
|
|
||||||
|
List<ApplicationResponse> applicationResponses = entityPage.getContent().stream()
|
||||||
|
.map(application -> {
|
||||||
|
ApplicationResponse response = getApplicationResponse(application);
|
||||||
|
return response;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
PageableResponseBean<List<ApplicationResponse>> pageableResponseBean = new PageableResponseBean<>();
|
||||||
|
pageableResponseBean.setBody(applicationResponses);
|
||||||
|
pageableResponseBean.setCurrentPage(entityPage.getNumber() + 1); // Page numbers typically start from 0, so add 1 for user-friendly indexing
|
||||||
|
pageableResponseBean.setTotalPages(entityPage.getTotalPages());
|
||||||
|
pageableResponseBean.setTotalRecords(entityPage.getTotalElements());
|
||||||
|
pageableResponseBean.setPageSize(entityPage.getSize());
|
||||||
|
|
||||||
|
return pageableResponseBean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Specification<ApplicationEntity> search(Long callId, Long companyId, ApplicationPageableRequestBean applicationPageableRequestBean, UserEntity userEntity) {
|
||||||
|
return (root, query, criteriaBuilder) -> {
|
||||||
|
|
||||||
|
List<Predicate> predicates = getPredicates(applicationPageableRequestBean, criteriaBuilder, root, callId, companyId, userEntity);
|
||||||
|
SortBy sortBy = new SortBy(GepafinConstant.CREATED_DATE, true);
|
||||||
|
|
||||||
|
if (applicationPageableRequestBean.getGlobalFilters() != null
|
||||||
|
&& applicationPageableRequestBean.getGlobalFilters().getSortBy() != null &&
|
||||||
|
applicationPageableRequestBean.getGlobalFilters().getSortBy().getColumnName() != null && Boolean.FALSE.equals(
|
||||||
|
isEmpty(applicationPageableRequestBean.getGlobalFilters().getSortBy().getColumnName()))) {
|
||||||
|
sortBy.setColumnName(applicationPageableRequestBean.getGlobalFilters().getSortBy().getColumnName());
|
||||||
|
sortBy.setSortDesc(true);
|
||||||
|
if (applicationPageableRequestBean.getGlobalFilters().getSortBy().getSortDesc() != null) {
|
||||||
|
sortBy.setSortDesc(applicationPageableRequestBean.getGlobalFilters().getSortBy().getSortDesc());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query.orderBy(criteriaBuilder.desc(root.get(sortBy.getColumnName())));
|
||||||
|
if (Boolean.FALSE.equals(sortBy.getSortDesc())) {
|
||||||
|
query.orderBy(criteriaBuilder.asc(root.get(sortBy.getColumnName())));
|
||||||
|
}
|
||||||
|
return query.where(criteriaBuilder.and(predicates.toArray(new Predicate[0]))).getRestriction();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<Predicate> getPredicates(ApplicationPageableRequestBean applicationPageableRequestBean,
|
||||||
|
CriteriaBuilder criteriaBuilder, Root<ApplicationEntity> root, Long callId, Long companyId, UserEntity userEntity) {
|
||||||
|
|
||||||
|
Integer year = null;
|
||||||
|
String search = null;
|
||||||
|
if (applicationPageableRequestBean.getGlobalFilters() != null) {
|
||||||
|
year = applicationPageableRequestBean.getGlobalFilters().getYear();
|
||||||
|
search = applicationPageableRequestBean.getGlobalFilters().getSearch();
|
||||||
|
}
|
||||||
|
List<Predicate> predicates = new ArrayList<>();
|
||||||
|
|
||||||
|
Boolean isBeneficiary = validator.checkIsBeneficiary();
|
||||||
|
if (isBeneficiary) {
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.USER_ID), userEntity.getId()));
|
||||||
|
}
|
||||||
|
if (year != null && year > 0) {
|
||||||
|
int filterYear = applicationPageableRequestBean.getGlobalFilters().getYear();
|
||||||
|
|
||||||
|
// Create LocalDateTime boundaries for the start and end of the year
|
||||||
|
LocalDateTime startOfYear = LocalDateTime.of(filterYear, 1, 1, 0, 0);
|
||||||
|
LocalDateTime endOfYear = LocalDateTime.of(filterYear, 12, 31, 23, 59, 59);
|
||||||
|
|
||||||
|
// Add the range comparison to filter records within the year
|
||||||
|
predicates.add(criteriaBuilder.between(root.get(GepafinConstant.CREATED_DATE), startOfYear, endOfYear));
|
||||||
|
|
||||||
|
}
|
||||||
|
// Search in `title` and `message` (if search term is provided)
|
||||||
|
if (search != null && !search.isEmpty()) {
|
||||||
|
Predicate titlePredicate = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.COMMENTS)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
predicates.add(criteriaBuilder.or(titlePredicate));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter by `status` (if status list is provided)
|
||||||
|
if (applicationPageableRequestBean.getStatus() != null && !applicationPageableRequestBean.getStatus().isEmpty()) {
|
||||||
|
List<String> statusValues = applicationPageableRequestBean.getStatus().stream()
|
||||||
|
.map(ApplicationStatusTypeEnum::name) // Convert enum to string
|
||||||
|
.toList();
|
||||||
|
predicates.add(root.get(GepafinConstant.STATUS).in(statusValues));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (callId != null) {
|
||||||
|
CallEntity call = callService.validateCall(callId);
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.CALL).get(GepafinConstant.ID), callId));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optional companyId filter
|
||||||
|
if (companyId != null) {
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.COMPANY_ID), companyId));
|
||||||
|
}
|
||||||
|
predicates.add(criteriaBuilder.isFalse(root.get(GepafinConstant.IS_DELETED)));
|
||||||
|
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.HUB_ID), userEntity.getHub().getId()));
|
||||||
|
|
||||||
|
|
||||||
|
return predicates;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
@@ -582,6 +583,10 @@ public class ApplicationEvaluationDao {
|
|||||||
CompanyEntity company = companyService.validateCompany(application.getCompanyId());
|
CompanyEntity company = companyService.validateCompany(application.getCompanyId());
|
||||||
response.setCompanyName(company.getCompanyName());
|
response.setCompanyName(company.getCompanyName());
|
||||||
}
|
}
|
||||||
|
response.setAmountAccepted(application.getAmountAccepted());
|
||||||
|
response.setAmountRequested(application.getAmountRequested());
|
||||||
|
response.setDateAccepted(application.getDateAccepted());
|
||||||
|
response.setDateRejected(application.getDateRejected());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -596,7 +601,8 @@ public class ApplicationEvaluationDao {
|
|||||||
Optional<AssignedApplicationsEntity> assignedApplications =
|
Optional<AssignedApplicationsEntity> assignedApplications =
|
||||||
assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplicationId);
|
assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplicationId);
|
||||||
ApplicationEvaluationEntity oldApplicationEvaluation = null;
|
ApplicationEvaluationEntity oldApplicationEvaluation = null;
|
||||||
VersionActionTypeEnum actionType;
|
ApplicationEntity application = applicationService.validateApplication(assignedApplications.get().getApplication().getId());
|
||||||
|
VersionActionTypeEnum actionType = VersionActionTypeEnum.INSERT;
|
||||||
if (existingEntityOptional.isPresent()) {
|
if (existingEntityOptional.isPresent()) {
|
||||||
entity = existingEntityOptional.get();
|
entity = existingEntityOptional.get();
|
||||||
oldApplicationEvaluation = Utils.getClonedEntityForData(entity);
|
oldApplicationEvaluation = Utils.getClonedEntityForData(entity);
|
||||||
@@ -612,10 +618,15 @@ public class ApplicationEvaluationDao {
|
|||||||
entity.setIsDeleted(false);
|
entity.setIsDeleted(false);
|
||||||
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
|
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
|
||||||
setIfUpdated(entity::getMotivation, entity::setMotivation, req.getMotivation());
|
setIfUpdated(entity::getMotivation, entity::setMotivation, req.getMotivation());
|
||||||
|
if(Boolean.TRUE.equals(req.getApplicationStatus().equals(ApplicationStatusForEvaluation.APPROVED)) && (req.getAmountAccepted()==null || req.getAmountAccepted().compareTo(BigDecimal.ZERO) < 0)){
|
||||||
|
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.AMOUNT_ACCEPTED_REQUIRED_WHILE_APPROVING_APPLICATION));
|
||||||
|
}
|
||||||
|
if (req.getAmountAccepted() != null && req.getAmountAccepted().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
application.setAmountAccepted(req.getAmountAccepted());
|
||||||
|
}
|
||||||
actionType = VersionActionTypeEnum.UPDATE;
|
actionType = VersionActionTypeEnum.UPDATE;
|
||||||
} else {
|
} else {
|
||||||
AssignedApplicationsEntity assignedApplicationsEntity = assignedApplicationsService.validateAssignedApplication(assignedApplicationId);
|
AssignedApplicationsEntity assignedApplicationsEntity = assignedApplicationsService.validateAssignedApplication(assignedApplicationId);
|
||||||
ApplicationEntity application = applicationService.validateApplication(assignedApplicationsEntity.getApplication().getId());
|
|
||||||
entity = convertToEntity(user, req, assignedApplicationId);
|
entity = convertToEntity(user, req, assignedApplicationId);
|
||||||
actionType = VersionActionTypeEnum.INSERT;
|
actionType = VersionActionTypeEnum.INSERT;
|
||||||
|
|
||||||
@@ -644,7 +655,6 @@ public class ApplicationEvaluationDao {
|
|||||||
loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(actionType).oldData(oldApplicationEvaluation).newData(entity).build());
|
loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(actionType).oldData(oldApplicationEvaluation).newData(entity).build());
|
||||||
|
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
ApplicationEntity application = applicationService.validateApplication(assignedApplications.get().getApplication().getId());
|
|
||||||
AssignedApplicationsEntity assignedApplicationsEntity = assignedApplications.get();
|
AssignedApplicationsEntity assignedApplicationsEntity = assignedApplications.get();
|
||||||
return updateApplicationEvaluationStatus(application, assignedApplicationsEntity, status);
|
return updateApplicationEvaluationStatus(application, assignedApplicationsEntity, status);
|
||||||
} else {
|
} else {
|
||||||
@@ -1821,9 +1831,15 @@ public class ApplicationEvaluationDao {
|
|||||||
|
|
||||||
|
|
||||||
if (Boolean.TRUE.equals(statusType.equals((ApplicationStatusTypeEnum.APPROVED.getValue())))) {
|
if (Boolean.TRUE.equals(statusType.equals((ApplicationStatusTypeEnum.APPROVED.getValue())))) {
|
||||||
|
application.setDateAccepted(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
|
application.setUpdatedDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
|
application = applicationRepository.save(application);
|
||||||
emailNotificationDao.sendAdmissibilityNotificationEmailForApprovedApplication(application);
|
emailNotificationDao.sendAdmissibilityNotificationEmailForApprovedApplication(application);
|
||||||
}
|
}
|
||||||
if (Boolean.TRUE.equals(statusType.equals((ApplicationStatusTypeEnum.REJECTED.getValue())))) {
|
if (Boolean.TRUE.equals(statusType.equals((ApplicationStatusTypeEnum.REJECTED.getValue())))) {
|
||||||
|
application.setDateRejected(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
|
application.setUpdatedDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
|
application = applicationRepository.save(application);
|
||||||
emailNotificationDao.sendInadmissibilityEmailForRejectedApplication(application,existingEntity);
|
emailNotificationDao.sendInadmissibilityEmailForRejectedApplication(application,existingEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,15 @@ import java.util.stream.Collectors;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
|
import jakarta.persistence.criteria.Predicate;
|
||||||
|
import jakarta.persistence.criteria.Root;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.entities.*;
|
import net.gepafin.tendermanagement.entities.*;
|
||||||
import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
import net.gepafin.tendermanagement.enums.*;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationTypeEnum;
|
import net.gepafin.tendermanagement.model.request.*;
|
||||||
import net.gepafin.tendermanagement.enums.VersionActionTypeEnum;
|
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.VersionHistoryRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.response.*;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
|
import net.gepafin.tendermanagement.model.util.SortBy;
|
||||||
import net.gepafin.tendermanagement.repositories.*;
|
import net.gepafin.tendermanagement.repositories.*;
|
||||||
import net.gepafin.tendermanagement.service.*;
|
import net.gepafin.tendermanagement.service.*;
|
||||||
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
||||||
@@ -28,6 +29,9 @@ import net.gepafin.tendermanagement.util.Utils;
|
|||||||
import net.gepafin.tendermanagement.util.Validator;
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
import org.h2.util.IOUtils;
|
import org.h2.util.IOUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
@@ -35,15 +39,6 @@ import org.springframework.util.StringUtils;
|
|||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.entities.LookUpDataEntity.LookUpDataTypeEnum;
|
import net.gepafin.tendermanagement.entities.LookUpDataEntity.LookUpDataTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
|
||||||
import net.gepafin.tendermanagement.enums.DocumentTypeEnum;
|
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
|
||||||
import net.gepafin.tendermanagement.model.request.DocumentReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.EvaluationCriteriaReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.FaqReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.LookUpDataReq;
|
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
|
||||||
import net.gepafin.tendermanagement.service.impl.CallValidatorServiceImpl;
|
import net.gepafin.tendermanagement.service.impl.CallValidatorServiceImpl;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
||||||
@@ -51,6 +46,7 @@ import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
|||||||
|
|
||||||
import static net.gepafin.tendermanagement.enums.RoleStatusEnum.ROLE_SUPER_ADMIN;
|
import static net.gepafin.tendermanagement.enums.RoleStatusEnum.ROLE_SUPER_ADMIN;
|
||||||
import static net.gepafin.tendermanagement.util.Utils.setIfUpdated;
|
import static net.gepafin.tendermanagement.util.Utils.setIfUpdated;
|
||||||
|
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||||
import static org.hibernate.internal.util.collections.CollectionHelper.listOf;
|
import static org.hibernate.internal.util.collections.CollectionHelper.listOf;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@@ -917,4 +913,154 @@ public class CallDao {
|
|||||||
return callEntity;
|
return callEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PageableResponseBean<List<CallDetailsResponseBean>> getAllCallsByPagination(HttpServletRequest request,UserEntity user,Long companyId , Boolean onlyPreferredCall, CallPageableRequestBean callPageableRequestBean) {
|
||||||
|
Integer pageNo = null;
|
||||||
|
Integer pageLimit = null;
|
||||||
|
if (callPageableRequestBean.getGlobalFilters() != null) {
|
||||||
|
pageNo = callPageableRequestBean.getGlobalFilters().getPage();
|
||||||
|
pageLimit = callPageableRequestBean.getGlobalFilters().getLimit();
|
||||||
|
}
|
||||||
|
if (pageLimit == null || pageLimit <= 0) {
|
||||||
|
pageLimit = GepafinConstant.DEFAULT_PAGE_LIMIT;
|
||||||
|
}
|
||||||
|
if (pageNo == null || pageNo <= 0) {
|
||||||
|
pageNo = GepafinConstant.DEFAULT_PAGE;
|
||||||
|
}
|
||||||
|
if (Boolean.TRUE.equals(onlyPreferredCall) && companyId == null) {
|
||||||
|
throw new CustomValidationException(
|
||||||
|
Status.VALIDATION_ERROR,
|
||||||
|
Translator.toLocale(GepafinConstant.COMPANY_ID_REQUIRED_FOR_PREFERRED_CALL)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Specification<CallEntity> spec = search(user, callPageableRequestBean);
|
||||||
|
Page<CallEntity> entityPage;
|
||||||
|
if (Boolean.TRUE.equals(onlyPreferredCall)) {
|
||||||
|
validator.validateUserWithCompany(request, companyId);
|
||||||
|
UserWithCompanyEntity userWithCompanyEntity = companyService.getUserWithCompany(user.getId(), companyId);
|
||||||
|
List<BeneficiaryPreferredCallEntity> preferredCalls = beneficiaryPreferredCallRepository
|
||||||
|
.findByUserIdAndUserWithCompanyIdAndIsDeletedFalse(user.getId(), userWithCompanyEntity.getId());
|
||||||
|
List<Long> preferredCallIds = preferredCalls.stream()
|
||||||
|
.map(BeneficiaryPreferredCallEntity::getCallId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// Add preferredCallIds filtering to the specification
|
||||||
|
spec = spec.and((root, query, criteriaBuilder) ->
|
||||||
|
root.get(GepafinConstant.ID).in(preferredCallIds)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
entityPage = callRepository.findAll(spec, PageRequest.of(pageNo - 1, pageLimit));
|
||||||
|
List<Long> callIds=new ArrayList<>();
|
||||||
|
if(entityPage!=null && entityPage.getContent()!=null && Boolean.FALSE.equals(entityPage.getContent().isEmpty())) {
|
||||||
|
callIds = entityPage.getContent().stream().map(CallEntity::getId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
Map<String, BeneficiaryPreferredCallEntity> preferredCallsMap =
|
||||||
|
getBeneficiaryPreferredCallsForUser(request,user, callIds, companyId);
|
||||||
|
|
||||||
|
List<CallDetailsResponseBean> callDetailsResponseBeans = entityPage.getContent().stream()
|
||||||
|
.map(callEntity -> {
|
||||||
|
CallDetailsResponseBean responseBean = convertToCallDetailsResponseBean(callEntity);
|
||||||
|
String key = user.getId() + "_" + callEntity.getId();
|
||||||
|
BeneficiaryPreferredCallEntity preferredCall = preferredCallsMap.get(key);
|
||||||
|
Long preferredId = preferredCall != null ? preferredCall.getId() : null;
|
||||||
|
responseBean.setPreferredCallId(preferredId);
|
||||||
|
|
||||||
|
return responseBean;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
PageableResponseBean<List<CallDetailsResponseBean>> pageableResponseBean = new PageableResponseBean<>();
|
||||||
|
pageableResponseBean.setBody(callDetailsResponseBeans);
|
||||||
|
pageableResponseBean.setCurrentPage(entityPage.getNumber() + 1); // Page numbers typically start from 0, so add 1 for user-friendly indexing
|
||||||
|
pageableResponseBean.setTotalPages(entityPage.getTotalPages());
|
||||||
|
pageableResponseBean.setTotalRecords(entityPage.getTotalElements());
|
||||||
|
pageableResponseBean.setPageSize(entityPage.getSize());
|
||||||
|
|
||||||
|
return pageableResponseBean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Specification<CallEntity> search(UserEntity userEntity, CallPageableRequestBean callPageableRequestBean) {
|
||||||
|
return (root, query, criteriaBuilder) -> {
|
||||||
|
|
||||||
|
List<Predicate> predicates = getPredicates(callPageableRequestBean, criteriaBuilder, root, userEntity);
|
||||||
|
SortBy sortBy = new SortBy(GepafinConstant.CREATED_DATE, true);
|
||||||
|
|
||||||
|
if (callPageableRequestBean.getGlobalFilters() != null
|
||||||
|
&& callPageableRequestBean.getGlobalFilters().getSortBy() != null &&
|
||||||
|
callPageableRequestBean.getGlobalFilters().getSortBy().getColumnName() != null && Boolean.FALSE.equals(
|
||||||
|
isEmpty(callPageableRequestBean.getGlobalFilters().getSortBy().getColumnName()))) {
|
||||||
|
sortBy.setColumnName(callPageableRequestBean.getGlobalFilters().getSortBy().getColumnName());
|
||||||
|
sortBy.setSortDesc(true);
|
||||||
|
if (callPageableRequestBean.getGlobalFilters().getSortBy().getSortDesc() != null) {
|
||||||
|
sortBy.setSortDesc(callPageableRequestBean.getGlobalFilters().getSortBy().getSortDesc());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query.orderBy(criteriaBuilder.desc(root.get(sortBy.getColumnName())));
|
||||||
|
if (Boolean.FALSE.equals(sortBy.getSortDesc())) {
|
||||||
|
query.orderBy(criteriaBuilder.asc(root.get(sortBy.getColumnName())));
|
||||||
|
}
|
||||||
|
return query.where(criteriaBuilder.and(predicates.toArray(new Predicate[0]))).getRestriction();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<Predicate> getPredicates(CallPageableRequestBean callPageableRequestBean,
|
||||||
|
CriteriaBuilder criteriaBuilder, Root<CallEntity> root, UserEntity userEntity) {
|
||||||
|
|
||||||
|
Integer year = null;
|
||||||
|
String search = null;
|
||||||
|
if (callPageableRequestBean.getGlobalFilters() != null) {
|
||||||
|
year = callPageableRequestBean.getGlobalFilters().getYear();
|
||||||
|
search = callPageableRequestBean.getGlobalFilters().getSearch();
|
||||||
|
}
|
||||||
|
List<Predicate> predicates = new ArrayList<>();
|
||||||
|
if (year != null && year > 0) {
|
||||||
|
int filterYear = callPageableRequestBean.getGlobalFilters().getYear();
|
||||||
|
|
||||||
|
// Create LocalDateTime boundaries for the start and end of the year
|
||||||
|
LocalDateTime startOfYear = LocalDateTime.of(filterYear, 1, 1, 0, 0);
|
||||||
|
LocalDateTime endOfYear = LocalDateTime.of(filterYear, 12, 31, 23, 59, 59);
|
||||||
|
|
||||||
|
// Add the range comparison to filter records within the year
|
||||||
|
predicates.add(criteriaBuilder.between(root.get(GepafinConstant.CREATED_DATE), startOfYear, endOfYear));
|
||||||
|
|
||||||
|
}
|
||||||
|
// Search in `title` and `message` (if search term is provided)
|
||||||
|
if (search != null && !search.isEmpty()) {
|
||||||
|
Predicate descriptionShort = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.DESCRIPTION_SHORT)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
predicates.add(criteriaBuilder.or(descriptionShort));
|
||||||
|
|
||||||
|
Predicate descriptionLong = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.DESCRIPTION_LONG)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
predicates.add(criteriaBuilder.or(descriptionLong));
|
||||||
|
|
||||||
|
Predicate name = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.NAME)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
predicates.add(criteriaBuilder.or(name));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter by `status` (if status list is provided)
|
||||||
|
if (callPageableRequestBean.getStatus() != null && !callPageableRequestBean.getStatus().isEmpty()) {
|
||||||
|
List<String> statusValues = callPageableRequestBean.getStatus().stream()
|
||||||
|
.map(CallStatusEnum::name) // Convert enum to string
|
||||||
|
.toList();
|
||||||
|
predicates.add(root.get(GepafinConstant.STATUS).in(statusValues));
|
||||||
|
}
|
||||||
|
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.HUB).get(GepafinConstant.ID), userEntity.getHub().getId()));
|
||||||
|
|
||||||
|
|
||||||
|
return predicates;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ public class CompanyDao {
|
|||||||
userWithCompanyEntity.setContactEmail(companyRequest.getContactEmail());
|
userWithCompanyEntity.setContactEmail(companyRequest.getContactEmail());
|
||||||
userWithCompanyEntity.setJson(Utils.convertMapIntoJsonString(companyRequest.getVatCheckResponse()) );
|
userWithCompanyEntity.setJson(Utils.convertMapIntoJsonString(companyRequest.getVatCheckResponse()) );
|
||||||
UserWithCompanyEntity userWithCompany = userWithCompanyRepository.save(userWithCompanyEntity);
|
UserWithCompanyEntity userWithCompany = userWithCompanyRepository.save(userWithCompanyEntity);
|
||||||
|
|
||||||
/** This code is responsible for adding a version history log for the "adding user with company" operation. **/
|
/** This code is responsible for adding a version history log for the "adding user with company" operation. **/
|
||||||
loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(VersionActionTypeEnum.INSERT).oldData(null).newData(userWithCompany).build());
|
loggingUtil.addVersionHistory(VersionHistoryRequest.builder().request(request).actionType(VersionActionTypeEnum.INSERT).oldData(null).newData(userWithCompany).build());
|
||||||
return userWithCompany;
|
return userWithCompany;
|
||||||
@@ -144,6 +143,22 @@ public class CompanyDao {
|
|||||||
entity.setNumberOfEmployees(request.getNumberOfEmployees());
|
entity.setNumberOfEmployees(request.getNumberOfEmployees());
|
||||||
entity.setAnnualRevenue(request.getAnnualRevenue());
|
entity.setAnnualRevenue(request.getAnnualRevenue());
|
||||||
entity.setHub(userEntity.getHub());
|
entity.setHub(userEntity.getHub());
|
||||||
|
Map<String, Object> vatCheckResponse = request.getVatCheckResponse();
|
||||||
|
if (request.getVatCheckResponse() != null) {
|
||||||
|
if (vatCheckResponse.containsKey("dettaglio")) {
|
||||||
|
Map<String, Object> dettaglio = (Map<String, Object>) vatCheckResponse.get("dettaglio");
|
||||||
|
if (dettaglio != null) {
|
||||||
|
if (dettaglio.containsKey("codice_ateco")) {
|
||||||
|
Object codiceAtecoObj = dettaglio.get("codice_ateco");
|
||||||
|
String codiceAteco = (codiceAtecoObj != null) ? codiceAtecoObj.toString() : null;
|
||||||
|
|
||||||
|
if (codiceAteco != null) {
|
||||||
|
entity.setCodiceAteco(codiceAteco);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,6 +180,7 @@ public class CompanyDao {
|
|||||||
response.setAnnualRevenue(entity.getAnnualRevenue());
|
response.setAnnualRevenue(entity.getAnnualRevenue());
|
||||||
if(userWithCompanyEntity!=null) {
|
if(userWithCompanyEntity!=null) {
|
||||||
response.setIsLegalRepresentant(userWithCompanyEntity.getIsLegalRepresentant());
|
response.setIsLegalRepresentant(userWithCompanyEntity.getIsLegalRepresentant());
|
||||||
|
response.setCodiceAteco(entity.getCodiceAteco());
|
||||||
}
|
}
|
||||||
response.setCreatedDate(entity.getCreatedDate());
|
response.setCreatedDate(entity.getCreatedDate());
|
||||||
response.setUpdatedDate(entity.getUpdatedDate());
|
response.setUpdatedDate(entity.getUpdatedDate());
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package net.gepafin.tendermanagement.dao;
|
package net.gepafin.tendermanagement.dao;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
|
import net.gepafin.tendermanagement.entities.CompanyEntity;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserWithCompanyEntity;
|
||||||
import net.gepafin.tendermanagement.entities.*;
|
import net.gepafin.tendermanagement.entities.*;
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
||||||
@@ -11,9 +16,15 @@ import net.gepafin.tendermanagement.model.response.SuperAdminWidgetResponseBean;
|
|||||||
import net.gepafin.tendermanagement.repositories.*;
|
import net.gepafin.tendermanagement.repositories.*;
|
||||||
import net.gepafin.tendermanagement.service.CompanyService;
|
import net.gepafin.tendermanagement.service.CompanyService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
@@ -45,11 +56,14 @@ public class DashboardDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationEvaluationRepository applicationEvaluationRepository;
|
private ApplicationEvaluationRepository applicationEvaluationRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserActionsRepository userActionsRepository;
|
||||||
|
|
||||||
public SuperAdminWidgetResponseBean getDashboardWidget(UserEntity requestedUserEntity) {
|
public SuperAdminWidgetResponseBean getDashboardWidget(UserEntity requestedUserEntity) {
|
||||||
SuperAdminWidgetResponseBean widgetResponseBean = new SuperAdminWidgetResponseBean();
|
SuperAdminWidgetResponseBean widgetResponseBean = new SuperAdminWidgetResponseBean();
|
||||||
widgetResponseBean.setWidget1(createWidget1(requestedUserEntity));
|
widgetResponseBean.setWidget1(createWidget1(requestedUserEntity));
|
||||||
// List<Object[]> widgetBars = callRepository.findApplicationsPerCall();
|
Map<String, Object> widgetBars =getStatistics(requestedUserEntity);
|
||||||
// widgetResponseBean.setWidgetBars(widgetBars);
|
widgetResponseBean.setWidgetBars(widgetBars);
|
||||||
return widgetResponseBean;
|
return widgetResponseBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +76,8 @@ public class DashboardDao {
|
|||||||
setSubmittedApplications(widget1, requestedUserEntity);
|
setSubmittedApplications(widget1, requestedUserEntity);
|
||||||
setDraftApplications(widget1, requestedUserEntity);
|
setDraftApplications(widget1, requestedUserEntity);
|
||||||
setNumberOfCompanies(widget1, requestedUserEntity);
|
setNumberOfCompanies(widget1, requestedUserEntity);
|
||||||
|
setAmountRequested(widget1,requestedUserEntity);
|
||||||
|
setAmountAccepted(widget1,requestedUserEntity);
|
||||||
return widget1;
|
return widget1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +94,20 @@ public class DashboardDao {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setAmountRequested(Widget1 widget1, UserEntity requestedUserEntity) {
|
||||||
|
BigDecimal amountRequested = applicationRepository.findTotalAmountRequestedOfApplication(requestedUserEntity.getHub().getId());
|
||||||
|
if (amountRequested != null) {
|
||||||
|
widget1.setTotalAmountRequested(amountRequested);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setAmountAccepted(Widget1 widget1, UserEntity requestedUserEntity) {
|
||||||
|
BigDecimal amountAccepted = applicationRepository.findTotalAmountAcceptedOfApplication(requestedUserEntity.getHub().getId());
|
||||||
|
if (amountAccepted != null) {
|
||||||
|
widget1.setTotalAmountAccepted(amountAccepted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void setRegisteredUsers(Widget1 widget1, UserEntity requestedUserEntity) {
|
private void setRegisteredUsers(Widget1 widget1, UserEntity requestedUserEntity) {
|
||||||
Long activeUsers = userRepository.countByStatusAndRoleEntityRoleTypeAndHubId(UserStatusEnum.ACTIVE.getValue(),
|
Long activeUsers = userRepository.countByStatusAndRoleEntityRoleTypeAndHubId(UserStatusEnum.ACTIVE.getValue(),
|
||||||
RoleStatusEnum.ROLE_BENEFICIARY.getValue(), requestedUserEntity.getHub().getId());
|
RoleStatusEnum.ROLE_BENEFICIARY.getValue(), requestedUserEntity.getHub().getId());
|
||||||
@@ -142,6 +171,35 @@ public class DashboardDao {
|
|||||||
return beneficiaryWidgetResponseBean;
|
return beneficiaryWidgetResponseBean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getStatistics(UserEntity requestedUser) {
|
||||||
|
Map<String, Object> stats = new HashMap<>();
|
||||||
|
|
||||||
|
// Get applications per call
|
||||||
|
List<Object[]> applicationsPerCall = applicationRepository.findApplicationsPerCallWithName(requestedUser.getHub().getId());
|
||||||
|
stats.put(GepafinConstant.APPLICATION_PER_CALL, applicationsPerCall.stream().map(result -> {
|
||||||
|
Map<String, Object> callData = new HashMap<>();
|
||||||
|
callData.put(GepafinConstant.CALL_NAME, result[0]); // Call name
|
||||||
|
callData.put(GepafinConstant.NUMBER_OF_APPLICATIONS, result[1]); // Application count
|
||||||
|
return callData;
|
||||||
|
}).toList());
|
||||||
|
|
||||||
|
// Get applications grouped by status
|
||||||
|
List<Object[]> applicationsByStatus = applicationRepository.findApplicationsByStatus(requestedUser.getHub().getId());
|
||||||
|
stats.put(GepafinConstant.APPLICATION_PER_STATUS, applicationsByStatus.stream().map(result -> {
|
||||||
|
Map<String, Object> statusData = new HashMap<>();
|
||||||
|
statusData.put(GepafinConstant.STATUS, result[0]); // Application status
|
||||||
|
statusData.put(GepafinConstant.NUMBER_OF_APPLICATIONS, result[1]); // Count of applications
|
||||||
|
return statusData;
|
||||||
|
}).toList());
|
||||||
|
|
||||||
|
return stats;
|
||||||
|
}
|
||||||
|
// public Page<UserActionEntity> getUserAction(UserEntity requestedUserEntity){
|
||||||
|
// Pageable pageable = PageRequest.of(0, 20); // Get the first 20 records
|
||||||
|
// List<String> roles=List.of(RoleStatusEnum.ROLE_PRE_INSTRUCTOR.getValue(),RoleStatusEnum.ROLE_GEPAFIN_OPERATOR.getValue(),RoleStatusEnum.ROLE_INSTRUCTOR_MANAGER.getValue());
|
||||||
|
// Page<UserActionEntity> userActionEntities=userActionsRepository.findActionsByRoleNamesAndHubId(roles,requestedUserEntity.getHub().getId(),pageable);
|
||||||
|
// return userActionEntities;
|
||||||
|
// }
|
||||||
public ApplicationWidgetResponseBean getApplicationDetails(UserEntity userEntity) {
|
public ApplicationWidgetResponseBean getApplicationDetails(UserEntity userEntity) {
|
||||||
ApplicationWidgetResponseBean applicationWidgetResponseBean = initializeResponseBean();
|
ApplicationWidgetResponseBean applicationWidgetResponseBean = initializeResponseBean();
|
||||||
|
|
||||||
|
|||||||
@@ -309,6 +309,10 @@ public class FlowFormDao {
|
|||||||
if(applicationEntity.getProtocol() != null) {
|
if(applicationEntity.getProtocol() != null) {
|
||||||
nextOrPreviousFormResponse.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
nextOrPreviousFormResponse.setProtocolNumber(applicationEntity.getProtocol().getProtocolNumber());
|
||||||
}
|
}
|
||||||
|
nextOrPreviousFormResponse.setAmountAccepted(applicationEntity.getAmountAccepted());
|
||||||
|
nextOrPreviousFormResponse.setAmountRequested(applicationEntity.getAmountRequested());
|
||||||
|
nextOrPreviousFormResponse.setDateAccepted(applicationEntity.getDateAccepted());
|
||||||
|
nextOrPreviousFormResponse.setDateRejected(applicationEntity.getDateRejected());
|
||||||
return nextOrPreviousFormResponse;
|
return nextOrPreviousFormResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package net.gepafin.tendermanagement.dao;
|
package net.gepafin.tendermanagement.dao;
|
||||||
|
|
||||||
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
|
import jakarta.persistence.criteria.Expression;
|
||||||
|
import jakarta.persistence.criteria.Predicate;
|
||||||
|
import jakarta.persistence.criteria.Root;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
@@ -12,8 +16,12 @@ import net.gepafin.tendermanagement.entities.UserWithCompanyEntity;
|
|||||||
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationTypeEnum;
|
import net.gepafin.tendermanagement.enums.NotificationTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
import net.gepafin.tendermanagement.enums.RoleStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.util.SortBy;
|
||||||
import net.gepafin.tendermanagement.repositories.NotificationRepository;
|
import net.gepafin.tendermanagement.repositories.NotificationRepository;
|
||||||
import net.gepafin.tendermanagement.repositories.NotificationTypeRepository;
|
import net.gepafin.tendermanagement.repositories.NotificationTypeRepository;
|
||||||
import net.gepafin.tendermanagement.repositories.UserRepository;
|
import net.gepafin.tendermanagement.repositories.UserRepository;
|
||||||
@@ -23,9 +31,16 @@ import net.gepafin.tendermanagement.util.DateTimeUtil;
|
|||||||
import net.gepafin.tendermanagement.util.Utils;
|
import net.gepafin.tendermanagement.util.Utils;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
|
import org.opensaml.xmlsec.signature.G;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -34,6 +49,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||||
import static org.hibernate.internal.util.collections.CollectionHelper.listOf;
|
import static org.hibernate.internal.util.collections.CollectionHelper.listOf;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@@ -275,4 +291,113 @@ public class NotificationDao {
|
|||||||
return notificationEntities.stream().map(this::convertNotificationEntityToNotificationResponse).toList();
|
return notificationEntities.stream().map(this::convertNotificationEntityToNotificationResponse).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PageableResponseBean<List<NotificationResponse>> getAllNotification(Long userId, NotificationRequestBean notificationRequestBean) {
|
||||||
|
Integer pageNo = null;
|
||||||
|
Integer pageLimit = null;
|
||||||
|
if (notificationRequestBean.getGlobalFilters() != null) {
|
||||||
|
pageNo = notificationRequestBean.getGlobalFilters().getPage();
|
||||||
|
pageLimit = notificationRequestBean.getGlobalFilters().getLimit();
|
||||||
|
}
|
||||||
|
if (pageLimit == null || pageLimit <= 0) {
|
||||||
|
pageLimit = GepafinConstant.DEFAULT_PAGE_LIMIT;
|
||||||
|
}
|
||||||
|
if (pageNo == null || pageNo <= 0) {
|
||||||
|
pageNo = GepafinConstant.DEFAULT_PAGE;
|
||||||
|
}
|
||||||
|
Specification<NotificationEntity> spec = search(userId, notificationRequestBean);
|
||||||
|
Page<NotificationEntity> entityPage = notificationRepository.findAll(spec, PageRequest.of(pageNo - 1, pageLimit));
|
||||||
|
// Prepare the response
|
||||||
|
|
||||||
|
|
||||||
|
List<NotificationResponse> notificationResponses = entityPage.getContent().stream()
|
||||||
|
.map(notification -> {
|
||||||
|
NotificationResponse response = convertNotificationEntityToNotificationResponse(notification);
|
||||||
|
return response;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
PageableResponseBean<List<NotificationResponse>> pageableResponseBean = new PageableResponseBean<>();
|
||||||
|
pageableResponseBean.setBody(notificationResponses);
|
||||||
|
pageableResponseBean.setCurrentPage(entityPage.getNumber() + 1); // Page numbers typically start from 0, so add 1 for user-friendly indexing
|
||||||
|
pageableResponseBean.setTotalPages(entityPage.getTotalPages());
|
||||||
|
pageableResponseBean.setTotalRecords(entityPage.getTotalElements());
|
||||||
|
pageableResponseBean.setPageSize(entityPage.getSize());
|
||||||
|
|
||||||
|
return pageableResponseBean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Specification<NotificationEntity> search(Long userId, NotificationRequestBean notificationRequestBean) {
|
||||||
|
return (root, query, criteriaBuilder) -> {
|
||||||
|
|
||||||
|
List<Predicate> predicates = getPredicates(notificationRequestBean, criteriaBuilder, root, userId);
|
||||||
|
SortBy sortBy = new SortBy(GepafinConstant.CREATED_DATE, true);
|
||||||
|
|
||||||
|
if (notificationRequestBean.getGlobalFilters() != null
|
||||||
|
&& notificationRequestBean.getGlobalFilters().getSortBy() != null &&
|
||||||
|
notificationRequestBean.getGlobalFilters().getSortBy().getColumnName() != null && Boolean.FALSE.equals(
|
||||||
|
isEmpty(notificationRequestBean.getGlobalFilters().getSortBy().getColumnName()))) {
|
||||||
|
sortBy.setColumnName(notificationRequestBean.getGlobalFilters().getSortBy().getColumnName());
|
||||||
|
sortBy.setSortDesc(true);
|
||||||
|
if (notificationRequestBean.getGlobalFilters().getSortBy().getSortDesc() != null) {
|
||||||
|
sortBy.setSortDesc(notificationRequestBean.getGlobalFilters().getSortBy().getSortDesc());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query.orderBy(criteriaBuilder.desc(root.get(sortBy.getColumnName())));
|
||||||
|
if (Boolean.FALSE.equals(sortBy.getSortDesc())) {
|
||||||
|
query.orderBy(criteriaBuilder.asc(root.get(sortBy.getColumnName())));
|
||||||
|
}
|
||||||
|
return query.where(criteriaBuilder.and(predicates.toArray(new Predicate[0]))).getRestriction();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<Predicate> getPredicates(NotificationRequestBean notificationRequestBean,
|
||||||
|
CriteriaBuilder criteriaBuilder, Root<NotificationEntity> root, Long userId) {
|
||||||
|
|
||||||
|
Integer year = null;
|
||||||
|
String search = null;
|
||||||
|
if (notificationRequestBean.getGlobalFilters() != null) {
|
||||||
|
year = notificationRequestBean.getGlobalFilters().getYear();
|
||||||
|
search = notificationRequestBean.getGlobalFilters().getSearch();
|
||||||
|
}
|
||||||
|
List<Predicate> predicates = new ArrayList<>();
|
||||||
|
if (year != null && year > 0) {
|
||||||
|
int filterYear = notificationRequestBean.getGlobalFilters().getYear();
|
||||||
|
|
||||||
|
// Create LocalDateTime boundaries for the start and end of the year
|
||||||
|
LocalDateTime startOfYear = LocalDateTime.of(filterYear, 1, 1, 0, 0);
|
||||||
|
LocalDateTime endOfYear = LocalDateTime.of(filterYear, 12, 31, 23, 59, 59);
|
||||||
|
|
||||||
|
// Add the range comparison to filter records within the year
|
||||||
|
predicates.add(criteriaBuilder.between(root.get(GepafinConstant.CREATED_DATE), startOfYear, endOfYear));
|
||||||
|
|
||||||
|
}
|
||||||
|
// Search in `title` and `message` (if search term is provided)
|
||||||
|
if (search != null && !search.isEmpty()) {
|
||||||
|
Predicate titlePredicate = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.TITLE)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
Predicate messagePredicate = criteriaBuilder.like(
|
||||||
|
criteriaBuilder.upper(root.get(GepafinConstant.MESSAGE)),
|
||||||
|
"%" + search.toUpperCase() + "%"
|
||||||
|
);
|
||||||
|
predicates.add(criteriaBuilder.or(titlePredicate, messagePredicate));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter by `status` (if status list is provided)
|
||||||
|
if (notificationRequestBean.getStatus() != null && !notificationRequestBean.getStatus().isEmpty()) {
|
||||||
|
List<String> statusValues = notificationRequestBean.getStatus().stream()
|
||||||
|
.map(NotificationEnum::name) // Convert enum to string
|
||||||
|
.toList();
|
||||||
|
predicates.add(root.get(GepafinConstant.STATUS).in(statusValues));
|
||||||
|
}
|
||||||
|
predicates.add(criteriaBuilder.isFalse(root.get(GepafinConstant.IS_DELETED)));
|
||||||
|
|
||||||
|
predicates.add(criteriaBuilder.equal(root.get(GepafinConstant.USER_ID), userId));
|
||||||
|
return predicates;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,160 @@
|
|||||||
|
package net.gepafin.tendermanagement.dao;
|
||||||
|
|
||||||
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
|
import jakarta.persistence.criteria.Predicate;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import net.gepafin.tendermanagement.entities.RoleActionContextEntity;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
|
import net.gepafin.tendermanagement.enums.TimePeriodEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.UserActionResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.repositories.AssignedApplicationsRepository;
|
||||||
|
import net.gepafin.tendermanagement.repositories.RoleActionContextRepository;
|
||||||
|
import net.gepafin.tendermanagement.repositories.UserActionsRepository;
|
||||||
|
import net.gepafin.tendermanagement.service.UserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserActionDao {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserActionsRepository userActionsRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AssignedApplicationsRepository assignedApplicationsRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RoleActionContextRepository roleActionContextRepository;
|
||||||
|
|
||||||
|
public SummaryPageResponseBean getUserAction(HttpServletRequest request, UserEntity userEntity, TimePeriodEnum timeFilter, List<UserActionContextEnum> actionContext){
|
||||||
|
Long numberOfLoginAttempts = userActionsRepository.countUserLoginAttempts(userEntity.getId());
|
||||||
|
Long applicationsProcessed = assignedApplicationsRepository.countAssignedApplicationsByUserId(userEntity.getId());
|
||||||
|
|
||||||
|
List<UserActionEntity> userActions = getFilterUserActions(userEntity.getId(),timeFilter,actionContext);
|
||||||
|
|
||||||
|
return createSummaryPageResponse(userEntity,numberOfLoginAttempts,applicationsProcessed,userActions);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SummaryPageResponseBean createSummaryPageResponse(UserEntity user, Long numberOfLoginAttempts, Long applicationsProcessed, List<UserActionEntity> userActions){
|
||||||
|
SummaryPageResponseBean response = new SummaryPageResponseBean();
|
||||||
|
response.setRole(user.getRoleEntity().getRoleName());
|
||||||
|
response.setLastLogin(user.getLastLogin());
|
||||||
|
response.setRegistrationDate(user.getCreatedDate());
|
||||||
|
response.setUsername(user.getFirstName());
|
||||||
|
response.setEmail(user.getEmail());
|
||||||
|
response.setNumberOfLoginAttempts(numberOfLoginAttempts);
|
||||||
|
response.setApplicationsProcessed(applicationsProcessed);
|
||||||
|
|
||||||
|
List<UserActionResponseBean> userAction = convertEntityToResponse(userActions);
|
||||||
|
response.setUserActions(userAction);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<UserActionEntity> getFilterUserActions(Long userId ,TimePeriodEnum timeFilter, List<UserActionContextEnum> actionContextList) {
|
||||||
|
LocalDateTime endDate = LocalDateTime.now();
|
||||||
|
LocalDateTime startDate = (timeFilter != null) ? getStartTimeFromFilter(timeFilter) : null;
|
||||||
|
Pageable pageable = PageRequest.of(0, 25);
|
||||||
|
|
||||||
|
// String actionContextLabel = (actionContext != null) ? actionContext.toString() : null;
|
||||||
|
List<String> actionContextLabels = (actionContextList != null && !actionContextList.isEmpty())
|
||||||
|
? actionContextList.stream().map(Enum::toString).collect(Collectors.toList())
|
||||||
|
: null;
|
||||||
|
|
||||||
|
Specification<UserActionEntity> spec = getUserActionsSpecification(userId, startDate, endDate, actionContextLabels);
|
||||||
|
Page<UserActionEntity> pageResult = userActionsRepository.findAll(spec, pageable);
|
||||||
|
|
||||||
|
return pageResult.getContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private LocalDateTime getStartTimeFromFilter(TimePeriodEnum timeFilter) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
if (timeFilter.equals(TimePeriodEnum.LAST_WEEK)) {
|
||||||
|
return now.minusDays(7);
|
||||||
|
} else if (timeFilter.equals(TimePeriodEnum.LAST_QUARTER)) {
|
||||||
|
return now.minusMonths(4);
|
||||||
|
} else if (timeFilter.equals(TimePeriodEnum.LAST_SEMESTER)) {
|
||||||
|
return now.minusMonths(6);
|
||||||
|
} else if (timeFilter.equals(TimePeriodEnum.LAST_YEAR)) {
|
||||||
|
return now.minusYears(1);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Specification<UserActionEntity> getUserActionsSpecification(Long userId, LocalDateTime startDate, LocalDateTime endDate, List<String> actionContextList) {
|
||||||
|
return (root, query, builder) -> {
|
||||||
|
Predicate predicate = builder.isFalse(root.get("isDeleted"));
|
||||||
|
|
||||||
|
predicate = builder.and(predicate, builder.equal(root.get("userId"), userId));
|
||||||
|
|
||||||
|
if (startDate != null && endDate != null) {
|
||||||
|
predicate = builder.and(predicate, builder.between(root.get("createdDate"), startDate, endDate));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (actionContextList != null && !actionContextList.isEmpty()) {
|
||||||
|
CriteriaBuilder.In<Object> inClause = builder.in(root.get("actionContext"));
|
||||||
|
for (String actionContext : actionContextList) {
|
||||||
|
inClause.value(actionContext);
|
||||||
|
}
|
||||||
|
predicate = builder.and(predicate, inClause);
|
||||||
|
}
|
||||||
|
query.orderBy(builder.desc(root.get("createdDate")));
|
||||||
|
|
||||||
|
return predicate;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<UserActionResponseBean> convertEntityToResponse(List<UserActionEntity> userActions) {
|
||||||
|
return userActions.stream().map(action -> {
|
||||||
|
UserActionResponseBean responseBean = new UserActionResponseBean();
|
||||||
|
responseBean.setId(action.getId());
|
||||||
|
responseBean.setUserId(action.getUserId());
|
||||||
|
responseBean.setActionType(action.getActionType());
|
||||||
|
responseBean.setRequestBody(action.getRequestBody());
|
||||||
|
responseBean.setLoginAttemptId(action.getLoginAttemptId());
|
||||||
|
responseBean.setIpAddress(action.getIpAddress());
|
||||||
|
responseBean.setActionContext(action.getActionContext());
|
||||||
|
responseBean.setHubId(action.getHubId());
|
||||||
|
responseBean.setUrl(action.getUrl());
|
||||||
|
responseBean.setResponse(action.getResponse());
|
||||||
|
responseBean.setCreatedDate(action.getCreatedDate());
|
||||||
|
responseBean.setUpdatedDate(action.getUpdatedDate());
|
||||||
|
return responseBean;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ActionContextLabelResponse> getActionContextLabels(HttpServletRequest request, UserEntity userEntity){
|
||||||
|
List<RoleActionContextEntity> actionContextLabel = roleActionContextRepository.findActionContextLabel(userEntity.getRoleEntity().getId());
|
||||||
|
return convertRoleContextEntityToResponse(actionContextLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ActionContextLabelResponse> convertRoleContextEntityToResponse(List<RoleActionContextEntity> actionContextEntities){
|
||||||
|
return actionContextEntities.stream().map(actionContext -> {
|
||||||
|
ActionContextLabelResponse responseBean = new ActionContextLabelResponse();
|
||||||
|
responseBean.setId(actionContext.getId());
|
||||||
|
responseBean.setActionContext(UserActionContextEnum.valueOf(actionContext.getActionContext()));
|
||||||
|
responseBean.setRoleId(actionContext.getRoleId());
|
||||||
|
responseBean.setDescription(actionContext.getDescription());
|
||||||
|
responseBean.setIsViewed(actionContext.getIsViewed());
|
||||||
|
return responseBean;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.entities;
|
|||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@@ -55,4 +56,16 @@ public class ApplicationEntity extends BaseEntity {
|
|||||||
@Column(name = "APPOINTMENT_ID")
|
@Column(name = "APPOINTMENT_ID")
|
||||||
private String appointmentId;
|
private String appointmentId;
|
||||||
|
|
||||||
}
|
@Column(name="AMOUNT_REQUESTED")
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
|
||||||
|
@Column(name="AMOUNT_ACCEPTED")
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
|
||||||
|
@Column(name="DATE_ACCEPTED")
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
|
||||||
|
@Column(name="DATE_REJECTED")
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -56,4 +56,7 @@ public class CompanyEntity extends BaseEntity{
|
|||||||
|
|
||||||
@Column(name = "NDG")
|
@Column(name = "NDG")
|
||||||
private String ndg;
|
private String ndg;
|
||||||
|
|
||||||
|
@Column(name = "CODICE_ATECO")
|
||||||
|
private String codiceAteco;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package net.gepafin.tendermanagement.entities;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@Table(name ="role_action_context")
|
||||||
|
public class RoleActionContextEntity extends BaseEntity {
|
||||||
|
|
||||||
|
@Column(name = "action_context")
|
||||||
|
private String actionContext;
|
||||||
|
|
||||||
|
@Column(name = "role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@Column(name="is_deleted")
|
||||||
|
private Boolean isDeleted;
|
||||||
|
|
||||||
|
@Column(name = "is_viewed")
|
||||||
|
private Boolean isViewed;
|
||||||
|
|
||||||
|
@Column(name = "description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package net.gepafin.tendermanagement.enums;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
public enum TimePeriodEnum {
|
||||||
|
|
||||||
|
LAST_WEEK ("LAST_WEEK"),
|
||||||
|
LAST_QUARTER("LAST_QUARTER"),
|
||||||
|
LAST_SEMESTER("LAST_SEMESTER"),
|
||||||
|
LAST_YEAR("LAST_YEAR");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
TimePeriodEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -164,7 +164,15 @@ public enum UserActionContextEnum {
|
|||||||
/** appointment action context **/
|
/** appointment action context **/
|
||||||
CHECK_OR_CREATE_NDG_CODE("CHECK_OR_CREATE_NDG_CODE"),
|
CHECK_OR_CREATE_NDG_CODE("CHECK_OR_CREATE_NDG_CODE"),
|
||||||
CREATE_APPOINTMENT("CREATE_APPOINTMENT"),
|
CREATE_APPOINTMENT("CREATE_APPOINTMENT"),
|
||||||
UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM("UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM");
|
UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM("UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM"),
|
||||||
|
|
||||||
|
GET_ALL_NOTIFICATION_BY_PAGINATION("GET_ALL_NOTIFICATION_BY_PAGINATION"),
|
||||||
|
GET_ALL_CALL_BY_PAGINATION("GET_ALL_CALL_BY_PAGINATION"),
|
||||||
|
GET_ALL_APPLICATION_BY_PAGINATION("GET_ALL_APPLICATION_BY_PAGINATION"),
|
||||||
|
|
||||||
|
|
||||||
|
GET_USER_ACTION("GET_USER_ACTION"),
|
||||||
|
GET_ACTION_CONTEXT_LABELS("GET_ACTION_CONTEXT_LABELS");
|
||||||
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.model.request;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class ApplicationEvaluationRequest {
|
public class ApplicationEvaluationRequest {
|
||||||
@@ -15,4 +16,5 @@ public class ApplicationEvaluationRequest {
|
|||||||
private String note;
|
private String note;
|
||||||
private ApplicationStatusForEvaluation applicationStatus;
|
private ApplicationStatusForEvaluation applicationStatus;
|
||||||
private String motivation;
|
private String motivation;
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApplicationPageableRequestBean {
|
||||||
|
|
||||||
|
private GlobalFilters globalFilters;
|
||||||
|
|
||||||
|
private List<ApplicationStatusTypeEnum> status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CallPageableRequestBean {
|
||||||
|
|
||||||
|
private GlobalFilters globalFilters;
|
||||||
|
|
||||||
|
private List<CallStatusEnum> status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.model.util.SortBy;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GlobalFilters {
|
||||||
|
private Integer year;
|
||||||
|
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
private String search;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private SortBy sortBy;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NotificationRequestBean {
|
||||||
|
|
||||||
|
private GlobalFilters globalFilters;
|
||||||
|
|
||||||
|
private List<NotificationEnum> status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ActionContextLabelResponse {
|
||||||
|
private Long id;
|
||||||
|
private UserActionContextEnum actionContext;
|
||||||
|
private Long roleId;
|
||||||
|
private Boolean isViewed;
|
||||||
|
private String description;
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
|||||||
import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -38,4 +39,8 @@ public class ApplicationEvaluationResponse {
|
|||||||
private LocalDateTime assignedAt;
|
private LocalDateTime assignedAt;
|
||||||
private String ndg;
|
private String ndg;
|
||||||
private String appointmentId;
|
private String appointmentId;
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package net.gepafin.tendermanagement.model.response;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -26,6 +27,15 @@ public class ApplicationGetResponseBean {
|
|||||||
|
|
||||||
private Long protocolNumber;
|
private Long protocolNumber;
|
||||||
|
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
|
|
||||||
|
|
||||||
private List<FormApplicationResponse> form;
|
private List<FormApplicationResponse> form;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.model.response;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationFormFieldResponseBean;
|
import net.gepafin.tendermanagement.model.response.ApplicationFormFieldResponseBean;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -37,4 +38,12 @@ public class ApplicationResponse{
|
|||||||
|
|
||||||
private String assignedUserName;
|
private String assignedUserName;
|
||||||
|
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ package net.gepafin.tendermanagement.model.response;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.gepafin.tendermanagement.model.BaseBean;
|
import net.gepafin.tendermanagement.model.BaseBean;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -19,6 +20,14 @@ public class ApplicationResponseBean extends BaseBean {
|
|||||||
|
|
||||||
private Long protocolNumber;
|
private Long protocolNumber;
|
||||||
|
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
|
|
||||||
private List<ApplicationFormFieldResponseBean> formFields;
|
private List<ApplicationFormFieldResponseBean> formFields;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ public class CompanyResponse extends BaseBean{
|
|||||||
private Boolean isLegalRepresentant;
|
private Boolean isLegalRepresentant;
|
||||||
private String contactName;
|
private String contactName;
|
||||||
private String contactEmail;
|
private String contactEmail;
|
||||||
|
private String codiceAteco;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package net.gepafin.tendermanagement.model.response;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class NextOrPreviousFormResponse {
|
public class NextOrPreviousFormResponse {
|
||||||
|
|
||||||
@@ -26,6 +29,14 @@ public class NextOrPreviousFormResponse {
|
|||||||
|
|
||||||
private ApplicationStatusTypeEnum applicationStatus;
|
private ApplicationStatusTypeEnum applicationStatus;
|
||||||
|
|
||||||
|
private BigDecimal amountRequested;
|
||||||
|
|
||||||
|
private BigDecimal amountAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateAccepted;
|
||||||
|
|
||||||
|
private LocalDateTime dateRejected;
|
||||||
|
|
||||||
private FormApplicationResponse applicationFormResponse;
|
private FormApplicationResponse applicationFormResponse;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PageableResponseBean<T> {
|
||||||
|
|
||||||
|
private T body;
|
||||||
|
private Long totalRecords;
|
||||||
|
private int currentPage;
|
||||||
|
private int totalPages;
|
||||||
|
private int pageSize;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SummaryPageResponseBean {
|
||||||
|
private String username;
|
||||||
|
private String email;
|
||||||
|
private String role;
|
||||||
|
private LocalDateTime lastLogin;
|
||||||
|
private LocalDateTime registrationDate;
|
||||||
|
private Long numberOfLoginAttempts;
|
||||||
|
private Long applicationsProcessed;
|
||||||
|
private List<UserActionResponseBean> userActions;
|
||||||
|
}
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
package net.gepafin.tendermanagement.model.response;
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class SuperAdminWidgetResponseBean {
|
public class SuperAdminWidgetResponseBean {
|
||||||
|
|
||||||
private Widget1 widget1;
|
private Widget1 widget1;
|
||||||
|
|
||||||
// private List<Object[]> widgetBars;
|
private Map<String, Object> widgetBars;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserActionResponseBean {
|
||||||
|
private Long id;
|
||||||
|
private Long userId;
|
||||||
|
private String actionType;
|
||||||
|
private String requestBody;
|
||||||
|
private Long loginAttemptId;
|
||||||
|
private String actionContext;
|
||||||
|
private String ipAddress;
|
||||||
|
private String methodType;
|
||||||
|
private Long hubId;
|
||||||
|
private String url;
|
||||||
|
private String response;
|
||||||
|
private LocalDateTime createdDate;
|
||||||
|
private LocalDateTime updatedDate;
|
||||||
|
}
|
||||||
@@ -23,4 +23,8 @@ public class Widget1 {
|
|||||||
|
|
||||||
private BigDecimal totalActiveFinancing;
|
private BigDecimal totalActiveFinancing;
|
||||||
|
|
||||||
|
private BigDecimal totalAmountRequested;
|
||||||
|
|
||||||
|
private BigDecimal totalAmountAccepted;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package net.gepafin.tendermanagement.model.util;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SortBy {
|
||||||
|
|
||||||
|
String columnName;
|
||||||
|
Boolean sortDesc;
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@@ -24,7 +25,6 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
|
|||||||
|
|
||||||
public Optional<ApplicationEntity> findByIdAndUserIdAndIsDeletedFalse(Long id,Long userId);
|
public Optional<ApplicationEntity> findByIdAndUserIdAndIsDeletedFalse(Long id,Long userId);
|
||||||
|
|
||||||
Optional<ApplicationEntity> findByUserIdAndUserWithCompanyIdAndCallIdAndIsDeletedFalse(Long userId, Long userWithCompanyId, Long callId);
|
|
||||||
|
|
||||||
public Optional<ApplicationEntity> findByIdAndUserIdAndCallIdAndIsDeletedFalse(Long applicationId, Long userId,
|
public Optional<ApplicationEntity> findByIdAndUserIdAndCallIdAndIsDeletedFalse(Long applicationId, Long userId,
|
||||||
Long callId);
|
Long callId);
|
||||||
@@ -45,6 +45,23 @@ public interface ApplicationRepository extends JpaRepository<ApplicationEntity,
|
|||||||
@Query("SELECT a.call.id FROM ApplicationEntity a WHERE a.id = :id AND a.isDeleted = false")
|
@Query("SELECT a.call.id FROM ApplicationEntity a WHERE a.id = :id AND a.isDeleted = false")
|
||||||
Long findCallIdById(@Param("id") Long id);
|
Long findCallIdById(@Param("id") Long id);
|
||||||
|
|
||||||
|
@Query("SELECT a.call.name, COUNT(a.id) FROM ApplicationEntity a WHERE a.isDeleted = false AND a.call.hub.id = :hubId GROUP BY a.call.name")
|
||||||
|
List<Object[]> findApplicationsPerCallWithName(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
|
// Count Applications by Status by Hub ID
|
||||||
|
@Query("SELECT a.status, COUNT(a.id) FROM ApplicationEntity a WHERE a.isDeleted = false AND a.call.hub.id = :hubId GROUP BY a.status")
|
||||||
|
List<Object[]> findApplicationsByStatus(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
|
@Query("SELECT SUM(a.amountRequested) " +
|
||||||
|
"FROM ApplicationEntity a " +
|
||||||
|
"WHERE a.hubId = :hubId AND a.status IN ('SUBMIT', 'SOCCORSO', 'APPROVED', 'EVALUATION', 'APPOINTMENT', 'NDG', 'ADMISSIBLE','REJECTED')")
|
||||||
|
BigDecimal findTotalAmountRequestedOfApplication(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
|
@Query("SELECT SUM(a.amountAccepted) " +
|
||||||
|
"FROM ApplicationEntity a " +
|
||||||
|
"WHERE a.hubId = :hubId AND a.status = 'APPROVED'")
|
||||||
|
BigDecimal findTotalAmountAcceptedOfApplication(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.hubId = :hubId AND a.status = 'SUBMIT' AND a.isDeleted = false")
|
@Query("SELECT COUNT(a) FROM ApplicationEntity a WHERE a.hubId = :hubId AND a.status = 'SUBMIT' AND a.isDeleted = false")
|
||||||
public Long countApplicationsByHubId(@Param("hubId") Long hubId);
|
public Long countApplicationsByHubId(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ public interface AssignedApplicationsRepository extends JpaRepository<AssignedAp
|
|||||||
@Param("applicationId") Long applicationId,
|
@Param("applicationId") Long applicationId,
|
||||||
@Param("id") Long id);
|
@Param("id") Long id);
|
||||||
|
|
||||||
|
@Query("SELECT COUNT(aa) FROM AssignedApplicationsEntity aa WHERE aa.isDeleted = false AND aa.userId = :userId AND aa.status <> 'CLOSE'")
|
||||||
|
Long countAssignedApplicationsByUserId(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package net.gepafin.tendermanagement.repositories;
|
package net.gepafin.tendermanagement.repositories;
|
||||||
import net.gepafin.tendermanagement.entities.CallEntity;
|
import net.gepafin.tendermanagement.entities.CallEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -9,7 +10,7 @@ import java.math.BigDecimal;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface CallRepository extends JpaRepository<CallEntity, Long> {
|
public interface CallRepository extends JpaRepository<CallEntity, Long>, JpaSpecificationExecutor<CallEntity> {
|
||||||
|
|
||||||
// public CallEntity findByIdAndStatusNotIn(Long id, List<String> status);
|
// public CallEntity findByIdAndStatusNotIn(Long id, List<String> status);
|
||||||
|
|
||||||
@@ -47,6 +48,10 @@ public interface CallRepository extends JpaRepository<CallEntity, Long> {
|
|||||||
BigDecimal findTotalAmountOfPublishedCallsAndHubId(@Param("hubId") Long hubId);
|
BigDecimal findTotalAmountOfPublishedCallsAndHubId(@Param("hubId") Long hubId);
|
||||||
@Query("SELECT c FROM CallEntity c WHERE c.id IN :ids AND c.status IN :status")
|
@Query("SELECT c FROM CallEntity c WHERE c.id IN :ids AND c.status IN :status")
|
||||||
List<CallEntity> findByIdInAndStatusIn(@Param("ids") List<Long> ids, @Param("status") List<String> status);
|
List<CallEntity> findByIdInAndStatusIn(@Param("ids") List<Long> ids, @Param("status") List<String> status);
|
||||||
|
|
||||||
|
@Query("SELECT SUM(c.amount) FROM CallEntity c WHERE c.hub.id = :hubId AND c.status = 'PUBLISH'")
|
||||||
|
BigDecimal findTotalAmountOfPublishedCalls(@Param("hubId") Long hubId);
|
||||||
|
|
||||||
List<CallEntity> findByIdIn(@Param("ids") List<Long> ids);
|
List<CallEntity> findByIdIn(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
package net.gepafin.tendermanagement.repositories;
|
package net.gepafin.tendermanagement.repositories;
|
||||||
|
|
||||||
import net.gepafin.tendermanagement.entities.NotificationEntity;
|
import net.gepafin.tendermanagement.entities.NotificationEntity;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface NotificationRepository extends JpaRepository<NotificationEntity, Long> {
|
public interface NotificationRepository extends JpaRepository<NotificationEntity, Long> , JpaSpecificationExecutor<NotificationEntity> {
|
||||||
|
|
||||||
NotificationEntity findByIdAndIsDeletedFalse(Long id);
|
NotificationEntity findByIdAndIsDeletedFalse(Long id);
|
||||||
|
|
||||||
@@ -17,4 +23,5 @@ public interface NotificationRepository extends JpaRepository<NotificationEntity
|
|||||||
List<NotificationEntity> findByUserIdAndIsDeletedFalseAndStatusIn(Long userId, List<String> statuses);
|
List<NotificationEntity> findByUserIdAndIsDeletedFalseAndStatusIn(Long userId, List<String> statuses);
|
||||||
|
|
||||||
List<NotificationEntity> findByUserWithCompanyIdAndUserIdAndIsDeletedFalse(Long userWithCompanyId, Long userId);
|
List<NotificationEntity> findByUserWithCompanyIdAndUserIdAndIsDeletedFalse(Long userWithCompanyId, Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package net.gepafin.tendermanagement.repositories;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.entities.RoleActionContextEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RoleActionContextRepository extends JpaRepository<RoleActionContextEntity,Long>, JpaSpecificationExecutor<RoleActionContextEntity> {
|
||||||
|
|
||||||
|
@Query("SELECT r FROM RoleActionContextEntity r WHERE r.roleId = :roleId AND r.isDeleted = false AND r.isViewed = true")
|
||||||
|
List<RoleActionContextEntity> findActionContextLabel(@Param("roleId") Long roleId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,9 +2,21 @@ package net.gepafin.tendermanagement.repositories;
|
|||||||
|
|
||||||
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
import net.gepafin.tendermanagement.entities.UserActionEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface UserActionsRepository extends JpaRepository<UserActionEntity, Long> {
|
public interface UserActionsRepository extends JpaRepository<UserActionEntity, Long> , JpaSpecificationExecutor<UserActionEntity> {
|
||||||
|
UserActionEntity findUserActionById(Long id);
|
||||||
|
|
||||||
|
@Query("SELECT COUNT(u) FROM UserActionEntity u " +
|
||||||
|
"WHERE u.userId = :userId " +
|
||||||
|
"AND u.actionContext = 'USER_LOGIN' " +
|
||||||
|
"AND u.isDeleted = false")
|
||||||
|
Long countUserLoginAttempts(@Param("userId") Long userId);
|
||||||
|
|
||||||
UserActionEntity findUserActionByIdAndIsDeletedFalse(Long id);
|
UserActionEntity findUserActionByIdAndIsDeletedFalse(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,18 +2,17 @@ package net.gepafin.tendermanagement.service;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.entities.ApplicationEntity;
|
import net.gepafin.tendermanagement.entities.ApplicationEntity;
|
||||||
|
import net.gepafin.tendermanagement.model.request.ApplicationPageableRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
public interface ApplicationService {
|
public interface ApplicationService {
|
||||||
@@ -41,5 +40,9 @@ public interface ApplicationService {
|
|||||||
public void deleteSignedDocument(HttpServletRequest request, Long applicationId);
|
public void deleteSignedDocument(HttpServletRequest request, Long applicationId);
|
||||||
|
|
||||||
public ApplicationResponse validateApplication(HttpServletRequest request, Long applicationId);
|
public ApplicationResponse validateApplication(HttpServletRequest request, Long applicationId);
|
||||||
|
|
||||||
byte[] downloadApplicationDocumentsAsZip(HttpServletRequest request, Long applicationId);
|
byte[] downloadApplicationDocumentsAsZip(HttpServletRequest request, Long applicationId);
|
||||||
}
|
|
||||||
|
PageableResponseBean<List<ApplicationResponse>> getAllApplicationByPagination(HttpServletRequest request, Long callId, Long companyId, ApplicationPageableRequestBean applicationPageableRequestBean);
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import java.util.List;
|
|||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.entities.CallEntity;
|
import net.gepafin.tendermanagement.entities.CallEntity;
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.CallPageableRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
||||||
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.CallResponse;
|
import net.gepafin.tendermanagement.model.response.CallResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
|
|
||||||
public interface CallService {
|
public interface CallService {
|
||||||
|
|
||||||
@@ -30,5 +32,9 @@ public interface CallService {
|
|||||||
CallEntity validateCall(Long callId);
|
CallEntity validateCall(Long callId);
|
||||||
|
|
||||||
CallEntity validatePublishedCall(Long callId, Long hubId);
|
CallEntity validatePublishedCall(Long callId, Long hubId);
|
||||||
|
|
||||||
byte[] downloadCallDocumentsAsZip(HttpServletRequest request, Long callId);
|
byte[] downloadCallDocumentsAsZip(HttpServletRequest request, Long callId);
|
||||||
|
|
||||||
|
PageableResponseBean<List<CallDetailsResponseBean>> getAllCallsByPagination(HttpServletRequest request, Long companyId , Boolean onlyPreferredCall,CallPageableRequestBean callPageableRequestBean);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ package net.gepafin.tendermanagement.service;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -20,4 +24,5 @@ public interface NotificationService {
|
|||||||
|
|
||||||
public List<NotificationResponse> getNotificationsByCompanyIdAndUserId(Long userId, Long companyId, List<NotificationEnum> statuses);
|
public List<NotificationResponse> getNotificationsByCompanyIdAndUserId(Long userId, Long companyId, List<NotificationEnum> statuses);
|
||||||
|
|
||||||
|
PageableResponseBean<List<NotificationResponse>> getAllNotification(HttpServletRequest request,Long userId, NotificationRequestBean notificationRequestBean);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package net.gepafin.tendermanagement.service;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import net.gepafin.tendermanagement.enums.TimePeriodEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UserActionService {
|
||||||
|
public SummaryPageResponseBean getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List<UserActionContextEnum> actionContext);
|
||||||
|
|
||||||
|
public List<ActionContextLabelResponse> getActionContextLabels(HttpServletRequest request, Long userId);
|
||||||
|
}
|
||||||
@@ -8,15 +8,12 @@ import net.gepafin.tendermanagement.dao.FlowFormDao;
|
|||||||
import net.gepafin.tendermanagement.entities.ApplicationEntity;
|
import net.gepafin.tendermanagement.entities.ApplicationEntity;
|
||||||
import net.gepafin.tendermanagement.entities.CompanyEntity;
|
import net.gepafin.tendermanagement.entities.CompanyEntity;
|
||||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
|
import net.gepafin.tendermanagement.model.request.ApplicationPageableRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
|
||||||
import net.gepafin.tendermanagement.service.ApplicationService;
|
import net.gepafin.tendermanagement.service.ApplicationService;
|
||||||
import net.gepafin.tendermanagement.util.Validator;
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
@@ -129,4 +126,13 @@ public class ApplicationServiceImpl implements ApplicationService {
|
|||||||
return applicationDao.downloadApplicationDocumentsAsZip(request,applicationId);
|
return applicationDao.downloadApplicationDocumentsAsZip(request,applicationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageableResponseBean<List<ApplicationResponse>> getAllApplicationByPagination(HttpServletRequest request, Long callId, Long companyId, ApplicationPageableRequestBean applicationPageableRequestBean) {
|
||||||
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
|
if (companyId != null) {
|
||||||
|
validator.validateUserWithCompany(request, companyId);
|
||||||
|
}
|
||||||
|
return applicationDao.getAllApplicationByPagination(userEntity,callId,companyId,applicationPageableRequestBean);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ import net.gepafin.tendermanagement.dao.CallDao;
|
|||||||
import net.gepafin.tendermanagement.entities.CallEntity;
|
import net.gepafin.tendermanagement.entities.CallEntity;
|
||||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.CallPageableRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
||||||
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.CallResponse;
|
import net.gepafin.tendermanagement.model.response.CallResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import net.gepafin.tendermanagement.service.CallService;
|
import net.gepafin.tendermanagement.service.CallService;
|
||||||
import net.gepafin.tendermanagement.util.Validator;
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
|
|
||||||
@@ -103,4 +105,10 @@ public class CallServiceImpl implements CallService {
|
|||||||
return callDao.downloadCallDocumentsAsZip(callId);
|
return callDao.downloadCallDocumentsAsZip(callId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageableResponseBean<List<CallDetailsResponseBean>> getAllCallsByPagination(HttpServletRequest request,Long companyId , Boolean onlyPreferredCall, CallPageableRequestBean callPageableRequestBean) {
|
||||||
|
UserEntity user = validator.validateUser(request);
|
||||||
|
return callDao.getAllCallsByPagination(request,user,companyId,onlyPreferredCall,callPageableRequestBean);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,11 +3,17 @@ package net.gepafin.tendermanagement.service.impl;
|
|||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.gepafin.tendermanagement.dao.NotificationDao;
|
import net.gepafin.tendermanagement.dao.NotificationDao;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import net.gepafin.tendermanagement.service.NotificationService;
|
import net.gepafin.tendermanagement.service.NotificationService;
|
||||||
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,6 +27,9 @@ public class NotificationServiceImpl implements NotificationService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private NotificationDao notificationDao;
|
private NotificationDao notificationDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Validator validator;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NotificationResponse sendNotification(Long userId, NotificationReq notificationReq, Long companyId) {
|
public NotificationResponse sendNotification(Long userId, NotificationReq notificationReq, Long companyId) {
|
||||||
|
|
||||||
@@ -59,4 +68,10 @@ public class NotificationServiceImpl implements NotificationService {
|
|||||||
public List<NotificationResponse> getNotificationsByCompanyIdAndUserId(Long userId, Long companyId, List<NotificationEnum> statuses) {
|
public List<NotificationResponse> getNotificationsByCompanyIdAndUserId(Long userId, Long companyId, List<NotificationEnum> statuses) {
|
||||||
return notificationDao.getNotificationByCompanyIdAndUserId(userId, companyId, statuses);
|
return notificationDao.getNotificationByCompanyIdAndUserId(userId, companyId, statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageableResponseBean<List<NotificationResponse>> getAllNotification(HttpServletRequest request, Long userId, NotificationRequestBean notificationRequestBean) {
|
||||||
|
UserEntity userEntity = validator.validateUser(request);
|
||||||
|
return notificationDao.getAllNotification(userId,notificationRequestBean);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package net.gepafin.tendermanagement.service.impl;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import net.gepafin.tendermanagement.dao.UserActionDao;
|
||||||
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
|
import net.gepafin.tendermanagement.enums.TimePeriodEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.service.UserActionService;
|
||||||
|
import net.gepafin.tendermanagement.util.Validator;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserActionServiceImpl implements UserActionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserActionDao userActionDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Validator validator;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SummaryPageResponseBean getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List<UserActionContextEnum> actionContext) {
|
||||||
|
UserEntity user = validator.validateUserId(request, userId);
|
||||||
|
return userActionDao.getUserAction(request,user,timeFilter,actionContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ActionContextLabelResponse> getActionContextLabels(HttpServletRequest request, Long userId) {
|
||||||
|
UserEntity user = validator.validateUserId(request, userId);
|
||||||
|
return userActionDao.getActionContextLabels(request,user);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ import jakarta.persistence.OneToOne;
|
|||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import org.apache.commons.collections4.MapUtils;
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -701,6 +702,18 @@ public class Utils {
|
|||||||
public static String createChannelForUserAndCompany(Long userId, Long companyId) {
|
public static String createChannelForUserAndCompany(Long userId, Long companyId) {
|
||||||
return GepafinConstant.COMMON_SINGLE_CHANNEL_PREFIX + userId + GepafinConstant.COMPANY_PREFIX + companyId;
|
return GepafinConstant.COMMON_SINGLE_CHANNEL_PREFIX + userId + GepafinConstant.COMPANY_PREFIX + companyId;
|
||||||
}
|
}
|
||||||
|
public static GlobalFilters setPageNumberAndLimit(GlobalFilters globalFilters){
|
||||||
|
if (globalFilters == null) {
|
||||||
|
if (globalFilters.getLimit() == null || globalFilters.getLimit() <= 0) {
|
||||||
|
globalFilters.setLimit(GepafinConstant.DEFAULT_PAGE_LIMIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (globalFilters.getPage() == null || globalFilters.getPage() <= 0) {
|
||||||
|
globalFilters.setPage(GepafinConstant.DEFAULT_PAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return globalFilters;
|
||||||
|
}
|
||||||
|
|
||||||
public static Map<String, Object> parseErrorResponse(String responseBody) {
|
public static Map<String, Object> parseErrorResponse(String responseBody) {
|
||||||
if (StringUtils.isBlank(responseBody)) {
|
if (StringUtils.isBlank(responseBody)) {
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package net.gepafin.tendermanagement.web.rest.api;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.gepafin.tendermanagement.model.request.ApplicationPageableRequestBean;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -19,12 +22,6 @@ import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
|||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.CompanyDelegationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
||||||
|
|
||||||
@@ -59,7 +56,7 @@ public interface ApplicationApi {
|
|||||||
@GetMapping(value = "/{applicationId}", produces = "application/json")
|
@GetMapping(value = "/{applicationId}", produces = "application/json")
|
||||||
ResponseEntity<Response<ApplicationGetResponseBean>> getApplicationByFormId(HttpServletRequest request, @Parameter(description = "The application id", required = true) @PathVariable(value = "applicationId", required = true) Long applicationId,@Parameter(description = "The form id", required = false) @RequestParam(value = "formId",required = false) Long formId);
|
ResponseEntity<Response<ApplicationGetResponseBean>> getApplicationByFormId(HttpServletRequest request, @Parameter(description = "The application id", required = true) @PathVariable(value = "applicationId", required = true) Long applicationId,@Parameter(description = "The form id", required = false) @RequestParam(value = "formId",required = false) Long formId);
|
||||||
|
|
||||||
@Operation(summary = "Api to get all applications",
|
@Operation(summary = "Api to get all applications (deprecated)",
|
||||||
responses = {
|
responses = {
|
||||||
@ApiResponse(responseCode = "200", description = "OK"),
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
@@ -213,5 +210,18 @@ public interface ApplicationApi {
|
|||||||
@GetMapping(value = "/{applicationId}/documents/zip")
|
@GetMapping(value = "/{applicationId}/documents/zip")
|
||||||
ResponseEntity<byte[]> downloadApplicationDocumentsAsZip(HttpServletRequest httpServletRequest,
|
ResponseEntity<byte[]> downloadApplicationDocumentsAsZip(HttpServletRequest httpServletRequest,
|
||||||
@Parameter(required = true) @PathVariable("applicationId") Long applicationId);
|
@Parameter(required = true) @PathVariable("applicationId") Long applicationId);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "Api to get all application by pagination.", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.NOTFOUND_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
|
||||||
|
@PostMapping( value = "/pagination", consumes = "application/json", produces = "application/json")
|
||||||
|
ResponseEntity<Response<PageableResponseBean<List<ApplicationResponse>>>> getAllApplicationByPagination(HttpServletRequest request,@Parameter(description = "The call id", required = false) @RequestParam(value = "callId", required = false) Long callId,
|
||||||
|
@Parameter(description = "The company id", required = false) @RequestParam(value = "companyId", required = false) Long companyId, @RequestBody ApplicationPageableRequestBean applicationPageableRequestBean);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package net.gepafin.tendermanagement.web.rest.api;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.CallPageableRequestBean;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -89,7 +92,7 @@ public interface CallApi {
|
|||||||
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId,@RequestParam(value = "companyId", required = false) Long companyId);
|
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId,@RequestParam(value = "companyId", required = false) Long companyId);
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "Api to get all calls",
|
@Operation(summary = "Api to get all calls (deprecated)",
|
||||||
responses = {
|
responses = {
|
||||||
@ApiResponse(responseCode = "200", description = "OK"),
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
@@ -149,4 +152,17 @@ public interface CallApi {
|
|||||||
ResponseEntity<byte[]> downloadCallDocumentsAsZip(HttpServletRequest httpServletRequest,
|
ResponseEntity<byte[]> downloadCallDocumentsAsZip(HttpServletRequest httpServletRequest,
|
||||||
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);
|
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "Api to get all calls by pagination.", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.NOTFOUND_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
|
||||||
|
@PostMapping(value = "/pagination", consumes = "application/json", produces = "application/json")
|
||||||
|
ResponseEntity<Response<PageableResponseBean<List<CallDetailsResponseBean>>>> getAllCallsByPagination(HttpServletRequest request,@RequestParam(value = "companyId", required = false) Long companyId , @RequestParam(value = "onlyPreferredCall", required = false, defaultValue = "false") Boolean onlyPreferredCall, @RequestBody CallPageableRequestBean callPageableRequestBean);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,14 @@ import io.swagger.v3.oas.annotations.media.ExampleObject;
|
|||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
@@ -96,6 +100,16 @@ public interface NotificationApi {
|
|||||||
@Parameter(description = "The company ID", required = true) @PathVariable(value = "companyId") Long companyId,
|
@Parameter(description = "The company ID", required = true) @PathVariable(value = "companyId") Long companyId,
|
||||||
@Parameter(description = "The notification status", required = false) @RequestParam(value = "status", required = false) List<NotificationEnum> statuses);
|
@Parameter(description = "The notification status", required = false) @RequestParam(value = "status", required = false) List<NotificationEnum> statuses);
|
||||||
|
|
||||||
|
@Operation(summary = "Api to get all notification by pagination.", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.NOTFOUND_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE))),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
|
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
|
||||||
|
@PostMapping(value = "/user/{userId}/pagination", consumes = "application/json", produces = "application/json")
|
||||||
|
ResponseEntity<Response<PageableResponseBean<List<NotificationResponse>>>> getAllNotification(HttpServletRequest request,@Parameter(description = "The user id", required = true) @PathVariable(value = "userId") Long userId, @RequestBody NotificationRequestBean notificationRequestBean);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package net.gepafin.tendermanagement.web.rest.api;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.ExampleObject;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import net.gepafin.tendermanagement.enums.TimePeriodEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.ErrorConstants;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UserActionApi {
|
||||||
|
@Operation(summary = "Api to get user action",
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
|
@GetMapping(value = "/user/{userId}", produces = { "application/json" })
|
||||||
|
ResponseEntity<Response<SummaryPageResponseBean>> getUserAction(HttpServletRequest request, @Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId,
|
||||||
|
@Parameter(description = "Time Filter") @RequestParam(value = "timeFilter", required = false) TimePeriodEnum timeFilter,
|
||||||
|
@Parameter(description = "Action Context") @RequestParam(value = "actionContext", required = false) List<UserActionContextEnum> actionContext);
|
||||||
|
|
||||||
|
@Operation(summary = "Api to get action context label",
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.NOTFOUND_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.UNAUTHORIZED_ERROR_EXAMPLE) })),
|
||||||
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
|
@GetMapping(value = "/user/{userId}/action-context", produces = { "application/json" })
|
||||||
|
ResponseEntity<Response<List<ActionContextLabelResponse>>> getActionContextLabels(HttpServletRequest request, @Parameter(description = "The user id", required = true) @PathVariable("userId") Long userId);
|
||||||
|
}
|
||||||
@@ -5,16 +5,13 @@ import net.gepafin.tendermanagement.config.Translator;
|
|||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.ApplicationPageableRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequest;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
||||||
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
import net.gepafin.tendermanagement.enums.FormActionEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
import net.gepafin.tendermanagement.model.request.ApplicationRequestBean;
|
||||||
import net.gepafin.tendermanagement.model.request.UserActionRequest;
|
import net.gepafin.tendermanagement.model.request.UserActionRequest;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationGetResponseBean;
|
import net.gepafin.tendermanagement.model.response.*;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponseBean;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationSignedDocumentResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.response.NextOrPreviousFormResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.service.ApplicationService;
|
import net.gepafin.tendermanagement.service.ApplicationService;
|
||||||
import net.gepafin.tendermanagement.service.PdfService;
|
import net.gepafin.tendermanagement.service.PdfService;
|
||||||
@@ -229,4 +226,15 @@ public class ApplicationApiController implements ApplicationApi {
|
|||||||
return new ResponseEntity<>(zipFile, headers, HttpStatus.OK);
|
return new ResponseEntity<>(zipFile, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<PageableResponseBean<List<ApplicationResponse>>>> getAllApplicationByPagination(HttpServletRequest request, Long callId, Long companyId, ApplicationPageableRequestBean applicationPageableRequestBean) {
|
||||||
|
|
||||||
|
/** This code is responsible for creating user action logs for the "get all notification by pagination" operation. **/
|
||||||
|
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW).actionContext(UserActionContextEnum.GET_ALL_APPLICATION_BY_PAGINATION).build());
|
||||||
|
|
||||||
|
PageableResponseBean<List<ApplicationResponse>> pageableResponseBean=applicationService
|
||||||
|
.getAllApplicationByPagination(request, callId,companyId,applicationPageableRequestBean);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK).body(new Response<>(pageableResponseBean, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_APPLICATION_SUCCESS_MSG)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import java.util.List;
|
|||||||
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
import net.gepafin.tendermanagement.enums.CallStatusEnum;
|
||||||
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
||||||
import net.gepafin.tendermanagement.model.request.UserActionRequest;
|
import net.gepafin.tendermanagement.model.request.*;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import net.gepafin.tendermanagement.util.LoggingUtil;
|
import net.gepafin.tendermanagement.util.LoggingUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
@@ -14,14 +15,12 @@ import org.springframework.http.MediaType;
|
|||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep1;
|
|
||||||
import net.gepafin.tendermanagement.model.request.CreateCallRequestStep2;
|
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateCallRequestStep1;
|
|
||||||
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
import net.gepafin.tendermanagement.model.response.CallDetailsResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.response.CallResponse;
|
import net.gepafin.tendermanagement.model.response.CallResponse;
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
@@ -151,5 +150,16 @@ public class CallApiController implements CallApi {
|
|||||||
return new ResponseEntity<>(zipFile, headers, HttpStatus.OK);
|
return new ResponseEntity<>(zipFile, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<PageableResponseBean<List<CallDetailsResponseBean>>>> getAllCallsByPagination(HttpServletRequest request, Long companyId , Boolean onlyPreferredCall, CallPageableRequestBean callPageableRequestBean) {
|
||||||
|
|
||||||
|
/** This code is responsible for creating user action logs for the "get all call by pagination" operation. **/
|
||||||
|
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW).actionContext(UserActionContextEnum.GET_ALL_CALL_BY_PAGINATION).build());
|
||||||
|
|
||||||
|
PageableResponseBean<List<CallDetailsResponseBean>> callsByPagination=callService.getAllCallsByPagination(request,companyId,onlyPreferredCall,callPageableRequestBean);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(callsByPagination, Status.SUCCESS, Translator.toLocale(GepafinConstant.CALL_FETCH_SUCCESS_MSG)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,13 +4,21 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import net.gepafin.tendermanagement.config.Translator;
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
import net.gepafin.tendermanagement.enums.NotificationEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.GlobalFilters;
|
||||||
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
import net.gepafin.tendermanagement.model.request.NotificationReq;
|
||||||
|
import net.gepafin.tendermanagement.model.request.NotificationRequestBean;
|
||||||
|
import net.gepafin.tendermanagement.model.request.UserActionRequest;
|
||||||
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
import net.gepafin.tendermanagement.model.response.NotificationResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.PageableResponseBean;
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.service.NotificationService;
|
import net.gepafin.tendermanagement.service.NotificationService;
|
||||||
|
import net.gepafin.tendermanagement.util.LoggingUtil;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.NotificationApi;
|
import net.gepafin.tendermanagement.web.rest.api.NotificationApi;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -25,6 +33,9 @@ public class NotificationApiController implements NotificationApi {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private NotificationService notificationService;
|
private NotificationService notificationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
LoggingUtil loggingUtil;
|
||||||
|
|
||||||
public ResponseEntity<Response<NotificationResponse>> sendNotification(HttpServletRequest request, NotificationReq notificationReq, Long userId, Long companyId) {
|
public ResponseEntity<Response<NotificationResponse>> sendNotification(HttpServletRequest request, NotificationReq notificationReq, Long userId, Long companyId) {
|
||||||
|
|
||||||
NotificationResponse notificationData = notificationService.sendNotification(userId, notificationReq, companyId);
|
NotificationResponse notificationData = notificationService.sendNotification(userId, notificationReq, companyId);
|
||||||
@@ -71,4 +82,14 @@ public class NotificationApiController implements NotificationApi {
|
|||||||
.body(new Response<>(notificationResponses, Status.SUCCESS, Translator.toLocale(GepafinConstant.NOTIFICATION_FETCHED_SUCCESSFULLY)));
|
.body(new Response<>(notificationResponses, Status.SUCCESS, Translator.toLocale(GepafinConstant.NOTIFICATION_FETCHED_SUCCESSFULLY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<PageableResponseBean<List<NotificationResponse>>>> getAllNotification(HttpServletRequest request,Long userId, NotificationRequestBean notificationRequestBean) {
|
||||||
|
|
||||||
|
/** This code is responsible for creating user action logs for the "get all notification by pagination" operation. **/
|
||||||
|
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW).actionContext(UserActionContextEnum.GET_ALL_NOTIFICATION_BY_PAGINATION).build());
|
||||||
|
|
||||||
|
PageableResponseBean<List<NotificationResponse>> notificationResponses=notificationService.getAllNotification(request, userId,notificationRequestBean);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK).body(new Response<>(notificationResponses, Status.SUCCESS, Translator.toLocale(GepafinConstant.NOTIFICATION_FETCHED_SUCCESSFULLY)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package net.gepafin.tendermanagement.web.rest.api.impl;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import net.gepafin.tendermanagement.config.Translator;
|
||||||
|
import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||||
|
import net.gepafin.tendermanagement.enums.TimePeriodEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionContextEnum;
|
||||||
|
import net.gepafin.tendermanagement.enums.UserActionLogsEnum;
|
||||||
|
import net.gepafin.tendermanagement.model.request.UserActionRequest;
|
||||||
|
import net.gepafin.tendermanagement.model.response.ActionContextLabelResponse;
|
||||||
|
import net.gepafin.tendermanagement.model.response.SummaryPageResponseBean;
|
||||||
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
|
import net.gepafin.tendermanagement.service.UserActionService;
|
||||||
|
import net.gepafin.tendermanagement.util.LoggingUtil;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.UserActionApi;
|
||||||
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("${openapi.gepafin.base-path:/v1/userAction}")
|
||||||
|
public class UserActionApiController implements UserActionApi {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserActionService userActionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LoggingUtil loggingUtil;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<SummaryPageResponseBean>> getUserAction(HttpServletRequest request, Long userId, TimePeriodEnum timeFilter, List<UserActionContextEnum> actionContext) {
|
||||||
|
|
||||||
|
/** This code is responsible for creating user action logs for the "get user action" operation. **/
|
||||||
|
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW)
|
||||||
|
.actionContext(UserActionContextEnum.GET_USER_ACTION).build());
|
||||||
|
SummaryPageResponseBean userActionResponse= userActionService.getUserAction(request,userId,timeFilter,actionContext);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(userActionResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.USER_ACTION_FETCHED_SUCCESSFULLY)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<List<ActionContextLabelResponse>>> getActionContextLabels(HttpServletRequest request, Long userId) {
|
||||||
|
|
||||||
|
/** This code is responsible for creating user action logs for the "get user action context labels" operation. **/
|
||||||
|
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.VIEW)
|
||||||
|
.actionContext(UserActionContextEnum.GET_ACTION_CONTEXT_LABELS).build());
|
||||||
|
|
||||||
|
List<ActionContextLabelResponse> actionContextResponse= userActionService.getActionContextLabels(request,userId);
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(actionContextResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.ACTION_CONTEXT_LABELS_FETCHED_SUCCESSFULLY)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2152,6 +2152,32 @@
|
|||||||
</addColumn>
|
</addColumn>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="13-01-2025_RK_142215" author="Rajesh Khore">
|
||||||
|
<createTable tableName="role_action_context">
|
||||||
|
<column autoIncrement="true" name="id" type="BIGINT">
|
||||||
|
<constraints nullable="false" primaryKey="true"
|
||||||
|
primaryKeyName="pk_role_action_context"/>
|
||||||
|
</column>
|
||||||
|
<column name="action_context" type="TEXT"/>
|
||||||
|
<column name="role_id" type="BIGINT"/>
|
||||||
|
<column name="is_deleted" type="BOOLEAN" defaultValueBoolean="false">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="is_viewed" type="BOOLEAN" defaultValueBoolean="true">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="description" type="TEXT"/>
|
||||||
|
<column name="created_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
<column name="updated_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||||
|
</createTable>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="13-01-2025_RK_164615" author="Rajesh Khore">
|
||||||
|
<sqlFile dbms="postgresql"
|
||||||
|
path="db/dump/insert_action_context_data_09_01_2025.sql"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
|
||||||
<changeSet id="31-12-2024" author="Piyush Kag">
|
<changeSet id="31-12-2024" author="Piyush Kag">
|
||||||
<sqlFile dbms="postgresql"
|
<sqlFile dbms="postgresql"
|
||||||
path="db/dump/update_json_template_for_notification_31_12_2024.sql"/>
|
path="db/dump/update_json_template_for_notification_31_12_2024.sql"/>
|
||||||
@@ -2188,5 +2214,19 @@
|
|||||||
<sqlFile dbms="postgresql"
|
<sqlFile dbms="postgresql"
|
||||||
path="db/dump/insert_expiration_scheduler_data_07_01_2025.sql"/>
|
path="db/dump/insert_expiration_scheduler_data_07_01_2025.sql"/>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
<changeSet id="13-01-2025_RK_191315" author="Rajesh Khore">
|
||||||
|
<addColumn tableName="company">
|
||||||
|
<column name="CODICE_ATECO" type="VARCHAR(286)">
|
||||||
|
</column>
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="08-01-2025_NK_075410" author="Nisha kashyap">
|
||||||
|
<addColumn tableName="application">
|
||||||
|
<column name="amount_requested" type="numeric"></column>
|
||||||
|
<column name="amount_accepted" type="numeric"></column>
|
||||||
|
<column name="date_accepted" type="TIMESTAMP WITHOUT TIME ZONE"></column>
|
||||||
|
<column name="date_rejected" type="TIMESTAMP WITHOUT TIME ZONE"></column>
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
INSERT INTO role_action_context (action_context, role_id, is_deleted, is_viewed, description ,created_date, updated_date) VALUES
|
||||||
|
('CREATE_CALL_STEP_1', 2, false, true,'Create Call Step 1', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_CALL_STEP_1', 2, false, true, 'Update Call Step 1','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_UPDATE_CALL_STEP_2', 2, false, true, 'Create Update Call Step 2','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('VALIDATE_CALL', 2, false, true,'Convalida Chiamata','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_CALL_STATUS', 2, false, true, 'Aggiorna Stato Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_CALL', 1, false, true, 'Ottieni Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_CALL', 2, false, true, 'Ottieni Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_CALL_DOCUMENT', 2 ,false, true, 'Scarica Documento Chiama','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_CALL_DOCUMENT', 1 ,false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_CALL_DOCUMENT', 3,false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_CALL_DOCUMENT', 5 , false, true,'Scarica Documento Chiama', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_USER', 1, false, true, 'Crea Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_USER', 2, false, true, 'Crea Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('USER_LOGIN', 1, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('USER_LOGIN', 2, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('USER_LOGIN', 3, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('USER_LOGIN', 5, false, true, 'Accesso Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('LOGOUT_USER', 1, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('LOGOUT_USER', 2, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('LOGOUT_USER', 3, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('LOGOUT_USER', 5, false, true,'Logout Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_USER', 2, false, true, 'Ottieni Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_USER_DETAILS', 2, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_USER_DETAILS', 1, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_USER_DETAILS', 3, false, true, 'Aggiorna Dettagli Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_USER_DETAILS', 5, false, true,'Aggiorna Dettagli Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_USER', 2, false, true, 'Elimina Utente','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('VALIDATE_NEW_USER_WITH_SPID_TOKEN', 1, false, true, 'Valida Nuovo Utente Con Token SPID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('VALIDATE_EXISTING_USER_WITH_SPID_TOKEN', 1, false, true, 'Valida Utente Esistente Con Token SPID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_VALID_USER_DETAILS', 1, false, true, 'Ottieni Dettagli Utente Valido', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_VALID_USER_DETAILS', 2, false, true, 'Ottieni Dettagli Utente Valido', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_USERS_BY_ROLE', 2, false, true, 'Ottieni Tutti Gli Utenti Per Ruolo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_USERS_BY_ROLE', 5, false, true, 'Ottieni Tutti Gli Utenti Per Ruolo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('GET_APPLICATION', 2, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION', 1, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION', 3, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION', 5, false, true, 'Ottieni Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_UPDATE_APPLICATION_FORM', 1, false, true, 'Crea/Aggiorna Form Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_UPDATE_APPLICATION_FORM', 2, false, true, 'Crea/Aggiorna Form Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_APPLICATION', 1, false, true, 'Crea Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_APPLICATION', 2, false, true, 'Crea Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_APPLICATION', 1, false, true, 'Elimina Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_APPLICATION', 2, false, true, 'Elimina Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_APPLICATION', 1, false, true, 'Ottieni Tutte Le Applicazioni', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_APPLICATION', 2, false, true, 'Ottieni Tutte Le Applicazioni', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('UPDATE_APPLICATION_STATUS', 2, false, true, 'Aggiorna Stato Dell Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('VALIDATE_APPLICATION', 2, false, true, 'Valida Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_SIGNED_DOCUMENT', 2, false, true, 'Carica Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_PDF', 2, false, true, 'Scarica PDF', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_SIGNED_DOCUMENT', 2, false, true, 'Ottieni Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_NEXT_PREVIOUS_FORM', 2, false, true, 'Ottieni Form Successivo/Precedente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_APPLICATION_DOC_ZIP', 2, false, true, 'Scarica Documenti Dell Applicazione In ZIP', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
|
||||||
|
('UPDATE_APPLICATION_STATUS', 1, false, true, 'Aggiorna Stato Dell Applicazione','2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('VALIDATE_APPLICATION', 1, false, true,'Valida Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_SIGNED_DOCUMENT', 1, false, true, 'Carica Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_PDF', 1, false, true, 'Scarica PDF', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_SIGNED_DOCUMENT', 1, false, true, 'Ottieni Documento Firmato', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_NEXT_PREVIOUS_FORM', 1, false, true, 'Ottieni Form Successivo/Precedente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_APPLICATION_DOC_ZIP', 1, false, true, 'Scarica Documenti Dell Applicazione In ZIP', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_FAQ', 2, false, true, 'Crea Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_FAQ', 2, false, true, 'Ottieni Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_FAQ_DETAILS', 2, false, true, 'Aggiorna Dettagli Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_FAQ', 2, false, true, 'Elimina Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_FAQ', 1, false, true, 'Crea Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_FAQ', 1, false, true, 'Ottieni Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_FAQ_DETAILS', 1, false, true, 'Aggiorna Dettagli Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_FAQ', 1, false, true, 'Elimina Faq', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_COMPANY', 1, false, true, 'Crea Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY', 1, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY', 2, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY', 5, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY', 3, false, true, 'Ottieni Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_COMPANY', 1, false, true, 'Aggiorna Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_COMPANY', 2, false, true, 'Elimina Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_COMPANY', 1, false, true, 'Elimina Azienda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_COMPANY_DELEGATION', 1, false, true, 'Carica Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DOWNLOAD_COMPANY_DELEGATION_TEMPLATE', 1, false, true, 'Scarica Modello Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_DELEGATION', 1, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_DELEGATION', 2, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_DELEGATION', 3, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_DELEGATION', 5, false, true, 'Ottieni Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_COMPANY_DELEGATION', 1, false, true, 'Elimina Delega Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CHECK_COMPANY_VAT_NUMBER', 1, false, true, 'Verifica Partita Iva Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CHECK_COMPANY_VAT_NUMBER', 2, false, true, 'Verifica Partita Iva Aziendale', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_BY_USER', 2, false, true, 'Ottieni Azienda Per Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_COMPANY_BY_USER', 1, false, true, 'Ottieni Azienda Per Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('REMOVE_COMPANY_FROM_USER', 2, false, true, 'Rimuovi Azienda Da Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
|
||||||
|
('CREATE_LOOKUP_DATA', 2, false, true, 'Crea Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_LOOKUP_DATA', 2, false, true, 'Elimina Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_LOOKUP_DATA', 2, false, true, 'Aggiorna Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA', 2, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA', 3, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA', 5, false, true, 'Ottieni Dati Di Riferimento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA_BY_TYPE', 2, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA_BY_TYPE', 3, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_LOOKUP_DATA_BY_TYPE', 5, false, true, 'Ottieni Dati Di Riferimento Per Tipo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_HUB', 2, false, true, 'Crea Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_HUB', 2, false, true, 'Ottieni Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_HUB', 2, false, true, 'Elimina Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_HUB', 2, false, true, 'Aggiorna Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_HUB', 2, false, true, 'Ottieni Tutti Gli Hub', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_HUB_BY_UUID', 2, false, true, 'Ottieni Hub Per UUID', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_AMENDMENT', 3, false, true, 'Crea Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_AMENDMENT', 5, false, true, 'Crea Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT', 3, false, true, 'Ottieni Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT', 5, false, true, 'Ottieni Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CLOSE_AMENDMENT', 3, false, true, 'Chiudi Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CLOSE_AMENDMENT', 5, false, true, 'Chiudi Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_AMENDMENT', 3, false, true, 'Aggiorna Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_AMENDMENT', 5, false, true, 'Aggiorna Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_AMENDMENT', 3, false, true, 'Elimina Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_AMENDMENT', 5, false, true, 'Elimina Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_AMENDMENT_STATUS', 3, false, true, 'Aggiorna Stato Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_AMENDMENT_STATUS', 5, false, true, 'Aggiorna Stato Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_AMENDMENT_BY_PREINSTRUCTOR_USER_ID', 3, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Preistruttore', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_AMENDMENT_BY_PREINSTRUCTOR_USER_ID', 5, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Preistruttore', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ALL_AMENDMENT_BY_BENEFICIARY_USER_ID', 1, false, true, 'Ottieni Tutte Le Modifiche Per ID Utente Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT_BY_APPLICATION_ID', 3, false, true, 'Ottieni Modifica Per ID Domanda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT_BY_APPLICATION_ID', 5, false, true, 'Ottieni Modifica Per ID Domanda', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('EXTEND_RESPONSE_DAYS_FOR_AMENDMENT', 3, false, true, 'Estendi Giorni Risposta Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('EXTEND_RESPONSE_DAYS_FOR_AMENDMENT', 5, false, true, 'Estendi Giorni Risposta Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION_DATA_FOR_AMENDMENT', 3, false, true, 'Ottieni Dati Domanda Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION_DATA_FOR_AMENDMENT', 5, false, true, 'Ottieni Dati Domanda Per Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
|
||||||
|
('CREATE_UPDATE_APPLICATION_EVALUATION', 3, false, true, 'Crea/Aggiorna Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_UPDATE_APPLICATION_EVALUATION', 5, false, true, 'Crea/Aggiorna Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION_EVALUATION', 3, false, true, 'Ottieni Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_APPLICATION_EVALUATION', 5, false, true, 'Ottieni Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_APPLICATION_EVALUATION', 3, false, true, 'Elimina Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_APPLICATION_EVALUATION', 5, false, true, 'Elimina Valutazione Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
|
||||||
|
('CREATE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Crea Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Crea Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Elimina Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Elimina Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Ottieni Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Ottieni Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_BENEFICIARY_PREFERRED_CALL', 2, false, true, 'Aggiorna Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_BENEFICIARY_PREFERRED_CALL', 1, false, true, 'Aggiorna Chiamata Preferita Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_ASSIGNED_APPLICATION', 2, false, true, 'Crea Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_ASSIGNED_APPLICATION', 5, false, true, 'Crea Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_ASSIGNED_APPLICATION', 2, false, true, 'Elimina Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_ASSIGNED_APPLICATION', 5, false, true, 'Elimina Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ASSIGNED_APPLICATION', 2, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ASSIGNED_APPLICATION', 3, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ASSIGNED_APPLICATION', 5, false, true, 'Ottieni Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_ASSIGNED_APPLICATION_DETAILS', 2, false, true, 'Aggiorna Dettagli Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_ASSIGNED_APPLICATION_DETAILS', 5, false, true, 'Aggiorna Dettagli Applicazione Assegnata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_FORM_FIELD', 2, false, true, 'Crea Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_FORM_FIELD', 2, false, true, 'Aggiorna Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_FORM_FIELD', 2, false, true, 'Ottieni Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_FORM_FIELD', 2, false, true, 'Elimina Campo Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('UPLOAD_CALL_DOCUMENT', 2, false, true, 'Carica Documento Chiamata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_CALL_IMAGES', 2, false, true, 'Carica Immagini Chiamata', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_APPLICATION_DOCUMENT', 1, false, true, 'Carica Documento Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_APPLICATION_IMAGES', 1, false, true, 'Carica Immagini Applicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_DOCUMENT', 2, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_DOCUMENT', 1, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_DOCUMENT', 3, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_DOCUMENT', 5, false, true, 'Elimina Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_DOCUMENT', 2, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_DOCUMENT', 1, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_DOCUMENT', 3, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_DOCUMENT', 5, false, true, 'Aggiorna Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_IMAGES', 2, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_IMAGES', 1, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_IMAGES', 3, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_IMAGES', 5, false, true, 'Aggiorna Immagini', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_DOCUMENT', 2, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_DOCUMENT', 1, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_DOCUMENT', 3, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_DOCUMENT', 5, false, true, 'Ottieni Documento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('UPLOAD_AMENDMENT_DOCUMENT', 3, false, true, 'Carica Documento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_AMENDMENT_DOCUMENT', 5, false, true, 'Carica Documento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_AMENDMENT_IMAGES', 3, false, true, 'Carica Immagini Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_AMENDMENT_IMAGES', 5, false, true, 'Carica Immagini Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_DOCUMENT', 3, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_DOCUMENT', 5, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_IMAGES', 3, false, true, 'Carica Immagini Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_IMAGES', 5, false, true, 'Carica Immagini Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_UPDATE_FLOW', 2, false, true, 'Crea/Aggiorna Flusso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_FLOW', 2, false, true, 'Ottieni Flusso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('GET_LOGIN_ATTEMPT_LIST', 2, false, true, 'Ottieni Lista Tentativi Accesso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('ADD_LOGIN_ATTEMPT', 2, false, true, 'Aggiungi Tentativo Accesso', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('GET_DASHBOARD_WIDGET_FOR_SUPER_ADMIN', 2, false, true, 'Ottenere Widget Cruscotto Per Super Admin', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_DASHBOARD_WIDGET_FOR_BENEFICIARY', 1, false, true, 'Ottenere Widget Cruscotto Per Beneficiario', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('GET_EVALUATION_CRITERIA', 2, false, true, 'Ottenere Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_EVALUATION_CRITERIA', 2, false, true, 'Aggiornare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_EVALUATION_CRITERIA', 2, false, true, 'Eliminare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_EVALUATION_CRITERIA', 2, false, true, 'Creare Criteri Di Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_DOC', 3, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_EVALUATION_DOC', 5, false, true, 'Carica Documento Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('ADD_COMMENT_TO_AMENDMENT_REQUEST', 3, false, true, 'Aggiungi Commento Alla Richiesta Di Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('ADD_COMMENT_TO_AMENDMENT_REQUEST', 5, false, true, 'Aggiungi Commento Alla Richiesta Di Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_COMMUNICATION_COMMENT', 3, false, true, 'Aggiornare Commento Comunicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_COMMUNICATION_COMMENT', 5, false, true, 'Aggiornare Commento Comunicazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT_COMMENT', 3, false, true, 'Ottenere Commento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_AMENDMENT_COMMENT', 5, false, true, 'Ottenere Commento Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_COMMENT_FROM_AMENDMENT', 3, false, true, 'Eliminare Commento Dalla Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_COMMENT_FROM_AMENDMENT', 5, false, true, 'Eliminare Commento Dalla Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CREATE_FORM', 2, false, true, 'Creare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPDATE_FORM', 2, false, true, 'Aggiornare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_FORM', 2, false, true, 'Ottenere Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('DELETE_FORM', 2, false, true, 'Eliminare Modulo', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('AMENDMENT_EXPIRATION_SCHEDULER', 2, false, true, 'Pianificatore Scadenza Modifica', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('EVALUATION_EXPIRATION_SCHEDULER', 2, false, true, 'Pianificatore Scadenza Valutazione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('CHECK_OR_CREATE_NDG_CODE', 2, false, true, 'Verificare O Creare Codice NDG', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('CREATE_APPOINTMENT', 2, false, true, 'Creare Appuntamento', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('UPLOAD_DOCUMENT_TO_EXTERNAL_SYSTEM', 2, false, true, 'Carica Documento Nel Sistema Esterno', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
|
||||||
|
('GET_USER_ACTION', 2, false, true, 'Ottenere Azione Utente', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z'),
|
||||||
|
('GET_ACTION_CONTEXT_LABELS', 2, false, true, 'Ottieni Etichette Contesto Azione', '2025-01-09T10:16:26.472Z', '2025-01-09T10:16:26.472Z');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -346,3 +346,7 @@ notification.sent.successfully=Notification sent successfully.
|
|||||||
notification.deleted.successfully=Notification deleted successfully.
|
notification.deleted.successfully=Notification deleted successfully.
|
||||||
notification.updated.successfully=Notification updated successfully.
|
notification.updated.successfully=Notification updated successfully.
|
||||||
user.with.company.not.found = User with company not found for user or company.
|
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.
|
||||||
|
|||||||
@@ -329,7 +329,6 @@ appointment.created.successfully = Appuntamento creato con successo.
|
|||||||
error.try.again = Errore di chiamata di servizio durante l'esecuzione dell'operazione. Riprovare.
|
error.try.again = Errore di chiamata di servizio durante l'esecuzione dell'operazione. Riprovare.
|
||||||
document.uploading.is.in.progress = Il documento ? in fase di caricamento.
|
document.uploading.is.in.progress = Il documento ? in fase di caricamento.
|
||||||
all.document.checked.and.one.checklist.checked=Tutti i documenti devono essere controllati e almeno una checklist deve essere controllata.
|
all.document.checked.and.one.checklist.checked=Tutti i documenti devono essere controllati e almeno una checklist deve essere controllata.
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
#notification messsages
|
#notification messsages
|
||||||
notification.already.in.state=La notifica <20> gi<67> nello stato fornito.
|
notification.already.in.state=La notifica <20> gi<67> nello stato fornito.
|
||||||
@@ -339,5 +338,7 @@ notification.sent.successfully=Notifica inviata con successo.
|
|||||||
notification.deleted.successfully=Notifica eliminata con successo.
|
notification.deleted.successfully=Notifica eliminata con successo.
|
||||||
notification.updated.successfully=Notifica aggiornata con successo.
|
notification.updated.successfully=Notifica aggiornata con successo.
|
||||||
user.with.company.not.found = Utente con azienda non trovato per utente o azienda.
|
user.with.company.not.found = Utente con azienda non trovato per utente o azienda.
|
||||||
=======
|
|
||||||
>>>>>>> 832666a4d412c2c81f5c1dfb5b1866aba2c40bdd
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user