| Line 1403... |
Line 1403... |
| 1403 |
sendNotificationModel
|
1403 |
sendNotificationModel
|
| 1404 |
.setMessage(String.format("Smartphones Rs.%.0f, Insurance Rs.%.0f, Total Rs.%.0f till %s.",
|
1404 |
.setMessage(String.format("Smartphones Rs.%.0f, Insurance Rs.%.0f, Total Rs.%.0f till %s.",
|
| 1405 |
model.getSmartphoneSale(), model.getInsuranceSale(), model.getTotalSale(),
|
1405 |
model.getSmartphoneSale(), model.getInsuranceSale(), model.getTotalSale(),
|
| 1406 |
String.format(timeString, now.format(timeFormatter))));
|
1406 |
String.format(timeString, now.format(timeFormatter))));
|
| 1407 |
sendNotificationModel.setType("url");
|
1407 |
sendNotificationModel.setType("url");
|
| 1408 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
1408 |
sendNotificationModel.setUrl("http://app.smartdukaan.com/pages/home/notifications");
|
| 1409 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
1409 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 1410 |
sendNotificationModel.setMessageType(MessageType.notification);
|
1410 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 1411 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
1411 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
| 1412 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
1412 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 1413 |
notificationService.sendNotification(sendNotificationModel);
|
1413 |
notificationService.sendNotification(sendNotificationModel);
|
| Line 1870... |
Line 1870... |
| 1870 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
1870 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 1871 |
sendNotificationModel.setCampaignName("Stock Alert");
|
1871 |
sendNotificationModel.setCampaignName("Stock Alert");
|
| 1872 |
sendNotificationModel.setTitle("Alert");
|
1872 |
sendNotificationModel.setTitle("Alert");
|
| 1873 |
sendNotificationModel.setMessage(notificationMessage);
|
1873 |
sendNotificationModel.setMessage(notificationMessage);
|
| 1874 |
sendNotificationModel.setType("url");
|
1874 |
sendNotificationModel.setType("url");
|
| 1875 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
1875 |
sendNotificationModel.setUrl("http://app.smartdukaan.com/pages/home/notifications");
|
| 1876 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
1876 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
| 1877 |
sendNotificationModel.setMessageType(MessageType.notification);
|
1877 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 1878 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
1878 |
int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
|
| 1879 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
1879 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| 1880 |
notificationService.sendNotification(sendNotificationModel);
|
1880 |
notificationService.sendNotification(sendNotificationModel);
|
| Line 2009... |
Line 2009... |
| 2009 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
2009 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 2010 |
sendNotificationModel.setCampaignName("Lead Reminder");
|
2010 |
sendNotificationModel.setCampaignName("Lead Reminder");
|
| 2011 |
sendNotificationModel.setTitle("Leads followup Reminder");
|
2011 |
sendNotificationModel.setTitle("Leads followup Reminder");
|
| 2012 |
sendNotificationModel.setMessage(notificationMessage);
|
2012 |
sendNotificationModel.setMessage(notificationMessage);
|
| 2013 |
sendNotificationModel.setType("url");
|
2013 |
sendNotificationModel.setType("url");
|
| 2014 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
2014 |
sendNotificationModel.setUrl("http://app.smartdukaan.com/pages/home/notifications");
|
| 2015 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
2015 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
| 2016 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
2016 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
| 2017 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(lead.getAssignTo())));
|
2017 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(lead.getAssignTo())));
|
| 2018 |
System.out.println(sendNotificationModel);
|
2018 |
System.out.println(sendNotificationModel);
|
| 2019 |
notificationService.sendNotification(sendNotificationModel);
|
2019 |
notificationService.sendNotification(sendNotificationModel);
|
| Line 2057... |
Line 2057... |
| 2057 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
2057 |
sendNotificationModel.setMessageType(MessageType.reminder);
|
| 2058 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(visit.getAuthId())));
|
2058 |
sendNotificationModel.setUserIds(Arrays.asList(authUserKeyMap.get(visit.getAuthId())));
|
| 2059 |
notificationService.sendNotification(sendNotificationModel);
|
2059 |
notificationService.sendNotification(sendNotificationModel);
|
| 2060 |
}
|
2060 |
}
|
| 2061 |
}
|
2061 |
}
|
| 2062 |
|
- |
|
| 2063 |
public AddPaymentResponse addPayment(AddPaymentRequest addPaymentRequest) throws Exception {
|
- |
|
| 2064 |
HdfcPayment hdfcPayment = hdfcPaymentRepository.selectByTransactionId(addPaymentRequest.getTransactionId());
|
- |
|
| 2065 |
AddPaymentResponse response = new AddPaymentResponse();
|
- |
|
| 2066 |
if (hdfcPayment == null) {
|
- |
|
| 2067 |
hdfcPayment = new HdfcPayment();
|
- |
|
| 2068 |
hdfcPayment.setAmount(addPaymentRequest.getAmount());
|
- |
|
| 2069 |
hdfcPayment.setCreateTimestamp(LocalDateTime.now());
|
- |
|
| 2070 |
hdfcPayment.setCreditTimestamp(addPaymentRequest.getCreditDateTime());
|
- |
|
| 2071 |
hdfcPayment.setFromAccountNumber(addPaymentRequest.getFromAccountNumber());
|
- |
|
| 2072 |
hdfcPayment.setFromBankName(addPaymentRequest.getFromBankName());
|
- |
|
| 2073 |
hdfcPayment.setMmid(addPaymentRequest.getMmid());
|
- |
|
| 2074 |
hdfcPayment.setRemitterName(addPaymentRequest.getRemitterName());
|
- |
|
| 2075 |
hdfcPayment.setTransactionId(addPaymentRequest.getTransactionId());
|
- |
|
| 2076 |
hdfcPayment.setTransferMode(addPaymentRequest.getTransferMode());
|
- |
|
| 2077 |
hdfcPayment.setUtr(addPaymentRequest.getUtr());
|
- |
|
| 2078 |
hdfcPayment.setVirtualAccount(hdfcPayment.getVirtualAccount());
|
- |
|
| 2079 |
hdfcPaymentRepository.persist(hdfcPayment);
|
- |
|
| 2080 |
String virtualAccount = hdfcPayment.getVirtualAccount();
|
- |
|
| 2081 |
String retailerIdString = virtualAccount.substring(6);
|
- |
|
| 2082 |
int retailerId = Integer.parseInt(retailerIdString);
|
- |
|
| 2083 |
String description = String.format("Paid through %s, Utr# %s", hdfcPayment.getTransferMode(),
|
- |
|
| 2084 |
hdfcPayment.getUtr());
|
- |
|
| 2085 |
walletService.addAmountToWallet(retailerId, hdfcPayment.getId(), WalletReferenceType.ADVANCE_AMOUNT,
|
- |
|
| 2086 |
description, (float) hdfcPayment.getAmount());
|
- |
|
| 2087 |
response.setCode("100");
|
- |
|
| 2088 |
response.setStatus("Success");
|
- |
|
| 2089 |
} else {
|
- |
|
| 2090 |
response.setCode("200");
|
- |
|
| 2091 |
response.setStatus("Duplicate");
|
- |
|
| 2092 |
}
|
- |
|
| 2093 |
response.setTransactionId("");
|
- |
|
| 2094 |
|
- |
|
| 2095 |
return response;
|
- |
|
| 2096 |
}
|
- |
|
| 2097 |
|
- |
|
| 2098 |
|
- |
|
| 2099 |
|
2062 |
|
| 2100 |
public void ticketClosed() throws Exception {
|
2063 |
public void ticketClosed() throws Exception {
|
| 2101 |
|
2064 |
|
| 2102 |
List<Ticket> tickets = ticketRepository.selectAllNotClosedTicketsWithStatus(ActivityType.RESOLVED);
|
2065 |
List<Ticket> tickets = ticketRepository.selectAllNotClosedTicketsWithStatus(ActivityType.RESOLVED);
|
| 2103 |
for (Ticket ticket : tickets) {
|
2066 |
for (Ticket ticket : tickets) {
|