| Line 545... |
Line 545... |
| 545 |
|
545 |
|
| 546 |
inputStreams.put(partnerTargetDetail.getTargetName(), is);
|
546 |
inputStreams.put(partnerTargetDetail.getTargetName(), is);
|
| 547 |
|
547 |
|
| 548 |
}
|
548 |
}
|
| 549 |
// String[] ccEmails = null;
|
549 |
// String[] ccEmails = null;
|
| - |
|
550 |
if (partnerTargetDetails != null) {
|
| 550 |
String[] ccEmails = { "Tarun.verma@smartdukaan.com", "Kamini.sharma@smartdukaan.com",
|
551 |
String[] ccEmails = { "Tarun.verma@smartdukaan.com", "Kamini.sharma@smartdukaan.com",
|
| 551 |
"chaitnaya.vats@smartdukaan.com", "dhruv.kathpal@smartdukaan.com" };
|
552 |
"chaitnaya.vats@smartdukaan.com", "dhruv.kathpal@smartdukaan.com" };
|
| 552 |
String subject = "Daily Sales Report ";
|
553 |
String subject = "Daily Sales Report ";
|
| 553 |
String message = MessageFormat.format("Sale Target summary for {0}", LocalDate.now());
|
554 |
String message = MessageFormat.format("Sale Target summary for {0}", LocalDate.now());
|
| 554 |
LOGGER.info("message" + message);
|
555 |
LOGGER.info("message" + message);
|
| 555 |
if (salesHeadDetail.getName().equals("Kamal")) {
|
556 |
if (salesHeadDetail.getName().equals("Kamal")) {
|
| 556 |
LOGGER.info("salesHeadDetail.getName()" + salesHeadDetail.getName());
|
557 |
LOGGER.info("salesHeadDetail.getName()" + salesHeadDetail.getName());
|
| 557 |
String[] to = { salesHeadDetail.getEmail(), "mohinder.mutreja@smartdukaan.com" };
|
558 |
String[] to = { salesHeadDetail.getEmail(), "mohinder.mutreja@smartdukaan.com" };
|
| 558 |
|
559 |
|
| 559 |
this.sendMailWithAttachments(to, ccEmails, message, subject, inputStreams);
|
560 |
this.sendMailWithAttachments(to, ccEmails, message, subject, inputStreams);
|
| 560 |
|
561 |
|
| 561 |
} else {
|
562 |
} else {
|
| 562 |
LOGGER.info("salesHeadDetail.getName()" + salesHeadDetail.getName());
|
563 |
LOGGER.info("salesHeadDetail.getName()" + salesHeadDetail.getName());
|
| 563 |
String[] to = { salesHeadDetail.getEmail() };
|
564 |
String[] to = { salesHeadDetail.getEmail() };
|
| 564 |
this.sendMailWithAttachments(to, ccEmails, message, subject, inputStreams);
|
565 |
this.sendMailWithAttachments(to, ccEmails, message, subject, inputStreams);
|
| 565 |
}
|
566 |
}
|
| - |
|
567 |
}
|
| 566 |
}
|
568 |
}
|
| 567 |
|
569 |
|
| 568 |
public void sendMailToPartnerAboutTargetAndSales() throws ProfitMandiBusinessException, MessagingException,
|
570 |
public void sendMailToPartnerAboutTargetAndSales() throws ProfitMandiBusinessException, MessagingException,
|
| 569 |
IOException, EncryptedDocumentException, InvalidFormatException {
|
571 |
IOException, EncryptedDocumentException, InvalidFormatException {
|
| 570 |
List<Integer> fofoIds = targetService.getfofoIdsFromfofoStore();
|
572 |
List<Integer> fofoIds = targetService.getfofoIdsFromfofoStore();
|