| 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 |
}
|
|
|
128 |
|
| 32048 |
tejbeer |
129 |
@Scheduled(cron = "0 0 10,15,17 * * *")
|
|
|
130 |
public void sendIndentTertiaryReport() throws Exception {
|
| 29757 |
tejbeer |
131 |
|
| 32048 |
tejbeer |
132 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
133 |
propertiesDetails.put("sendIndentTertiaryReport", "0");
|
| 29673 |
manish |
134 |
|
| 32048 |
tejbeer |
135 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
136 |
|
| 32048 |
tejbeer |
137 |
scheduledTasks.sendIndentTertiary();
|
| 29757 |
tejbeer |
138 |
|
| 32048 |
tejbeer |
139 |
propertiesDetails.put("sendIndentTertiaryReport", "1");
|
|
|
140 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
141 |
|
| 32048 |
tejbeer |
142 |
}
|
| 28921 |
tejbeer |
143 |
|
| 32048 |
tejbeer |
144 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
145 |
public void checkPartnerActiveStoreByStatus() throws Exception {
|
|
|
146 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
147 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "0");
|
| 29673 |
manish |
148 |
|
| 32048 |
tejbeer |
149 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
150 |
|
| 32048 |
tejbeer |
151 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
152 |
propertiesDetails.put("checkPartnerActiveStoreByStatus", "1");
|
|
|
153 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
154 |
|
| 32048 |
tejbeer |
155 |
}
|
| 26790 |
tejbeer |
156 |
|
| 32048 |
tejbeer |
157 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
158 |
public void sendStockAgeingReport() throws Throwable {
|
| 29757 |
tejbeer |
159 |
|
| 32048 |
tejbeer |
160 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
161 |
propertiesDetails.put("sendStockAgeingReport", "0");
|
| 29673 |
manish |
162 |
|
| 32048 |
tejbeer |
163 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
164 |
|
| 32048 |
tejbeer |
165 |
scheduledTasks.sendAgeingReport();
|
| 29757 |
tejbeer |
166 |
|
| 32048 |
tejbeer |
167 |
propertiesDetails.put("sendStockAgeingReport", "1");
|
|
|
168 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
169 |
|
| 32048 |
tejbeer |
170 |
}
|
| 24131 |
govind |
171 |
|
| 32048 |
tejbeer |
172 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
173 |
public void escalateTicket() throws Exception {
|
|
|
174 |
log.info("escalate ticket");
|
|
|
175 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
176 |
propertiesDetails.put("escalateTicket", "0");
|
|
|
177 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
178 |
ticketRelatedScheduledTask.escalateTicket();
|
| 29757 |
tejbeer |
179 |
|
| 32048 |
tejbeer |
180 |
propertiesDetails.put("escalateTicket", "1");
|
|
|
181 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
182 |
|
| 32048 |
tejbeer |
183 |
}
|
| 24841 |
govind |
184 |
|
| 32048 |
tejbeer |
185 |
@Scheduled(cron = "0 0 11 * * *")
|
|
|
186 |
public void alertTicketToUser() throws Exception {
|
|
|
187 |
log.info("alert for ticket");
|
|
|
188 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
189 |
propertiesDetails.put("alertTicketToUser", "0");
|
|
|
190 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
191 |
|
| 32048 |
tejbeer |
192 |
ticketRelatedScheduledTask.alertforTicket();
|
|
|
193 |
propertiesDetails.put("alertTicketToUser", "1");
|
|
|
194 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
195 |
|
| 32048 |
tejbeer |
196 |
}
|
| 24841 |
govind |
197 |
|
| 32048 |
tejbeer |
198 |
@Scheduled(cron = "0 0 14,18,23 ? * *")
|
|
|
199 |
public void dailySaleNotification() throws Exception {
|
|
|
200 |
log.info("daily send Notification");
|
|
|
201 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
202 |
propertiesDetails.put("dailySaleNotification", "0");
|
|
|
203 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
204 |
|
| 32048 |
tejbeer |
205 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
| 29757 |
tejbeer |
206 |
|
| 32048 |
tejbeer |
207 |
propertiesDetails.put("dailySaleNotification", "1");
|
|
|
208 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
209 |
|
| 32048 |
tejbeer |
210 |
}
|
| 24841 |
govind |
211 |
|
| 32048 |
tejbeer |
212 |
/*
|
|
|
213 |
* @Scheduled(cron = "0 0 6 * * *") public void dailyReconciliation() throws
|
|
|
214 |
* Exception { reconciliation.dailyReconciliation(); }
|
|
|
215 |
*/
|
| 28205 |
tejbeer |
216 |
|
| 32048 |
tejbeer |
217 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
218 |
public void selectFinServiceFollowUpDateByCurrDate() throws Exception {
|
|
|
219 |
log.info("selectFinServiceFollowUpDateByCurrDate");
|
|
|
220 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
| 30049 |
amit.gupta |
221 |
|
| 32048 |
tejbeer |
222 |
}
|
| 30049 |
amit.gupta |
223 |
|
| 32165 |
amit.gupta |
224 |
@Scheduled(cron = "0 0 4 * * *")
|
| 32048 |
tejbeer |
225 |
public void processActivation() throws Exception {
|
| 29757 |
tejbeer |
226 |
|
| 32048 |
tejbeer |
227 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
228 |
propertiesDetails.put("processActivation", "0");
|
|
|
229 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
230 |
|
| 32048 |
tejbeer |
231 |
scheduledTasks.processActivation();
|
| 29757 |
tejbeer |
232 |
|
| 32048 |
tejbeer |
233 |
propertiesDetails.put("processActivation", "1");
|
|
|
234 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
235 |
|
| 32048 |
tejbeer |
236 |
}
|
| 25721 |
tejbeer |
237 |
|
| 32048 |
tejbeer |
238 |
// TODO: Change it back to first of every month
|
|
|
239 |
// @Scheduled(cron = "0 0 1 1 * *")
|
|
|
240 |
@Scheduled(cron = "0 0 1 2 * *")
|
|
|
241 |
public void rollOutUpgardedMargins() throws Exception {
|
|
|
242 |
scheduledTasks.rollOutUpgardedMarginsNextMonth();
|
| 30788 |
amit.gupta |
243 |
|
| 32048 |
tejbeer |
244 |
}
|
| 30788 |
amit.gupta |
245 |
|
| 34241 |
tejus.loha |
246 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 32048 |
tejbeer |
247 |
public void sendNotification() throws Throwable {
|
| 29757 |
tejbeer |
248 |
|
| 32048 |
tejbeer |
249 |
log.info("send Notification");
|
|
|
250 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
251 |
propertiesDetails.put("sendNotification", "0");
|
|
|
252 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
253 |
|
| 32048 |
tejbeer |
254 |
scheduledTasks.sendNotification();
|
|
|
255 |
propertiesDetails.put("sendNotification", "1");
|
|
|
256 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
257 |
log.info("send Notification Done");
|
| 29673 |
manish |
258 |
|
| 32048 |
tejbeer |
259 |
}
|
| 28205 |
tejbeer |
260 |
|
| 34669 |
amit.gupta |
261 |
//@Scheduled(cron = "0 */15 * * * *")
|
| 32048 |
tejbeer |
262 |
public void checkRazorPayPaymentStatus() throws Throwable {
|
| 29757 |
tejbeer |
263 |
|
| 32048 |
tejbeer |
264 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
265 |
propertiesDetails.put("checkRazorPayPaymentStatus", "0");
|
|
|
266 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
267 |
|
| 32048 |
tejbeer |
268 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
269 |
propertiesDetails.put("checkRazorPayPaymentStatus", "1");
|
|
|
270 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
271 |
|
| 32048 |
tejbeer |
272 |
}
|
| 28377 |
tejbeer |
273 |
|
| 34241 |
tejus.loha |
274 |
@Scheduled(fixedDelay = 2 * 1000)
|
| 33426 |
amit.gupta |
275 |
//@Scheduled(cron = "0 5 23 * * *")
|
| 32048 |
tejbeer |
276 |
public void updateIrnsToInvoices() throws Throwable {
|
|
|
277 |
runOnceTasks.updateIrnsToInvoices();
|
|
|
278 |
}
|
| 31612 |
tejbeer |
279 |
|
| 32048 |
tejbeer |
280 |
// No longer needed
|
|
|
281 |
// @Scheduled(cron = "0 */10 * * * *")
|
|
|
282 |
public void attachToffeeInvoices() throws Throwable {
|
| 29757 |
tejbeer |
283 |
|
| 32048 |
tejbeer |
284 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
285 |
propertiesDetails.put("attachToffeeInvoices", "0");
|
|
|
286 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
287 |
|
| 32048 |
tejbeer |
288 |
scheduledTasks.attachToffeeInvoices();
|
| 29757 |
tejbeer |
289 |
|
| 32048 |
tejbeer |
290 |
propertiesDetails.put("attachToffeeInvoices", "1");
|
|
|
291 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
292 |
|
| 32048 |
tejbeer |
293 |
}
|
| 24841 |
govind |
294 |
|
| 32048 |
tejbeer |
295 |
@Scheduled(cron = "0 0 5 * * *")
|
|
|
296 |
public void ticketClosed() throws Throwable {
|
| 26283 |
tejbeer |
297 |
|
| 32048 |
tejbeer |
298 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
299 |
propertiesDetails.put("ticketClosed", "0");
|
|
|
300 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
301 |
|
| 32048 |
tejbeer |
302 |
scheduledTasks.ticketClosed();
|
| 29757 |
tejbeer |
303 |
|
| 32048 |
tejbeer |
304 |
propertiesDetails.put("ticketClosed", "1");
|
|
|
305 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26283 |
tejbeer |
306 |
|
| 32048 |
tejbeer |
307 |
}
|
| 26283 |
tejbeer |
308 |
|
| 32048 |
tejbeer |
309 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
310 |
public void checkfocusedModelInPartnerStock() throws Throwable {
|
|
|
311 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
312 |
|
| 32048 |
tejbeer |
313 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
314 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "0");
|
|
|
315 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
316 |
|
| 32048 |
tejbeer |
317 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
318 |
propertiesDetails.put("checkfocusedModelInPartnerStock", "1");
|
|
|
319 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 25721 |
tejbeer |
320 |
|
| 32048 |
tejbeer |
321 |
log.info("endTime" + LocalDateTime.now());
|
|
|
322 |
}
|
| 28205 |
tejbeer |
323 |
|
| 32048 |
tejbeer |
324 |
@Scheduled(cron = "0 0 8,10,12,14,16,18,20 * * *")
|
|
|
325 |
public void notifyLead() throws Throwable {
|
| 29757 |
tejbeer |
326 |
|
| 32048 |
tejbeer |
327 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
328 |
propertiesDetails.put("notifyLead", "0");
|
|
|
329 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
330 |
|
| 32048 |
tejbeer |
331 |
scheduledTasks.notifyLead();
|
| 29757 |
tejbeer |
332 |
|
| 32048 |
tejbeer |
333 |
propertiesDetails.put("notifyLead", "1");
|
|
|
334 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
335 |
|
| 32048 |
tejbeer |
336 |
// scheduledTasks.notifyVisits();
|
|
|
337 |
}
|
| 25721 |
tejbeer |
338 |
|
| 32048 |
tejbeer |
339 |
// No longer scheduled
|
|
|
340 |
// @Scheduled(cron = "0 0 1 * * *")
|
|
|
341 |
public void fetchImeiActivation() throws Throwable {
|
|
|
342 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
343 |
propertiesDetails.put("fetchImeiActivation", "0");
|
|
|
344 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
345 |
|
| 32048 |
tejbeer |
346 |
runOnceTasks.fetchImeiActivation(0);
|
| 29757 |
tejbeer |
347 |
|
| 32048 |
tejbeer |
348 |
propertiesDetails.put("fetchImeiActivation", "1");
|
|
|
349 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
350 |
|
| 32048 |
tejbeer |
351 |
}
|
| 26790 |
tejbeer |
352 |
|
| 32411 |
amit.gupta |
353 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
354 |
//Send all lead owners the report for scheduled followups missed
|
|
|
355 |
public void sendUnscheduledFollowUpMail() throws Exception {
|
|
|
356 |
scheduledTasks.sendUnscheduledFollowUpMail();
|
|
|
357 |
}
|
|
|
358 |
|
| 32048 |
tejbeer |
359 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
360 |
public void checkValidateReferral() throws Throwable {
|
|
|
361 |
log.info("startTime" + LocalDateTime.now());
|
|
|
362 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
363 |
propertiesDetails.put("checkValidateReferral", "0");
|
|
|
364 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
365 |
|
| 32048 |
tejbeer |
366 |
scheduledTasks.checkValidateReferral();
|
| 29757 |
tejbeer |
367 |
|
| 32048 |
tejbeer |
368 |
propertiesDetails.put("checkValidateReferral", "1");
|
|
|
369 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 26790 |
tejbeer |
370 |
|
| 32048 |
tejbeer |
371 |
log.info("endTime" + LocalDateTime.now());
|
|
|
372 |
}
|
| 26790 |
tejbeer |
373 |
|
| 32048 |
tejbeer |
374 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
375 |
public void partnerProblemAlert() throws Throwable {
|
|
|
376 |
log.info("startTime" + LocalDateTime.now());
|
|
|
377 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
378 |
propertiesDetails.put("partnerProblemAlert", "0");
|
|
|
379 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
380 |
|
| 32048 |
tejbeer |
381 |
scheduledTasks.partnerProblemAlert();
|
|
|
382 |
propertiesDetails.put("partnerProblemAlert", "1");
|
|
|
383 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
384 |
|
| 32048 |
tejbeer |
385 |
log.info("endTime" + LocalDateTime.now());
|
|
|
386 |
}
|
| 28921 |
tejbeer |
387 |
|
| 32048 |
tejbeer |
388 |
/*
|
|
|
389 |
* @Scheduled(cron = "0 30 10 * * MON-SAT") public void
|
|
|
390 |
* sendMorningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
391 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
392 |
* LinkedHashMap<>(); propertiesDetails.put("sendMorningAttendanceAlert", "0");
|
|
|
393 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
394 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
395 |
*
|
| 32048 |
tejbeer |
396 |
* scheduledTasks.sendAttendanceMorningAlert();
|
|
|
397 |
* propertiesDetails.put("sendMorningAttendanceAlert", "1");
|
|
|
398 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
399 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
400 |
*
|
| 32048 |
tejbeer |
401 |
* log.info("endTime" + LocalDateTime.now()); }
|
| 32507 |
amit.gupta |
402 |
*
|
| 32048 |
tejbeer |
403 |
* @Scheduled(cron = "0 30 20 * * MON-SAT") public void
|
|
|
404 |
* sendEveningAttendanceAlert() throws Throwable { log.info("startTime" +
|
|
|
405 |
* LocalDateTime.now()); LinkedHashMap<String, String> propertiesDetails = new
|
|
|
406 |
* LinkedHashMap<>(); propertiesDetails.put("sendEveningAttendanceAlert", "0");
|
|
|
407 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
408 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
409 |
*
|
| 32048 |
tejbeer |
410 |
* scheduledTasks.sendAttendanceEveningAlert();
|
|
|
411 |
* propertiesDetails.put("sendEveningAttendanceAlert", "1");
|
|
|
412 |
* writeToPropertiesFile.saveParamChanges(propertiesDetails,
|
|
|
413 |
* nagiosCronPropertiesFile);
|
| 32507 |
amit.gupta |
414 |
*
|
| 32048 |
tejbeer |
415 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
416 |
*/
|
| 29673 |
manish |
417 |
|
| 32048 |
tejbeer |
418 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
419 |
public void onboardingEventDelays() throws Throwable {
|
|
|
420 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
421 |
|
| 32048 |
tejbeer |
422 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
423 |
propertiesDetails.put("onboardingEventDelays", "0");
|
|
|
424 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
425 |
|
| 32048 |
tejbeer |
426 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
| 29757 |
tejbeer |
427 |
|
| 32048 |
tejbeer |
428 |
propertiesDetails.put("onboardingEventDelays", "1");
|
|
|
429 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
430 |
|
| 32048 |
tejbeer |
431 |
log.info("endTime" + LocalDateTime.now());
|
|
|
432 |
}
|
| 28921 |
tejbeer |
433 |
|
| 32048 |
tejbeer |
434 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
435 |
public void brandingAlert() throws Throwable {
|
|
|
436 |
log.info("startTime" + LocalDateTime.now());
|
|
|
437 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
438 |
propertiesDetails.put("brandingAlert", "0");
|
|
|
439 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
440 |
|
| 32048 |
tejbeer |
441 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
442 |
propertiesDetails.put("brandingAlert", "1");
|
|
|
443 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
444 |
|
| 32048 |
tejbeer |
445 |
log.info("endTime" + LocalDateTime.now());
|
|
|
446 |
}
|
| 28921 |
tejbeer |
447 |
|
| 33859 |
tejus.loha |
448 |
// @Scheduled(cron = "0 0 8 * * *")
|
|
|
449 |
// public void advancePaymentPendingAlert() throws Throwable {
|
|
|
450 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
451 |
//
|
|
|
452 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
453 |
// propertiesDetails.put("advancePaymentPendingAlert", "0");
|
|
|
454 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
455 |
//
|
|
|
456 |
// onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
457 |
// propertiesDetails.put("advancePaymentPendingAlert", "1");
|
|
|
458 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
459 |
//
|
|
|
460 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
461 |
// }
|
| 29757 |
tejbeer |
462 |
|
| 32048 |
tejbeer |
463 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
464 |
public void fullPaymentPendingAlert() throws Throwable {
|
|
|
465 |
log.info("startTime" + LocalDateTime.now());
|
| 29757 |
tejbeer |
466 |
|
| 32048 |
tejbeer |
467 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
468 |
propertiesDetails.put("fullPaymentPendingAlert", "0");
|
|
|
469 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
470 |
|
| 32048 |
tejbeer |
471 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
| 29757 |
tejbeer |
472 |
|
| 32048 |
tejbeer |
473 |
propertiesDetails.put("fullPaymentPendingAlert", "1");
|
|
|
474 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
475 |
|
| 32048 |
tejbeer |
476 |
log.info("endTime" + LocalDateTime.now());
|
|
|
477 |
}
|
| 28921 |
tejbeer |
478 |
|
| 33859 |
tejus.loha |
479 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
480 |
// public void advancePaymentPendinglegalAlert() throws Throwable {
|
|
|
481 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
482 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
483 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "0");
|
|
|
484 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
485 |
//
|
|
|
486 |
//// onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
487 |
//
|
|
|
488 |
// propertiesDetails.put("advancePaymentPendinglegalAlert", "1");
|
|
|
489 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
490 |
//
|
|
|
491 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
492 |
// }
|
| 29673 |
manish |
493 |
|
| 32048 |
tejbeer |
494 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
495 |
public void onBoardingCompleteEventEmail() throws Throwable {
|
|
|
496 |
log.info("startTime" + LocalDateTime.now());
|
|
|
497 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
498 |
propertiesDetails.put("onBoardingCompleteEventEmail", "0");
|
|
|
499 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
500 |
|
| 32048 |
tejbeer |
501 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
502 |
propertiesDetails.put("onBoardingCompleteEventEmail", "1");
|
|
|
503 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
504 |
|
| 32048 |
tejbeer |
505 |
log.info("endTime" + LocalDateTime.now());
|
|
|
506 |
}
|
| 29040 |
tejbeer |
507 |
|
| 32048 |
tejbeer |
508 |
@Scheduled(cron = "0 */5 * * * *")
|
|
|
509 |
public void updateSaholicCISTable() throws Throwable {
|
|
|
510 |
log.info("updateSaholicCISTable startTime" + LocalDateTime.now());
|
|
|
511 |
runOnceTasks.updateSaholicCISTable();
|
|
|
512 |
log.info("updateSaholicCISTable endTime" + LocalDateTime.now());
|
|
|
513 |
}
|
| 30667 |
amit.gupta |
514 |
|
| 34241 |
tejus.loha |
515 |
@Autowired
|
|
|
516 |
PurSaleService purSaleService;
|
|
|
517 |
|
|
|
518 |
@Scheduled(cron = "0 0 10,19 * * ?")
|
|
|
519 |
public void send10DaysEgedStockReport() throws Throwable {
|
| 34275 |
tejus.loha |
520 |
log.info("moreThen10DaysEgedStockReport startTime" + LocalDateTime.now());
|
|
|
521 |
scheduledTasks.send10OrMoreOlderStockReport();
|
|
|
522 |
log.info("moreThen10DaysEgedStockReport endTime" + LocalDateTime.now());
|
| 34241 |
tejus.loha |
523 |
}
|
|
|
524 |
|
| 32048 |
tejbeer |
525 |
@Scheduled(fixedDelay = 30 * 60 * 1000, initialDelay = 15 * 60 * 1000)
|
|
|
526 |
public void fetchPartnerStat() throws Throwable {
|
|
|
527 |
scheduledTasks.fetchParnterStats();
|
|
|
528 |
}
|
| 30390 |
amit.gupta |
529 |
|
| 33859 |
tejus.loha |
530 |
// @Scheduled(cron = "0 0 9 * * *")
|
|
|
531 |
// public void storeTimelinePromoterPending() throws Throwable {
|
|
|
532 |
// log.info("startTime" + LocalDateTime.now());
|
|
|
533 |
//
|
|
|
534 |
// LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
535 |
// propertiesDetails.put("storeTimelinePromoterPending", "0");
|
|
|
536 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
537 |
//
|
|
|
538 |
//// onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
539 |
// propertiesDetails.put("storeTimelinePromoterPending", "1");
|
|
|
540 |
// writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
541 |
//
|
|
|
542 |
// log.info("endTime" + LocalDateTime.now());
|
|
|
543 |
// }
|
| 29757 |
tejbeer |
544 |
|
| 34669 |
amit.gupta |
545 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32214 |
jai.hind |
546 |
public void checkItelImeiActivationNew() throws Throwable {
|
|
|
547 |
log.info("startTime" + LocalDate.now());
|
|
|
548 |
|
|
|
549 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
550 |
propertiesDetails.put("checkItelImeiActivationNew", "0");
|
|
|
551 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
552 |
log.info("startTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
553 |
scheduledTasks.checkItelImeiActivationNew(LocalDate.now(), 90);
|
|
|
554 |
long secs = (new Date().getTime()) / 1000;
|
|
|
555 |
log.info("endTimecheckItelImeiActivation" + LocalDate.now());
|
|
|
556 |
propertiesDetails.put("checkItelImeiActivationNew", "1");
|
|
|
557 |
propertiesDetails.put("itelDate", Long.toString(secs));
|
|
|
558 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
|
|
559 |
|
|
|
560 |
}
|
|
|
561 |
|
|
|
562 |
|
| 32048 |
tejbeer |
563 |
@Scheduled(fixedDelay = 60 * 1000)
|
|
|
564 |
public void vivoImeiActivation() throws Throwable {
|
|
|
565 |
log.info("startTimevivoImeiActivation" + LocalDateTime.now());
|
| 29757 |
tejbeer |
566 |
|
| 32048 |
tejbeer |
567 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
568 |
propertiesDetails.put("vivoImeiActivation", "0");
|
|
|
569 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
570 |
|
| 32048 |
tejbeer |
571 |
scheduledTasks.checkImeiActivation();
|
|
|
572 |
long secs = (new Date().getTime()) / 1000;
|
|
|
573 |
log.info("endTimevivoImeiActivation" + LocalDateTime.now());
|
|
|
574 |
propertiesDetails.put("vivoImeiActivation", "1");
|
| 29757 |
tejbeer |
575 |
|
| 32048 |
tejbeer |
576 |
propertiesDetails.put("vivoDate", Long.toString(secs));
|
|
|
577 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
578 |
|
| 32048 |
tejbeer |
579 |
}
|
| 29255 |
tejbeer |
580 |
|
| 32048 |
tejbeer |
581 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
582 |
public void reviewUncontactablePartner() throws Throwable {
|
|
|
583 |
log.info("startTime" + LocalDateTime.now());
|
| 30421 |
tejbeer |
584 |
|
| 32048 |
tejbeer |
585 |
scheduledTasks.reviewUncontactablePartner();
|
| 30421 |
tejbeer |
586 |
|
| 32048 |
tejbeer |
587 |
}
|
| 30421 |
tejbeer |
588 |
|
| 33928 |
ranu |
589 |
@Scheduled(cron = "0 0 7 * * *")
|
|
|
590 |
public void setMovementWiseRbmTodayTargets() throws Throwable {
|
| 34669 |
amit.gupta |
591 |
log.info("today targets startTime {}", LocalDateTime.now());
|
| 33928 |
ranu |
592 |
|
|
|
593 |
scheduledTasks.persistRbmTodayTargets();
|
|
|
594 |
|
|
|
595 |
}
|
|
|
596 |
|
| 33986 |
ranu |
597 |
@Scheduled(cron = "0 0 21 * * *")
|
|
|
598 |
public void setMovementWiseRbmTodayAchievements() throws Throwable {
|
| 34669 |
amit.gupta |
599 |
log.info("today achievement startTime {}", LocalDateTime.now());
|
| 33986 |
ranu |
600 |
|
|
|
601 |
scheduledTasks.persistRbmTodayAchievements();
|
|
|
602 |
|
|
|
603 |
}
|
|
|
604 |
|
| 33078 |
ranu |
605 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
606 |
public void reviewNonSdBuyingBrand() throws Throwable {
|
|
|
607 |
log.info("startTime" + LocalDateTime.now());
|
|
|
608 |
|
|
|
609 |
scheduledTasks.reviewNonSdBuyingBrand();
|
|
|
610 |
|
|
|
611 |
}
|
|
|
612 |
|
| 32048 |
tejbeer |
613 |
@Autowired
|
|
|
614 |
private StandAlone standAlone;
|
| 30352 |
amit.gupta |
615 |
|
| 32832 |
amit.gupta |
616 |
@Autowired
|
|
|
617 |
OrderTrackingService orderTrackingService;
|
|
|
618 |
|
| 32147 |
amit.gupta |
619 |
@Scheduled(fixedDelay = 60 * 1000)
|
| 32048 |
tejbeer |
620 |
public void oppo() throws Throwable {
|
|
|
621 |
standAlone.checkOppoImeiStatus();
|
|
|
622 |
}
|
| 30352 |
amit.gupta |
623 |
|
| 34421 |
amit.gupta |
624 |
@Scheduled(fixedDelay = 60 * 1000)
|
|
|
625 |
public void realme() throws Throwable {
|
|
|
626 |
standAlone.checkRealmeImeiStatus();
|
|
|
627 |
}
|
|
|
628 |
|
| 32801 |
amit.gupta |
629 |
@Scheduled(cron = "0 0 * * * *")
|
| 32048 |
tejbeer |
630 |
public void markBlueDartOrderDelivered() throws Throwable {
|
|
|
631 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
632 |
orderTrackingService.markBlueDartOrderDelivered();
|
| 32048 |
tejbeer |
633 |
log.info("endTime" + LocalDateTime.now());
|
|
|
634 |
}
|
| 31117 |
tejbeer |
635 |
|
| 32881 |
amit.gupta |
636 |
@Scheduled(cron = "0 15 * * * *")
|
| 32048 |
tejbeer |
637 |
public void markDelhiveryOrderDelivered() throws Throwable {
|
|
|
638 |
LinkedHashMap<String, String> propertiesDetails = new LinkedHashMap<>();
|
|
|
639 |
propertiesDetails.put("markDelhiveryOrderDelivered", "0");
|
|
|
640 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
641 |
|
| 32048 |
tejbeer |
642 |
log.info("startTime" + LocalDateTime.now());
|
| 32832 |
amit.gupta |
643 |
orderTrackingService.markDelhiveryOrderDelivered();
|
| 32048 |
tejbeer |
644 |
propertiesDetails.put("markDelhiveryOrderDelivered", "1");
|
|
|
645 |
writeToPropertiesFile.saveParamChanges(propertiesDetails, nagiosCronPropertiesFile);
|
| 29673 |
manish |
646 |
|
| 32048 |
tejbeer |
647 |
log.info("endTime" + LocalDateTime.now());
|
|
|
648 |
}
|
| 29308 |
tejbeer |
649 |
|
| 32048 |
tejbeer |
650 |
@Scheduled(cron = "0 0 4 * * *")
|
|
|
651 |
public void processPriceDrop() throws Throwable {
|
|
|
652 |
scheduledTasks.processPriceDrop();
|
|
|
653 |
}
|
| 30637 |
amit.gupta |
654 |
|
| 32048 |
tejbeer |
655 |
@Scheduled(cron = "0 0 0 * * *")
|
|
|
656 |
public void calculateInterestAccured() throws Throwable {
|
| 34710 |
amit.gupta |
657 |
scheduledTasks.loanSettlement();
|
| 32048 |
tejbeer |
658 |
scheduledTasks.calculateInterestAccured();
|
|
|
659 |
}
|
| 30859 |
tejbeer |
660 |
|
| 32117 |
tejbeer |
661 |
// @Scheduled(cron = "0 */5 2-22 * * *")
|
| 33181 |
amit.gupta |
662 |
@Scheduled(fixedDelay = 1 * 60 * 1000)
|
| 32531 |
amit.gupta |
663 |
//@Scheduled(cron = "0 0 23 * * *")
|
| 32048 |
tejbeer |
664 |
public void loanSettlement() throws Throwable {
|
| 34756 |
amit.gupta |
665 |
LocalTime now = LocalTime.now();
|
| 34767 |
amit.gupta |
666 |
LocalTime start = LocalTime.of(9, 0);
|
| 34757 |
amit.gupta |
667 |
LocalTime end = LocalTime.of(23, 0);
|
| 34756 |
amit.gupta |
668 |
|
|
|
669 |
if (now.isBefore(start) || now.isAfter(end)) {
|
| 34762 |
amit.gupta |
670 |
System.out.println("Task skipped during restricted hours: " + now);
|
|
|
671 |
} else {
|
| 34756 |
amit.gupta |
672 |
scheduledTasks.loanSettlement();
|
|
|
673 |
System.out.println("Task executed at " + now);
|
|
|
674 |
}
|
| 32048 |
tejbeer |
675 |
}
|
| 30859 |
tejbeer |
676 |
|
| 32048 |
tejbeer |
677 |
@Scheduled(cron = "0 */15 * * * *")
|
|
|
678 |
public void ccAvenueSettlement() throws Throwable {
|
|
|
679 |
scheduledTasks.settleCCAvePayments();
|
|
|
680 |
}
|
| 31332 |
amit.gupta |
681 |
|
| 32048 |
tejbeer |
682 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
683 |
public void dailyLoanAlert() throws Throwable {
|
|
|
684 |
scheduledTasks.dailyLoanAlert();
|
|
|
685 |
}
|
| 30896 |
amit.gupta |
686 |
|
| 34162 |
ranu |
687 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
688 |
public void groupHidCatalogsByWeeks() throws Throwable {
|
|
|
689 |
scheduledTasks.groupHidCatalogsByWeeks();
|
|
|
690 |
}
|
|
|
691 |
|
| 34321 |
ranu |
692 |
@Scheduled(cron = "0 0 9 * * *")
|
|
|
693 |
public void sendFeebackSalesAndRbm() throws Throwable {
|
|
|
694 |
scheduledTasksTest.sendRbmFeedbackSummaryEmail();
|
|
|
695 |
scheduledTasksTest.sendSalesFeedbackSummaryEmail();
|
|
|
696 |
}
|
|
|
697 |
|
| 32165 |
amit.gupta |
698 |
//Look out for imeis that have activation pending based of sale and mark create new SIO out of them
|
| 32048 |
tejbeer |
699 |
@Scheduled(cron = "0 0 1 * * *")
|
|
|
700 |
public void processActivatedImeisForSchemes() throws Throwable {
|
|
|
701 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
702 |
}
|
| 34241 |
tejus.loha |
703 |
|
| 33357 |
amit.gupta |
704 |
//On every fifth update deductions
|
| 33435 |
amit.gupta |
705 |
@Scheduled(cron = "0 30 6 5 * ?")
|
| 33357 |
amit.gupta |
706 |
public void processSidbiDeductions() throws Throwable {
|
|
|
707 |
scheduledTasks.processSidbiDeductions();
|
|
|
708 |
}
|
| 34669 |
amit.gupta |
709 |
|
| 34374 |
amit.gupta |
710 |
//Dont reset it for now as proposed by TV
|
|
|
711 |
//@Scheduled(cron = "0 30 6 4 * ?")
|
| 33904 |
amit.gupta |
712 |
public void resetHardLimit() throws Throwable {
|
|
|
713 |
scheduledTasks.resetHardLimit();
|
|
|
714 |
}
|
|
|
715 |
|
| 34451 |
ranu |
716 |
@Scheduled(cron = "0 0/30 * * * *")
|
| 32048 |
tejbeer |
717 |
public void updatePartnerLimit() throws Throwable {
|
|
|
718 |
scheduledTasks.updatePartnerLimit();
|
|
|
719 |
}
|
| 30929 |
tejbeer |
720 |
|
| 34253 |
ranu |
721 |
@Scheduled(cron = "0 0 9,14,18 * * *")
|
| 33874 |
ranu |
722 |
public void createOpeningStockPartyWise() throws Throwable {
|
|
|
723 |
scheduledTasks.createOpeningStockPartyWise();
|
|
|
724 |
}
|
| 30936 |
tejbeer |
725 |
|
| 33874 |
ranu |
726 |
|
| 32842 |
amit.gupta |
727 |
//Loans due/overdue/default notifications sent to parnters
|
|
|
728 |
@Scheduled(cron = "0 0 11 * * *")
|
| 32822 |
ranu |
729 |
public void sendMailWhatsAppAfterLoanDueDate() throws Throwable {
|
|
|
730 |
scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
|
|
|
731 |
}
|
| 34241 |
tejus.loha |
732 |
|
| 32842 |
amit.gupta |
733 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
734 |
public void alertForDueDate() throws Throwable {
|
|
|
735 |
scheduledTasks.alertForDueDate();
|
|
|
736 |
}
|
| 32822 |
ranu |
737 |
|
| 33722 |
ranu |
738 |
@Scheduled(cron = "0 10 6 * * *")
|
| 32048 |
tejbeer |
739 |
public void notifyLoanDueDateCross() throws Throwable {
|
|
|
740 |
scheduledTasks.notifyLoanDueDateCross();
|
|
|
741 |
}
|
| 30936 |
tejbeer |
742 |
|
| 33722 |
ranu |
743 |
@Scheduled(cron = "0 15 6 * * *")
|
| 32048 |
tejbeer |
744 |
public void notifyDefaultLoans() throws Throwable {
|
|
|
745 |
scheduledTasks.notifyDefaultLoans();
|
|
|
746 |
}
|
| 30936 |
tejbeer |
747 |
|
| 32048 |
tejbeer |
748 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
749 |
public void hygineAlertForInternalTeam() throws Throwable {
|
|
|
750 |
scheduledTasks.hygineAlertForInternalTeam();
|
| 31206 |
tejbeer |
751 |
|
| 32048 |
tejbeer |
752 |
}
|
| 31206 |
tejbeer |
753 |
|
| 32048 |
tejbeer |
754 |
@Scheduled(cron = "0 0 23 * * *")
|
|
|
755 |
public void hygineAlertForPartner() throws Throwable {
|
|
|
756 |
scheduledTasks.hygineAlertForPartner();
|
| 31206 |
tejbeer |
757 |
|
| 32048 |
tejbeer |
758 |
}
|
| 31206 |
tejbeer |
759 |
|
| 32048 |
tejbeer |
760 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
761 |
public void monthlyTargetForPartner() throws Throwable {
|
|
|
762 |
scheduledTasks.monthlyTargetForPartner();
|
| 31249 |
tejbeer |
763 |
|
| 32048 |
tejbeer |
764 |
}
|
| 31249 |
tejbeer |
765 |
|
| 32048 |
tejbeer |
766 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
767 |
public void monthlyTargetForInternalTeam() throws Throwable {
|
|
|
768 |
scheduledTasks.monthlyTargetForInternalTeam();
|
| 31249 |
tejbeer |
769 |
|
| 32048 |
tejbeer |
770 |
}
|
| 31612 |
tejbeer |
771 |
|
| 32048 |
tejbeer |
772 |
@Scheduled(cron = "0 0 6 * * *")
|
|
|
773 |
public void sendSamsungRebilling() throws Throwable {
|
|
|
774 |
scheduledTasks.sendMailForSamsungRebilling();
|
|
|
775 |
}
|
| 31931 |
amit.gupta |
776 |
|
| 32048 |
tejbeer |
777 |
@Scheduled(cron = "0 10 8 * * *")
|
|
|
778 |
public void sendMailForAgeingAlert() throws Throwable {
|
|
|
779 |
scheduledTasks.sendMailForAgeingAlert();
|
|
|
780 |
}
|
|
|
781 |
|
|
|
782 |
|
|
|
783 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
784 |
public void sendFilteredRetailerPerformance() throws Throwable {
|
|
|
785 |
scheduledTasks.sendFilteredRetailerPerformance();
|
|
|
786 |
}
|
| 32690 |
amit.gupta |
787 |
|
| 33444 |
ranu |
788 |
@Scheduled(cron = "0 0 0 * * MON")
|
|
|
789 |
public void findAllLiveDemoBrandItemsByBillingDate() throws Throwable {
|
|
|
790 |
scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
|
|
|
791 |
}
|
| 34241 |
tejus.loha |
792 |
|
| 33464 |
ranu |
793 |
@Scheduled(cron = "0 10 6 * * *")
|
|
|
794 |
public void findTodayPocoBillingItems() throws Throwable {
|
|
|
795 |
scheduledTasks.findTodayPocoBillingItems();
|
|
|
796 |
}
|
| 32690 |
amit.gupta |
797 |
|
| 33444 |
ranu |
798 |
|
| 32690 |
amit.gupta |
799 |
@Scheduled(cron = "0 0 12 * * *")
|
|
|
800 |
public void rejectPriceDropsOfApprovedImeis() throws Throwable {
|
|
|
801 |
scheduledTasks.rejectPriceDropsOfApprovedImeis();
|
|
|
802 |
}
|
| 32907 |
amit.gupta |
803 |
|
|
|
804 |
@Autowired
|
|
|
805 |
POScheduler poScheduler;
|
| 34241 |
tejus.loha |
806 |
|
| 32907 |
amit.gupta |
807 |
@Scheduled(cron = "0 0 1 * * *")
|
| 33643 |
amit.gupta |
808 |
public void autoClosePO() {
|
| 32907 |
amit.gupta |
809 |
poScheduler.autoClosePurchaseOrders();
|
|
|
810 |
}
|
| 32048 |
tejbeer |
811 |
/*
|
|
|
812 |
* @Scheduled(cron = "0 0 9 * * *") public void onBoardingDocumentsPending()
|
|
|
813 |
* throws Throwable { log.info("startTime" + LocalDateTime.now());
|
|
|
814 |
* onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
815 |
* log.info("endTime" + LocalDateTime.now()); }
|
|
|
816 |
*/
|
| 34443 |
vikas.jang |
817 |
|
| 34547 |
vikas.jang |
818 |
@Scheduled(cron = "0 50 23 * * *")
|
| 34443 |
vikas.jang |
819 |
public void bidConfirmation() throws Throwable {
|
| 34547 |
vikas.jang |
820 |
log.info("running bid cron at 23:50PM");
|
| 34443 |
vikas.jang |
821 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.YESTERDAY);
|
|
|
822 |
}
|
|
|
823 |
|
| 34547 |
vikas.jang |
824 |
@Scheduled(cron = "0 0 19 * * *")
|
| 34443 |
vikas.jang |
825 |
public void processLiquidationBids() throws Throwable {
|
| 34547 |
vikas.jang |
826 |
log.info("running bid cron at 07:00PM");
|
| 34443 |
vikas.jang |
827 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
828 |
}
|
|
|
829 |
|
| 34547 |
vikas.jang |
830 |
@Scheduled(cron = "0 30 21 * * *")
|
| 34443 |
vikas.jang |
831 |
public void bidPurchaseOrder() throws Throwable {
|
| 34547 |
vikas.jang |
832 |
log.info("running bid cron at 09:30PM");
|
| 34443 |
vikas.jang |
833 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
834 |
}
|
| 34547 |
vikas.jang |
835 |
|
| 34669 |
amit.gupta |
836 |
/*@Scheduled(cron = "0 0 12 * * *")
|
|
|
837 |
public void processCashDiscount() throws Throwable {
|
|
|
838 |
scheduledTasks.processCashDiscount();
|
|
|
839 |
}*/
|
|
|
840 |
|
|
|
841 |
|
| 34563 |
vikas.jang |
842 |
@Scheduled(cron = "0 0 9,17 * * *")
|
| 34547 |
vikas.jang |
843 |
public void bidConsolidatedMessage() throws Throwable {
|
|
|
844 |
log.info("Running bid cron at 09:00 AM or 05:00 PM");
|
|
|
845 |
runOnceTasks.consolidatedBiddingMessage();
|
| 34563 |
vikas.jang |
846 |
}
|
| 34770 |
vikas.jang |
847 |
|
|
|
848 |
@Scheduled(cron = "0 0 8 * * *")
|
|
|
849 |
public void employeeTrackingReport() throws Throwable {
|
|
|
850 |
log.info("Running bid cron at 08:00 AM");
|
|
|
851 |
runOnceTasks.employeeTrackingReport();
|
|
|
852 |
}
|
| 34792 |
amit.gupta |
853 |
@Scheduled(cron = "0 0 0 1 1,4,7,10 *")
|
|
|
854 |
public void sendUpdateMobileBrandMarketShareQuaterlyMail() throws Throwable {
|
| 34791 |
aman.kumar |
855 |
log.info("Running Marketshare update remined quaterly");
|
|
|
856 |
scheduledTasks.sendUpdateMobileBrandMarketShareQuaterlyMail();
|
|
|
857 |
}
|
| 23756 |
amit.gupta |
858 |
}
|