| Line 697... |
Line 697... |
| 697 |
|
697 |
|
| 698 |
List<Order> filteredorders = vorders.stream()
|
698 |
List<Order> filteredorders = vorders.stream()
|
| 699 |
.filter(x -> (!x.getStatus().equals(OrderStatus.SHIPPED_FROM_WH)
|
699 |
.filter(x -> (!x.getStatus().equals(OrderStatus.SHIPPED_FROM_WH)
|
| 700 |
|| !x.getStatus().equals(OrderStatus.DELIVERY_SUCCESS)))
|
700 |
|| !x.getStatus().equals(OrderStatus.DELIVERY_SUCCESS)))
|
| 701 |
.collect(Collectors.toList());
|
701 |
.collect(Collectors.toList());
|
| - |
|
702 |
|
| - |
|
703 |
LOGGER.info("filteredOrder"+ filteredorders);
|
| 702 |
|
704 |
|
| 703 |
if (!filteredorders.isEmpty()) {
|
705 |
if (!filteredorders.isEmpty()) {
|
| 704 |
throw new ProfitMandiBusinessException("Upload File", "",
|
706 |
throw new ProfitMandiBusinessException("Upload File", "",
|
| 705 |
"Order status should be shipped from warehouse");
|
707 |
"Order status should be shipped from warehouse");
|
| 706 |
|
708 |
|
| Line 831... |
Line 833... |
| 831 |
}
|
833 |
}
|
| 832 |
|
834 |
|
| 833 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
835 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 834 |
sendNotificationModel.setCampaignName("Order Hold");
|
836 |
sendNotificationModel.setCampaignName("Order Hold");
|
| 835 |
sendNotificationModel.setTitle("Order Hold");
|
837 |
sendNotificationModel.setTitle("Order Hold");
|
| - |
|
838 |
sendNotificationModel.setMessage(
|
| 836 |
sendNotificationModel.setMessage(String.format("Dear partner, your SmartDukaan ORDER "
|
839 |
String.format("Dear partner, your SmartDukaan order " + delayBilling.getInvoiceNumber()
|
| 837 |
+ delayBilling.getInvoiceNumber() + "has been delayed for " + delayBilling.getReason() + "."));
|
840 |
+ "has been delayed due to " + delayBilling.getReason() + "."));
|
| 838 |
sendNotificationModel.setType("url");
|
841 |
sendNotificationModel.setType("url");
|
| 839 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
842 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
| 840 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
843 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 841 |
sendNotificationModel.setMessageType(MessageType.notification);
|
844 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 842 |
int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());
|
845 |
int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());
|