Disable transaction log lookup and date check

Commented out the TransactionLog repository lookup and the previous-day date validation in CancellationTransactionService. The changes affect processDepositCancellationTransaction and processGLCancellationTransaction, temporarily bypassing the transaction existence check and same-day cancellation enforcement by leaving the original code commented for potential reinstatement.
FMFI-PRE-PRODUCTION-2026
Naeem Ullah 2 weeks ago
parent ac04510494
commit 889583b600

@ -35,13 +35,13 @@ public class CancellationTransactionService {
public ResponseEntity<Object> processDepositCancellationTransaction(DepositCancellationDTO depositCancellationDTO, String tokenHeader) {
String porOrgacode = depositCancellationDTO.getPorOrgacode();
TransactionLog log = transactionLogRepository
.findByTransactionIDAndPorOrgacode(depositCancellationDTO.getNodeId()+depositCancellationDTO.getSgtGntrtranlink(), porOrgacode)
.orElseThrow(() -> new TransactionNotFoundException(porOrgacode));
// TransactionLog log = transactionLogRepository
// .findByTransactionIDAndPorOrgacode(depositCancellationDTO.getNodeId()+depositCancellationDTO.getSgtGntrtranlink(), porOrgacode)
// .orElseThrow(() -> new TransactionNotFoundException(porOrgacode));
if (!log.getSgtGntrdate().isEqual(LocalDate.now())) {
throw new PreviousDayCancellationException(porOrgacode);
}
// if (!log.getSgtGntrdate().isEqual(LocalDate.now())) {
// throw new PreviousDayCancellationException(porOrgacode);
// }
String url = depositURI + "/deposit" + "/organizations/" + depositCancellationDTO.getPorOrgacode() +
"/transactions" + ACONNECT + "/cancel/nodes/" + depositCancellationDTO.getNodeId() +
@ -64,13 +64,13 @@ public class CancellationTransactionService {
public ResponseEntity<Object> processGLCancellationTransaction(GLCancellationDTO glCancellationDTO, String tokenHeader) {
String porOrgacode = glCancellationDTO.getPorOrgacode();
TransactionLog log = transactionLogRepository
.findByTransactionIDAndPorOrgacode(glCancellationDTO.getNodeId()+glCancellationDTO.getSgtGntrtranlink(), porOrgacode)
.orElseThrow(() -> new TransactionNotFoundException(porOrgacode));
if (!log.getSgtGntrdate().isEqual(LocalDate.now())) {
throw new PreviousDayCancellationException(porOrgacode);
}
// TransactionLog log = transactionLogRepository
// .findByTransactionIDAndPorOrgacode(glCancellationDTO.getNodeId()+glCancellationDTO.getSgtGntrtranlink(), porOrgacode)
// .orElseThrow(() -> new TransactionNotFoundException(porOrgacode));
//
// if (!log.getSgtGntrdate().isEqual(LocalDate.now())) {
// throw new PreviousDayCancellationException(porOrgacode);
// }
String url = generalledgerURI + GENERALLEDGER + "/organizations/" + glCancellationDTO.getPorOrgacode() +
"/transactions" + ACONNECT + "/cancel/nodes/" + glCancellationDTO.getNodeId() +

Loading…
Cancel
Save