adamsaghy commented on code in PR #2777:
URL: https://github.com/apache/fineract/pull/2777#discussion_r1061512542
##########
fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java:
##########
@@ -96,6 +97,19 @@ public CommandProcessingResult executeInlineJob(JsonCommand
command, String jobN
@Override
public void execute(List<Long> loanIds, String jobName) {
+ LocalDate oldestCOBBusinessDate = getOldestCOBBusinessDate(loanIds);
+ LocalDate cobBusinessDate =
ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE);
+ List<Long> loanIdsToBeProcessed = getLoanIdsTOBeProcessed(loanIds,
oldestCOBBusinessDate, cobBusinessDate);
+ if (!loanIdsToBeProcessed.isEmpty()) {
+ LocalDate executingBusinessDate =
oldestCOBBusinessDate.plusDays(1);
+ while (!executingBusinessDate.isAfter(cobBusinessDate)) {
+ execute(loanIdsToBeProcessed, jobName, executingBusinessDate);
Review Comment:
If we have these loanids:
1,2,3
Oldest COB date: 20-11-2022
Loan 1 : last cob date is 20-11-2022
Loan 2 : last cob date is 21-11-2022
Loan 3 : last cob date is 22-11-2022
It will execute the inline COB for loan 1 which is good
It will execute the inline COB for loan 2 which is bad
It will execute the inline COB for loan 3 which is bad
Shall we run it only where it matches with the particular date? so give only
sublist...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]