| 23755 |
amit.gupta |
1 |
package com.smartdukaan.cron;
|
| 23723 |
amit.gupta |
2 |
|
| 29946 |
amit.gupta |
3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
|
|
4 |
import com.smartdukaan.cron.scheduled.*;
|
|
|
5 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
|
|
6 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
|
|
7 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
|
|
8 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
|
|
9 |
import com.spice.profitmandi.dao.util.ContentPojoPopulator;
|
|
|
10 |
import com.spice.profitmandi.service.integrations.samsung.upgradeoffer.UpgradeOfferService;
|
| 23723 |
amit.gupta |
11 |
import org.apache.logging.log4j.LogManager;
|
|
|
12 |
import org.apache.logging.log4j.Logger;
|
| 28389 |
amit.gupta |
13 |
import org.apache.velocity.app.VelocityEngine;
|
|
|
14 |
import org.apache.velocity.exception.VelocityException;
|
| 23898 |
amit.gupta |
15 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
16 |
import org.springframework.boot.ApplicationArguments;
|
|
|
17 |
import org.springframework.boot.ApplicationRunner;
|
| 23723 |
amit.gupta |
18 |
import org.springframework.boot.WebApplicationType;
|
|
|
19 |
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
20 |
import org.springframework.boot.builder.SpringApplicationBuilder;
|
|
|
21 |
import org.springframework.context.annotation.Bean;
|
|
|
22 |
import org.springframework.context.annotation.ComponentScan;
|
| 23935 |
amit.gupta |
23 |
import org.springframework.context.annotation.Primary;
|
| 23723 |
amit.gupta |
24 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
|
|
25 |
import org.springframework.core.io.ClassPathResource;
|
| 23906 |
amit.gupta |
26 |
import org.springframework.mail.javamail.JavaMailSender;
|
|
|
27 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
| 31010 |
amit.gupta |
28 |
import org.springframework.scheduling.annotation.EnableScheduling;
|
| 28389 |
amit.gupta |
29 |
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
|
| 23723 |
amit.gupta |
30 |
|
| 29946 |
amit.gupta |
31 |
import java.io.FileInputStream;
|
|
|
32 |
import java.io.IOException;
|
|
|
33 |
import java.time.LocalDate;
|
| 31008 |
amit.gupta |
34 |
import java.time.LocalDateTime;
|
|
|
35 |
import java.time.YearMonth;
|
| 31031 |
amit.gupta |
36 |
import java.util.ArrayList;
|
| 29946 |
amit.gupta |
37 |
import java.util.Arrays;
|
|
|
38 |
import java.util.List;
|
|
|
39 |
import java.util.Properties;
|
|
|
40 |
import java.util.stream.Collectors;
|
| 23724 |
amit.gupta |
41 |
|
| 23723 |
amit.gupta |
42 |
@SpringBootApplication
|
| 30578 |
amit.gupta |
43 |
//@EnableCaching
|
| 31396 |
amit.gupta |
44 |
@EnableScheduling
|
| 23755 |
amit.gupta |
45 |
@ComponentScan("com.smartdukaan.cron.*, com.spice.profitmandi.common.*")
|
| 24122 |
govind |
46 |
public class Application implements ApplicationRunner {
|
|
|
47 |
|
|
|
48 |
private static final Logger LOGGER = LogManager.getLogger(Application.class);
|
|
|
49 |
|
| 25563 |
amit.gupta |
50 |
@Autowired
|
| 27007 |
amit.gupta |
51 |
LeadSyncRunner leadSyncRunner;
|
| 30120 |
amit.gupta |
52 |
|
| 29860 |
amit.gupta |
53 |
@Autowired
|
| 30209 |
amit.gupta |
54 |
StandAlone standAlone;
|
|
|
55 |
|
|
|
56 |
@Autowired
|
| 29860 |
amit.gupta |
57 |
UpgradeOfferService upgradeOfferService;
|
| 27392 |
amit.gupta |
58 |
|
| 27007 |
amit.gupta |
59 |
@Autowired
|
| 27124 |
amit.gupta |
60 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
| 28368 |
tejbeer |
61 |
|
| 27562 |
amit.gupta |
62 |
@Autowired
|
| 28921 |
tejbeer |
63 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
|
|
64 |
|
|
|
65 |
@Autowired
|
| 27562 |
amit.gupta |
66 |
private InvestmentRelatedTasks investmentRelatedTasks;
|
| 27392 |
amit.gupta |
67 |
|
| 27124 |
amit.gupta |
68 |
@Autowired
|
| 27077 |
amit.gupta |
69 |
private CsService csService;
|
| 29814 |
tejbeer |
70 |
|
| 29714 |
amit.gupta |
71 |
@Autowired
|
|
|
72 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
| 24603 |
amit.gupta |
73 |
|
| 29361 |
tejbeer |
74 |
@Autowired
|
|
|
75 |
private ContentPojoPopulator contentPojoPopulator;
|
|
|
76 |
|
| 23723 |
amit.gupta |
77 |
public static void main(String[] args) throws Throwable {
|
| 30309 |
amit.gupta |
78 |
try {
|
|
|
79 |
new SpringApplicationBuilder(Application.class).web(WebApplicationType.NONE).run(args);
|
|
|
80 |
} catch (Throwable t) {
|
|
|
81 |
t.printStackTrace();
|
|
|
82 |
}
|
| 23723 |
amit.gupta |
83 |
}
|
| 24122 |
govind |
84 |
|
| 23723 |
amit.gupta |
85 |
@Bean
|
| 23738 |
amit.gupta |
86 |
public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
|
| 23755 |
amit.gupta |
87 |
LOGGER.info("Called Configuration");
|
| 24122 |
govind |
88 |
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
| 23723 |
amit.gupta |
89 |
propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
|
|
|
90 |
return propertySourcesPlaceholderConfigurer;
|
|
|
91 |
}
|
| 24122 |
govind |
92 |
|
| 28389 |
amit.gupta |
93 |
@Bean(name = "veloctyEngine")
|
|
|
94 |
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|
|
|
95 |
VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
|
|
|
96 |
|
|
|
97 |
Properties velocityProperties = new Properties();
|
|
|
98 |
velocityProperties.put("resource.loader", "class");
|
|
|
99 |
velocityProperties.put("class.resource.loader.class",
|
|
|
100 |
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
|
|
101 |
velocityProperties.put("file.resource.loader.cache", true);
|
|
|
102 |
velocityProperties.put("file.resource.loader.unicode", true);
|
|
|
103 |
velocityProperties.put("input.encoding", "UTF-8");
|
|
|
104 |
velocityProperties.put("output.encoding", "UTF-8");
|
| 29378 |
tejbeer |
105 |
velocityProperties.put("response.encoding", "UTF-8");
|
| 28389 |
amit.gupta |
106 |
velocityProperties.put("overrideLogging", true);
|
|
|
107 |
|
| 28921 |
tejbeer |
108 |
// velocityProperties.put("file.resource.loader.path", ".");
|
| 28389 |
amit.gupta |
109 |
|
|
|
110 |
factory.setVelocityProperties(velocityProperties);
|
|
|
111 |
|
|
|
112 |
return factory.createVelocityEngine();
|
|
|
113 |
|
|
|
114 |
}
|
|
|
115 |
|
| 24122 |
govind |
116 |
@Bean(name = "mailSender")
|
| 23935 |
amit.gupta |
117 |
@Primary
|
| 24122 |
govind |
118 |
public JavaMailSender sendGridMailSender() {
|
|
|
119 |
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
|
| 23723 |
amit.gupta |
120 |
|
| 24122 |
govind |
121 |
// Using gmail
|
|
|
122 |
mailSender.setHost("smtp.sendgrid.net");
|
|
|
123 |
mailSender.setPort(587);
|
| 27630 |
amit.gupta |
124 |
mailSender.setUsername("apikey");
|
|
|
125 |
mailSender.setPassword("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");
|
| 24122 |
govind |
126 |
|
|
|
127 |
Properties javaMailProperties = new Properties();
|
|
|
128 |
javaMailProperties.put("mail.smtp.starttls.enable", "false");
|
|
|
129 |
javaMailProperties.put("mail.smtp.auth", "true");
|
|
|
130 |
javaMailProperties.put("mail.transport.protocol", "smtp");
|
| 24603 |
amit.gupta |
131 |
// javaMailProperties.put("mail.debug", "true");// Prints out everything on
|
|
|
132 |
// screen
|
| 24122 |
govind |
133 |
|
|
|
134 |
mailSender.setJavaMailProperties(javaMailProperties);
|
|
|
135 |
return mailSender;
|
|
|
136 |
}
|
|
|
137 |
|
| 23935 |
amit.gupta |
138 |
@Bean
|
| 24122 |
govind |
139 |
public JavaMailSender googleMailSender() {
|
| 23935 |
amit.gupta |
140 |
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
|
| 24122 |
govind |
141 |
// Using gmail
|
| 23935 |
amit.gupta |
142 |
mailSender.setHost("smtp.gmail.com");
|
|
|
143 |
mailSender.setPort(587);
|
| 30763 |
tejbeer |
144 |
mailSender.setUsername("build@shop2020.in");
|
| 23935 |
amit.gupta |
145 |
mailSender.setPassword("cafe@nes");
|
| 24122 |
govind |
146 |
|
| 23935 |
amit.gupta |
147 |
Properties javaMailProperties = new Properties();
|
|
|
148 |
javaMailProperties.put("mail.smtp.starttls.enable", "true");
|
|
|
149 |
javaMailProperties.put("mail.smtp.auth", "true");
|
|
|
150 |
javaMailProperties.put("mail.transport.protocol", "smtp");
|
| 24122 |
govind |
151 |
javaMailProperties.put("mail.debug", "true");// Prints out everything on screen
|
| 23935 |
amit.gupta |
152 |
mailSender.setJavaMailProperties(javaMailProperties);
|
|
|
153 |
return mailSender;
|
|
|
154 |
}
|
|
|
155 |
|
| 24122 |
govind |
156 |
@Autowired
|
| 23898 |
amit.gupta |
157 |
private RunOnceTasks runOnceTasks;
|
| 24122 |
govind |
158 |
|
|
|
159 |
@Autowired
|
| 23929 |
amit.gupta |
160 |
private ScheduledTasks scheduledTasks;
|
| 24848 |
amit.gupta |
161 |
|
| 24827 |
amit.gupta |
162 |
@Autowired
|
|
|
163 |
private Reconciliation reconciliation;
|
| 24122 |
govind |
164 |
|
| 30335 |
amit.gupta |
165 |
@Autowired
|
|
|
166 |
CaptchaService captchaService;
|
|
|
167 |
|
| 23898 |
amit.gupta |
168 |
@Override
|
|
|
169 |
public void run(ApplicationArguments args) throws Exception {
|
|
|
170 |
LOGGER.info("Called run method");
|
| 25694 |
amit.gupta |
171 |
if (args.containsOption("tc")) {
|
| 25842 |
amit.gupta |
172 |
System.out.println("Toffee service called");
|
| 29714 |
amit.gupta |
173 |
scheduledTasks.toffeeRollback();
|
| 25694 |
amit.gupta |
174 |
System.exit(0);
|
|
|
175 |
}
|
| 30739 |
amit.gupta |
176 |
if (args.containsOption("bag")) {
|
|
|
177 |
System.out.println("Bag service called");
|
|
|
178 |
runOnceTasks.testBag();
|
|
|
179 |
System.exit(0);
|
|
|
180 |
}
|
| 30309 |
amit.gupta |
181 |
|
| 27272 |
amit.gupta |
182 |
if (args.containsOption("rw")) {
|
|
|
183 |
System.out.println("Reverse wallet");
|
|
|
184 |
scheduledTasks.reverseWallet();
|
|
|
185 |
System.exit(0);
|
|
|
186 |
}
|
| 28633 |
amit.gupta |
187 |
if (args.containsOption("sendIndentTertiary")) {
|
|
|
188 |
System.out.println("sendIndentTertiary");
|
|
|
189 |
scheduledTasks.sendIndentTertiary();
|
|
|
190 |
System.exit(0);
|
|
|
191 |
}
|
| 28709 |
amit.gupta |
192 |
if (args.containsOption("checkPartnerActiveStore")) {
|
|
|
193 |
System.out.println("checkPartnerActiveStore");
|
|
|
194 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
195 |
System.exit(0);
|
|
|
196 |
}
|
| 28921 |
tejbeer |
197 |
|
| 29800 |
manish |
198 |
if (args.containsOption("selectFinServiceFollowUpDateByCurrDate")) {
|
|
|
199 |
System.out.println("selectfinServiceFollowUpDateByCurrDate");
|
| 29814 |
tejbeer |
200 |
|
| 29800 |
manish |
201 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
|
|
202 |
System.exit(0);
|
|
|
203 |
}
|
|
|
204 |
|
| 27720 |
amit.gupta |
205 |
if (args.containsOption("addHdfcPayment")) {
|
|
|
206 |
runOnceTasks.addPayment();
|
|
|
207 |
System.exit(0);
|
|
|
208 |
}
|
| 27431 |
amit.gupta |
209 |
if (args.containsOption("processSchemeOut")) {
|
|
|
210 |
System.out.println("Process schemeOut");
|
|
|
211 |
int orderId = Integer.parseInt(args.getOptionValues("orderid").get(0));
|
|
|
212 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoid").get(0));
|
|
|
213 |
runOnceTasks.processSchemeOut(fofoId, orderId);
|
|
|
214 |
System.exit(0);
|
|
|
215 |
}
|
| 27124 |
amit.gupta |
216 |
if (args.containsOption("at")) {
|
|
|
217 |
System.out.println("Toffee service called");
|
|
|
218 |
ticketRelatedScheduledTask.alertforTicket();
|
|
|
219 |
System.exit(0);
|
|
|
220 |
}
|
|
|
221 |
if (args.containsOption("et")) {
|
| 27392 |
amit.gupta |
222 |
ticketRelatedScheduledTask.escalateTicket();
|
|
|
223 |
;
|
| 27124 |
amit.gupta |
224 |
System.exit(0);
|
|
|
225 |
}
|
| 26291 |
tejbeer |
226 |
if (args.containsOption("sr")) {
|
| 25694 |
amit.gupta |
227 |
List<String> schemeIds = args.getOptionValues("schemeId");
|
| 25697 |
amit.gupta |
228 |
System.out.println(schemeIds);
|
| 25694 |
amit.gupta |
229 |
scheduledTasks.schemeRollback(schemeIds);
|
| 25695 |
amit.gupta |
230 |
System.exit(0);
|
| 25694 |
amit.gupta |
231 |
}
|
| 27437 |
amit.gupta |
232 |
if (args.containsOption("processActivation")) {
|
|
|
233 |
scheduledTasks.processActivation();
|
|
|
234 |
System.exit(0);
|
|
|
235 |
}
|
| 28769 |
amit.gupta |
236 |
if (args.containsOption("sendAttendanceMorningAlert")) {
|
|
|
237 |
scheduledTasks.sendAttendanceMorningAlert();
|
|
|
238 |
System.exit(0);
|
|
|
239 |
}
|
| 28779 |
amit.gupta |
240 |
if (args.containsOption("sendAttendanceEveningAlert")) {
|
|
|
241 |
scheduledTasks.sendAttendanceEveningAlert();
|
|
|
242 |
System.exit(0);
|
|
|
243 |
}
|
| 28368 |
tejbeer |
244 |
|
|
|
245 |
if (args.containsOption("checkRazorPayPaymentStatus")) {
|
|
|
246 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
247 |
System.exit(0);
|
|
|
248 |
}
|
| 25503 |
amit.gupta |
249 |
if (args.containsOption("grouping")) {
|
|
|
250 |
scheduledTasks.grouping();
|
|
|
251 |
System.exit(0);
|
|
|
252 |
}
|
| 25530 |
amit.gupta |
253 |
if (args.containsOption("fixWallet")) {
|
|
|
254 |
runOnceTasks.fixWallet();
|
|
|
255 |
System.exit(0);
|
|
|
256 |
}
|
| 25312 |
amit.gupta |
257 |
if (args.containsOption("reconcileExpiredFixedSchemes")) {
|
| 25073 |
amit.gupta |
258 |
reconciliation.reconcileExpiredFixedSchemes();
|
|
|
259 |
System.exit(0);
|
|
|
260 |
}
|
| 27746 |
amit.gupta |
261 |
if (args.containsOption("dailyReconciliation")) {
|
| 28207 |
tejbeer |
262 |
if (args.containsOption("date")) {
|
| 27746 |
amit.gupta |
263 |
LocalDate date = LocalDate.parse(args.getOptionValues("date").get(0));
|
|
|
264 |
reconciliation.dailyReconciliation(date);
|
|
|
265 |
} else {
|
|
|
266 |
reconciliation.dailyReconciliation(LocalDate.now().minusDays(1));
|
|
|
267 |
}
|
|
|
268 |
System.exit(0);
|
|
|
269 |
}
|
| 26291 |
tejbeer |
270 |
/*
|
|
|
271 |
* if (args.containsOption("test")) { schemeService.processSchemeIn(9243,
|
|
|
272 |
* 175138102); throw new Exception(); }
|
|
|
273 |
*/
|
| 25073 |
amit.gupta |
274 |
if (args.containsOption("fixSchemePayouts")) {
|
|
|
275 |
|
| 25029 |
amit.gupta |
276 |
runOnceTasks.fixSchemePayouts();
|
|
|
277 |
System.exit(0);
|
|
|
278 |
}
|
| 25312 |
amit.gupta |
279 |
if (args.containsOption("sendNotification")) {
|
| 25300 |
tejbeer |
280 |
scheduledTasks.sendNotification();
|
|
|
281 |
System.exit(0);
|
|
|
282 |
}
|
| 25721 |
tejbeer |
283 |
|
| 26291 |
tejbeer |
284 |
if (args.containsOption("ticketClosed")) {
|
|
|
285 |
scheduledTasks.ticketClosed();
|
|
|
286 |
System.exit(0);
|
|
|
287 |
}
|
| 28921 |
tejbeer |
288 |
|
| 28776 |
amit.gupta |
289 |
if (args.containsOption("getVendorWarehouses")) {
|
|
|
290 |
int warehouseId = Integer.parseInt(args.getOptionValues("warehouseId").get(0));
|
|
|
291 |
scheduledTasks.getVendorWarehouses(warehouseId);
|
|
|
292 |
System.exit(0);
|
|
|
293 |
}
|
| 26291 |
tejbeer |
294 |
|
| 25721 |
tejbeer |
295 |
if (args.containsOption("checkfocusedModelInPartnerStock")) {
|
|
|
296 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
297 |
System.exit(0);
|
|
|
298 |
}
|
| 28207 |
tejbeer |
299 |
|
| 29451 |
manish |
300 |
if (args.containsOption("checkImeiActivation")) {
|
|
|
301 |
scheduledTasks.checkImeiActivation();
|
|
|
302 |
System.exit(0);
|
|
|
303 |
}
|
| 29776 |
tejbeer |
304 |
|
| 29532 |
manish |
305 |
if (args.containsOption("checkTecnoImeiActivation")) {
|
| 29451 |
manish |
306 |
|
| 29532 |
manish |
307 |
LocalDate dateTechno = LocalDate.now();
|
| 29776 |
tejbeer |
308 |
|
| 30318 |
amit.gupta |
309 |
int days = 25;
|
|
|
310 |
if (args.containsOption("days")) {
|
|
|
311 |
days = Integer.parseInt(args.getOptionValues("days").get(0));
|
|
|
312 |
}
|
| 29532 |
manish |
313 |
scheduledTasks.checkTecnoImeiActivation(dateTechno, days);
|
| 29488 |
manish |
314 |
System.exit(0);
|
|
|
315 |
}
|
| 29776 |
tejbeer |
316 |
|
| 29488 |
manish |
317 |
if (args.containsOption("checkItelImeiActivation")) {
|
| 29537 |
manish |
318 |
LocalDate dateItel = LocalDate.now();
|
| 30318 |
amit.gupta |
319 |
int days = 25;
|
|
|
320 |
if (args.containsOption("days")) {
|
|
|
321 |
days = Integer.parseInt(args.getOptionValues("days").get(0));
|
|
|
322 |
}
|
| 29537 |
manish |
323 |
scheduledTasks.checkItelImeiActivation(dateItel, days);
|
| 29488 |
manish |
324 |
System.exit(0);
|
|
|
325 |
}
|
| 29532 |
manish |
326 |
|
| 28207 |
tejbeer |
327 |
if (args.containsOption("partnerProblemAlert")) {
|
|
|
328 |
scheduledTasks.partnerProblemAlert();
|
|
|
329 |
System.exit(0);
|
|
|
330 |
}
|
| 24855 |
amit.gupta |
331 |
if (args.containsOption("notify")) {
|
| 25073 |
amit.gupta |
332 |
if (args.containsOption("fofoId")) {
|
| 24988 |
tejbeer |
333 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoId").get(0));
|
| 25837 |
amit.gupta |
334 |
scheduledTasks.sendDailySalesNotificationToPartner(fofoId);
|
| 24988 |
tejbeer |
335 |
}
|
| 24855 |
amit.gupta |
336 |
System.exit(0);
|
|
|
337 |
}
|
| 24955 |
amit.gupta |
338 |
if (args.containsOption("findMismatchesInIndent")) {
|
|
|
339 |
runOnceTasks.findMismatchesInIndent();
|
|
|
340 |
System.exit(0);
|
|
|
341 |
}
|
| 28921 |
tejbeer |
342 |
|
|
|
343 |
if (args.containsOption("onboardingEventDelays")) {
|
|
|
344 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
|
|
345 |
System.exit(0);
|
|
|
346 |
}
|
|
|
347 |
|
| 29035 |
tejbeer |
348 |
if (args.containsOption("onBoardingCompleteEventEmail")) {
|
|
|
349 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
350 |
System.exit(0);
|
|
|
351 |
}
|
|
|
352 |
|
| 29040 |
tejbeer |
353 |
if (args.containsOption("onBoardingDocumentsPending")) {
|
|
|
354 |
onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
355 |
System.exit(0);
|
|
|
356 |
}
|
| 28982 |
tejbeer |
357 |
if (args.containsOption("onBoardingMigration")) {
|
|
|
358 |
onBoardingRelatedSchelduleTask.onBoardingMigration();
|
|
|
359 |
System.exit(0);
|
|
|
360 |
}
|
|
|
361 |
|
| 28921 |
tejbeer |
362 |
if (args.containsOption("advancePaymentPendingAlert")) {
|
|
|
363 |
onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
364 |
System.exit(0);
|
|
|
365 |
}
|
|
|
366 |
|
|
|
367 |
if (args.containsOption("fullPaymentPendingAlert")) {
|
|
|
368 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
|
|
369 |
System.exit(0);
|
|
|
370 |
}
|
|
|
371 |
|
| 28963 |
tejbeer |
372 |
if (args.containsOption("advancePaymentPendinglegalAlert")) {
|
|
|
373 |
onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
374 |
System.exit(0);
|
|
|
375 |
}
|
|
|
376 |
|
| 29308 |
tejbeer |
377 |
if (args.containsOption("markDelhiveryOrderDelivered")) {
|
|
|
378 |
scheduledTasks.markDelhiveryOrderDelivered();
|
|
|
379 |
System.exit(0);
|
|
|
380 |
}
|
|
|
381 |
|
| 31117 |
tejbeer |
382 |
if (args.containsOption("markBlueDartOrderDelivered")) {
|
|
|
383 |
scheduledTasks.markBlueDartOrderDelivered();
|
|
|
384 |
System.exit(0);
|
|
|
385 |
}
|
|
|
386 |
|
| 29109 |
tejbeer |
387 |
if (args.containsOption("mergingdata")) {
|
|
|
388 |
onBoardingRelatedSchelduleTask.mergingdata();
|
|
|
389 |
System.exit(0);
|
|
|
390 |
}
|
| 28921 |
tejbeer |
391 |
if (args.containsOption("brandingAlert")) {
|
|
|
392 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
393 |
System.exit(0);
|
|
|
394 |
}
|
| 29255 |
tejbeer |
395 |
|
|
|
396 |
if (args.containsOption("storeTimelinePromoterPending")) {
|
|
|
397 |
onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
398 |
System.exit(0);
|
|
|
399 |
}
|
|
|
400 |
|
| 27222 |
amit.gupta |
401 |
if (args.containsOption("ppl")) {
|
|
|
402 |
runOnceTasks.printPendingLeads();
|
|
|
403 |
System.exit(0);
|
|
|
404 |
}
|
| 31089 |
amit.gupta |
405 |
|
|
|
406 |
if (args.containsOption("sweets")) {
|
|
|
407 |
runOnceTasks.getSweet();
|
|
|
408 |
}
|
| 24862 |
amit.gupta |
409 |
if (args.containsOption("notifyAll")) {
|
| 25837 |
amit.gupta |
410 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
| 24862 |
amit.gupta |
411 |
System.exit(0);
|
|
|
412 |
}
|
| 31249 |
tejbeer |
413 |
|
|
|
414 |
if (args.containsOption("monthlyTargetForInternalTeam")) {
|
|
|
415 |
scheduledTasks.monthlyTargetForInternalTeam();
|
|
|
416 |
System.exit(0);
|
|
|
417 |
}
|
|
|
418 |
|
|
|
419 |
if (args.containsOption("monthlyTargetForPartner")) {
|
|
|
420 |
scheduledTasks.monthlyTargetForPartner();
|
|
|
421 |
System.exit(0);
|
|
|
422 |
}
|
|
|
423 |
|
|
|
424 |
if (args.containsOption("hygineAlertForPartner")) {
|
|
|
425 |
scheduledTasks.hygineAlertForPartner();
|
|
|
426 |
System.exit(0);
|
|
|
427 |
}
|
|
|
428 |
|
|
|
429 |
if (args.containsOption("hygineAlertForInternalTeam")) {
|
|
|
430 |
scheduledTasks.hygineAlertForInternalTeam();
|
|
|
431 |
System.exit(0);
|
|
|
432 |
}
|
|
|
433 |
|
| 25029 |
amit.gupta |
434 |
if (args.containsOption("OutSchemeReco")) {
|
| 25073 |
amit.gupta |
435 |
scheduledTasks.dryRunOutSchemeReco();
|
| 27252 |
amit.gupta |
436 |
// runOnceTasks.migrateChallansToInvoices();
|
|
|
437 |
// reconciliation.dailyReconciliation();
|
|
|
438 |
System.exit(0);
|
|
|
439 |
}
|
|
|
440 |
if (args.containsOption("dryRunSchemeReco")) {
|
|
|
441 |
scheduledTasks.dryRunSchemeReco();
|
|
|
442 |
// runOnceTasks.migrateChallansToInvoices();
|
|
|
443 |
// reconciliation.dailyReconciliation();
|
|
|
444 |
System.exit(0);
|
|
|
445 |
}
|
|
|
446 |
if (args.containsOption("OutReco1")) {
|
|
|
447 |
scheduledTasks.dryRunSchemeOutReco1();
|
|
|
448 |
System.exit(0);
|
|
|
449 |
}
|
|
|
450 |
if (args.containsOption("once")) {
|
| 31046 |
amit.gupta |
451 |
if (args.containsOption("cancelOnceAssist")) {
|
|
|
452 |
runOnceTasks.cancelOnceAssist();
|
|
|
453 |
}
|
| 24122 |
govind |
454 |
if (args.containsOption("1")) {
|
| 24603 |
amit.gupta |
455 |
if (args.containsOption("test")) {
|
| 24271 |
amit.gupta |
456 |
scheduledTasks.sendPartnerInvestmentDetails(args.getOptionValues("email"));
|
| 24272 |
amit.gupta |
457 |
} else {
|
| 27751 |
amit.gupta |
458 |
System.out.println("Called sendPartnerInvestmentDetails");
|
| 30858 |
amit.gupta |
459 |
scheduledTasks.sendPartnerInvestmentDetails();
|
| 24271 |
amit.gupta |
460 |
}
|
| 24122 |
govind |
461 |
System.exit(0);
|
|
|
462 |
}
|
| 24682 |
amit.gupta |
463 |
if (args.containsOption("2")) {
|
| 24696 |
amit.gupta |
464 |
if (args.containsOption("test")) {
|
| 24848 |
amit.gupta |
465 |
String[] emails = new String[args.getOptionValues("email").size()];
|
| 24696 |
amit.gupta |
466 |
scheduledTasks.sendAgeingReport(args.getOptionValues("email").toArray(emails));
|
|
|
467 |
} else {
|
|
|
468 |
scheduledTasks.sendAgeingReport();
|
|
|
469 |
}
|
| 24682 |
amit.gupta |
470 |
System.exit(0);
|
|
|
471 |
}
|
| 24151 |
amit.gupta |
472 |
if (args.containsOption("3")) {
|
| 24603 |
amit.gupta |
473 |
if (args.getOptionNames().contains("offset")) {
|
| 24461 |
amit.gupta |
474 |
int offset = Integer.parseInt(args.getOptionValues("offset").get(0));
|
| 24603 |
amit.gupta |
475 |
if (args.getOptionNames().contains("days")) {
|
| 24461 |
amit.gupta |
476 |
int durationDays = Integer.parseInt(args.getOptionValues("days").get(0));
|
| 25586 |
amit.gupta |
477 |
scheduledTasks.processScheme(offset, durationDays, args.containsOption("dryRun"));
|
| 24461 |
amit.gupta |
478 |
} else {
|
| 25586 |
amit.gupta |
479 |
scheduledTasks.processScheme(offset, args.containsOption("dryRun"));
|
| 24461 |
amit.gupta |
480 |
}
|
| 24560 |
amit.gupta |
481 |
} else if (args.containsOption("catalogid")) {
|
| 24603 |
amit.gupta |
482 |
// scheduledTasks.processSchemeForModel(args.getOptionValues("catalogid").get(0));
|
| 24461 |
amit.gupta |
483 |
} else {
|
| 25586 |
amit.gupta |
484 |
scheduledTasks.processScheme(args.containsOption("dryRun"));
|
| 24461 |
amit.gupta |
485 |
}
|
| 24151 |
amit.gupta |
486 |
System.exit(0);
|
|
|
487 |
}
|
| 24238 |
amit.gupta |
488 |
if (args.containsOption("4")) {
|
| 24241 |
amit.gupta |
489 |
scheduledTasks.evaluateExcessSchemeOut();
|
| 24256 |
amit.gupta |
490 |
}
|
|
|
491 |
if (args.containsOption("5")) {
|
|
|
492 |
int offset = Integer.parseInt(args.getOptionValues("offset").get(0));
|
| 25586 |
amit.gupta |
493 |
scheduledTasks.processScheme(offset, args.containsOption("dryRun"));
|
| 24238 |
amit.gupta |
494 |
System.exit(0);
|
|
|
495 |
}
|
| 24603 |
amit.gupta |
496 |
if (args.containsOption("cancelOrder")) {
|
| 24265 |
amit.gupta |
497 |
List<String> invoiceNumbers = args.getOptionValues("invoiceNumber");
|
|
|
498 |
runOnceTasks.cancelOrder(invoiceNumbers);
|
|
|
499 |
}
|
| 24641 |
amit.gupta |
500 |
if (args.containsOption("migratePurchase")) {
|
|
|
501 |
runOnceTasks.migratePurchase();
|
|
|
502 |
}
|
| 24603 |
amit.gupta |
503 |
if (args.containsOption("migratepd")) {
|
| 24431 |
amit.gupta |
504 |
scheduledTasks.moveImeisToPriceDropImeis();
|
|
|
505 |
}
|
| 24603 |
amit.gupta |
506 |
if (args.containsOption("walletmismatch")) {
|
| 24542 |
amit.gupta |
507 |
scheduledTasks.walletmismatch();
|
|
|
508 |
}
|
| 24603 |
amit.gupta |
509 |
if (args.containsOption("schemewalletmismatch")) {
|
| 24580 |
amit.gupta |
510 |
scheduledTasks.schemewalletmismatch();
|
|
|
511 |
}
|
| 24603 |
amit.gupta |
512 |
if (args.containsOption("gst")) {
|
| 24542 |
amit.gupta |
513 |
scheduledTasks.gst();
|
|
|
514 |
}
|
| 26291 |
tejbeer |
515 |
if (args.containsOption("mailDashboardScreenshots")) {
|
| 25751 |
amit.gupta |
516 |
runOnceTasks.mailDashboardScreenshots();
|
|
|
517 |
}
|
| 26291 |
tejbeer |
518 |
if (args.containsOption("notifyLead")) {
|
| 25942 |
amit.gupta |
519 |
scheduledTasks.notifyLead();
|
| 25940 |
amit.gupta |
520 |
scheduledTasks.notifyVisits();
|
| 25927 |
amit.gupta |
521 |
}
|
| 26291 |
tejbeer |
522 |
if (args.containsOption("fixgrn")) {
|
| 26092 |
amit.gupta |
523 |
runOnceTasks.fixGrn();
|
|
|
524 |
}
|
| 26291 |
tejbeer |
525 |
if (args.containsOption("pbfix")) {
|
| 26033 |
amit.gupta |
526 |
runOnceTasks.pbfix();
|
|
|
527 |
}
|
| 26579 |
amit.gupta |
528 |
if (args.containsOption("mongom")) {
|
|
|
529 |
runOnceTasks.mongom();
|
|
|
530 |
}
|
| 26797 |
amit.gupta |
531 |
if (args.containsOption("processPd")) {
|
|
|
532 |
int priceDropId = Integer.parseInt(args.getOptionValues("processPd").get(0));
|
|
|
533 |
runOnceTasks.processPd(priceDropId);
|
|
|
534 |
}
|
| 26291 |
tejbeer |
535 |
if (args.containsOption("samsung")) {
|
| 27392 |
amit.gupta |
536 |
if (args.containsOption("ym")) {
|
| 26408 |
amit.gupta |
537 |
int ym = Integer.parseInt(args.getOptionValues("ym").get(0));
|
|
|
538 |
runOnceTasks.fetchImeiActivation(ym);
|
|
|
539 |
}
|
|
|
540 |
runOnceTasks.fetchImeiActivation(0);
|
| 26214 |
amit.gupta |
541 |
}
|
| 26291 |
tejbeer |
542 |
if (args.containsOption("fixdupimeigrn")) {
|
| 26265 |
amit.gupta |
543 |
runOnceTasks.fixDupGrns();
|
|
|
544 |
}
|
| 27392 |
amit.gupta |
545 |
if (args.containsOption("cancel")) {
|
| 26759 |
amit.gupta |
546 |
runOnceTasks.cancelDn(args.getOptionValues("dn").get(0));
|
|
|
547 |
}
|
| 27392 |
amit.gupta |
548 |
if (args.containsOption("fixScheme")) {
|
| 26929 |
amit.gupta |
549 |
runOnceTasks.fixScheme();
|
|
|
550 |
}
|
| 27392 |
amit.gupta |
551 |
if (args.containsOption("syncLeads")) {
|
| 27007 |
amit.gupta |
552 |
leadSyncRunner.syncLeads();
|
|
|
553 |
}
|
| 27392 |
amit.gupta |
554 |
if (args.containsOption("testCs")) {
|
| 27077 |
amit.gupta |
555 |
int category = Integer.parseInt(args.getOptionValues("category").get(0));
|
|
|
556 |
EscalationType escalationType = EscalationType.valueOf(args.getOptionValues("escalation").get(0));
|
|
|
557 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoid").get(0));
|
|
|
558 |
csService.getAuthUserId(category, escalationType, fofoId);
|
|
|
559 |
}
|
| 27392 |
amit.gupta |
560 |
if (args.containsOption("duporder")) {
|
| 27279 |
amit.gupta |
561 |
runOnceTasks.removeDuplicateOrders();
|
|
|
562 |
}
|
| 27511 |
amit.gupta |
563 |
if (args.containsOption("createDummyInvoices")) {
|
|
|
564 |
runOnceTasks.createDummyInvoices();
|
|
|
565 |
}
|
| 27392 |
amit.gupta |
566 |
|
| 27450 |
tejbeer |
567 |
if (args.containsOption("createGeofence")) {
|
|
|
568 |
runOnceTasks.createGeofence();
|
|
|
569 |
}
|
|
|
570 |
if (args.containsOption("getAllGeofences")) {
|
|
|
571 |
runOnceTasks.getAllGeofences();
|
|
|
572 |
}
|
| 27562 |
amit.gupta |
573 |
if (args.containsOption("payMonthlyInvestment")) {
|
|
|
574 |
investmentRelatedTasks.payMonthlyInvestment();
|
|
|
575 |
}
|
| 28531 |
amit.gupta |
576 |
if (args.containsOption("evaluateActualInvestmentPayout")) {
|
|
|
577 |
investmentRelatedTasks.evaluateActualInvestmentPayout();
|
|
|
578 |
}
|
| 27457 |
tejbeer |
579 |
if (args.containsOption("deleteGeofences")) {
|
|
|
580 |
List<String> geofenceIds = args.getOptionValues("geofenceId");
|
|
|
581 |
runOnceTasks.deleteGeofences(geofenceIds);
|
|
|
582 |
}
|
| 27948 |
amit.gupta |
583 |
if (args.containsOption("createOffers")) {
|
| 28866 |
amit.gupta |
584 |
if (args.containsOption("fileName")) {
|
| 28865 |
amit.gupta |
585 |
String fileName = args.getOptionValues("fileName").get(0);
|
| 29714 |
amit.gupta |
586 |
FileInputStream stream = new FileInputStream(fileName);
|
|
|
587 |
runOnceTasks.createOffers(stream);
|
| 27948 |
amit.gupta |
588 |
}
|
|
|
589 |
}
|
| 28207 |
tejbeer |
590 |
if (args.containsOption("schemeout")) {
|
|
|
591 |
if (args.containsOption("invoices")) {
|
| 27892 |
amit.gupta |
592 |
String invoicesString = args.getOptionValues("invoices").get(0);
|
|
|
593 |
List<String> invoices = Arrays.asList(invoicesString.split(","));
|
|
|
594 |
scheduledTasks.processSchemeOut(invoices);
|
|
|
595 |
}
|
|
|
596 |
}
|
| 28207 |
tejbeer |
597 |
if (args.containsOption("schemein")) {
|
|
|
598 |
if (args.containsOption("invoices")) {
|
| 27987 |
amit.gupta |
599 |
String invoicesString = args.getOptionValues("invoices").get(0);
|
|
|
600 |
List<String> invoices = Arrays.asList(invoicesString.split(","));
|
|
|
601 |
scheduledTasks.processSchemeIn(invoices);
|
|
|
602 |
}
|
|
|
603 |
}
|
| 28207 |
tejbeer |
604 |
|
|
|
605 |
if (args.containsOption("fixScans")) {
|
| 28038 |
amit.gupta |
606 |
runOnceTasks.fixScans();
|
|
|
607 |
}
|
| 29860 |
amit.gupta |
608 |
if (args.containsOption("fixPrebookingOrderGrn")) {
|
|
|
609 |
runOnceTasks.genericCreateCurrentInventorySnapshot();
|
|
|
610 |
}
|
| 29870 |
amit.gupta |
611 |
if (args.containsOption("fixOurSerialized")) {
|
| 30120 |
amit.gupta |
612 |
if (args.containsOption("orderIds")) {
|
| 29870 |
amit.gupta |
613 |
String orderIdsString = args.getOptionValues("orderIds").get(0);
|
| 30421 |
tejbeer |
614 |
List<Integer> orderIds = Arrays.asList(orderIdsString.split(",")).stream()
|
|
|
615 |
.map(x -> Integer.parseInt(x)).collect(Collectors.toList());
|
|
|
616 |
// runOnceTasks.fixOurSerialized(orderIds);
|
| 29870 |
amit.gupta |
617 |
}
|
|
|
618 |
}
|
| 28921 |
tejbeer |
619 |
|
| 28622 |
amit.gupta |
620 |
if (args.containsOption("reverseMaa")) {
|
|
|
621 |
runOnceTasks.reverseMaa();
|
|
|
622 |
}
|
| 28921 |
tejbeer |
623 |
|
| 28558 |
amit.gupta |
624 |
if (args.containsOption("fixOffer")) {
|
|
|
625 |
runOnceTasks.fixOffer();
|
|
|
626 |
}
|
| 28921 |
tejbeer |
627 |
|
| 28661 |
amit.gupta |
628 |
if (args.containsOption("opporeno")) {
|
|
|
629 |
runOnceTasks.opporeno();
|
|
|
630 |
}
|
| 28921 |
tejbeer |
631 |
|
| 28675 |
amit.gupta |
632 |
if (args.containsOption("fixorders")) {
|
|
|
633 |
runOnceTasks.fixOrders();
|
|
|
634 |
}
|
| 28736 |
amit.gupta |
635 |
if (args.containsOption("fixreservations")) {
|
|
|
636 |
runOnceTasks.fixReservations();
|
|
|
637 |
}
|
| 28809 |
amit.gupta |
638 |
if (args.containsOption("addinvestment")) {
|
|
|
639 |
runOnceTasks.addInvestment();
|
|
|
640 |
}
|
| 28841 |
amit.gupta |
641 |
if (args.containsOption("brandregion")) {
|
|
|
642 |
runOnceTasks.brandRegion();
|
|
|
643 |
}
|
| 28972 |
amit.gupta |
644 |
if (args.containsOption("rollOutUpgardedMargins")) {
|
|
|
645 |
scheduledTasks.rollOutUpgardedMargins();
|
|
|
646 |
}
|
| 29251 |
amit.gupta |
647 |
if (args.containsOption("rollOutUpgardedMarginsNextMonth")) {
|
|
|
648 |
scheduledTasks.rollOutUpgardedMarginsNextMonth();
|
|
|
649 |
}
|
|
|
650 |
if (args.containsOption("checkCancellationMargin")) {
|
|
|
651 |
scheduledTasks.checkCancellationMargin();
|
|
|
652 |
}
|
| 30421 |
tejbeer |
653 |
if (args.containsOption("reviewUncontactablePartner")) {
|
|
|
654 |
scheduledTasks.reviewUncontactablePartner();
|
|
|
655 |
}
|
| 29366 |
tejbeer |
656 |
if (args.containsOption("sendWelcomeEmail")) {
|
|
|
657 |
onBoardingRelatedSchelduleTask.sendWelcomeEmail();
|
| 29361 |
tejbeer |
658 |
}
|
| 29776 |
tejbeer |
659 |
|
|
|
660 |
if (args.containsOption("partnerOnboardingLegalMigration")) {
|
|
|
661 |
onBoardingRelatedSchelduleTask.partnerOnboardingLegalMigration();
|
|
|
662 |
}
|
|
|
663 |
|
| 29794 |
tejbeer |
664 |
if (args.containsOption("addKycLegalMigration")) {
|
|
|
665 |
onBoardingRelatedSchelduleTask.addKycLegalMigration();
|
|
|
666 |
}
|
|
|
667 |
|
| 30309 |
amit.gupta |
668 |
if (args.containsOption("testGstPro")) {
|
|
|
669 |
System.out.println("TestGstProc called");
|
|
|
670 |
try {
|
| 30324 |
amit.gupta |
671 |
runOnceTasks.updateIrnsToInvoices();
|
| 30309 |
amit.gupta |
672 |
} catch (Exception e) {
|
|
|
673 |
e.printStackTrace();
|
|
|
674 |
}
|
|
|
675 |
}
|
|
|
676 |
|
| 29564 |
amit.gupta |
677 |
if (args.containsOption("reverseSchemeCancelInvoice")) {
|
| 29776 |
tejbeer |
678 |
if (args.containsOption("invoice")) {
|
| 29564 |
amit.gupta |
679 |
String invoice = args.getOptionValues("invoice").get(0);
|
|
|
680 |
runOnceTasks.reverseSchemes(invoice);
|
|
|
681 |
}
|
|
|
682 |
}
|
| 29814 |
tejbeer |
683 |
|
| 31031 |
amit.gupta |
684 |
if (args.containsOption("reverseInvalidActivation")) {
|
|
|
685 |
if (args.containsOption("inventoryids")) {
|
|
|
686 |
String inventoryItemIdsString = args.getOptionValues("inventoryids").get(0);
|
|
|
687 |
List<Integer> inventoryItemIds = new ArrayList<>();
|
|
|
688 |
for (String inventoryItemIdString : inventoryItemIdsString.split(",")) {
|
|
|
689 |
int inventoryItemId = Integer.parseInt(inventoryItemIdString.trim());
|
|
|
690 |
inventoryItemIds.add(inventoryItemId);
|
|
|
691 |
}
|
|
|
692 |
runOnceTasks.reverseInvalidActivation(inventoryItemIds);
|
|
|
693 |
}
|
|
|
694 |
}
|
|
|
695 |
|
| 29814 |
tejbeer |
696 |
if (args.containsOption("partnerWiseCreditAccount")) {
|
|
|
697 |
scheduledTasks.partnerWiseCreditAccount();
|
|
|
698 |
}
|
| 29714 |
amit.gupta |
699 |
if (args.containsOption("runme")) {
|
|
|
700 |
runOnceTasks.runMe();
|
| 29776 |
tejbeer |
701 |
|
| 29714 |
amit.gupta |
702 |
}
|
| 30758 |
tejbeer |
703 |
if (args.containsOption("" + "")) {
|
| 29860 |
amit.gupta |
704 |
upgradeOfferService.authenticateUser();
|
| 29776 |
tejbeer |
705 |
|
| 29714 |
amit.gupta |
706 |
}
|
| 29860 |
amit.gupta |
707 |
if (args.containsOption("mandiiUser")) {
|
| 30421 |
tejbeer |
708 |
runOnceTasks.mandiiUser(args.getOptionValues("firstName").get(0),
|
|
|
709 |
args.getOptionValues("lastName").get(0), args.getOptionValues("pan").get(0),
|
|
|
710 |
args.getOptionValues("dob").get(0), args.getOptionValues("aadhaar").get(0),
|
|
|
711 |
args.getOptionValues("gender").get(0), args.getOptionValues("father").get(0));
|
| 30120 |
amit.gupta |
712 |
|
| 29860 |
amit.gupta |
713 |
}
|
| 29308 |
tejbeer |
714 |
|
| 29863 |
tejbeer |
715 |
if (args.containsOption("mandiiUsers")) {
|
| 29946 |
amit.gupta |
716 |
if (args.containsOption("pan")) {
|
|
|
717 |
runOnceTasks.mandiiUsers(args.getOptionValues("pan").get(0));
|
|
|
718 |
} else {
|
|
|
719 |
runOnceTasks.mandiiUsers();
|
|
|
720 |
}
|
| 29863 |
tejbeer |
721 |
|
|
|
722 |
}
|
|
|
723 |
|
| 30209 |
amit.gupta |
724 |
if (args.containsOption("checkOppoImeiStatus")) {
|
|
|
725 |
try {
|
|
|
726 |
standAlone.checkOppoImeiStatus();
|
|
|
727 |
} catch (Exception e) {
|
|
|
728 |
e.printStackTrace();
|
|
|
729 |
}
|
|
|
730 |
}
|
|
|
731 |
|
| 30758 |
tejbeer |
732 |
/*
|
|
|
733 |
* if (args.containsOption("checkRealmeImeiStatus")) { try {
|
|
|
734 |
* standAlone.checkRealmeImeiStatus(); } catch (Exception e) {
|
|
|
735 |
* e.printStackTrace(); } }
|
|
|
736 |
*/
|
| 30449 |
amit.gupta |
737 |
|
| 30335 |
amit.gupta |
738 |
if (args.containsOption("amazonPurchase")) {
|
|
|
739 |
try {
|
|
|
740 |
runOnceTasks.amazonPurchase();
|
|
|
741 |
} catch (Exception e) {
|
|
|
742 |
e.printStackTrace();
|
|
|
743 |
}
|
|
|
744 |
}
|
|
|
745 |
|
|
|
746 |
if (args.containsOption("getCaptchaCode")) {
|
|
|
747 |
try {
|
|
|
748 |
captchaService.getCaptchaCode("/home/amit/Desktop/generatingCodes.jpg");
|
|
|
749 |
} catch (Exception e) {
|
|
|
750 |
e.printStackTrace();
|
|
|
751 |
}
|
|
|
752 |
}
|
|
|
753 |
|
| 30313 |
amit.gupta |
754 |
if (args.containsOption("testIrnLive")) {
|
|
|
755 |
try {
|
|
|
756 |
runOnceTasks.testIrnLive(args.getOptionValues("invoiceNumber").get(0));
|
|
|
757 |
} catch (Exception e) {
|
|
|
758 |
e.printStackTrace();
|
|
|
759 |
}
|
|
|
760 |
}
|
|
|
761 |
|
| 30576 |
amit.gupta |
762 |
if (args.containsOption("createoffercriteria")) {
|
|
|
763 |
try {
|
|
|
764 |
runOnceTasks.createOfferCriteria();
|
|
|
765 |
} catch (Exception e) {
|
|
|
766 |
e.printStackTrace();
|
|
|
767 |
}
|
|
|
768 |
}
|
|
|
769 |
|
| 30616 |
amit.gupta |
770 |
if (args.containsOption("fix-price-drops")) {
|
|
|
771 |
runOnceTasks.fixPriceDrop();
|
|
|
772 |
|
|
|
773 |
}
|
|
|
774 |
|
| 30641 |
amit.gupta |
775 |
if (args.containsOption("processSchemeByIds")) {
|
|
|
776 |
List<String> schemeIds = Arrays.asList(args.getOptionValues("ids").get(0).split(","));
|
| 30758 |
tejbeer |
777 |
List<Integer> schemeIdsInt = schemeIds.stream().map(x -> Integer.parseInt(x))
|
|
|
778 |
.collect(Collectors.toList());
|
| 30641 |
amit.gupta |
779 |
runOnceTasks.processSchemeByIds(schemeIdsInt);
|
|
|
780 |
|
|
|
781 |
}
|
|
|
782 |
|
| 30659 |
amit.gupta |
783 |
if (args.containsOption("updateSaholicCISTable")) {
|
|
|
784 |
runOnceTasks.updateSaholicCISTable();
|
|
|
785 |
|
|
|
786 |
}
|
|
|
787 |
|
| 30739 |
amit.gupta |
788 |
if (args.containsOption("mapbag")) {
|
|
|
789 |
runOnceTasks.mapBag();
|
|
|
790 |
}
|
|
|
791 |
|
| 24265 |
amit.gupta |
792 |
System.exit(0);
|
| 23898 |
amit.gupta |
793 |
}
|
| 29035 |
tejbeer |
794 |
|
| 30859 |
tejbeer |
795 |
if (args.containsOption("calculateInterestAccured")) {
|
|
|
796 |
|
|
|
797 |
scheduledTasks.calculateInterestAccured();
|
|
|
798 |
System.exit(0);
|
|
|
799 |
}
|
|
|
800 |
|
|
|
801 |
if (args.containsOption("loanSettlement")) {
|
|
|
802 |
|
|
|
803 |
scheduledTasks.loanSettlement();
|
|
|
804 |
System.exit(0);
|
|
|
805 |
}
|
|
|
806 |
|
|
|
807 |
if (args.containsOption("dailyLoanAlert")) {
|
|
|
808 |
|
|
|
809 |
scheduledTasks.dailyLoanAlert();
|
|
|
810 |
System.exit(0);
|
|
|
811 |
}
|
|
|
812 |
|
| 30913 |
tejbeer |
813 |
if (args.containsOption("updatePartnerLimit")) {
|
|
|
814 |
scheduledTasks.updatePartnerLimit();
|
|
|
815 |
System.exit(0);
|
|
|
816 |
}
|
| 30929 |
tejbeer |
817 |
|
| 30936 |
tejbeer |
818 |
if (args.containsOption("notifyDefaultLoans")) {
|
|
|
819 |
scheduledTasks.notifyDefaultLoans();
|
| 30929 |
tejbeer |
820 |
System.exit(0);
|
|
|
821 |
}
|
|
|
822 |
|
| 30890 |
amit.gupta |
823 |
if (args.containsOption("fixinsurance")) {
|
|
|
824 |
runOnceTasks.addMissingWalletDebitsForInsurance();
|
|
|
825 |
System.exit(0);
|
|
|
826 |
}
|
|
|
827 |
|
| 30896 |
amit.gupta |
828 |
if (args.containsOption("processActivatedImeisForSchemes")) {
|
|
|
829 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
830 |
System.exit(0);
|
|
|
831 |
}
|
|
|
832 |
|
| 30936 |
tejbeer |
833 |
if (args.containsOption("notifyLoanDueDateCross")) {
|
|
|
834 |
scheduledTasks.notifyLoanDueDateCross();
|
|
|
835 |
System.exit(0);
|
|
|
836 |
}
|
|
|
837 |
|
|
|
838 |
if (args.containsOption("alertForDueDate")) {
|
|
|
839 |
scheduledTasks.alertForDueDate();
|
|
|
840 |
System.exit(0);
|
|
|
841 |
}
|
| 30982 |
tejbeer |
842 |
|
|
|
843 |
if (args.containsOption("userMobileNumberOptIn")) {
|
|
|
844 |
scheduledTasks.userMobileNumberOptIn();
|
|
|
845 |
System.exit(0);
|
|
|
846 |
}
|
|
|
847 |
|
|
|
848 |
if (args.containsOption("authUserMobileNumberOptIn")) {
|
|
|
849 |
scheduledTasks.authUserMobileNumberOptIn();
|
|
|
850 |
System.exit(0);
|
|
|
851 |
}
|
| 30905 |
amit.gupta |
852 |
if (args.containsOption("morning")) {
|
| 30935 |
amit.gupta |
853 |
if (args.containsOption("0")) {
|
|
|
854 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
855 |
}
|
| 30907 |
amit.gupta |
856 |
if (args.containsOption("1")) {
|
|
|
857 |
scheduledTasks.sendIndentTertiary();
|
|
|
858 |
}
|
| 30929 |
tejbeer |
859 |
// 0
|
| 30907 |
amit.gupta |
860 |
if (args.containsOption("2")) {
|
|
|
861 |
scheduledTasks.calculateInterestAccured();
|
|
|
862 |
}
|
| 30905 |
amit.gupta |
863 |
System.out.println("scheduledTasks.calculateInterestAccured()");
|
| 30929 |
tejbeer |
864 |
// 0
|
| 30907 |
amit.gupta |
865 |
if (args.containsOption("3")) {
|
|
|
866 |
scheduledTasks.markDelhiveryOrderDelivered();
|
|
|
867 |
}
|
| 30905 |
amit.gupta |
868 |
System.out.println("scheduledTasks.markDelhiveryOrderDelivered()");
|
| 30929 |
tejbeer |
869 |
// 1
|
| 30907 |
amit.gupta |
870 |
if (args.containsOption("4")) {
|
|
|
871 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
872 |
}
|
| 30905 |
amit.gupta |
873 |
System.out.println("scheduledTasks.processActivatedImeisForSchemes()");
|
| 30929 |
tejbeer |
874 |
// 2
|
| 30907 |
amit.gupta |
875 |
if (args.containsOption("5")) {
|
|
|
876 |
scheduledTasks.processActivation();
|
|
|
877 |
}
|
| 30905 |
amit.gupta |
878 |
System.out.println("scheduledTasks.processActivation()");
|
| 30929 |
tejbeer |
879 |
// 4
|
| 30907 |
amit.gupta |
880 |
if (args.containsOption("6")) {
|
|
|
881 |
scheduledTasks.processPriceDrop();
|
|
|
882 |
}
|
| 30905 |
amit.gupta |
883 |
System.out.println("scheduledTasks.processPriceDrop()");
|
| 30929 |
tejbeer |
884 |
// 5
|
| 30907 |
amit.gupta |
885 |
if (args.containsOption("7")) {
|
|
|
886 |
scheduledTasks.loanSettlement();
|
|
|
887 |
}
|
| 30905 |
amit.gupta |
888 |
System.out.println("scheduledTasks.loanSettlement()");
|
| 30929 |
tejbeer |
889 |
// 8
|
| 30907 |
amit.gupta |
890 |
if (args.containsOption("8")) {
|
|
|
891 |
scheduledTasks.reviewUncontactablePartner();
|
|
|
892 |
}
|
| 30929 |
tejbeer |
893 |
// 9
|
| 30907 |
amit.gupta |
894 |
if (args.containsOption("9")) {
|
|
|
895 |
onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
896 |
}
|
| 30929 |
tejbeer |
897 |
// 9
|
| 30907 |
amit.gupta |
898 |
if (args.containsOption("10")) {
|
|
|
899 |
onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
900 |
}
|
| 30929 |
tejbeer |
901 |
// sendPartnerInvestment
|
| 30907 |
amit.gupta |
902 |
if (args.containsOption("11")) {
|
|
|
903 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
904 |
}
|
| 31008 |
amit.gupta |
905 |
if (args.containsOption("sendCreditNote")) {
|
|
|
906 |
LocalDateTime localDateTime = LocalDateTime.now().minusDays(10);
|
|
|
907 |
YearMonth yearMonth = YearMonth.from(localDateTime);
|
| 31117 |
tejbeer |
908 |
/*
|
|
|
909 |
* if
|
|
|
910 |
* (localDateTime.toLocalDate().equals(yearMonth.atEndOfMonth().getDayOfMonth())
|
|
|
911 |
* && Arrays.asList(20,21,22,23).contains(localDateTime.getHour())) {
|
|
|
912 |
* scheduledTasks.sendCreditNote(yearMonth); }
|
|
|
913 |
*/
|
| 31008 |
amit.gupta |
914 |
scheduledTasks.sendCreditNote(yearMonth);
|
|
|
915 |
}
|
| 30906 |
amit.gupta |
916 |
System.exit(0);
|
| 30905 |
amit.gupta |
917 |
}
|
| 23898 |
amit.gupta |
918 |
}
|
| 24848 |
amit.gupta |
919 |
}
|