| Line 1322... |
Line 1322... |
| 1322 |
LOGGER.info("Your today sale till" + " " + now.format(timeFormatter) +" "+ "is" + " " + sale+" "+"vs" +" "+"daily target = 0.0");
|
1322 |
LOGGER.info("Your today sale till" + " " + now.format(timeFormatter) +" "+ "is" + " " + sale+" "+"vs" +" "+"daily target = 0.0");
|
| 1323 |
}
|
1323 |
}
|
| 1324 |
// notification.setMessage("Your sale is "+salesbyfofoId.get(fofoId));
|
1324 |
// notification.setMessage("Your sale is "+salesbyfofoId.get(fofoId));
|
| 1325 |
notification.setType("Url");
|
1325 |
notification.setType("Url");
|
| 1326 |
notification.setUrl("http://app.profitmandi.com/pages/home/dashboard");
|
1326 |
notification.setUrl("http://app.profitmandi.com/pages/home/dashboard");
|
| - |
|
1327 |
LOGGER.info("UserID" +userAccountRepository.selectUserIdByRetailerId(fofoId));
|
| 1327 |
notification
|
1328 |
notification
|
| 1328 |
.setSql(MessageFormat.format("SELECT distinct d1.user_id from devices d1 left join devices d2 on"
|
1329 |
.setSql("SELECT distinct d1.user_id from devices d1 left join devices d2 on"
|
| 1329 |
+ "(d1.imeinumber = d2.imeinumber and d1.created < d2.created) "
|
1330 |
+ "(d1.imeinumber = d2.imeinumber and d1.created < d2.created) "
|
| 1330 |
+ " where d2.id is null and d1.user_id in ({0})", userAccountRepository.selectUserIdByRetailerId(fofoId)));
|
1331 |
+ " where d2.id is null and d1.user_id = "+userAccountRepository.selectUserIdByRetailerId(175120474));
|
| - |
|
1332 |
LOGGER.info("SELECT distinct d1.user_id from devices d1 left join devices d2 on"
|
| - |
|
1333 |
+ "(d1.imeinumber = d2.imeinumber and d1.created < d2.created) "
|
| - |
|
1334 |
+ " where d2.id is null and d1.user_id = "+userAccountRepository.selectUserIdByRetailerId(175120474));
|
| 1331 |
notification.setExpiresat(LocalDateTime.now().plusDays(1).toEpochSecond(ZoneOffset.UTC) * 1000);
|
1335 |
notification.setExpiresat(LocalDateTime.now().plusDays(1).toEpochSecond(ZoneOffset.UTC) * 1000);
|
| 1332 |
notification.setStatus("active");
|
1336 |
notification.setStatus("active");
|
| 1333 |
notification.setSmsprocessed(0);
|
1337 |
notification.setSmsprocessed(0);
|
| 1334 |
notification.setNotification_processed(0);
|
1338 |
notification.setNotification_processed(0);
|
| 1335 |
notification.setNotification_type("GENERAL_NOTIFICATION");
|
1339 |
notification.setNotification_type("GENERAL_NOTIFICATION");
|
| Line 1340... |
Line 1344... |
| 1340 |
String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap,dailyTarget);
|
1344 |
String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap,dailyTarget);
|
| 1341 |
LOGGER.info(saleReport);
|
1345 |
LOGGER.info(saleReport);
|
| 1342 |
String cc[] = { "Tarun.verma@smartdukaan.com", "Kamini.sharma@smartdukaan.com",
|
1346 |
String cc[] = { "Tarun.verma@smartdukaan.com", "Kamini.sharma@smartdukaan.com",
|
| 1343 |
"chaitnaya.vats@smartdukaan.com","adeel.yazdani@smartdukaan.com","mohinder.mutreja@smartdukaan.com"};
|
1347 |
"chaitnaya.vats@smartdukaan.com","adeel.yazdani@smartdukaan.com","mohinder.mutreja@smartdukaan.com"};
|
| 1344 |
String subject = "sale report till" + " " + now.format(timeFormatter);
|
1348 |
String subject = "sale report till" + " " + now.format(timeFormatter);
|
| 1345 |
this.sendMailOfHtmlFomat("amod.sen@smartdukaan.com", saleReport, cc, subject);
|
1349 |
//this.sendMailOfHtmlFomat("amod.sen@smartdukaan.com", saleReport, cc, subject);
|
| 1346 |
}
|
1350 |
}
|
| 1347 |
|
1351 |
|
| 1348 |
public String getDailySalesReportByPartnerId(Map<Integer, Double> salesByFofoIdMap,Map<Integer, Float> dailyTarget)
|
1352 |
public String getDailySalesReportByPartnerId(Map<Integer, Double> salesByFofoIdMap,Map<Integer, Float> dailyTarget)
|
| 1349 |
throws ProfitMandiBusinessException {
|
1353 |
throws ProfitMandiBusinessException {
|
| 1350 |
StringBuilder sb = new StringBuilder();
|
1354 |
StringBuilder sb = new StringBuilder();
|