| 23756 |
amit.gupta |
1 |
package com.smartdukaan.cron.scheduled;
|
|
|
2 |
|
| 30049 |
amit.gupta |
3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
|
|
4 |
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
|
|
|
5 |
import com.smartdukaan.cron.properties.WriteToPropertiesFile;
|
| 34948 |
ranu |
6 |
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
|
| 30049 |
amit.gupta |
7 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 32832 |
amit.gupta |
8 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
| 32907 |
amit.gupta |
9 |
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
|
| 34443 |
vikas.jang |
10 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 34241 |
tejus.loha |
11 |
import com.spice.profitmandi.dao.service.PurSaleService;
|
| 23756 |
amit.gupta |
12 |
import org.apache.logging.log4j.LogManager;
|
|
|
13 |
import org.apache.logging.log4j.Logger;
|
|
|
14 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
15 |
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
16 |
import org.springframework.stereotype.Component;
|
|
|
17 |
|
| 30049 |
amit.gupta |
18 |
import java.time.LocalDate;
|
|
|
19 |
import java.time.LocalDateTime;
|
| 34756 |
amit.gupta |
20 |
import java.time.LocalTime;
|
| 30049 |
amit.gupta |
21 |
import java.util.Date;
|
|
|
22 |
import java.util.LinkedHashMap;
|
| 23756 |
amit.gupta |
23 |
|
|
|
24 |
@Component
|
| 30887 |
amit.gupta |
25 |
//@ConditionalOnProperty(name = "scheduled", havingValue = "true", matchIfMissing = true)
|
| 23756 |
amit.gupta |
26 |
public class ScheduledSkeleton {
|
| 23794 |
govind |
27 |
|
| 32048 |
tejbeer |
28 |
private static final Logger log = LogManager.getLogger(ScheduledSkeleton.class);
|
| 23756 |
amit.gupta |
29 |
|
| 32048 |
tejbeer |
30 |
@Autowired
|
|
|
31 |
private ScheduledTasks scheduledTasks;
|
| 28205 |
tejbeer |
32 |
|
| 32048 |
tejbeer |
33 |
@Autowired
|
| 36361 |
amit |
34 |
private BatchScheduledTasks batchScheduledTasks;
|
|
|
35 |
|
|
|
36 |
@Autowired
|
| 34321 |
ranu |
37 |
private ScheduledTasksTest scheduledTasksTest;
|
|
|
38 |
|
|
|
39 |
@Autowired
|
| 34948 |
ranu |
40 |
private AbmReportSender abmReportSender;
|
|
|
41 |
|
|
|
42 |
@Autowired
|
| 32048 |
tejbeer |
43 |
private LeadSyncRunner leadSyncRunner;
|
| 24841 |
govind |
44 |
|
| 32048 |
tejbeer |
45 |
@Autowired
|
|
|
46 |
private Reconciliation reconciliation;
|
| 25822 |
amit.gupta |
47 |
|
| 32048 |
tejbeer |
48 |
@Autowired
|
|
|
49 |
private RunOnceTasks runOnceTasks;
|
| 23756 |
amit.gupta |
50 |
|
| 32048 |
tejbeer |
51 |
@Autowired
|
|
|
52 |
NagiosMonitorTasks nagiosMonitorTasks;
|
| 24188 |
govind |
53 |
|
| 32048 |
tejbeer |
54 |
@Autowired
|
|
|
55 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
| 24841 |
govind |
56 |
|
| 32048 |
tejbeer |
57 |
@Autowired
|
|
|
58 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
| 28921 |
tejbeer |
59 |
|
| 32048 |
tejbeer |
60 |
@Autowired
|
|
|
61 |
private WriteToPropertiesFile writeToPropertiesFile;
|
| 29673 |
manish |
62 |
|
| 32048 |
tejbeer |
63 |
String nagiosCronPropertiesFile = "/var/log/services/nagios-Cron-Monitoring.properties";
|
| 29757 |
tejbeer |
64 |
|
| 32048 |
tejbeer |
65 |
@Scheduled(cron = "0 0 2 * * *")
|
|
|
66 |
public void processDailySchemes() throws Exception {
|
| 29757 |
tejbeer |
67 |
|
| 32048 |
tejbeer |
68 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
69 |
propertiesDetails.put("processDailySchemes", "0");
|
| 29673 |
manish |
70 |
|
| 32048 |
tejbeer |
71 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
72 |
int maxMinusDays = 5;
|
|
|
73 |
int currentDayOfMonth = LocalDate.now().getDayOfMonth();
|
|
|
74 |
int minusDays = currentDayOfMonth > maxMinusDays ? maxMinusDays : currentDayOfMonth - 1;
|
|
|
75 |
if (minusDays > 0) {
|
|
|
76 |
scheduledTasks.processScheme(LocalDateTime.now().minusDays(minusDays), LocalDateTime.now(), false);
|
|
|
77 |
}
|
|
|
78 |
propertiesDetails.put("processDailySchemes", "1");
|
|
|
79 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
80 |
|
| 32048 |
tejbeer |
81 |
}
|
| 24841 |
govind |
82 |
|
| 32048 |
tejbeer |
83 |
@Scheduled(cron = "0 15 0 * * *")
|
|
|
84 |
public void runOnceTasks() throws Exception {
|
| 29757 |
tejbeer |
85 |
|
| 32048 |
tejbeer |
86 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
87 |
propertiesDetails.put("runOnceTasks", "0");
|
| 29673 |
manish |
88 |
|
| 32048 |
tejbeer |
89 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
90 |
|
| 32048 |
tejbeer |
91 |
scheduledTasks.reconcileRecharge();
|
| 29757 |
tejbeer |
92 |
|
| 32048 |
tejbeer |
93 |
propertiesDetails.put("runOnceTasks", "1");
|
|
|
94 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
95 |
}
|
| 25822 |
amit.gupta |
96 |
|
| 32048 |
tejbeer |
97 |
/*
|
|
|
98 |
* @Scheduled(cron = "0 0 8 * * *") public void mailDashboardScreenshots()
|
|
|
99 |
* throws Exception { runOnceTasks.mailDashboardScreenshots(); }
|
|
|
100 |
*/
|
| 25721 |
tejbeer |
101 |
|
| 32048 |
tejbeer |
102 |
@Scheduled(cron = "0 05 0 1,16 * ?")
|
|
|
103 |
public void processRechargeCashback() throws Throwable {
|
| 29673 |
manish |
104 |
|
| 32048 |
tejbeer |
105 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
106 |
propertiesDetails.put("processRechargeCashback", "0");
|
| 29673 |
manish |
107 |
|
| 32048 |
tejbeer |
108 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
109 |
scheduledTasks.processRechargeCashback();
|
| 29673 |
manish |
110 |
|
| 32048 |
tejbeer |
111 |
propertiesDetails.put("processRechargeCashback", "1");
|
|
|
112 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
113 |
|
| 32048 |
tejbeer |
114 |
}
|
| 23794 |
govind |
115 |
|
| 32048 |
tejbeer |
116 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
117 |
public void sendPartnerInvestmentDetails() throws Exception {
|
|
|
118 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
119 |
propertiesDetails.put("sendPartnerInvestmentDetails", "0");
|
|
|
120 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
121 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
122 |
long secs = (new Date().getTime()) / 1000;
|
|
|
123 |
log.info("sendPartnerInvestmentDetails" + LocalDateTime.now());
|
| 29757 |
tejbeer |
124 |
|
| 32048 |
tejbeer |
125 |
propertiesDetails.put("investmentDate", Long.toString(secs));
|
|
|
126 |
propertiesDetails.put("sendPartnerInvestmentDetails", "1");
|
|
|
127 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
128 |
|
| 32048 |
tejbeer |
129 |
}
|
| 28921 |
tejbeer |
130 |
|
| 34725 |
ranu |
131 |
@Scheduled(cron = "0 30 6 * * *")
|
| 34648 |
ranu |
132 |
public void generateBiReport() throws Exception {
|
|
|
133 |
scheduledTasksTest.generateBiReport();
|
|
|
134 |
}
|
| 34939 |
ranu |
135 |
@Scheduled(cron = "0 30 4 * * *")
|
|
|
136 |
public void createFofoSmartCartSuggestion() throws Exception {
|
|
|
137 |
scheduledTasksTest.createFofoSmartCartSuggestion();
|
|
|
138 |
}
|
| 35980 |
amit |
139 |
/*@Scheduled(cron = "0 0 6,22 * * *")
|
| 34948 |
ranu |
140 |
public void sendAbmSmartCartReport() throws Exception {
|
|
|
141 |
abmReportSender.sendAbmSmartCartReport();
|
| 35980 |
amit |
142 |
}*/
|
| 34648 |
ranu |
143 |
|
| 32048 |
tejbeer |
144 |
@Scheduled(cron = "0 0 10,15,17 * * *")
|
|
|
145 |
public void sendIndentTertiaryReport() throws Exception {
|
| 29757 |
tejbeer |
146 |
|
| 32048 |
tejbeer |
147 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
148 |
propertiesDetails.put("sendIndentTertiaryReport", "0");
|
| 29673 |
manish |
149 |
|
| 32048 |
tejbeer |
150 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
151 |
|
| 32048 |
tejbeer |
152 |
scheduledTasks.sendIndentTertiary();
|
| 29757 |
tejbeer |
153 |
|
| 32048 |
tejbeer |
154 |
propertiesDetails.put("sendIndentTertiaryReport", "1");
|
|
|
155 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
156 |
|
| 32048 |
tejbeer |
157 |
}
|
| 28921 |
tejbeer |
158 |
|
| 32048 |
tejbeer |
159 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
160 |
public void checkPartnerActiveStoreByStatus() throws Exception {
|
|
|
161 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
162 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
|
| 29673 |
manish |
163 |
|
| 32048 |
tejbeer |
164 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
165 |
|
| 32048 |
tejbeer |
166 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
167 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
|
|
|
168 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
169 |
|
| 32048 |
tejbeer |
170 |
}
|
| 26790 |
tejbeer |
171 |
|
| 32048 |
tejbeer |
172 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
173 |
public void sendStockAgeingReport() throws Throwable {
|
| 29757 |
tejbeer |
174 |
|
| 32048 |
tejbeer |
175 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
176 |
propertiesDetails.put("sendStockAgeingReport", "0");
|
| 29673 |
manish |
177 |
|
| 32048 |
tejbeer |
178 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
179 |
|
| 32048 |
tejbeer |
180 |
scheduledTasks.sendAgeingReport();
|
| 29757 |
tejbeer |
181 |
|
| 32048 |
tejbeer |
182 |
propertiesDetails.put("sendStockAgeingReport", "1");
|
|
|
183 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
184 |
|
| 32048 |
tejbeer |
185 |
}
|
| 24131 |
govind |
186 |
|
| 32048 |
tejbeer |
187 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
188 |
public void escalateTicket() throws Exception {
|
|
|
189 |
log.info("escalate ticket");
|
|
|
190 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
191 |
propertiesDetails.put("escalateTicket", "0");
|
|
|
192 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
193 |
ticketRelatedScheduledTask.escalateTicket();
|
| 29757 |
tejbeer |
194 |
|
| 32048 |
tejbeer |
195 |
propertiesDetails.put("escalateTicket", "1");
|
|
|
196 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
197 |
|
| 32048 |
tejbeer |
198 |
}
|
| 24841 |
govind |
199 |
|
| 32048 |
tejbeer |
200 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
201 |
public void alertTicketToUser() throws Exception {
|
|
|
202 |
log.info("alert for ticket");
|
|
|
203 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
204 |
propertiesDetails.put("alertTicketToUser", "0");
|
|
|
205 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
206 |
|
| 32048 |
tejbeer |
207 |
ticketRelatedScheduledTask.alertforTicket();
|
|
|
208 |
propertiesDetails.put("alertTicketToUser", "1");
|
|
|
209 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
210 |
|
| 32048 |
tejbeer |
211 |
}
|
| 24841 |
govind |
212 |
|
| 34904 |
ranu |
213 |
//@Scheduled(cron = "0 0 14,18,23 ? * *")
|
| 32048 |
tejbeer |
214 |
public void dailySaleNotification() throws Exception {
|
|
|
215 |
log.info("daily send Notification");
|
|
|
216 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
217 |
propertiesDetails.put("dailySaleNotification", "0");
|
|
|
218 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
219 |
|
| 32048 |
tejbeer |
220 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
| 29757 |
tejbeer |
221 |
|
| 32048 |
tejbeer |
222 |
propertiesDetails.put("dailySaleNotification", "1");
|
|
|
223 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
224 |
|
| 32048 |
tejbeer |
225 |
}
|
| 24841 |
govind |
226 |
|
| 32048 |
tejbeer |
227 |
/*
|
|
|
228 |
* @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
|
|
|
229 |
* Exception { reconciliation.dailyReconciliation(); }
|
|
|
230 |
*/
|
| 28205 |
tejbeer |
231 |
|
| 32048 |
tejbeer |
232 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
233 |
public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
|
|
|
234 |
log.info("selectFinServiceFollowUpDateByCurrDate");
|
|
|
235 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
| 30049 |
amit.gupta |
236 |
|
| 32048 |
tejbeer |
237 |
}
|
| 30049 |
amit.gupta |
238 |
|
| 32165 |
amit.gupta |
239 |
@Scheduled(cron = "0 0 4 * * *")
|
| 32048 |
tejbeer |
240 |
public void processActivation() throws Exception {
|
| 29757 |
tejbeer |
241 |
|
| 32048 |
tejbeer |
242 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
243 |
propertiesDetails.put("processActivation", "0");
|
|
|
244 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
245 |
|
| 32048 |
tejbeer |
246 |
scheduledTasks.processActivation();
|
| 29757 |
tejbeer |
247 |
|
| 32048 |
tejbeer |
248 |
propertiesDetails.put("processActivation", "1");
|
|
|
249 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
250 |
|
| 32048 |
tejbeer |
251 |
}
|
| 25721 |
tejbeer |
252 |
|
| 32048 |
tejbeer |
253 |
// TODO: Change it back to first of every month
|
|
|
254 |
// @Scheduled(cron = "0 0 1 1 * *")
|
|
|
255 |
@Scheduled(cron = "0 0 1 2 * *")
|
|
|
256 |
public void rollOutUpgardedMargins() throws Exception {
|
| 35522 |
amit |
257 |
scheduledTasks.rollOutUpgardedMarginsNextMonth(null);
|
| 30788 |
amit.gupta |
258 |
|
| 32048 |
tejbeer |
259 |
}
|
| 30788 |
amit.gupta |
260 |
|
| 34241 |
tejus.loha |
261 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 32048 |
tejbeer |
262 |
public void sendNotification() throws Throwable {
|
| 29757 |
tejbeer |
263 |
|
| 32048 |
tejbeer |
264 |
log.info("send Notification");
|
|
|
265 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
266 |
propertiesDetails.put("sendNotification", "0");
|
|
|
267 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
268 |
|
| 32048 |
tejbeer |
269 |
scheduledTasks.sendNotification();
|
|
|
270 |
propertiesDetails.put("sendNotification", "1");
|
|
|
271 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
272 |
log.info("send Notification Done");
|
| 29673 |
manish |
273 |
|
| 32048 |
tejbeer |
274 |
}
|
| 28205 |
tejbeer |
275 |
|
| 34669 |
amit.gupta |
276 |
//@Scheduled(cron = "0 */15 * * * *")
|
| 32048 |
tejbeer |
277 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
| 29757 |
tejbeer |
278 |
|
| 32048 |
tejbeer |
279 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
280 |
propertiesDetails.put("checkRazorPayPaymentStatus", "0");
|
|
|
281 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
282 |
|
| 32048 |
tejbeer |
283 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
284 |
propertiesDetails.put("checkRazorPayPaymentStatus", "1");
|
|
|
285 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
286 |
|
| 32048 |
tejbeer |
287 |
}
|
| 28377 |
tejbeer |
288 |
|
| 36292 |
amit |
289 |
@Scheduled(fixedDelay = 5 * 1000)
|
| 33426 |
amit.gupta |
290 |
//@Scheduled(cron = "0 5 23 * * *")
|
| 32048 |
tejbeer |
291 |
public void updateIrnsToInvoices() throws Throwable {
|
|
|
292 |
runOnceTasks.updateIrnsToInvoices();
|
|
|
293 |
}
|
| 31612 |
tejbeer |
294 |
|
| 32048 |
tejbeer |
295 |
// No longer needed
|
|
|
296 |
// @Scheduled(cron = "0 */10 * * * *")
|
|
|
297 |
public void attachToffeeInvoices() throws Throwable {
|
| 29757 |
tejbeer |
298 |
|
| 32048 |
tejbeer |
299 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
300 |
propertiesDetails.put("attachToffeeInvoices", "0");
|
|
|
301 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
302 |
|
| 32048 |
tejbeer |
303 |
scheduledTasks.attachToffeeInvoices();
|
| 29757 |
tejbeer |
304 |
|
| 32048 |
tejbeer |
305 |
propertiesDetails.put("attachToffeeInvoices", "1");
|
|
|
306 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
307 |
|
| 32048 |
tejbeer |
308 |
}
|
| 24841 |
govind |
309 |
|
| 35568 |
amit |
310 |
// REMOVED: ticketClosed() scheduler - now handled by TicketRelatedScheduledTask.autoCloseResolvedTickets()
|
|
|
311 |
// which uses 8 working days instead of 7 calendar days and runs as part of processAllTicketTasks()
|
| 26283 |
tejbeer |
312 |
|
| 32048 |
tejbeer |
313 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
314 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
315 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
316 |
|
| 32048 |
tejbeer |
317 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
318 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
|
|
|
319 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
320 |
|
| 32048 |
tejbeer |
321 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
322 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
|
|
|
323 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 25721 |
tejbeer |
324 |
|
| 32048 |
tejbeer |
325 |
log.info("endTime" + LocalDateTime.now());
|
|
|
326 |
}
|
| 28205 |
tejbeer |
327 |
|
| 32048 |
tejbeer |
328 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
|
|
329 |
public void notifyLead() throws Throwable {
|
| 29757 |
tejbeer |
330 |
|
| 32048 |
tejbeer |
331 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
332 |
propertiesDetails.put("notifyLead", "0");
|
|
|
333 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
334 |
|
| 32048 |
tejbeer |
335 |
scheduledTasks.notifyLead();
|
| 29757 |
tejbeer |
336 |
|
| 32048 |
tejbeer |
337 |
propertiesDetails.put("notifyLead", "1");
|
|
|
338 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
339 |
|
| 32048 |
tejbeer |
340 |
// scheduledTasks.notifyVisits();
|
|
|
341 |
}
|
| 25721 |
tejbeer |
342 |
|
| 32048 |
tejbeer |
343 |
// No longer scheduled
|
|
|
344 |
// @Scheduled(cron = "0 0 1 * * *")
|
|
|
345 |
public void fetchImeiActivation() throws Throwable {
|
|
|
346 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
347 |
propertiesDetails.put("fetchImeiActivation", "0");
|
|
|
348 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
349 |
|
| 32048 |
tejbeer |
350 |
runOnceTasks.fetchImeiActivation(0);
|
| 29757 |
tejbeer |
351 |
|
| 32048 |
tejbeer |
352 |
propertiesDetails.put("fetchImeiActivation", "1");
|
|
|
353 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
354 |
|
| 32048 |
tejbeer |
355 |
}
|
| 26790 |
tejbeer |
356 |
|
| 32411 |
amit.gupta |
357 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
358 |
//Send all lead owners the report for scheduled followups missed
|
|
|
359 |
public void sendUnscheduledFollowUpMail() throws Exception {
|
|
|
360 |
scheduledTasks.sendUnscheduledFollowUpMail();
|
|
|
361 |
}
|
|
|
362 |
|
| 32048 |
tejbeer |
363 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
364 |
public void checkValidateReferral() throws Throwable {
|
|
|
365 |
log.info("startTime" + LocalDateTime.now());
|
|
|
366 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
367 |
propertiesDetails.put("checkValidateReferral", "0");
|
|
|
368 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
369 |
|
| 32048 |
tejbeer |
370 |
scheduledTasks.checkValidateReferral();
|
| 29757 |
tejbeer |
371 |
|
| 32048 |
tejbeer |
372 |
propertiesDetails.put("checkValidateReferral", "1");
|
|
|
373 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26790 |
tejbeer |
374 |
|
| 32048 |
tejbeer |
375 |
log.info("endTime" + LocalDateTime.now());
|
|
|
376 |
}
|
| 26790 |
tejbeer |
377 |
|
| 32048 |
tejbeer |
378 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
379 |
public void partnerProblemAlert() throws Throwable {
|
|
|
380 |
log.info("startTime" + LocalDateTime.now());
|
|
|
381 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
382 |
propertiesDetails.put("partnerProblemAlert", "0");
|
|
|
383 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
384 |
|
| 32048 |
tejbeer |
385 |
scheduledTasks.partnerProblemAlert();
|
|
|
386 |
propertiesDetails.put("partnerProblemAlert", "1");
|
|
|
387 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
388 |
|
| 32048 |
tejbeer |
389 |
log.info("endTime" + LocalDateTime.now());
|
|
|
390 |
}
|
| 28921 |
tejbeer |
391 |
|
| 32048 |
tejbeer |
392 |
/*
|
|
|
393 |
* @Scheduled(cron = "0 30 10 * * MON-SAT") public void
|
|
|
394 |
* sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
395 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
396 |
* LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
|
|
|
397 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
398 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
399 |
*
|
| 32048 |
tejbeer |
400 |
* scheduledTasks.sendAttendanceMorningAlert();
|
|
|
401 |
* propertiesDetails.put("sendMorningAttendanceAlert", "1");
|
|
|
402 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
403 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
404 |
*
|
| 32048 |
tejbeer |
405 |
* log.info("endTime" + LocalDateTime.now()); }
|
| 32507 |
amit.gupta |
406 |
*
|
| 32048 |
tejbeer |
407 |
* @Scheduled(cron = "0 30 20 * * MON-SAT") public void
|
|
|
408 |
* sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
409 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
410 |
* LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
|
|
|
411 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
412 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
413 |
*
|
| 32048 |
tejbeer |
414 |
* scheduledTasks.sendAttendanceEveningAlert();
|
|
|
415 |
* propertiesDetails.put("sendEveningAttendanceAlert", "1");
|
|
|
416 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
417 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
418 |
*
|
| 32048 |
tejbeer |
419 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
420 |
*/
|
| 29673 |
manish |
421 |
|
| 35109 |
ranu |
422 |
@Scheduled(cron = "0 0 10 * * *")
|
| 32048 |
tejbeer |
423 |
public void onboardingEventDelays() throws Throwable {
|
|
|
424 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
425 |
|
| 32048 |
tejbeer |
426 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
427 |
propertiesDetails.put("onboardingEventDelays", "0");
|
|
|
428 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
429 |
|
| 32048 |
tejbeer |
430 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
| 29757 |
tejbeer |
431 |
|
| 32048 |
tejbeer |
432 |
propertiesDetails.put("onboardingEventDelays", "1");
|
|
|
433 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
434 |
|
| 32048 |
tejbeer |
435 |
log.info("endTime" + LocalDateTime.now());
|
|
|
436 |
}
|
| 28921 |
tejbeer |
437 |
|
| 36065 |
aman |
438 |
@Scheduled(cron = "0 30 10 * * *")
|
|
|
439 |
public void sendStockDeliveredTrainingNotification() {
|
|
|
440 |
log.info("sendStockDeliveredTrainingNotification startTime " + LocalDateTime.now());
|
|
|
441 |
onBoardingRelatedSchelduleTask.sendStockDeliveredTrainingNotification();
|
|
|
442 |
log.info("sendStockDeliveredTrainingNotification endTime " + LocalDateTime.now());
|
|
|
443 |
}
|
|
|
444 |
|
| 36003 |
aman |
445 |
@Scheduled(cron = "0 0 9 * * ?")
|
|
|
446 |
public void sendDelayAlertEmail() {
|
|
|
447 |
log.info("sendDelayAlertEmail startTime " + LocalDateTime.now());
|
|
|
448 |
onBoardingRelatedSchelduleTask.sendDelayAlertEmail();
|
|
|
449 |
log.info("sendDelayAlertEmail endTime " + LocalDateTime.now());
|
|
|
450 |
}
|
|
|
451 |
|
| 32048 |
tejbeer |
452 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
453 |
public void brandingAlert() throws Throwable {
|
|
|
454 |
log.info("startTime" + LocalDateTime.now());
|
|
|
455 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
456 |
propertiesDetails.put("brandingAlert", "0");
|
|
|
457 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
458 |
|
| 32048 |
tejbeer |
459 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
460 |
propertiesDetails.put("brandingAlert", "1");
|
|
|
461 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
462 |
|
| 32048 |
tejbeer |
463 |
log.info("endTime" + LocalDateTime.now());
|
|
|
464 |
}
|
| 28921 |
tejbeer |
465 |
|
| 33859 |
tejus.loha |
466 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
467 |
// public void advancePaymentPendingAlert() throws Throwable {
|
|
|
468 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
469 |
//
|
|
|
470 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
471 |
// propertiesDetails.put("advancePaymentPendingAlert", "0");
|
|
|
472 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
473 |
//
|
|
|
474 |
// onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
475 |
// propertiesDetails.put("advancePaymentPendingAlert", "1");
|
|
|
476 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
477 |
//
|
|
|
478 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
479 |
// }
|
| 29757 |
tejbeer |
480 |
|
| 32048 |
tejbeer |
481 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
482 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
483 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
484 |
|
| 32048 |
tejbeer |
485 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
486 |
propertiesDetails.put("fullPaymentPendingAlert", "0");
|
|
|
487 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
488 |
|
| 32048 |
tejbeer |
489 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
| 29757 |
tejbeer |
490 |
|
| 32048 |
tejbeer |
491 |
propertiesDetails.put("fullPaymentPendingAlert", "1");
|
|
|
492 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
493 |
|
| 32048 |
tejbeer |
494 |
log.info("endTime" + LocalDateTime.now());
|
|
|
495 |
}
|
| 28921 |
tejbeer |
496 |
|
| 33859 |
tejus.loha |
497 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
498 |
// public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
499 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
500 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
501 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
|
|
|
502 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
503 |
//
|
|
|
504 |
//// onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
505 |
//
|
|
|
506 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
|
|
|
507 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
508 |
//
|
|
|
509 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
510 |
// }
|
| 29673 |
manish |
511 |
|
| 32048 |
tejbeer |
512 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
513 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
514 |
log.info("startTime" + LocalDateTime.now());
|
|
|
515 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
516 |
propertiesDetails.put("onBoardingCompleteEventEmail", "0");
|
|
|
517 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
518 |
|
| 32048 |
tejbeer |
519 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
520 |
propertiesDetails.put("onBoardingCompleteEventEmail", "1");
|
|
|
521 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
522 |
|
| 32048 |
tejbeer |
523 |
log.info("endTime" + LocalDateTime.now());
|
|
|
524 |
}
|
| 29040 |
tejbeer |
525 |
|
| 32048 |
tejbeer |
526 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
527 |
public void updateSaholicCISTable() throws Throwable {
|
|
|
528 |
log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
|
|
|
529 |
runOnceTasks.updateSaholicCISTable();
|
|
|
530 |
log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
|
|
|
531 |
}
|
| 30667 |
amit.gupta |
532 |
|
| 34241 |
tejus.loha |
533 |
@Autowired
|
|
|
534 |
PurSaleService purSaleService;
|
|
|
535 |
|
| 35133 |
ranu |
536 |
@Scheduled(cron = "0 0 6,22 * * ?")
|
| 34241 |
tejus.loha |
537 |
public void send10DaysEgedStockReport() throws Throwable {
|
| 34275 |
tejus.loha |
538 |
log.info("moreThen10DaysEgedStockReport startTime" + LocalDateTime.now());
|
|
|
539 |
scheduledTasks.send10OrMoreOlderStockReport();
|
|
|
540 |
log.info("moreThen10DaysEgedStockReport endTime" + LocalDateTime.now());
|
| 34241 |
tejus.loha |
541 |
}
|
|
|
542 |
|
| 35616 |
amit |
543 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 32048 |
tejbeer |
544 |
public void fetchPartnerStat() throws Throwable {
|
|
|
545 |
scheduledTasks.fetchParnterStats();
|
|
|
546 |
}
|
| 30390 |
amit.gupta |
547 |
|
| 33859 |
tejus.loha |
548 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
549 |
// public void storeTimelinePromoterPending() throws Throwable {
|
|
|
550 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
551 |
//
|
|
|
552 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
553 |
// propertiesDetails.put("storeTimelinePromoterPending", "0");
|
|
|
554 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
555 |
//
|
|
|
556 |
//// onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
557 |
// propertiesDetails.put("storeTimelinePromoterPending", "1");
|
|
|
558 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
559 |
//
|
|
|
560 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
561 |
// }
|
| 29757 |
tejbeer |
562 |
|
| 34669 |
amit.gupta |
563 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32214 |
jai.hind |
564 |
public void checkItelImeiActivationNew() throws Throwable {
|
|
|
565 |
log.info("startTime" + LocalDate.now());
|
|
|
566 |
|
|
|
567 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
568 |
propertiesDetails.put("checkItelImeiActivationNew", "0");
|
|
|
569 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
570 |
log.info("startTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
571 |
scheduledTasks.checkItelImeiActivationNew(LocalDate.now(), 90);
|
|
|
572 |
long secs = (new Date().getTime()) / 1000;
|
|
|
573 |
log.info("endTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
574 |
propertiesDetails.put("checkItelImeiActivationNew", "1");
|
|
|
575 |
propertiesDetails.put("itelDate", Long.toString(secs));
|
|
|
576 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
577 |
|
|
|
578 |
}
|
|
|
579 |
|
|
|
580 |
|
| 36292 |
amit |
581 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 32048 |
tejbeer |
582 |
public void vivoImeiActivation() throws Throwable {
|
|
|
583 |
log.info("startTimevivoImeiActivation" + LocalDateTime.now());
|
| 29757 |
tejbeer |
584 |
|
| 32048 |
tejbeer |
585 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
586 |
propertiesDetails.put("vivoImeiActivation", "0");
|
|
|
587 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
588 |
|
| 32048 |
tejbeer |
589 |
scheduledTasks.checkImeiActivation();
|
|
|
590 |
long secs = (new Date().getTime()) / 1000;
|
|
|
591 |
log.info("endTimevivoImeiActivation" + LocalDateTime.now());
|
|
|
592 |
propertiesDetails.put("vivoImeiActivation", "1");
|
| 29757 |
tejbeer |
593 |
|
| 32048 |
tejbeer |
594 |
propertiesDetails.put("vivoDate", Long.toString(secs));
|
|
|
595 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
596 |
|
| 32048 |
tejbeer |
597 |
}
|
| 29255 |
tejbeer |
598 |
|
| 36292 |
amit |
599 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 36253 |
amit |
600 |
public void vivoImeiActivationTertiary() throws Throwable {
|
|
|
601 |
log.info("startTimevivoImeiActivationTertiary" + LocalDateTime.now());
|
|
|
602 |
|
|
|
603 |
scheduledTasks.checkImeiActivationTertiary();
|
|
|
604 |
|
|
|
605 |
log.info("endTimevivoImeiActivationTertiary" + LocalDateTime.now());
|
|
|
606 |
}
|
|
|
607 |
|
| 32048 |
tejbeer |
608 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
609 |
public void reviewUncontactablePartner() throws Throwable {
|
|
|
610 |
log.info("startTime" + LocalDateTime.now());
|
| 30421 |
tejbeer |
611 |
|
| 32048 |
tejbeer |
612 |
scheduledTasks.reviewUncontactablePartner();
|
| 30421 |
tejbeer |
613 |
|
| 32048 |
tejbeer |
614 |
}
|
| 30421 |
tejbeer |
615 |
|
| 33928 |
ranu |
616 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
617 |
public void setMovementWiseRbmTodayTargets() throws Throwable {
|
| 34669 |
amit.gupta |
618 |
log.info("today targets startTime {}", LocalDateTime.now());
|
| 33928 |
ranu |
619 |
|
|
|
620 |
scheduledTasks.persistRbmTodayTargets();
|
|
|
621 |
|
|
|
622 |
}
|
|
|
623 |
|
| 33986 |
ranu |
624 |
@Scheduled(cron = "0 0 21 * * *")
|
|
|
625 |
public void setMovementWiseRbmTodayAchievements() throws Throwable {
|
| 34669 |
amit.gupta |
626 |
log.info("today achievement startTime {}", LocalDateTime.now());
|
| 33986 |
ranu |
627 |
|
|
|
628 |
scheduledTasks.persistRbmTodayAchievements();
|
|
|
629 |
|
|
|
630 |
}
|
|
|
631 |
|
| 33078 |
ranu |
632 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
633 |
public void reviewNonSdBuyingBrand() throws Throwable {
|
|
|
634 |
log.info("startTime" + LocalDateTime.now());
|
|
|
635 |
|
|
|
636 |
scheduledTasks.reviewNonSdBuyingBrand();
|
|
|
637 |
|
|
|
638 |
}
|
|
|
639 |
|
| 32048 |
tejbeer |
640 |
@Autowired
|
|
|
641 |
private StandAlone standAlone;
|
| 30352 |
amit.gupta |
642 |
|
| 32832 |
amit.gupta |
643 |
@Autowired
|
|
|
644 |
OrderTrackingService orderTrackingService;
|
|
|
645 |
|
| 36292 |
amit |
646 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 32048 |
tejbeer |
647 |
public void oppo() throws Throwable {
|
|
|
648 |
standAlone.checkOppoImeiStatus();
|
|
|
649 |
}
|
| 30352 |
amit.gupta |
650 |
|
| 36292 |
amit |
651 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 36253 |
amit |
652 |
public void oppoTertiary() throws Throwable {
|
|
|
653 |
standAlone.checkOppoImeiStatusTertiary();
|
|
|
654 |
}
|
|
|
655 |
|
| 36292 |
amit |
656 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 34421 |
amit.gupta |
657 |
public void realme() throws Throwable {
|
|
|
658 |
standAlone.checkRealmeImeiStatus();
|
|
|
659 |
}
|
|
|
660 |
|
| 36292 |
amit |
661 |
@Scheduled(fixedDelay = 5 * 60 * 1000)
|
| 36253 |
amit |
662 |
public void realmeTertiary() throws Throwable {
|
|
|
663 |
standAlone.checkRealmeImeiStatusTertiary();
|
|
|
664 |
}
|
|
|
665 |
|
| 32801 |
amit.gupta |
666 |
@Scheduled(cron = "0 0 * * * *")
|
| 32048 |
tejbeer |
667 |
public void markBlueDartOrderDelivered() throws Throwable {
|
|
|
668 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
669 |
orderTrackingService.markBlueDartOrderDelivered();
|
| 32048 |
tejbeer |
670 |
log.info("endTime" + LocalDateTime.now());
|
|
|
671 |
}
|
| 31117 |
tejbeer |
672 |
|
| 32881 |
amit.gupta |
673 |
@Scheduled(cron = "0 15 * * * *")
|
| 32048 |
tejbeer |
674 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
|
|
675 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
676 |
propertiesDetails.put("markDelhiveryOrderDelivered", "0");
|
|
|
677 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
678 |
|
| 32048 |
tejbeer |
679 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
680 |
orderTrackingService.markDelhiveryOrderDelivered();
|
| 32048 |
tejbeer |
681 |
propertiesDetails.put("markDelhiveryOrderDelivered", "1");
|
|
|
682 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
683 |
|
| 32048 |
tejbeer |
684 |
log.info("endTime" + LocalDateTime.now());
|
|
|
685 |
}
|
| 29308 |
tejbeer |
686 |
|
| 32048 |
tejbeer |
687 |
@Scheduled(cron = "0 0 4 * * *")
|
|
|
688 |
public void processPriceDrop() throws Throwable {
|
|
|
689 |
scheduledTasks.processPriceDrop();
|
|
|
690 |
}
|
| 30637 |
amit.gupta |
691 |
|
| 32048 |
tejbeer |
692 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
693 |
public void calculateInterestAccured() throws Throwable {
|
| 34710 |
amit.gupta |
694 |
scheduledTasks.loanSettlement();
|
| 32048 |
tejbeer |
695 |
scheduledTasks.calculateInterestAccured();
|
|
|
696 |
}
|
| 30859 |
tejbeer |
697 |
|
| 32117 |
tejbeer |
698 |
// @Scheduled(cron = "0 */5 2-22 * * *")
|
| 33181 |
amit.gupta |
699 |
@Scheduled(fixedDelay = 1 * 60 * 1000)
|
| 32531 |
amit.gupta |
700 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32048 |
tejbeer |
701 |
public void loanSettlement() throws Throwable {
|
| 34756 |
amit.gupta |
702 |
LocalTime now = LocalTime.now();
|
| 34767 |
amit.gupta |
703 |
LocalTime start = LocalTime.of(9, 0);
|
| 34757 |
amit.gupta |
704 |
LocalTime end = LocalTime.of(23, 0);
|
| 34756 |
amit.gupta |
705 |
|
|
|
706 |
if (now.isBefore(start) || now.isAfter(end)) {
|
| 34762 |
amit.gupta |
707 |
System.out.println("Task skipped during restricted hours: " + now);
|
|
|
708 |
} else {
|
| 34756 |
amit.gupta |
709 |
scheduledTasks.loanSettlement();
|
|
|
710 |
System.out.println("Task executed at " + now);
|
|
|
711 |
}
|
| 32048 |
tejbeer |
712 |
}
|
| 30859 |
tejbeer |
713 |
|
| 32048 |
tejbeer |
714 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
715 |
public void ccAvenueSettlement() throws Throwable {
|
|
|
716 |
scheduledTasks.settleCCAvePayments();
|
|
|
717 |
}
|
| 31332 |
amit.gupta |
718 |
|
| 32048 |
tejbeer |
719 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
720 |
public void dailyLoanAlert() throws Throwable {
|
|
|
721 |
scheduledTasks.dailyLoanAlert();
|
|
|
722 |
}
|
| 30896 |
amit.gupta |
723 |
|
| 35106 |
ranu |
724 |
@Scheduled(cron = "0 0 11 * * *")
|
| 34162 |
ranu |
725 |
public void groupHidCatalogsByWeeks() throws Throwable {
|
|
|
726 |
scheduledTasks.groupHidCatalogsByWeeks();
|
|
|
727 |
}
|
|
|
728 |
|
| 36113 |
ranu |
729 |
@Scheduled(cron = "0 0 9 * * MON") // Every Monday at 9:00 AM
|
| 34321 |
ranu |
730 |
public void sendFeebackSalesAndRbm() throws Throwable {
|
|
|
731 |
scheduledTasksTest.sendRbmFeedbackSummaryEmail();
|
|
|
732 |
scheduledTasksTest.sendSalesFeedbackSummaryEmail();
|
|
|
733 |
}
|
|
|
734 |
|
| 32165 |
amit.gupta |
735 |
//Look out for imeis that have activation pending based of sale and mark create new SIO out of them
|
| 32048 |
tejbeer |
736 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
737 |
public void processActivatedImeisForSchemes() throws Throwable {
|
|
|
738 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
739 |
}
|
| 34241 |
tejus.loha |
740 |
|
| 33357 |
amit.gupta |
741 |
//On every fifth update deductions
|
| 33435 |
amit.gupta |
742 |
@Scheduled(cron = "0 30 6 5 * ?")
|
| 33357 |
amit.gupta |
743 |
public void processSidbiDeductions() throws Throwable {
|
|
|
744 |
scheduledTasks.processSidbiDeductions();
|
|
|
745 |
}
|
| 34669 |
amit.gupta |
746 |
|
| 34374 |
amit.gupta |
747 |
//Dont reset it for now as proposed by TV
|
|
|
748 |
//@Scheduled(cron = "0 30 6 4 * ?")
|
| 33904 |
amit.gupta |
749 |
public void resetHardLimit() throws Throwable {
|
|
|
750 |
scheduledTasks.resetHardLimit();
|
|
|
751 |
}
|
|
|
752 |
|
| 34830 |
ranu |
753 |
@Scheduled(cron = "0 0/20 * * * *")
|
| 32048 |
tejbeer |
754 |
public void updatePartnerLimit() throws Throwable {
|
| 36361 |
amit |
755 |
batchScheduledTasks.updatePartnerLimitWithBatch();
|
| 32048 |
tejbeer |
756 |
}
|
| 30929 |
tejbeer |
757 |
|
| 34253 |
ranu |
758 |
@Scheduled(cron = "0 0 9,14,18 * * *")
|
| 33874 |
ranu |
759 |
public void createOpeningStockPartyWise() throws Throwable {
|
|
|
760 |
scheduledTasks.createOpeningStockPartyWise();
|
|
|
761 |
}
|
| 30936 |
tejbeer |
762 |
|
| 33874 |
ranu |
763 |
|
| 32842 |
amit.gupta |
764 |
//Loans due/overdue/default notifications sent to parnters
|
|
|
765 |
@Scheduled(cron = "0 0 11 * * *")
|
| 32822 |
ranu |
766 |
public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
|
|
|
767 |
scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
|
|
|
768 |
}
|
| 34241 |
tejus.loha |
769 |
|
| 32842 |
amit.gupta |
770 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
771 |
public void alertForDueDate() throws Throwable {
|
|
|
772 |
scheduledTasks.alertForDueDate();
|
|
|
773 |
}
|
| 32822 |
ranu |
774 |
|
| 35133 |
ranu |
775 |
@Scheduled(cron = "0 0 4,21 * * *")
|
| 32048 |
tejbeer |
776 |
public void notifyLoanDueDateCross() throws Throwable {
|
|
|
777 |
scheduledTasks.notifyLoanDueDateCross();
|
|
|
778 |
}
|
| 30936 |
tejbeer |
779 |
|
| 35133 |
ranu |
780 |
@Scheduled(cron = "0 0 4,21 * * *")
|
| 32048 |
tejbeer |
781 |
public void notifyDefaultLoans() throws Throwable {
|
|
|
782 |
scheduledTasks.notifyDefaultLoans();
|
|
|
783 |
}
|
| 30936 |
tejbeer |
784 |
|
| 34910 |
ranu |
785 |
// @Scheduled(cron = "0 0 23 * * *")
|
| 32048 |
tejbeer |
786 |
public void hygineAlertForInternalTeam() throws Throwable {
|
|
|
787 |
scheduledTasks.hygineAlertForInternalTeam();
|
| 31206 |
tejbeer |
788 |
|
| 32048 |
tejbeer |
789 |
}
|
| 31206 |
tejbeer |
790 |
|
| 32048 |
tejbeer |
791 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
792 |
public void hygineAlertForPartner() throws Throwable {
|
|
|
793 |
scheduledTasks.hygineAlertForPartner();
|
| 31206 |
tejbeer |
794 |
|
| 32048 |
tejbeer |
795 |
}
|
| 31206 |
tejbeer |
796 |
|
| 32048 |
tejbeer |
797 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
798 |
public void monthlyTargetForPartner() throws Throwable {
|
|
|
799 |
scheduledTasks.monthlyTargetForPartner();
|
| 31249 |
tejbeer |
800 |
|
| 32048 |
tejbeer |
801 |
}
|
| 31249 |
tejbeer |
802 |
|
| 32048 |
tejbeer |
803 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
804 |
public void monthlyTargetForInternalTeam() throws Throwable {
|
|
|
805 |
scheduledTasks.monthlyTargetForInternalTeam();
|
| 31249 |
tejbeer |
806 |
|
| 32048 |
tejbeer |
807 |
}
|
| 31612 |
tejbeer |
808 |
|
| 32048 |
tejbeer |
809 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
810 |
public void sendSamsungRebilling() throws Throwable {
|
|
|
811 |
scheduledTasks.sendMailForSamsungRebilling();
|
|
|
812 |
}
|
| 31931 |
amit.gupta |
813 |
|
| 32048 |
tejbeer |
814 |
@Scheduled(cron = "0 10 8 * * *")
|
|
|
815 |
public void sendMailForAgeingAlert() throws Throwable {
|
|
|
816 |
scheduledTasks.sendMailForAgeingAlert();
|
|
|
817 |
}
|
|
|
818 |
|
|
|
819 |
|
|
|
820 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
821 |
public void sendFilteredRetailerPerformance() throws Throwable {
|
|
|
822 |
scheduledTasks.sendFilteredRetailerPerformance();
|
|
|
823 |
}
|
| 32690 |
amit.gupta |
824 |
|
| 33444 |
ranu |
825 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
826 |
public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
|
|
|
827 |
scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
|
|
|
828 |
}
|
| 34241 |
tejus.loha |
829 |
|
| 33464 |
ranu |
830 |
@Scheduled(cron = "0 10 6 * * *")
|
|
|
831 |
public void findTodayPocoBillingItems() throws Throwable {
|
|
|
832 |
scheduledTasks.findTodayPocoBillingItems();
|
|
|
833 |
}
|
| 32690 |
amit.gupta |
834 |
|
| 33444 |
ranu |
835 |
|
| 32690 |
amit.gupta |
836 |
@Scheduled(cron = "0 0 12 * * *")
|
|
|
837 |
public void rejectPriceDropsOfApprovedImeis() throws Throwable {
|
|
|
838 |
scheduledTasks.rejectPriceDropsOfApprovedImeis();
|
|
|
839 |
}
|
| 32907 |
amit.gupta |
840 |
|
|
|
841 |
@Autowired
|
|
|
842 |
POScheduler poScheduler;
|
| 34241 |
tejus.loha |
843 |
|
| 32907 |
amit.gupta |
844 |
@Scheduled(cron = "0 0 1 * * *")
|
| 33643 |
amit.gupta |
845 |
public void autoClosePO() {
|
| 32907 |
amit.gupta |
846 |
poScheduler.autoClosePurchaseOrders();
|
|
|
847 |
}
|
| 32048 |
tejbeer |
848 |
/*
|
|
|
849 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
850 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
851 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
852 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
853 |
*/
|
| 34443 |
vikas.jang |
854 |
|
| 34547 |
vikas.jang |
855 |
@Scheduled(cron = "0 50 23 * * *")
|
| 34443 |
vikas.jang |
856 |
public void bidConfirmation() throws Throwable {
|
| 34547 |
vikas.jang |
857 |
log.info("running bid cron at 23:50PM");
|
| 34443 |
vikas.jang |
858 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.YESTERDAY);
|
|
|
859 |
}
|
|
|
860 |
|
| 34547 |
vikas.jang |
861 |
@Scheduled(cron = "0 0 19 * * *")
|
| 34443 |
vikas.jang |
862 |
public void processLiquidationBids() throws Throwable {
|
| 34547 |
vikas.jang |
863 |
log.info("running bid cron at 07:00PM");
|
| 34443 |
vikas.jang |
864 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
865 |
}
|
|
|
866 |
|
| 34547 |
vikas.jang |
867 |
@Scheduled(cron = "0 30 21 * * *")
|
| 34443 |
vikas.jang |
868 |
public void bidPurchaseOrder() throws Throwable {
|
| 34547 |
vikas.jang |
869 |
log.info("running bid cron at 09:30PM");
|
| 34443 |
vikas.jang |
870 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
871 |
}
|
| 34547 |
vikas.jang |
872 |
|
| 34669 |
amit.gupta |
873 |
/*@Scheduled(cron = "0 0 12 * * *")
|
|
|
874 |
public void processCashDiscount() throws Throwable {
|
|
|
875 |
scheduledTasks.processCashDiscount();
|
|
|
876 |
}*/
|
|
|
877 |
|
|
|
878 |
|
| 34563 |
vikas.jang |
879 |
@Scheduled(cron = "0 0 9,17 * * *")
|
| 34547 |
vikas.jang |
880 |
public void bidConsolidatedMessage() throws Throwable {
|
|
|
881 |
log.info("Running bid cron at 09:00 AM or 05:00 PM");
|
|
|
882 |
runOnceTasks.consolidatedBiddingMessage();
|
| 34563 |
vikas.jang |
883 |
}
|
| 34770 |
vikas.jang |
884 |
|
|
|
885 |
@Scheduled(cron = "0 0 8 * * *")
|
| 34836 |
vikas |
886 |
public void yesterdayTrackingReport() throws Throwable {
|
|
|
887 |
log.info("Running yesterday employee tracking cron at 08:00 AM");
|
|
|
888 |
runOnceTasks.yesterdayTrackingReport();
|
| 34770 |
vikas.jang |
889 |
}
|
| 34836 |
vikas |
890 |
|
| 35178 |
amit |
891 |
@Scheduled(cron = "0 10 8 * * *")
|
| 35177 |
amit |
892 |
public void partnerCreditExposureReport() throws Throwable {
|
|
|
893 |
log.info("Running yesterday employee tracking cron at 08:00 AM");
|
|
|
894 |
runOnceTasks.sendCreditExposureReport();
|
|
|
895 |
}
|
|
|
896 |
|
| 34836 |
vikas |
897 |
@Scheduled(cron = "0 0 21,16 * * *")
|
|
|
898 |
public void dailyTrackingReport() throws Throwable {
|
|
|
899 |
log.info("Running daily employee tracking cron at 09:00 PM and 04:00 PM");
|
|
|
900 |
runOnceTasks.dailyTrackingReport();
|
|
|
901 |
}
|
| 35105 |
vikas |
902 |
|
| 34792 |
amit.gupta |
903 |
@Scheduled(cron = "0 0 0 1 1,4,7,10 *")
|
|
|
904 |
public void sendUpdateMobileBrandMarketShareQuaterlyMail() throws Throwable {
|
| 34791 |
aman.kumar |
905 |
log.info("Running Marketshare update remined quaterly");
|
|
|
906 |
scheduledTasks.sendUpdateMobileBrandMarketShareQuaterlyMail();
|
|
|
907 |
}
|
| 35105 |
vikas |
908 |
|
|
|
909 |
@Scheduled(cron = "0 0 * * * *")
|
|
|
910 |
public void checkRewardsEligibility() throws Throwable {
|
|
|
911 |
log.info("Running Rewards Disburse daily");
|
|
|
912 |
runOnceTasks.checkRewardsEligibility();
|
|
|
913 |
}
|
| 35326 |
amit |
914 |
|
|
|
915 |
@Scheduled(cron="0 0 20 * * *")
|
|
|
916 |
public void sendTrialExpiry() {
|
|
|
917 |
scheduledTasks.sendTrialExpiry();
|
|
|
918 |
}
|
| 35666 |
vikas |
919 |
|
|
|
920 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
921 |
public void fetchOffersByItem() {
|
|
|
922 |
scheduledTasks.cachePinelabsOffers();
|
|
|
923 |
}
|
| 35788 |
vikas |
924 |
|
|
|
925 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
926 |
public void syncProductsToShopify() throws Exception {
|
| 36058 |
ranu |
927 |
scheduledTasks.syncProductsToShopifyByWarehouseId(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("UP-WEST/NOIDA"));
|
| 35788 |
vikas |
928 |
}
|
| 23756 |
amit.gupta |
929 |
}
|