Resolved Conflicts
This commit is contained in:
@@ -278,6 +278,7 @@ public class GepafinConstant {
|
|||||||
public static final String APPLICATION_AMENDMENT_UPDATE_SUCCESSFULLY_MSG = "application.amendment.update.successfully";
|
public static final String APPLICATION_AMENDMENT_UPDATE_SUCCESSFULLY_MSG = "application.amendment.update.successfully";
|
||||||
public static final String APPLICATION_AMENDMENT_CLOSED_SUCCESFULLY = "application.amendment.closed.successfully";
|
public static final String APPLICATION_AMENDMENT_CLOSED_SUCCESFULLY = "application.amendment.closed.successfully";
|
||||||
|
|
||||||
|
public static final String RESPONSE_DAYS_EXTENDED_SUCCESS_MSG = "response.days.extended.success";
|
||||||
public static final String COMMUNICATION_ADDED_TO_AMENDMENT_REQUEST_SUCCESS = "added.comment.to.amendment.request.success";
|
public static final String COMMUNICATION_ADDED_TO_AMENDMENT_REQUEST_SUCCESS = "added.comment.to.amendment.request.success";
|
||||||
public static final String COMMENT_NOT_FOUND = "comment.not.found";
|
public static final String COMMENT_NOT_FOUND = "comment.not.found";
|
||||||
public static final String COMMENT_UPDATED_SUCCESS_MSG = "comment.updated.successfully";
|
public static final String COMMENT_UPDATED_SUCCESS_MSG = "comment.updated.successfully";
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class ApplicationAmendmentRequestDao {
|
|||||||
.collect(Collectors.joining(","));
|
.collect(Collectors.joining(","));
|
||||||
applicationAmendmentRequestEntity.setFormFields(fieldIdsString);
|
applicationAmendmentRequestEntity.setFormFields(fieldIdsString);
|
||||||
}
|
}
|
||||||
UserEntity userEntity = userService.validateUser(applicationEvaluationId);
|
UserEntity userEntity = userService.validateUser(applicationEvaluationEntity.getUserId());
|
||||||
Long protocolNumber = protocolDao.getProtocolNumber(userEntity.getHub());
|
Long protocolNumber = protocolDao.getProtocolNumber(userEntity.getHub());
|
||||||
ProtocolEntity protocolEntity = protocolDao.createProtocolEntity(
|
ProtocolEntity protocolEntity = protocolDao.createProtocolEntity(
|
||||||
applicationEvaluationEntity.getAssignedApplicationsEntity().getApplication(), protocolNumber,
|
applicationEvaluationEntity.getAssignedApplicationsEntity().getApplication(), protocolNumber,
|
||||||
@@ -444,4 +444,16 @@ public class ApplicationAmendmentRequestDao {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApplicationAmendmentRequestResponse extendResponseDays(Long id, Long newResponseDays) {
|
||||||
|
ApplicationAmendmentRequestEntity request = applicationAmendmentRequestRepository.findByIdAndIsDeletedFalse(id)
|
||||||
|
.orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND,
|
||||||
|
Translator.toLocale(GepafinConstant.APPLICATION_AMENDMENT_NOT_FOUND_MSG)));
|
||||||
|
|
||||||
|
if (newResponseDays != null && newResponseDays > 0) {
|
||||||
|
Long currentResponseDays = request.getResponseDays() != null ? request.getResponseDays() : 0L;
|
||||||
|
request.setResponseDays(currentResponseDays + newResponseDays);
|
||||||
|
applicationAmendmentRequestRepository.save(request);
|
||||||
|
}
|
||||||
|
return convertEntityToResponse(request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ public class ApplicationDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationSignedDocumentRepository applicationSignedDocumentRepository;
|
private ApplicationSignedDocumentRepository applicationSignedDocumentRepository;
|
||||||
|
|
||||||
@Value("${aws.s3.url.folder.signed.document}")
|
// @Value("${aws.s3.url.folder.signed.document}")
|
||||||
private String signedDocumentS3Folder;
|
// private String signedDocumentS3Folder;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
@@ -611,8 +611,11 @@ public class ApplicationDao {
|
|||||||
sendMailToUserAndCompany(userEntity, applicationEntity);
|
sendMailToUserAndCompany(userEntity, applicationEntity);
|
||||||
sendMailTodefaultSystemAndGepafin(userEntity, applicationEntity);
|
sendMailTodefaultSystemAndGepafin(userEntity, applicationEntity);
|
||||||
applicationEntity.setStatus(status.getValue());
|
applicationEntity.setStatus(status.getValue());
|
||||||
applicationEntity = saveApplicationEntity(applicationEntity);
|
|
||||||
}
|
}
|
||||||
|
if (status.equals(ApplicationStatusTypeEnum.DRAFT) && Boolean.TRUE.equals(applicationEntity.getStatus().equals(ApplicationStatusTypeEnum.AWAITING.getValue()))) {
|
||||||
|
applicationEntity.setStatus(status.getValue());
|
||||||
|
}
|
||||||
|
applicationEntity = saveApplicationEntity(applicationEntity);
|
||||||
|
|
||||||
|
|
||||||
return getApplicationResponse(applicationEntity);
|
return getApplicationResponse(applicationEntity);
|
||||||
|
|||||||
@@ -342,11 +342,18 @@ public class ApplicationEvaluationDao {
|
|||||||
response.setCallEndDate(callEndDate);
|
response.setCallEndDate(callEndDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(UserEntity user, ApplicationEvaluationRequest req, Long assignedApplciationId) {
|
|
||||||
|
|
||||||
Optional<ApplicationEvaluationEntity> existingEntityOptional = applicationEvaluationRepository.findByAssignedApplicationsEntity_IdAndIsDeletedFalse(assignedApplciationId);
|
public ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(
|
||||||
|
UserEntity user,
|
||||||
|
ApplicationEvaluationRequest req,
|
||||||
|
Long assignedApplicationId) {
|
||||||
|
|
||||||
|
Optional<ApplicationEvaluationEntity> existingEntityOptional =
|
||||||
|
applicationEvaluationRepository.findByAssignedApplicationsEntity_IdAndIsDeletedFalse(assignedApplicationId);
|
||||||
ApplicationEvaluationEntity entity;
|
ApplicationEvaluationEntity entity;
|
||||||
Optional<AssignedApplicationsEntity> assignedApplications=assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplciationId);
|
Optional<AssignedApplicationsEntity> assignedApplications =
|
||||||
|
assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplicationId);
|
||||||
|
|
||||||
if (existingEntityOptional.isPresent()) {
|
if (existingEntityOptional.isPresent()) {
|
||||||
entity = existingEntityOptional.get();
|
entity = existingEntityOptional.get();
|
||||||
entity.setCriteria(Utils.convertObjectToJson(filterNonNullCriteria(processCriteria(entity, req))));
|
entity.setCriteria(Utils.convertObjectToJson(filterNonNullCriteria(processCriteria(entity, req))));
|
||||||
@@ -355,12 +362,20 @@ public class ApplicationEvaluationDao {
|
|||||||
entity.setIsDeleted(false);
|
entity.setIsDeleted(false);
|
||||||
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
|
setIfUpdated(entity::getNote, entity::setNote, req.getNote());
|
||||||
} else {
|
} else {
|
||||||
entity = convertToEntity(user, req, assignedApplciationId);
|
entity = convertToEntity(user, req, assignedApplicationId);
|
||||||
}
|
}
|
||||||
|
ApplicationStatusForEvaluation status = req.getApplicationStatus();
|
||||||
|
|
||||||
ApplicationEvaluationEntity savedEntity = applicationEvaluationRepository.save(entity);
|
ApplicationEvaluationEntity savedEntity = applicationEvaluationRepository.save(entity);
|
||||||
|
if (status != null) {
|
||||||
|
ApplicationEntity application = applicationService.validateApplication(assignedApplications.get().getApplication().getId());
|
||||||
|
AssignedApplicationsEntity assignedApplicationsEntity = assignedApplications.get();
|
||||||
|
return updateApplicationEvaluationStatus(application, assignedApplicationsEntity, status);
|
||||||
|
} else {
|
||||||
return convertToResponse(savedEntity);
|
return convertToResponse(savedEntity);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<ChecklistRequest> filterNonNullChecklist(List<ChecklistRequest> checklistRequests) {
|
private List<ChecklistRequest> filterNonNullChecklist(List<ChecklistRequest> checklistRequests) {
|
||||||
|
|
||||||
@@ -862,17 +877,18 @@ public class ApplicationEvaluationDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationEvaluationResponse updateApplicationEvaluationStatus(ApplicationEntity application, AssignedApplicationsEntity assignedApplicationsEntity,
|
public ApplicationEvaluationResponse updateApplicationEvaluationStatus(ApplicationEntity application, AssignedApplicationsEntity assignedApplicationsEntity,
|
||||||
AssignedEvaluationStatus newStatus) {
|
ApplicationStatusForEvaluation newStatus) {
|
||||||
|
|
||||||
Optional<ApplicationEvaluationEntity> existingEntityOptional = applicationEvaluationRepository.findByAssignedApplicationsEntity_IdAndIsDeletedFalse(
|
Optional<ApplicationEvaluationEntity> existingEntityOptional = applicationEvaluationRepository.findByAssignedApplicationsEntity_IdAndIsDeletedFalse(
|
||||||
assignedApplicationsEntity.getId());
|
assignedApplicationsEntity.getId());
|
||||||
ApplicationEvaluationEntity entity;
|
ApplicationEvaluationEntity entity;
|
||||||
|
|
||||||
String statusType = application.getStatus();
|
|
||||||
if (existingEntityOptional.isPresent()) {
|
if (existingEntityOptional.isPresent()) {
|
||||||
ApplicationEvaluationEntity existingEntity = existingEntityOptional.get();
|
ApplicationEvaluationEntity existingEntity = existingEntityOptional.get();
|
||||||
application.setStatus(newStatus.getValue());
|
application.setStatus(newStatus.getValue());
|
||||||
application = applicationRepository.save(application);
|
application = applicationRepository.save(application);
|
||||||
|
String statusType = application.getStatus();
|
||||||
if (application.getStatus().equals(ApplicationStatusTypeEnum.APPROVED.getValue()) || application.getStatus().equals(ApplicationStatusTypeEnum.REJECTED.getValue())) {
|
if (application.getStatus().equals(ApplicationStatusTypeEnum.APPROVED.getValue()) || application.getStatus().equals(ApplicationStatusTypeEnum.REJECTED.getValue())) {
|
||||||
existingEntity.setStatus(ApplicationEvaluationStatusTypeEnum.CLOSE.getValue());
|
existingEntity.setStatus(ApplicationEvaluationStatusTypeEnum.CLOSE.getValue());
|
||||||
assignedApplicationsEntity.setStatus(AssignedApplicationEnum.CLOSE.getValue());
|
assignedApplicationsEntity.setStatus(AssignedApplicationEnum.CLOSE.getValue());
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import net.gepafin.tendermanagement.util.DateTimeUtil;
|
|||||||
import net.gepafin.tendermanagement.util.Utils;
|
import net.gepafin.tendermanagement.util.Utils;
|
||||||
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.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
@@ -94,8 +93,8 @@ public class CallDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private FormDao formDao;
|
private FormDao formDao;
|
||||||
|
|
||||||
@Value("${aws.s3.url.folder}")
|
// @Value("${aws.s3.url.folder}")
|
||||||
private String s3Folder;
|
// private String s3Folder;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AmazonS3Service amazonS3Service;
|
private AmazonS3Service amazonS3Service;
|
||||||
@@ -103,6 +102,9 @@ public class CallDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CriteriaFormFieldRepository criteriaFormFieldRepository;
|
private CriteriaFormFieldRepository criteriaFormFieldRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private S3PathConfig s3PathConfig;
|
||||||
|
|
||||||
public CallResponse createCallStep1(CreateCallRequestStep1 createCallRequest, UserEntity userEntity) {
|
public CallResponse createCallStep1(CreateCallRequestStep1 createCallRequest, UserEntity userEntity) {
|
||||||
createCallRequest.setRegionId(userEntity.getRoleEntity().getRegion().getId());
|
createCallRequest.setRegionId(userEntity.getRoleEntity().getRegion().getId());
|
||||||
CallEntity callEntity = convertToCallEntity(createCallRequest, userEntity);
|
CallEntity callEntity = convertToCallEntity(createCallRequest, userEntity);
|
||||||
@@ -127,6 +129,7 @@ public class CallDao {
|
|||||||
ZipOutputStream zos = new ZipOutputStream(zipOutputStream)) {
|
ZipOutputStream zos = new ZipOutputStream(zipOutputStream)) {
|
||||||
|
|
||||||
for (DocumentEntity document : documents) {
|
for (DocumentEntity document : documents) {
|
||||||
|
String s3Folder = s3PathConfig.generateDocumentPath(DocumentSourceTypeEnum.CALL, callId, 0L);
|
||||||
try (InputStream fileInputStream = amazonS3Service.getFile(s3Folder, document.getFilePath())) {
|
try (InputStream fileInputStream = amazonS3Service.getFile(s3Folder, document.getFilePath())) {
|
||||||
String fileName = Utils.extractFileName(document.getFilePath());
|
String fileName = Utils.extractFileName(document.getFilePath());
|
||||||
ZipEntry zipEntry = new ZipEntry(fileName);
|
ZipEntry zipEntry = new ZipEntry(fileName);
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import java.util.Map;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import net.gepafin.tendermanagement.enums.DocOtherSourceTypeEnum;
|
import net.gepafin.tendermanagement.enums.DocOtherSourceTypeEnum;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -58,8 +58,8 @@ public class DelegationDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private S3PathConfig s3ConfigBean;
|
private S3PathConfig s3ConfigBean;
|
||||||
|
|
||||||
@Value("${aws.s3.url.folder.delegation}")
|
// @Value("${aws.s3.url.folder.delegation}")
|
||||||
private String s3Folder;
|
// private String s3Folder;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserCompanyDelegationRepository userCompanyDelegationRepository;
|
private UserCompanyDelegationRepository userCompanyDelegationRepository;
|
||||||
@@ -67,9 +67,9 @@ public class DelegationDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private Validator validator;
|
private Validator validator;
|
||||||
|
|
||||||
|
|
||||||
public ByteArrayOutputStream generateDocument(Map<String, String> placeholders, String templateName) {
|
public ByteArrayOutputStream generateDocument(Map<String, String> placeholders, String templateName) {
|
||||||
try {
|
try {
|
||||||
|
String s3Folder = s3ConfigBean.generateDocumentPathForOther(DocOtherSourceTypeEnum.TEMPLATE, 0L, 0L);
|
||||||
InputStream templateStream = amazonS3Service.getFile(s3Folder ,templateName);
|
InputStream templateStream = amazonS3Service.getFile(s3Folder ,templateName);
|
||||||
XWPFDocument doc = loadTemplate(templateStream);
|
XWPFDocument doc = loadTemplate(templateStream);
|
||||||
replacePlaceholders(doc, placeholders);
|
replacePlaceholders(doc, placeholders);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
|
|||||||
import net.gepafin.tendermanagement.repositories.ApplicationRepository;
|
import net.gepafin.tendermanagement.repositories.ApplicationRepository;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -49,8 +48,8 @@ public class DocumentDao {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationRepository applicationFormRepository;
|
private ApplicationRepository applicationFormRepository;
|
||||||
|
|
||||||
@Value("${aws.s3.url.folder}")
|
// @Value("${aws.s3.url.folder}")
|
||||||
private String s3Folder;
|
// private String s3Folder;
|
||||||
|
|
||||||
public List<DocumentResponseBean> uploadFiles(List<MultipartFile> files, Long sourceId, DocumentSourceTypeEnum sourceType, DocumentTypeEnum fileType) {
|
public List<DocumentResponseBean> uploadFiles(List<MultipartFile> files, Long sourceId, DocumentSourceTypeEnum sourceType, DocumentTypeEnum fileType) {
|
||||||
List<DocumentEntity> documentEntities = new ArrayList<>();
|
List<DocumentEntity> documentEntities = new ArrayList<>();
|
||||||
@@ -141,7 +140,7 @@ public class DocumentDao {
|
|||||||
try {
|
try {
|
||||||
Long callId;
|
Long callId;
|
||||||
Long applicationId;
|
Long applicationId;
|
||||||
if(type.equals("APPLICATION")){
|
if(type.equals(DocumentSourceTypeEnum.APPLICATION)){
|
||||||
callId = applicationFormRepository.findCallIdById(id);
|
callId = applicationFormRepository.findCallIdById(id);
|
||||||
applicationId = id;
|
applicationId = id;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package net.gepafin.tendermanagement.enums;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
public enum AssignedEvaluationStatus {
|
public enum ApplicationStatusForEvaluation {
|
||||||
APPROVED("APPROVED"),
|
APPROVED("APPROVED"),
|
||||||
REJECTED("REJECTED");
|
REJECTED("REJECTED");
|
||||||
|
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
AssignedEvaluationStatus(String value) {
|
ApplicationStatusForEvaluation(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package net.gepafin.tendermanagement.model.request;
|
package net.gepafin.tendermanagement.model.request;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
@@ -10,4 +11,5 @@ public class ApplicationEvaluationRequest {
|
|||||||
private List<ChecklistRequest> checklist;
|
private List<ChecklistRequest> checklist;
|
||||||
private List<FieldRequest> files;
|
private List<FieldRequest> files;
|
||||||
private String note;
|
private String note;
|
||||||
|
private ApplicationStatusForEvaluation applicationStatus;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,5 @@ public interface ApplicationAmendmentRequestService {
|
|||||||
ApplicationAmendmentRequestEntity validateApplicationAmendmentRequest(Long applicationAmendmentId);
|
ApplicationAmendmentRequestEntity validateApplicationAmendmentRequest(Long applicationAmendmentId);
|
||||||
List<ApplicationAmendmentRequestResponse> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request,Long beneficiaryId);
|
List<ApplicationAmendmentRequestResponse> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request,Long beneficiaryId);
|
||||||
ApplicationAmendmentRequestResponse closeAmendmentRequest(HttpServletRequest request, Long id, CloseAmendmentRequest closeAmendmentRequest);
|
ApplicationAmendmentRequestResponse closeAmendmentRequest(HttpServletRequest request, Long id, CloseAmendmentRequest closeAmendmentRequest);
|
||||||
|
ApplicationAmendmentRequestResponse extendResponseDays(HttpServletRequest request, Long id, Long addedDays);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,21 +2,18 @@ package net.gepafin.tendermanagement.service;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity;
|
import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
import net.gepafin.tendermanagement.enums.AssignedEvaluationStatus;
|
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ApplicationEvaluationService {
|
public interface ApplicationEvaluationService {
|
||||||
ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(HttpServletRequest request, ApplicationEvaluationRequest applicationEvaluationRequest,Long assignedApplicationsId);
|
ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(
|
||||||
|
HttpServletRequest request,
|
||||||
|
ApplicationEvaluationRequest applicationEvaluationRequest,
|
||||||
|
Long assignedApplicationsId);
|
||||||
|
|
||||||
void deleteApplicationEvaluation(HttpServletRequest request,Long id);
|
void deleteApplicationEvaluation(HttpServletRequest request,Long id);
|
||||||
|
|
||||||
ApplicationEvaluationResponse getApplicationEvaluationByApplicationId(HttpServletRequest request,Long applicationId,Long assignedApplicationId);
|
ApplicationEvaluationResponse getApplicationEvaluationByApplicationId(HttpServletRequest request,Long applicationId,Long assignedApplicationId);
|
||||||
ApplicationEvaluationResponse updateApplicationEvaluationStatus(HttpServletRequest request, Long assignedApplicationId, AssignedEvaluationStatus status);
|
|
||||||
|
|
||||||
|
|
||||||
ApplicationEvaluationEntity validateApplicationEvaluation(Long applicationEvaluationId);
|
ApplicationEvaluationEntity validateApplicationEvaluation(Long applicationEvaluationId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,5 +72,11 @@ public class ApplicationAmendmentRequestServiceImpl implements ApplicationAmendm
|
|||||||
return applicationAmendmentRequestDao.closeAmendmentRequest(id,closeAmendmentRequest);
|
return applicationAmendmentRequestDao.closeAmendmentRequest(id,closeAmendmentRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicationAmendmentRequestResponse extendResponseDays(HttpServletRequest request, Long id, Long addedDays) {
|
||||||
|
return applicationAmendmentRequestDao.extendResponseDays(id, addedDays);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ import net.gepafin.tendermanagement.dao.ApplicationEvaluationDao;
|
|||||||
import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity;
|
import net.gepafin.tendermanagement.entities.ApplicationEvaluationEntity;
|
||||||
import net.gepafin.tendermanagement.entities.AssignedApplicationsEntity;
|
import net.gepafin.tendermanagement.entities.AssignedApplicationsEntity;
|
||||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
import net.gepafin.tendermanagement.enums.AssignedEvaluationStatus;
|
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
||||||
|
|
||||||
@@ -23,8 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -39,10 +36,19 @@ public class ApplicationEvaluationServiceImpl implements ApplicationEvaluationSe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(HttpServletRequest request, ApplicationEvaluationRequest req,Long assignedApplicationsId) {
|
public ApplicationEvaluationResponse createOrUpdateApplicationEvaluation(
|
||||||
AssignedApplicationsEntity assignedApplication = assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplicationsId).orElseThrow(()->
|
HttpServletRequest request,
|
||||||
new ResourceNotFoundException(Status.NOT_FOUND,Translator.toLocale(GepafinConstant.ASSIGNED_APPLICATION_NOT_FOUND_MSG)));
|
ApplicationEvaluationRequest req,
|
||||||
|
Long assignedApplicationsId) {
|
||||||
|
|
||||||
|
AssignedApplicationsEntity assignedApplication = assignedApplicationsRepository
|
||||||
|
.findByIdAndIsDeletedFalse(assignedApplicationsId)
|
||||||
|
.orElseThrow(() -> new ResourceNotFoundException(
|
||||||
|
Status.NOT_FOUND,
|
||||||
|
Translator.toLocale(GepafinConstant.ASSIGNED_APPLICATION_NOT_FOUND_MSG)));
|
||||||
|
|
||||||
UserEntity user = validator.validatePreInstructor(request, assignedApplication.getUserId());
|
UserEntity user = validator.validatePreInstructor(request, assignedApplication.getUserId());
|
||||||
|
|
||||||
return applicationEvaluationDao.createOrUpdateApplicationEvaluation(user, req, assignedApplication.getId());
|
return applicationEvaluationDao.createOrUpdateApplicationEvaluation(user, req, assignedApplication.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +84,6 @@ public class ApplicationEvaluationServiceImpl implements ApplicationEvaluationSe
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteApplicationEvaluation(HttpServletRequest request,Long id) {
|
public void deleteApplicationEvaluation(HttpServletRequest request,Long id) {
|
||||||
@@ -87,16 +91,6 @@ public class ApplicationEvaluationServiceImpl implements ApplicationEvaluationSe
|
|||||||
applicationEvaluationDao.deleteById(id);
|
applicationEvaluationDao.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public ApplicationEvaluationResponse updateApplicationEvaluationStatus(HttpServletRequest request, Long assignedApplicationId, AssignedEvaluationStatus status) {
|
|
||||||
AssignedApplicationsEntity assignedApplication = assignedApplicationsRepository.findByIdAndIsDeletedFalse(assignedApplicationId).orElseThrow(()->
|
|
||||||
new ResourceNotFoundException(Status.NOT_FOUND,Translator.toLocale(GepafinConstant.ASSIGNED_APPLICATION_NOT_FOUND_MSG)));
|
|
||||||
validator.validatePreInstructor(request,assignedApplication.getUserId());
|
|
||||||
return applicationEvaluationDao.updateApplicationEvaluationStatus(assignedApplication.getApplication(),assignedApplication,status);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplicationEvaluationEntity validateApplicationEvaluation(Long applicationEvaluationId) {
|
public ApplicationEvaluationEntity validateApplicationEvaluation(Long applicationEvaluationId) {
|
||||||
return applicationEvaluationDao.validateApplicationEvaluation(applicationEvaluationId);
|
return applicationEvaluationDao.validateApplicationEvaluation(applicationEvaluationId);
|
||||||
|
|||||||
@@ -113,6 +113,21 @@ public interface ApplicationAmendmentRequestApi {
|
|||||||
@GetMapping(value = "/beneficiary/user/{id}", produces = "application/json")
|
@GetMapping(value = "/beneficiary/user/{id}", produces = "application/json")
|
||||||
ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request,
|
ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAllAmendmentRequestByBeneficiaryId(HttpServletRequest request,
|
||||||
@Parameter(description = "Id", required = false) @PathVariable(value = "id",required = false) Long beneficiaryId);
|
@Parameter(description = "Id", required = false) @PathVariable(value = "id",required = false) Long beneficiaryId);
|
||||||
|
@Operation(summary = "Api to extend response days for an amendment request",
|
||||||
|
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) }))
|
||||||
|
})
|
||||||
|
@PutMapping(value = "/{id}/extendExpiration", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
ResponseEntity<Response<ApplicationAmendmentRequestResponse>> extendResponseDays(
|
||||||
|
HttpServletRequest request,
|
||||||
|
@Parameter( required = true) @PathVariable("id") Long id,
|
||||||
|
@Parameter( required = true) @RequestParam("extendedDays") Long extendedDays);
|
||||||
|
|
||||||
@Operation(summary = "Api to close the application amendment request",
|
@Operation(summary = "Api to close the application amendment request",
|
||||||
responses = {
|
responses = {
|
||||||
|
|||||||
@@ -7,22 +7,15 @@ 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 jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationEvaluationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
|
||||||
import net.gepafin.tendermanagement.enums.AssignedEvaluationStatus;
|
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateApplicationEvaluationRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
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.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.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ApplicationEvaluationApi {
|
public interface ApplicationEvaluationApi {
|
||||||
|
|
||||||
@Operation(summary = "API to create or update ApplicationEvaluation",
|
@Operation(summary = "API to create or update ApplicationEvaluation",
|
||||||
@@ -36,8 +29,8 @@ public interface ApplicationEvaluationApi {
|
|||||||
@PutMapping(value = "/{assignedApplicationsId}", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
@PutMapping(value = "/{assignedApplicationsId}", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
ResponseEntity<Response<ApplicationEvaluationResponse>> createOrUpdateApplicationEvaluation(
|
ResponseEntity<Response<ApplicationEvaluationResponse>> createOrUpdateApplicationEvaluation(
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
@Parameter(required = true) @PathVariable("assignedApplicationsId") Long assignedApplicationsId,
|
@Parameter(description = "Assigned Application ID", required = true) @PathVariable("assignedApplicationsId") Long assignedApplicationsId,
|
||||||
@Parameter( required = true) @Valid @RequestBody ApplicationEvaluationRequest evaluationRequest);
|
@Parameter(description = "Application Evaluation Request Body", required = true) @Valid @RequestBody ApplicationEvaluationRequest evaluationRequest);
|
||||||
|
|
||||||
@Operation(summary = "API to get ApplicationEvaluation data for evaluation process",
|
@Operation(summary = "API to get ApplicationEvaluation data for evaluation process",
|
||||||
responses = {
|
responses = {
|
||||||
@@ -60,18 +53,5 @@ public interface ApplicationEvaluationApi {
|
|||||||
ResponseEntity<Response<Void>> deleteApplicationEvaluation(HttpServletRequest request,
|
ResponseEntity<Response<Void>> deleteApplicationEvaluation(HttpServletRequest request,
|
||||||
@Parameter( required = true) @PathVariable("id") Long id);
|
@Parameter( required = true) @PathVariable("id") Long id);
|
||||||
|
|
||||||
@Operation(summary = "Api to update application evaluation status",
|
|
||||||
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) })) })
|
|
||||||
@PutMapping(value = "/{assignedApplicationId}/status", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
||||||
ResponseEntity<Response<ApplicationEvaluationResponse>> updateApplicationEvaluationStatus(HttpServletRequest request,
|
|
||||||
@Parameter( required = true) @PathVariable("assignedApplicationId") Long assignedApplicationId,
|
|
||||||
@Parameter(description = "status", required = true)@RequestParam(value = "status", required = true) AssignedEvaluationStatus status);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public interface CommunicationApi {
|
|||||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
@PostMapping(value = "/{amendmentId}", produces = { "application/json" })
|
@PostMapping(value = "/{amendmentId}", produces = { "application/json" })
|
||||||
ResponseEntity<Response<CommunicationResponseBean>> addCommentToAmendmentRequest(HttpServletRequest request,
|
ResponseEntity<Response<CommunicationResponseBean>> addCommentToAmendmentRequest(HttpServletRequest request,
|
||||||
@RequestBody @Parameter CommunicationRequestBean communicationResponseBean, @Param(value = "amendmentId") Long amendmentId);
|
@RequestBody @Parameter CommunicationRequestBean communicationResponseBean, @PathVariable(value = "amendmentId") Long amendmentId);
|
||||||
|
|
||||||
@Operation(summary = "API to Get Amendment Request Comment", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
@Operation(summary = "API to Get Amendment Request Comment", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
||||||
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
@@ -43,7 +43,7 @@ public interface CommunicationApi {
|
|||||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
|
||||||
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
|
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
|
||||||
@GetMapping(value = "/{amendmentId}", produces = "application/json")
|
@GetMapping(value = "/{amendmentId}", produces = "application/json")
|
||||||
public ResponseEntity<Response<ApplicationAmendmentResponse>> getAmendmentComments(@PathVariable Long amendmentId);
|
public ResponseEntity<Response<ApplicationAmendmentResponse>> getAmendmentComments(@PathVariable(value = "amendmentId") Long amendmentId);
|
||||||
|
|
||||||
@Operation(summary = "Api to update communication comments", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
@Operation(summary = "Api to update communication comments", responses = { @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 = {
|
||||||
@@ -54,7 +54,7 @@ public interface CommunicationApi {
|
|||||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
@PutMapping(value = "/{amendmentId}/{commentId}", produces = { "application/json" })
|
@PutMapping(value = "/{amendmentId}/{commentId}", produces = { "application/json" })
|
||||||
ResponseEntity<Response<CommunicationResponseBean>> updateCommunicationAmendment(HttpServletRequest request,
|
ResponseEntity<Response<CommunicationResponseBean>> updateCommunicationAmendment(HttpServletRequest request,
|
||||||
@RequestBody @Parameter CommunicationRequestBean communicationResponseBean, @PathVariable Long amendmentId, @PathVariable Long commentId);
|
@RequestBody @Parameter CommunicationRequestBean communicationResponseBean, @PathVariable(value = "amendmentId") Long amendmentId, @PathVariable(value = "commentId") Long commentId);
|
||||||
|
|
||||||
@Operation(summary = "Api to delete communication comments", responses = { @ApiResponse(responseCode = "200", description = "OK"),
|
@Operation(summary = "Api to delete communication comments", responses = { @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 = {
|
||||||
@@ -64,6 +64,6 @@ public interface CommunicationApi {
|
|||||||
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
|
||||||
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
|
||||||
@DeleteMapping(value = "/{amendmentId}/{commentId}", produces = { "application/json" })
|
@DeleteMapping(value = "/{amendmentId}/{commentId}", produces = { "application/json" })
|
||||||
ResponseEntity<Response<String>> deleteApplicationAmendmentComment(HttpServletRequest request, @Param(value = "amendmentId") Long amendmentId,
|
ResponseEntity<Response<String>> deleteApplicationAmendmentComment(HttpServletRequest request, @PathVariable(value = "amendmentId") Long amendmentId,
|
||||||
@Param(value = "commentId") Long commentId);
|
@Param(value = "commentId") Long commentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,4 +88,18 @@ public class ApplicationAmendmentRequestController implements ApplicationAmendme
|
|||||||
return ResponseEntity.status(HttpStatus.CREATED)
|
return ResponseEntity.status(HttpStatus.CREATED)
|
||||||
.body(new Response<>(amendmentRequestResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_AMENDMENT_CLOSED_SUCCESFULLY)));
|
.body(new Response<>(amendmentRequestResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_AMENDMENT_CLOSED_SUCCESFULLY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseEntity<Response<ApplicationAmendmentRequestResponse>> extendResponseDays(
|
||||||
|
HttpServletRequest request,
|
||||||
|
Long id,
|
||||||
|
Long addedDays) {
|
||||||
|
|
||||||
|
log.info("Extending response days for Amendment Request ID: {}", id);
|
||||||
|
|
||||||
|
ApplicationAmendmentRequestResponse response = applicationAmendmentRequestService.extendResponseDays(request, id, addedDays);
|
||||||
|
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.RESPONSE_DAYS_EXTENDED_SUCCESS_MSG)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,9 @@ package net.gepafin.tendermanagement.web.rest.api.impl;
|
|||||||
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.enums.ApplicationEvaluationStatusTypeEnum;
|
import net.gepafin.tendermanagement.enums.ApplicationStatusForEvaluation;
|
||||||
import net.gepafin.tendermanagement.enums.ApplicationStatusTypeEnum;
|
|
||||||
import net.gepafin.tendermanagement.enums.AssignedEvaluationStatus;
|
|
||||||
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
import net.gepafin.tendermanagement.model.request.ApplicationEvaluationRequest;
|
||||||
import net.gepafin.tendermanagement.model.request.UpdateApplicationEvaluationRequest;
|
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
import net.gepafin.tendermanagement.model.response.ApplicationEvaluationResponse;
|
||||||
import net.gepafin.tendermanagement.model.response.ApplicationResponse;
|
|
||||||
import net.gepafin.tendermanagement.model.util.Response;
|
import net.gepafin.tendermanagement.model.util.Response;
|
||||||
import net.gepafin.tendermanagement.service.ApplicationEvaluationService;
|
import net.gepafin.tendermanagement.service.ApplicationEvaluationService;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.ApplicationEvaluationApi;
|
import net.gepafin.tendermanagement.web.rest.api.ApplicationEvaluationApi;
|
||||||
@@ -20,8 +16,6 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("${openapi.gepafin.base-path:/v1/applicationEvaluation}")
|
@RequestMapping("${openapi.gepafin.base-path:/v1/applicationEvaluation}")
|
||||||
public class ApplicationEvaluationApiController implements ApplicationEvaluationApi {
|
public class ApplicationEvaluationApiController implements ApplicationEvaluationApi {
|
||||||
@@ -30,13 +24,19 @@ public class ApplicationEvaluationApiController implements ApplicationEvaluation
|
|||||||
private ApplicationEvaluationService applicationEvaluationService;
|
private ApplicationEvaluationService applicationEvaluationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Response<ApplicationEvaluationResponse>> createOrUpdateApplicationEvaluation(HttpServletRequest request,
|
public ResponseEntity<Response<ApplicationEvaluationResponse>> createOrUpdateApplicationEvaluation(
|
||||||
Long assignedApplicationsId,ApplicationEvaluationRequest evaluationRequest) {
|
HttpServletRequest request,
|
||||||
ApplicationEvaluationResponse response = applicationEvaluationService.createOrUpdateApplicationEvaluation(request,evaluationRequest,assignedApplicationsId);
|
Long assignedApplicationsId,
|
||||||
|
ApplicationEvaluationRequest evaluationRequest) {
|
||||||
|
|
||||||
|
ApplicationEvaluationResponse response = applicationEvaluationService.createOrUpdateApplicationEvaluation(
|
||||||
|
request, evaluationRequest, assignedApplicationsId);
|
||||||
|
|
||||||
return ResponseEntity.status(HttpStatus.CREATED)
|
return ResponseEntity.status(HttpStatus.CREATED)
|
||||||
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_CREATED_SUCCESSFULLY)));
|
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_CREATED_SUCCESSFULLY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(
|
public ResponseEntity<Response<ApplicationEvaluationResponse>> getApplicationEvaluationByApplicationId(
|
||||||
HttpServletRequest request, Long applicationId, Long assignedApplicationId) {
|
HttpServletRequest request, Long applicationId, Long assignedApplicationId) {
|
||||||
@@ -56,10 +56,4 @@ public class ApplicationEvaluationApiController implements ApplicationEvaluation
|
|||||||
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_DELETED_SUCCESSFULLY)));
|
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.EVALUATION_DELETED_SUCCESSFULLY)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResponseEntity<Response<ApplicationEvaluationResponse>> updateApplicationEvaluationStatus(HttpServletRequest request, Long assignedApplicationId, AssignedEvaluationStatus status) {
|
|
||||||
ApplicationEvaluationResponse applicationEvaluationResponse = applicationEvaluationService.updateApplicationEvaluationStatus(request, assignedApplicationId,status);
|
|
||||||
return ResponseEntity.status(HttpStatus.OK)
|
|
||||||
.body(new Response<>(applicationEvaluationResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_EVALUATION_STATUS_UPDATED_SUCCESSFULLY)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ aws.secret.access.key=FtnkzF8E3vtqPrVnloqMyNSUSqg0f9Z9L0R7qQOu
|
|||||||
aws.s3.region=eu-west-1
|
aws.s3.region=eu-west-1
|
||||||
aws.s3.bucket.name=mementoresources
|
aws.s3.bucket.name=mementoresources
|
||||||
aws.s3.url = https://mementoresources.s3.eu-west-1.amazonaws.com/
|
aws.s3.url = https://mementoresources.s3.eu-west-1.amazonaws.com/
|
||||||
aws.s3.url.folder=gepafin
|
#aws.s3.url.folder=gepafin
|
||||||
aws.s3.url.folder.delegation=gepafin/delegation
|
#aws.s3.url.folder.delegation=gepafin/delegation
|
||||||
aws.s3.url.folder.signed.document=gepafin/signed-document
|
#aws.s3.url.folder.signed.document=gepafin/signed-document
|
||||||
# JWT configuration
|
# JWT configuration
|
||||||
# Ensure these values match your expectations
|
# Ensure these values match your expectations
|
||||||
security.authentication.jwt.secret=my-secret-token-to-change-in-prod-environment-your-super-secure-randomly-generated-key
|
security.authentication.jwt.secret=my-secret-token-to-change-in-prod-environment-your-super-secure-randomly-generated-key
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ get_login_attempt_se_msg=Login attempts fetched successfully.
|
|||||||
application.in.submit.status.cannot.delete.company=The company cannot be deleted because there are active applications in the SUBMITTED status.
|
application.in.submit.status.cannot.delete.company=The company cannot be deleted because there are active applications in the SUBMITTED status.
|
||||||
get.users.success.msg = Successfully fetched users.
|
get.users.success.msg = Successfully fetched users.
|
||||||
cannot.create.beneficiary.user = Creation of a Beneficiary user is not allowed. Please assign the appropriate role.
|
cannot.create.beneficiary.user = Creation of a Beneficiary user is not allowed. Please assign the appropriate role.
|
||||||
|
|
||||||
application.evaluation.not.found=Application Evaluation not found with ID: {0}
|
application.evaluation.not.found=Application Evaluation not found with ID: {0}
|
||||||
evaluation.created.successfully = Application evaluation created successfully.
|
evaluation.created.successfully = Application evaluation created successfully.
|
||||||
evaluation.updated.successfully = Application evaluation updated successfully.
|
evaluation.updated.successfully = Application evaluation updated successfully.
|
||||||
@@ -293,6 +294,7 @@ application.amendment.not.found = Application Amendment Request not found with t
|
|||||||
application.amendment.get.success = Application Amendment details fetched successfully with given ID.
|
application.amendment.get.success = Application Amendment details fetched successfully with given ID.
|
||||||
application.amendment.update.successfully = Application Amendment Updated Successfully.
|
application.amendment.update.successfully = Application Amendment Updated Successfully.
|
||||||
application.amendment.closed.successfully = Application Amendment Closed Successfully.
|
application.amendment.closed.successfully = Application Amendment Closed Successfully.
|
||||||
|
response.days.extended.success=Response days extended successfully.
|
||||||
|
|
||||||
added.comment.to.amendment.request.success = Application Amendment Comment Added Successfully.
|
added.comment.to.amendment.request.success = Application Amendment Comment Added Successfully.
|
||||||
comment.not.found = Comment Not Found.
|
comment.not.found = Comment Not Found.
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ evaluation.deleted.successfully = Valutazione dell'applicazione eliminata con su
|
|||||||
evaluations.fetched.successfully = Tutte le valutazioni delle applicazioni recuperate con successo.
|
evaluations.fetched.successfully = Tutte le valutazioni delle applicazioni recuperate con successo.
|
||||||
application.evaluation.status.updated.successfully=Stato della valutazione dell'applicazione aggiornato con successo.
|
application.evaluation.status.updated.successfully=Stato della valutazione dell'applicazione aggiornato con successo.
|
||||||
assigned.application.not.found.with.id=Applicazione assegnata con questo ID dell'applicazione non trovata
|
assigned.application.not.found.with.id=Applicazione assegnata con questo ID dell'applicazione non trovata
|
||||||
either.application.or.assigned.application.id.required=È richiesto almeno uno tra applicationId o assignedApplicationId.
|
either.application.or.assigned.application.id.required=<EFBFBD> richiesto almeno uno tra applicationId o assignedApplicationId.
|
||||||
evaluation.already.exists=Una valutazione dell'applicazione esiste già per questo ID applicazione.
|
evaluation.already.exists=Una valutazione dell'applicazione esiste gi<EFBFBD> per questo ID applicazione.
|
||||||
|
|
||||||
application.assigned.success.msg =Domanda assegnata con successo
|
application.assigned.success.msg =Domanda assegnata con successo
|
||||||
application.already.assigned.msg =La domanda <20> gi<67> assegnata
|
application.already.assigned.msg =La domanda <20> gi<67> assegnata
|
||||||
@@ -288,6 +288,7 @@ application.amendment.not.found = Richiesta di modifica dell'applicazione non tr
|
|||||||
application.amendment.get.success = Dettagli della modifica dell'applicazione recuperati correttamente con l'ID fornito.
|
application.amendment.get.success = Dettagli della modifica dell'applicazione recuperati correttamente con l'ID fornito.
|
||||||
application.amendment.update.successfully = Emendamento all'applicazione aggiornato con successo.
|
application.amendment.update.successfully = Emendamento all'applicazione aggiornato con successo.
|
||||||
application.amendment.closed.successfully = Emendamento alla domanda chiuso con successo.
|
application.amendment.closed.successfully = Emendamento alla domanda chiuso con successo.
|
||||||
|
response.days.extended.success=Giorni di risposta estesi con successo.
|
||||||
|
|
||||||
added.comment.to.amendment.request.success = Commento aggiunto con successo alla richiesta di emendamento.
|
added.comment.to.amendment.request.success = Commento aggiunto con successo alla richiesta di emendamento.
|
||||||
comment.not.found = Commento non trovato.
|
comment.not.found = Commento non trovato.
|
||||||
|
|||||||
Reference in New Issue
Block a user