| Line 104... |
Line 104... |
| 104 |
private OrderRepository orderRepository;
|
104 |
private OrderRepository orderRepository;
|
| 105 |
@Autowired
|
105 |
@Autowired
|
| 106 |
private FofoOrderRepository fofoOrderRepository;
|
106 |
private FofoOrderRepository fofoOrderRepository;
|
| 107 |
|
107 |
|
| 108 |
@Autowired
|
108 |
@Autowired
|
| 109 |
private JavaMailSender mailSender;
|
109 |
private JavaMailSender gmailRelaySender;
|
| 110 |
|
110 |
|
| 111 |
public void dailyReconciliation() throws Exception {
|
111 |
public void dailyReconciliation() throws Exception {
|
| 112 |
LocalDate date = LocalDate.now().minusDays(1);
|
112 |
LocalDate date = LocalDate.now().minusDays(1);
|
| 113 |
dailyReconciliation(date);
|
113 |
dailyReconciliation(date);
|
| 114 |
}
|
114 |
}
|
| Line 171... |
Line 171... |
| 171 |
"Reconciliation Date", "Purchase Reconciled", "Wallet amount consumed", "Ordered Total",
|
171 |
"Reconciliation Date", "Purchase Reconciled", "Wallet amount consumed", "Ordered Total",
|
| 172 |
"Cancelled Total", "Refunded Total", "Scheme In Reconciled", "Scheme In to Wallet",
|
172 |
"Cancelled Total", "Refunded Total", "Scheme In Reconciled", "Scheme In to Wallet",
|
| 173 |
"Scheme In disbursed", "Scheme In rolledback", "SchemeOut Reconciled", "Scheme Out to Wallet",
|
173 |
"Scheme In disbursed", "Scheme In rolledback", "SchemeOut Reconciled", "Scheme Out to Wallet",
|
| 174 |
"Scheme Out Disbursed", "Scheme Out Rolledback"), rows);
|
174 |
"Scheme Out Disbursed", "Scheme Out Rolledback"), rows);
|
| 175 |
|
175 |
|
| 176 |
Utils.sendMailWithAttachment(mailSender,
|
176 |
Utils.sendMailWithAttachment(gmailRelaySender,
|
| 177 |
new String[]{"amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com"}, new String[]{},
|
177 |
new String[]{"amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com"}, new String[]{},
|
| 178 |
reconciled ? "Reconciled Successfully" : "Reconciliation failed", "Report attached",
|
178 |
reconciled ? "Reconciled Successfully" : "Reconciliation failed", "Report attached",
|
| 179 |
String.format("reconciliation-%s.csv", FormattingUtils.formatDate(yesterday.atStartOfDay())),
|
179 |
String.format("reconciliation-%s.csv", FormattingUtils.formatDate(yesterday.atStartOfDay())),
|
| 180 |
new ByteArrayResource(baos.toByteArray()));
|
180 |
new ByteArrayResource(baos.toByteArray()));
|
| 181 |
}
|
181 |
}
|