Merge pull request #67 from Kitzanos/feature/GEPAFINBE-79

GEPAFINBE-79(Application Amendment Communication)
This commit is contained in:
bagoraharish92
2024-10-28 16:18:02 +05:30
committed by GitHub
34 changed files with 991 additions and 129 deletions

View File

@@ -26,7 +26,7 @@ public interface ApplicationService {
void deleteApplication(HttpServletRequest request, Long applicationId);
public ApplicationEntity validateApplication(Long userId);
public ApplicationEntity validateApplication(Long applicationId);
public ApplicationResponse createApplication(HttpServletRequest request, Long companyId, ApplicationRequest applicationRequest, Long callId);

View File

@@ -0,0 +1,15 @@
package net.gepafin.tendermanagement.service;
import net.gepafin.tendermanagement.model.request.CommunicationRequestBean;
import net.gepafin.tendermanagement.model.response.ApplicationAmendmentResponse;
import net.gepafin.tendermanagement.model.response.CommunicationResponseBean;
public interface CommunicationService {
CommunicationResponseBean addCommentToAmendmentRequest(CommunicationRequestBean communicationRequestBean, Long amendmentId);
String deleteComment(Long amendmentId, Long commentId);
CommunicationResponseBean updateAmendmentComment(CommunicationRequestBean communicationRequestBean, Long amendmentId, Long commentId);
ApplicationAmendmentResponse getAmendmentComments(Long id);
}

View File

@@ -35,8 +35,6 @@ public class ApplicationAmendmentRequestServiceImpl implements ApplicationAmendm
return applicationAmendmentRequestDao.createApplicationAmendmentRequest(applicationEvaluationId,applicationAmendmentRequest);
}
@Override
public void deleteApplicationAmendmentRequest(HttpServletRequest request, Long id) {
applicationAmendmentRequestDao.deleteById(id);

View File

@@ -56,8 +56,8 @@ public class ApplicationServiceImpl implements ApplicationService {
}
@Override
public ApplicationEntity validateApplication(Long id) {
return applicationDao.validateApplication(id);
public ApplicationEntity validateApplication(Long applicationId) {
return applicationDao.validateApplication(applicationId);
}
@Override

View File

@@ -0,0 +1,43 @@
package net.gepafin.tendermanagement.service.impl;
import net.gepafin.tendermanagement.dao.CommunicationDao;
import net.gepafin.tendermanagement.model.request.CommunicationRequestBean;
import net.gepafin.tendermanagement.model.response.ApplicationAmendmentResponse;
import net.gepafin.tendermanagement.model.response.CommunicationResponseBean;
import net.gepafin.tendermanagement.service.CommunicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class CommunicationServiceImpl implements CommunicationService {
@Autowired
CommunicationDao communicationDao;
@Override
@Transactional(rollbackFor = Exception.class)
public CommunicationResponseBean addCommentToAmendmentRequest(CommunicationRequestBean communicationRequestBean, Long amendmentId) {
return communicationDao.addCommentToAmendmentRequest(communicationRequestBean, amendmentId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public String deleteComment(Long amendmentId, Long commentId) {
return communicationDao.deleteComment(amendmentId, commentId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public CommunicationResponseBean updateAmendmentComment(CommunicationRequestBean communicationRequestBean, Long amendmentId, Long commentId) {
return communicationDao.updateAmendmentComment(communicationRequestBean, amendmentId, commentId);
}
@Override
@Transactional(readOnly = true)
public ApplicationAmendmentResponse getAmendmentComments(Long id) {
return communicationDao.getAmendmentComments(id);
}
}

View File

@@ -181,16 +181,10 @@ public class S3ReUploadMigrationService {
private void updateDocumentPathAndDeleteOldEntry(DocumentEntity document, String newPath) {
String fileName = extractFileName(newPath);
DocumentEntity newDocument = new DocumentEntity();
DocumentEntity newDocument = document;
newDocument.setFilePath(newPath);
newDocument.setSource(document.getSource());
newDocument.setType(document.getType());
newDocument.setIsDeleted(false);
newDocument.setSourceId(document.getSourceId());
newDocument.setFileName(fileName);
documentRepository.save(newDocument);
documentRepository.delete(document);
log.info("Migrated document ID: {} to new path: {}", document.getId(), newPath);
}

View File

@@ -229,15 +229,11 @@ public class UserSignedAndDelegationServiceImpl {
private void updateDocumentPathAndDeleteOldEntry(ApplicationSignedDocumentEntity document, String newPath) {
ApplicationSignedDocumentEntity newDocument = new ApplicationSignedDocumentEntity();
ApplicationSignedDocumentEntity newDocument = document;
String fileName = extractFileNameFromPath(newPath);
newDocument.setFilePath(newPath);
newDocument.setFileName(fileName);
newDocument.setApplication(document.getApplication());
newDocument.setStatus("ACTIVE");
applicationSignedDocumentRepository.save(newDocument);
applicationSignedDocumentRepository.delete(document);
log.info("Migrated document ID: {} to new path: {}", document.getId(), newPath);
}
@@ -245,17 +241,10 @@ public class UserSignedAndDelegationServiceImpl {
private void updateDelegatedDocumentPathAndDeleteOldEntry(UserCompanyDelegationEntity document, String newPath) {
String fileName = extractFileNameFromPath(newPath);
UserCompanyDelegationEntity newDocument = new UserCompanyDelegationEntity();
UserCompanyDelegationEntity newDocument = document;
newDocument.setFilePath(newPath);
newDocument.setFileName(fileName);
newDocument.setBeneficiaryId(document.getBeneficiaryId());
newDocument.setUserId(document.getUserId());
newDocument.setCompanyId(document.getCompanyId());
newDocument.setStatus("ACTIVE");
userCompanyDelegationRepository.save(newDocument);
userCompanyDelegationRepository.delete(document);
log.info("Migrated document ID: {} to new path: {}", document.getId(), newPath);
}
}