Resolved conflicts for GEPAFINBE-31.
This commit is contained in:
@@ -58,7 +58,7 @@ public class CommunicationDao {
|
|||||||
public ApplicationAmendmentResponse getAmendmentComments(Long amendmentId) {
|
public ApplicationAmendmentResponse getAmendmentComments(Long amendmentId) {
|
||||||
|
|
||||||
ApplicationAmendmentRequestEntity amendmentData = applicationAmendmentRequestService.validateApplicationAmendmentRequest(amendmentId);
|
ApplicationAmendmentRequestEntity amendmentData = applicationAmendmentRequestService.validateApplicationAmendmentRequest(amendmentId);
|
||||||
List<CommunicationResponseBean> commentsList = communicationRepository.findCommentDetailsByAmendmentId(amendmentId);
|
List<CommunicationResponseBean> commentsList = communicationRepository.findCommentListDetailsByAmendmentId(amendmentId);
|
||||||
if (commentsList == null) {
|
if (commentsList == null) {
|
||||||
throw new CustomValidationException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.COMMENT_NOT_FOUND));
|
throw new CustomValidationException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.COMMENT_NOT_FOUND));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class DocumentDao {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletRequest request;
|
private HttpServletRequest request;
|
||||||
|
|
||||||
// @Value("${aws.s3.url.folder}")
|
// @Value("${aws.s3.url.folder}")
|
||||||
// private String s3Folder;
|
// private String s3Folder;
|
||||||
|
|
||||||
@@ -144,22 +144,27 @@ public class DocumentDao {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Long resolveSourceId(Long sourceId, DocumentSourceTypeEnum sourceType) {
|
private Long resolveSourceId(Long sourceId, DocumentSourceTypeEnum sourceType) {
|
||||||
|
|
||||||
if (sourceType == DocumentSourceTypeEnum.CALL) {
|
if (sourceType == DocumentSourceTypeEnum.CALL) {
|
||||||
CallEntity callEntity = callService.validateCall(sourceId);
|
CallEntity callEntity = callService.validateCall(sourceId);
|
||||||
// callDao.validateUpdate(callEntity);
|
// callDao.validateUpdate(callEntity);
|
||||||
return callEntity.getId();
|
return callEntity.getId();
|
||||||
}
|
}
|
||||||
// else if (sourceType == SourceTypeEnum.APPLICATION) {
|
// else if (sourceType == SourceTypeEnum.APPLICATION) {
|
||||||
// ApplicationEntity applicationEntity = applicationService.validateApplication(sourceId);
|
// ApplicationEntity applicationEntity = applicationService.validateApplication(sourceId);
|
||||||
// return applicationEntity.getId(); // Assuming ApplicationEntity has getId()
|
// return applicationEntity.getId(); // Assuming ApplicationEntity has getId()
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
return sourceId;
|
return sourceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFile(Long documentId) {
|
public void deleteFile(Long documentId) {
|
||||||
|
|
||||||
DocumentEntity documentEntity = validateDocument(documentId);
|
DocumentEntity documentEntity = documentRepository.findById(documentId)
|
||||||
|
.orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND)));
|
||||||
|
// String fileName= Utils.extractFileName(documentEntity.getFilePath());
|
||||||
|
// deleteFileOnAmazonS3(fileName);
|
||||||
|
|
||||||
//cloned for old data
|
//cloned for old data
|
||||||
DocumentEntity oldDocumentEntity = Utils.getClonedEntityForData(documentEntity);
|
DocumentEntity oldDocumentEntity = Utils.getClonedEntityForData(documentEntity);
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,18 @@ public class CommunicationResponseBean {
|
|||||||
this.amendmentId = amendmentId;
|
this.amendmentId = amendmentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CommunicationResponseBean(LocalDateTime commentedDate, String comment, String title, LocalDateTime createdDate, LocalDateTime updatedDate, Long amendmentId,Long senderUserId,Long receiverUserId) {
|
||||||
|
|
||||||
|
this.commentedDate = commentedDate;
|
||||||
|
this.comment = comment;
|
||||||
|
this.title = title;
|
||||||
|
this.createdDate = createdDate;
|
||||||
|
this.updatedDate = updatedDate;
|
||||||
|
this.amendmentId = amendmentId;
|
||||||
|
this.senderUserId = senderUserId;
|
||||||
|
this.receiverUserId = receiverUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public CommunicationResponseBean() {
|
public CommunicationResponseBean() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ public interface CommunicationRepository extends JpaRepository<CommunicationEnti
|
|||||||
List<CommunicationResponseBean> findCommentsByApplicationAmendmentRequestId(@Param("applicationAmendmentRequestId") Long amendmentRequestId);
|
List<CommunicationResponseBean> findCommentsByApplicationAmendmentRequestId(@Param("applicationAmendmentRequestId") Long amendmentRequestId);
|
||||||
|
|
||||||
@Query("SELECT new net.gepafin.tendermanagement.model.response.CommunicationResponseBean( " + "c.commentedDate, c.communicationComment, c.communicationTitle, c.createdDate, c" +
|
@Query("SELECT new net.gepafin.tendermanagement.model.response.CommunicationResponseBean( " + "c.commentedDate, c.communicationComment, c.communicationTitle, c.createdDate, c" +
|
||||||
".updatedDate, c.applicationAmendmentRequest.id) " + "FROM CommunicationEntity c " + "WHERE c.applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
|
".updatedDate, c.applicationAmendmentRequest.id,c.senderUserId, c.receiverUserId) " + "FROM CommunicationEntity c " + "WHERE c.applicationAmendmentRequest.id = :amendmentId AND c.isDeleted = false")
|
||||||
List<CommunicationResponseBean> findCommentDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
|
List<CommunicationResponseBean> findCommentListDetailsByAmendmentId(@Param("amendmentId") Long amendmentId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user