-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FINERACT-2421: Fix Progressive Loan - Missing Model Issues #5472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
FINERACT-2421: Fix Progressive Loan - Missing Model Issues #5472
Conversation
bb818b3 to
69fc174
Compare
6c6a32d to
1167af4
Compare
| case NONE -> throw new IllegalStateException("Unexpected PreClosureInterestCalculationStrategy: NONE"); | ||
| }; | ||
|
|
||
| // TODO: usually used for read operations, if model is incorrect (changed state), we need to wait till something |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not a TODO item
| extends JpaSpecificationExecutor<ProgressiveLoanModel>, JpaRepository<ProgressiveLoanModel, Long> { | ||
|
|
||
| Optional<ProgressiveLoanModel> findOneByLoanId(Long loanId); | ||
| Optional<ProgressiveLoanModel> findOneByLoanId(Long loan_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo
|
|
||
| @Override | ||
| public Long removeByLoanId(Long loanId) { | ||
| return loanModelRepository.removeByLoan_Id(loanId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid using snake case method names
|
|
||
| private ChangedTransactionDetail processLatestTransactionProgressiveInterestRecalculation( | ||
| AdvancedPaymentScheduleTransactionProcessor advancedProcessor, Loan loan, LoanTransaction loanTransaction) { | ||
| // TODO: Lets recalculate the model if it is incorrect, it is used by WRITE operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this.
|
|
||
| TransactionCtx transactionCtx; | ||
| if (transactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor) { | ||
| // Fixed: prevented to use it without a model. shouldReprocessLoan used for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this
| @Override | ||
| public void updateModel(Loan loan) { | ||
| // recalculate the model if it is incorrect, it is used by WRITE operations | ||
| // Fixed on caller side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this.
1167af4 to
a56c07a
Compare
… Runs * COB Periodic Accruals Create model if model is not saved before calculate new accrual * Force Reprocess All Transactions in case there is no Saved Model * Create Internal API Endpoint and LoanStepDef to remove ProgressiveLoanInterestScheduleModel by loanId
a56c07a to
4a102e0
Compare
COB runs can fail for Progressive Loans if there are no entry for Saved Progressive Model in DB.