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