| Line 1841... |
Line 1841... |
| 1841 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
1841 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 1842 |
sendNotificationModel.setMessageType(MessageType.notification);
|
1842 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 1843 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
1843 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
| 1844 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
1844 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 1845 |
notificationService.sendNotification(sendNotificationModel);
|
1845 |
notificationService.sendNotification(sendNotificationModel);
|
| 1846 |
|
- |
|
| - |
|
1846 |
String whatsappMessageTemplate = String.format(
|
| - |
|
1847 |
"Dear Partner, Your sale update is Smartphones Rs.%.0f, Insurance Rs.%.0f, Total Rs.%.0f till %s.",
|
| - |
|
1848 |
model.getSmartphoneSale(), model.getInsuranceSale(), model.getTotalSale(),
|
| - |
|
1849 |
String.format(timeString, now.format(timeFormatter)));
|
| 1847 |
notificationService.sendWhatsappMessage(messageTemplate, title, address.getPhoneNumber());
|
1850 |
notificationService.sendWhatsappMessage(whatsappMessageTemplate, title, address.getPhoneNumber());
|
| 1848 |
|
1851 |
|
| 1849 |
}
|
1852 |
}
|
| 1850 |
// String saleReport = this.getDailySalesReportHtml(partnerSalesHeadersMap,
|
1853 |
// String saleReport = this.getDailySalesReportHtml(partnerSalesHeadersMap,
|
| 1851 |
// saleTargetReportModelMap);
|
1854 |
// saleTargetReportModelMap);
|
| 1852 |
String statewiseSaleReport = this.getStateWiseSales(saleTargetReportModelMap, partnerSalesHeadersMap);
|
1855 |
String statewiseSaleReport = this.getStateWiseSales(saleTargetReportModelMap, partnerSalesHeadersMap);
|
| Line 3547... |
Line 3550... |
| 3547 |
userWallet.setAmount(0);
|
3550 |
userWallet.setAmount(0);
|
| 3548 |
}
|
3551 |
}
|
| 3549 |
|
3552 |
|
| 3550 |
}
|
3553 |
}
|
| 3551 |
}
|
3554 |
}
|
| - |
|
3555 |
|
| - |
|
3556 |
List<Order> allOrders = orderRepository.selectHoldOrder();
|
| - |
|
3557 |
if (!allOrders.isEmpty()) {
|
| - |
|
3558 |
Map<Integer, List<Order>> transactionOrdersMap = allOrders.stream()
|
| - |
|
3559 |
.collect(Collectors.groupingBy(Order::getTransactionId, Collectors.toList()));
|
| - |
|
3560 |
|
| - |
|
3561 |
for (Entry<Integer, List<Order>> transactionOrdersEntry : transactionOrdersMap.entrySet()) {
|
| - |
|
3562 |
|
| - |
|
3563 |
List<Order> orders = transactionOrdersEntry.getValue();
|
| - |
|
3564 |
|
| - |
|
3565 |
int fofoId = orders.get(0).getRetailerId();
|
| - |
|
3566 |
|
| - |
|
3567 |
double totalAmount = orders.stream()
|
| - |
|
3568 |
.collect(Collectors.summingDouble(x -> (double) x.getTotalAmount()));
|
| - |
|
3569 |
}
|
| - |
|
3570 |
}
|
| 3552 |
}
|
3571 |
}
|
| 3553 |
|
3572 |
|
| 3554 |
}
|
3573 |
}
|
| 3555 |
|
3574 |
|
| 3556 |
private void settledLoanStatement(LoanReferenceType loanReferneceType, BigDecimal amount, int fofoId, int loanId,
|
3575 |
private void settledLoanStatement(LoanReferenceType loanReferneceType, BigDecimal amount, int fofoId, int loanId,
|