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