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