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