| Line 235... |
Line 235... |
| 235 |
int referenceId = Integer.parseInt(FormattingUtils.getYearMonth(startOfPreviousMonth.atStartOfDay()));
|
235 |
int referenceId = Integer.parseInt(FormattingUtils.getYearMonth(startOfPreviousMonth.atStartOfDay()));
|
| 236 |
LocalDate lastOfPreviousMonth = firstDateOfCurrentMonth.minusDays(1);
|
236 |
LocalDate lastOfPreviousMonth = firstDateOfCurrentMonth.minusDays(1);
|
| 237 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
237 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
| 238 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
238 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
| 239 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
239 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
| 240 |
.filter(x -> x.getShortPercentage() <= 10)
|
240 |
.filter(x -> x.getShortPercentage() <= ProfitMandiConstants.OK_INVESTMENT_SHORT_PERCENTAGE)
|
| 241 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
241 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
| 242 |
LOGGER.info("investmentMaintainedDaysMap {}", investmentMaintainedDaysMap);
|
242 |
LOGGER.info("investmentMaintainedDaysMap {}", investmentMaintainedDaysMap);
|
| 243 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectAllPending(SchemeType.INVESTMENT,
|
243 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectAllPending(SchemeType.INVESTMENT,
|
| 244 |
startOfPreviousMonth.atStartOfDay(), firstDateOfCurrentMonth.atStartOfDay());
|
244 |
startOfPreviousMonth.atStartOfDay(), firstDateOfCurrentMonth.atStartOfDay());
|
| 245 |
|
245 |
|
| Line 316... |
Line 316... |
| 316 |
LocalDate startOfPreviousMonth = firstDateOfCurrentMonth.minusMonths(1);
|
316 |
LocalDate startOfPreviousMonth = firstDateOfCurrentMonth.minusMonths(1);
|
| 317 |
LocalDate lastOfPreviousMonth = firstDateOfCurrentMonth.minusDays(1);
|
317 |
LocalDate lastOfPreviousMonth = firstDateOfCurrentMonth.minusDays(1);
|
| 318 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
318 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
| 319 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
319 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
| 320 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
320 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
| 321 |
.filter(x -> x.getShortPercentage() <= 10)
|
321 |
.filter(x -> x.getShortPercentage() <= ProfitMandiConstants.OK_INVESTMENT_SHORT_PERCENTAGE)
|
| 322 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
322 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
| 323 |
LOGGER.info("investmentMaintainedDaysMap {}", investmentMaintainedDaysMap);
|
323 |
LOGGER.info("investmentMaintainedDaysMap {}", investmentMaintainedDaysMap);
|
| 324 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectAllPending(SchemeType.INVESTMENT,
|
324 |
List<SchemeInOut> schemeInOuts = schemeInOutRepository.selectAllPending(SchemeType.INVESTMENT,
|
| 325 |
startOfPreviousMonth.atStartOfDay(), firstDateOfCurrentMonth.atStartOfDay());
|
325 |
startOfPreviousMonth.atStartOfDay(), firstDateOfCurrentMonth.atStartOfDay());
|
| 326 |
Map<Integer, List<SchemeInOut>> inventoryItemIdSchemeMap = schemeInOuts.stream()
|
326 |
Map<Integer, List<SchemeInOut>> inventoryItemIdSchemeMap = schemeInOuts.stream()
|
| Line 384... |
Line 384... |
| 384 |
|
384 |
|
| 385 |
int referenceId = Integer.parseInt(FormattingUtils.getYearMonth(startOfPreviousMonth.atStartOfDay()));
|
385 |
int referenceId = Integer.parseInt(FormattingUtils.getYearMonth(startOfPreviousMonth.atStartOfDay()));
|
| 386 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
386 |
List<PartnerDailyInvestment> partnerDailyInvestments = partnerDailyInvestmentRepository
|
| 387 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
387 |
.selectAll(startOfPreviousMonth, lastOfPreviousMonth);
|
| 388 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
388 |
Map<Integer, Long> investmentMaintainedDaysMap = partnerDailyInvestments.stream()
|
| 389 |
.filter(x -> x.getShortPercentage() <= 10)
|
389 |
.filter(x -> x.getShortPercentage() <= ProfitMandiConstants.OK_INVESTMENT_SHORT_PERCENTAGE)
|
| 390 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
390 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.counting()));
|
| 391 |
|
391 |
|
| 392 |
for (EvaluateSchemeInvestmentPayoutModel esip : evaluateSchemeInvestmentPayouts) {
|
392 |
for (EvaluateSchemeInvestmentPayoutModel esip : evaluateSchemeInvestmentPayouts) {
|
| 393 |
|
393 |
|
| 394 |
long investmentMaintainedDays = investmentMaintainedDaysMap.get(esip.getFofoId()) == null ? 0
|
394 |
long investmentMaintainedDays = investmentMaintainedDaysMap.get(esip.getFofoId()) == null ? 0
|