| 23755 |
amit.gupta |
1 |
package com.smartdukaan.cron;
|
| 23723 |
amit.gupta |
2 |
|
| 32782 |
raveendra. |
3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
|
|
4 |
import com.smartdukaan.cron.scheduled.*;
|
| 34945 |
ranu |
5 |
import com.smartdukaan.cron.scheduled.ambreports.AbmReportSender;
|
| 32782 |
raveendra. |
6 |
import com.smartdukaan.cron.scheduled.b2b.Listing;
|
|
|
7 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 32831 |
amit.gupta |
8 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
| 33274 |
amit.gupta |
9 |
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
|
| 34860 |
ranu |
10 |
import com.smartdukaan.cron.scheduled.razorpay.FetchPartnersDisbursementTask;
|
| 34443 |
vikas.jang |
11 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 32782 |
raveendra. |
12 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
|
|
13 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
|
|
14 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
|
|
15 |
import com.spice.profitmandi.dao.util.ContentPojoPopulator;
|
|
|
16 |
import com.spice.profitmandi.service.integrations.samsung.upgradeoffer.UpgradeOfferService;
|
| 23723 |
amit.gupta |
17 |
import org.apache.logging.log4j.LogManager;
|
|
|
18 |
import org.apache.logging.log4j.Logger;
|
| 28389 |
amit.gupta |
19 |
import org.apache.velocity.app.VelocityEngine;
|
|
|
20 |
import org.apache.velocity.exception.VelocityException;
|
| 34860 |
ranu |
21 |
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
|
| 23898 |
amit.gupta |
22 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
23 |
import org.springframework.boot.ApplicationArguments;
|
|
|
24 |
import org.springframework.boot.ApplicationRunner;
|
| 23723 |
amit.gupta |
25 |
import org.springframework.boot.WebApplicationType;
|
|
|
26 |
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
27 |
import org.springframework.boot.builder.SpringApplicationBuilder;
|
|
|
28 |
import org.springframework.context.annotation.Bean;
|
|
|
29 |
import org.springframework.context.annotation.ComponentScan;
|
| 34554 |
tejus.loha |
30 |
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
| 23935 |
amit.gupta |
31 |
import org.springframework.context.annotation.Primary;
|
| 23723 |
amit.gupta |
32 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
|
|
33 |
import org.springframework.core.io.ClassPathResource;
|
| 23906 |
amit.gupta |
34 |
import org.springframework.mail.javamail.JavaMailSender;
|
|
|
35 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
| 28389 |
amit.gupta |
36 |
import org.springframework.ui.velocity.VelocityEngineFactoryBean;
|
| 23723 |
amit.gupta |
37 |
|
| 32782 |
raveendra. |
38 |
import java.io.FileInputStream;
|
|
|
39 |
import java.io.IOException;
|
|
|
40 |
import java.time.LocalDate;
|
|
|
41 |
import java.time.YearMonth;
|
|
|
42 |
import java.util.ArrayList;
|
|
|
43 |
import java.util.Arrays;
|
|
|
44 |
import java.util.List;
|
|
|
45 |
import java.util.Properties;
|
|
|
46 |
import java.util.stream.Collectors;
|
| 23724 |
amit.gupta |
47 |
|
| 23723 |
amit.gupta |
48 |
@SpringBootApplication
|
| 34554 |
tejus.loha |
49 |
@EnableAspectJAutoProxy
|
| 23755 |
amit.gupta |
50 |
@ComponentScan("com.smartdukaan.cron.*, com.spice.profitmandi.common.*")
|
| 24122 |
govind |
51 |
public class Application implements ApplicationRunner {
|
|
|
52 |
|
| 31753 |
tejbeer |
53 |
private static final Logger LOGGER = LogManager.getLogger(Application.class);
|
| 24122 |
govind |
54 |
|
| 31753 |
tejbeer |
55 |
@Autowired
|
|
|
56 |
LeadSyncRunner leadSyncRunner;
|
| 30120 |
amit.gupta |
57 |
|
| 31753 |
tejbeer |
58 |
@Autowired
|
|
|
59 |
StandAlone standAlone;
|
| 30209 |
amit.gupta |
60 |
|
| 31753 |
tejbeer |
61 |
@Autowired
|
|
|
62 |
UpgradeOfferService upgradeOfferService;
|
| 27392 |
amit.gupta |
63 |
|
| 31753 |
tejbeer |
64 |
@Autowired
|
|
|
65 |
private TicketRelatedScheduledTask ticketRelatedScheduledTask;
|
| 28368 |
tejbeer |
66 |
|
| 31753 |
tejbeer |
67 |
@Autowired
|
|
|
68 |
private OnBoardingRelatedSchelduleTask onBoardingRelatedSchelduleTask;
|
| 28921 |
tejbeer |
69 |
|
| 31753 |
tejbeer |
70 |
@Autowired
|
|
|
71 |
private InvestmentRelatedTasks investmentRelatedTasks;
|
| 27392 |
amit.gupta |
72 |
|
| 31753 |
tejbeer |
73 |
@Autowired
|
|
|
74 |
private CsService csService;
|
| 29814 |
tejbeer |
75 |
|
| 31753 |
tejbeer |
76 |
@Autowired
|
|
|
77 |
private FofoOrderItemRepository fofoOrderItemRepository;
|
| 24603 |
amit.gupta |
78 |
|
| 31753 |
tejbeer |
79 |
@Autowired
|
|
|
80 |
private ContentPojoPopulator contentPojoPopulator;
|
| 29361 |
tejbeer |
81 |
|
| 31753 |
tejbeer |
82 |
@Autowired
|
|
|
83 |
private Listing listing;
|
| 24122 |
govind |
84 |
|
| 32831 |
amit.gupta |
85 |
@Autowired
|
|
|
86 |
OrderTrackingService orderTrackingService;
|
|
|
87 |
|
| 31753 |
tejbeer |
88 |
public static void main(String[] args) throws Throwable {
|
|
|
89 |
try {
|
| 34554 |
tejus.loha |
90 |
new SpringApplicationBuilder(Application.class).web(WebApplicationType.SERVLET).run(args);
|
| 31753 |
tejbeer |
91 |
} catch (Throwable t) {
|
|
|
92 |
t.printStackTrace();
|
|
|
93 |
}
|
|
|
94 |
}
|
| 28389 |
amit.gupta |
95 |
|
| 31753 |
tejbeer |
96 |
@Bean
|
|
|
97 |
public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
|
|
|
98 |
LOGGER.info("Called Configuration");
|
|
|
99 |
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
|
|
100 |
propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
|
|
|
101 |
return propertySourcesPlaceholderConfigurer;
|
|
|
102 |
}
|
| 28389 |
amit.gupta |
103 |
|
| 31753 |
tejbeer |
104 |
@Bean(name = "veloctyEngine")
|
|
|
105 |
public VelocityEngine velocityEngine() throws VelocityException, IOException {
|
|
|
106 |
VelocityEngineFactoryBean factory = new VelocityEngineFactoryBean();
|
| 28389 |
amit.gupta |
107 |
|
| 31753 |
tejbeer |
108 |
Properties velocityProperties = new Properties();
|
|
|
109 |
velocityProperties.put("resource.loader", "class");
|
|
|
110 |
velocityProperties.put("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
|
|
|
111 |
velocityProperties.put("file.resource.loader.cache", true);
|
|
|
112 |
velocityProperties.put("file.resource.loader.unicode", true);
|
|
|
113 |
velocityProperties.put("input.encoding", "UTF-8");
|
|
|
114 |
velocityProperties.put("output.encoding", "UTF-8");
|
|
|
115 |
velocityProperties.put("response.encoding", "UTF-8");
|
|
|
116 |
velocityProperties.put("overrideLogging", true);
|
| 28389 |
amit.gupta |
117 |
|
| 31753 |
tejbeer |
118 |
// velocityProperties.put("file.resource.loader.path", ".");
|
| 28389 |
amit.gupta |
119 |
|
| 31753 |
tejbeer |
120 |
factory.setVelocityProperties(velocityProperties);
|
| 28389 |
amit.gupta |
121 |
|
| 31753 |
tejbeer |
122 |
return factory.createVelocityEngine();
|
| 23723 |
amit.gupta |
123 |
|
| 31753 |
tejbeer |
124 |
}
|
| 24122 |
govind |
125 |
|
| 34668 |
amit.gupta |
126 |
@Bean(name = "mailSender")
|
| 31753 |
tejbeer |
127 |
@Primary
|
|
|
128 |
public JavaMailSender sendGridMailSender() {
|
|
|
129 |
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
|
| 24122 |
govind |
130 |
|
| 31753 |
tejbeer |
131 |
// Using gmail
|
|
|
132 |
mailSender.setHost("smtp.sendgrid.net");
|
|
|
133 |
mailSender.setPort(587);
|
|
|
134 |
mailSender.setUsername("apikey");
|
| 34668 |
amit.gupta |
135 |
mailSender.setPassword("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");
|
| 24122 |
govind |
136 |
|
| 31753 |
tejbeer |
137 |
Properties javaMailProperties = new Properties();
|
|
|
138 |
javaMailProperties.put("mail.smtp.starttls.enable", "false");
|
|
|
139 |
javaMailProperties.put("mail.smtp.auth", "true");
|
|
|
140 |
javaMailProperties.put("mail.transport.protocol", "smtp");
|
| 24122 |
govind |
141 |
|
| 31753 |
tejbeer |
142 |
mailSender.setJavaMailProperties(javaMailProperties);
|
|
|
143 |
return mailSender;
|
| 34632 |
ranu |
144 |
}
|
| 23935 |
amit.gupta |
145 |
|
| 31753 |
tejbeer |
146 |
@Bean
|
|
|
147 |
public JavaMailSender googleMailSender() {
|
|
|
148 |
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
|
| 34612 |
ranu |
149 |
mailSender.setHost("smtp.gmail.com");
|
|
|
150 |
mailSender.setPort(465);
|
|
|
151 |
mailSender.setUsername("sdtech@smartdukaan.com");
|
|
|
152 |
mailSender.setPassword("gpdschroalhhirox"); // App Password
|
|
|
153 |
|
|
|
154 |
Properties props = mailSender.getJavaMailProperties();
|
|
|
155 |
props.put("mail.smtp.auth", "true");
|
|
|
156 |
props.put("mail.smtp.ssl.enable", "true");
|
|
|
157 |
props.put("mail.smtp.ssl.trust", "smtp.gmail.com");
|
|
|
158 |
props.put("mail.smtp.socketFactory.port", "465");
|
|
|
159 |
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
|
|
160 |
props.put("mail.debug", "true");
|
|
|
161 |
|
|
|
162 |
return mailSender;
|
|
|
163 |
}
|
|
|
164 |
|
| 31753 |
tejbeer |
165 |
@Autowired
|
|
|
166 |
private RunOnceTasks runOnceTasks;
|
| 24122 |
govind |
167 |
|
| 31753 |
tejbeer |
168 |
@Autowired
|
|
|
169 |
private ScheduledTasks scheduledTasks;
|
| 30335 |
amit.gupta |
170 |
|
| 31753 |
tejbeer |
171 |
@Autowired
|
| 34306 |
ranu |
172 |
private ScheduledTasksTest scheduledTasksTest;
|
|
|
173 |
|
|
|
174 |
@Autowired
|
| 34945 |
ranu |
175 |
private AbmReportSender abmReportSender;
|
|
|
176 |
|
|
|
177 |
@Autowired
|
| 34860 |
ranu |
178 |
private FetchPartnersDisbursementTask fetchPartnersDisbursementTask;
|
|
|
179 |
|
|
|
180 |
@Autowired
|
| 31753 |
tejbeer |
181 |
private Reconciliation reconciliation;
|
| 30309 |
amit.gupta |
182 |
|
| 31753 |
tejbeer |
183 |
@Autowired
|
|
|
184 |
CaptchaService captchaService;
|
| 28921 |
tejbeer |
185 |
|
| 33274 |
amit.gupta |
186 |
@Autowired
|
|
|
187 |
POScheduler poScheduler;
|
| 32878 |
amit.gupta |
188 |
|
| 33274 |
amit.gupta |
189 |
|
| 31753 |
tejbeer |
190 |
@Override
|
|
|
191 |
public void run(ApplicationArguments args) throws Exception {
|
| 32008 |
amit.gupta |
192 |
//scheduledTasks.test();
|
|
|
193 |
//System.exit();
|
| 31753 |
tejbeer |
194 |
LOGGER.info("Called run method");
|
| 33260 |
amit.gupta |
195 |
if (args.containsOption("removePartialBillingForTransaction")) {
|
|
|
196 |
if (args.containsOption("trId")) {
|
| 33051 |
amit.gupta |
197 |
int transactionId = Integer.parseInt(args.getOptionValues("trId").get(0));
|
| 33054 |
amit.gupta |
198 |
scheduledTasks.removePartialBillingForTransaction(transactionId);
|
| 33051 |
amit.gupta |
199 |
}
|
|
|
200 |
System.exit(0);
|
|
|
201 |
}
|
| 34523 |
ranu |
202 |
if (args.containsOption("createOpeningStockPartyWise")) {
|
|
|
203 |
scheduledTasks.createOpeningStockPartyWise();
|
|
|
204 |
System.exit(0);
|
|
|
205 |
}
|
| 31753 |
tejbeer |
206 |
if (args.containsOption("tc")) {
|
|
|
207 |
System.out.println("Toffee service called");
|
|
|
208 |
scheduledTasks.toffeeRollback();
|
|
|
209 |
System.exit(0);
|
|
|
210 |
}
|
|
|
211 |
if (args.containsOption("bag")) {
|
|
|
212 |
System.out.println("Bag service called");
|
|
|
213 |
runOnceTasks.testBag();
|
|
|
214 |
System.exit(0);
|
|
|
215 |
}
|
| 29814 |
tejbeer |
216 |
|
| 31753 |
tejbeer |
217 |
if (args.containsOption("rw")) {
|
|
|
218 |
System.out.println("Reverse wallet");
|
|
|
219 |
scheduledTasks.reverseWallet();
|
|
|
220 |
System.exit(0);
|
|
|
221 |
}
|
|
|
222 |
if (args.containsOption("sendIndentTertiary")) {
|
|
|
223 |
System.out.println("sendIndentTertiary");
|
|
|
224 |
scheduledTasks.sendIndentTertiary();
|
|
|
225 |
System.exit(0);
|
|
|
226 |
}
|
|
|
227 |
if (args.containsOption("checkPartnerActiveStore")) {
|
|
|
228 |
System.out.println("checkPartnerActiveStore");
|
|
|
229 |
scheduledTasks.checkPartnerActiveStore();
|
|
|
230 |
System.exit(0);
|
|
|
231 |
}
|
| 29800 |
manish |
232 |
|
| 31753 |
tejbeer |
233 |
if (args.containsOption("selectFinServiceFollowUpDateByCurrDate")) {
|
|
|
234 |
System.out.println("selectfinServiceFollowUpDateByCurrDate");
|
| 28368 |
tejbeer |
235 |
|
| 31753 |
tejbeer |
236 |
scheduledTasks.selectFinServiceFollowUpDateByCurrDate(LocalDate.now());
|
|
|
237 |
System.exit(0);
|
|
|
238 |
}
|
| 25073 |
amit.gupta |
239 |
|
| 31753 |
tejbeer |
240 |
if (args.containsOption("addHdfcPayment")) {
|
|
|
241 |
runOnceTasks.addPayment();
|
|
|
242 |
System.exit(0);
|
|
|
243 |
}
|
|
|
244 |
if (args.containsOption("processSchemeOut")) {
|
|
|
245 |
System.out.println("Process schemeOut");
|
|
|
246 |
int orderId = Integer.parseInt(args.getOptionValues("orderid").get(0));
|
|
|
247 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoid").get(0));
|
|
|
248 |
runOnceTasks.processSchemeOut(fofoId, orderId);
|
|
|
249 |
System.exit(0);
|
|
|
250 |
}
|
|
|
251 |
if (args.containsOption("at")) {
|
|
|
252 |
System.out.println("Toffee service called");
|
|
|
253 |
ticketRelatedScheduledTask.alertforTicket();
|
|
|
254 |
System.exit(0);
|
|
|
255 |
}
|
|
|
256 |
if (args.containsOption("et")) {
|
|
|
257 |
ticketRelatedScheduledTask.escalateTicket();
|
|
|
258 |
;
|
|
|
259 |
System.exit(0);
|
|
|
260 |
}
|
|
|
261 |
if (args.containsOption("sr")) {
|
|
|
262 |
List<String> schemeIds = args.getOptionValues("schemeId");
|
|
|
263 |
System.out.println(schemeIds);
|
|
|
264 |
scheduledTasks.schemeRollback(schemeIds);
|
|
|
265 |
System.exit(0);
|
|
|
266 |
}
|
|
|
267 |
if (args.containsOption("processActivation")) {
|
|
|
268 |
scheduledTasks.processActivation();
|
|
|
269 |
System.exit(0);
|
|
|
270 |
}
|
|
|
271 |
if (args.containsOption("sendAttendanceMorningAlert")) {
|
|
|
272 |
scheduledTasks.sendAttendanceMorningAlert();
|
|
|
273 |
System.exit(0);
|
|
|
274 |
}
|
|
|
275 |
if (args.containsOption("sendAttendanceEveningAlert")) {
|
|
|
276 |
scheduledTasks.sendAttendanceEveningAlert();
|
|
|
277 |
System.exit(0);
|
|
|
278 |
}
|
| 25721 |
tejbeer |
279 |
|
| 31753 |
tejbeer |
280 |
if (args.containsOption("checkRazorPayPaymentStatus")) {
|
|
|
281 |
scheduledTasks.checkRazorPayPaymentStatus();
|
|
|
282 |
System.exit(0);
|
|
|
283 |
}
|
|
|
284 |
if (args.containsOption("grouping")) {
|
|
|
285 |
scheduledTasks.grouping();
|
|
|
286 |
System.exit(0);
|
|
|
287 |
}
|
|
|
288 |
if (args.containsOption("fixWallet")) {
|
|
|
289 |
runOnceTasks.fixWallet();
|
|
|
290 |
System.exit(0);
|
|
|
291 |
}
|
|
|
292 |
if (args.containsOption("reconcileExpiredFixedSchemes")) {
|
|
|
293 |
reconciliation.reconcileExpiredFixedSchemes();
|
|
|
294 |
System.exit(0);
|
|
|
295 |
}
|
|
|
296 |
if (args.containsOption("dailyReconciliation")) {
|
|
|
297 |
if (args.containsOption("date")) {
|
|
|
298 |
LocalDate date = LocalDate.parse(args.getOptionValues("date").get(0));
|
|
|
299 |
reconciliation.dailyReconciliation(date);
|
|
|
300 |
} else {
|
|
|
301 |
reconciliation.dailyReconciliation(LocalDate.now().minusDays(1));
|
|
|
302 |
}
|
|
|
303 |
System.exit(0);
|
|
|
304 |
}
|
|
|
305 |
/*
|
|
|
306 |
* if (args.containsOption("test")) { schemeService.processSchemeIn(9243,
|
|
|
307 |
* 175138102); throw new Exception(); }
|
|
|
308 |
*/
|
| 28921 |
tejbeer |
309 |
|
| 31753 |
tejbeer |
310 |
if (args.containsOption("sendNotification")) {
|
|
|
311 |
scheduledTasks.sendNotification();
|
|
|
312 |
System.exit(0);
|
|
|
313 |
}
|
| 26291 |
tejbeer |
314 |
|
| 31753 |
tejbeer |
315 |
if (args.containsOption("ticketClosed")) {
|
|
|
316 |
scheduledTasks.ticketClosed();
|
|
|
317 |
System.exit(0);
|
|
|
318 |
}
|
| 28207 |
tejbeer |
319 |
|
| 31753 |
tejbeer |
320 |
if (args.containsOption("getVendorWarehouses")) {
|
|
|
321 |
int warehouseId = Integer.parseInt(args.getOptionValues("warehouseId").get(0));
|
|
|
322 |
scheduledTasks.getVendorWarehouses(warehouseId);
|
|
|
323 |
System.exit(0);
|
|
|
324 |
}
|
| 29776 |
tejbeer |
325 |
|
| 31753 |
tejbeer |
326 |
if (args.containsOption("checkfocusedModelInPartnerStock")) {
|
| 34344 |
amit.gupta |
327 |
try {
|
|
|
328 |
scheduledTasks.checkfocusedModelInPartnerStock();
|
|
|
329 |
} finally {
|
|
|
330 |
System.exit(0);
|
|
|
331 |
}
|
| 31753 |
tejbeer |
332 |
}
|
| 29451 |
manish |
333 |
|
| 31753 |
tejbeer |
334 |
if (args.containsOption("checkImeiActivation")) {
|
|
|
335 |
scheduledTasks.checkImeiActivation();
|
|
|
336 |
System.exit(0);
|
|
|
337 |
}
|
| 29776 |
tejbeer |
338 |
|
| 31753 |
tejbeer |
339 |
if (args.containsOption("checkTecnoImeiActivation")) {
|
| 29776 |
tejbeer |
340 |
|
| 31753 |
tejbeer |
341 |
LocalDate dateTechno = LocalDate.now();
|
| 29532 |
manish |
342 |
|
| 31753 |
tejbeer |
343 |
int days = 25;
|
|
|
344 |
if (args.containsOption("days")) {
|
|
|
345 |
days = Integer.parseInt(args.getOptionValues("days").get(0));
|
|
|
346 |
}
|
|
|
347 |
scheduledTasks.checkTecnoImeiActivation(dateTechno, days);
|
|
|
348 |
System.exit(0);
|
|
|
349 |
}
|
| 28921 |
tejbeer |
350 |
|
| 31753 |
tejbeer |
351 |
if (args.containsOption("checkItelImeiActivation")) {
|
|
|
352 |
LocalDate dateItel = LocalDate.now();
|
|
|
353 |
int days = 25;
|
|
|
354 |
if (args.containsOption("days")) {
|
|
|
355 |
days = Integer.parseInt(args.getOptionValues("days").get(0));
|
|
|
356 |
}
|
|
|
357 |
scheduledTasks.checkItelImeiActivation(dateItel, days);
|
|
|
358 |
System.exit(0);
|
|
|
359 |
}
|
| 28921 |
tejbeer |
360 |
|
| 31753 |
tejbeer |
361 |
if (args.containsOption("partnerProblemAlert")) {
|
|
|
362 |
scheduledTasks.partnerProblemAlert();
|
|
|
363 |
System.exit(0);
|
|
|
364 |
}
|
|
|
365 |
if (args.containsOption("notify")) {
|
|
|
366 |
if (args.containsOption("fofoId")) {
|
|
|
367 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoId").get(0));
|
|
|
368 |
scheduledTasks.sendDailySalesNotificationToPartner(fofoId);
|
|
|
369 |
}
|
|
|
370 |
System.exit(0);
|
|
|
371 |
}
|
|
|
372 |
if (args.containsOption("findMismatchesInIndent")) {
|
|
|
373 |
runOnceTasks.findMismatchesInIndent();
|
|
|
374 |
System.exit(0);
|
|
|
375 |
}
|
| 29035 |
tejbeer |
376 |
|
| 31753 |
tejbeer |
377 |
if (args.containsOption("onboardingEventDelays")) {
|
|
|
378 |
onBoardingRelatedSchelduleTask.onboardingEventDelays();
|
|
|
379 |
System.exit(0);
|
|
|
380 |
}
|
| 28982 |
tejbeer |
381 |
|
| 31753 |
tejbeer |
382 |
if (args.containsOption("onBoardingCompleteEventEmail")) {
|
|
|
383 |
onBoardingRelatedSchelduleTask.onBoardingCompleteEventEmail();
|
|
|
384 |
System.exit(0);
|
|
|
385 |
}
|
| 28921 |
tejbeer |
386 |
|
| 31753 |
tejbeer |
387 |
if (args.containsOption("onBoardingDocumentsPending")) {
|
|
|
388 |
onBoardingRelatedSchelduleTask.onBoardingDocumentsPending();
|
|
|
389 |
System.exit(0);
|
|
|
390 |
}
|
|
|
391 |
if (args.containsOption("onBoardingMigration")) {
|
|
|
392 |
onBoardingRelatedSchelduleTask.onBoardingMigration();
|
|
|
393 |
System.exit(0);
|
|
|
394 |
}
|
| 28921 |
tejbeer |
395 |
|
| 33859 |
tejus.loha |
396 |
// if (args.containsOption("advancePaymentPendingAlert")) {
|
|
|
397 |
// onBoardingRelatedSchelduleTask.advancePaymentPendingAlert();
|
|
|
398 |
// System.exit(0);
|
|
|
399 |
// }
|
| 28963 |
tejbeer |
400 |
|
| 31753 |
tejbeer |
401 |
if (args.containsOption("fullPaymentPendingAlert")) {
|
|
|
402 |
onBoardingRelatedSchelduleTask.fullPaymentPendingAlert();
|
|
|
403 |
System.exit(0);
|
|
|
404 |
}
|
| 29308 |
tejbeer |
405 |
|
| 33859 |
tejus.loha |
406 |
// if (args.containsOption("advancePaymentPendinglegalAlert")) {
|
|
|
407 |
// onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
408 |
// System.exit(0);
|
|
|
409 |
// }
|
| 31117 |
tejbeer |
410 |
|
| 31753 |
tejbeer |
411 |
if (args.containsOption("markDelhiveryOrderDelivered")) {
|
| 32831 |
amit.gupta |
412 |
orderTrackingService.markDelhiveryOrderDelivered();
|
| 31753 |
tejbeer |
413 |
System.exit(0);
|
|
|
414 |
}
|
| 32831 |
amit.gupta |
415 |
|
| 31753 |
tejbeer |
416 |
if (args.containsOption("markBlueDartOrderDelivered")) {
|
| 32794 |
raveendra. |
417 |
System.out.println("Marking BlueDart Order Delivered...");
|
| 32831 |
amit.gupta |
418 |
orderTrackingService.markBlueDartOrderDelivered();
|
| 31753 |
tejbeer |
419 |
System.exit(0);
|
|
|
420 |
}
|
|
|
421 |
if (args.containsOption("mergingdata")) {
|
|
|
422 |
onBoardingRelatedSchelduleTask.mergingdata();
|
|
|
423 |
System.exit(0);
|
|
|
424 |
}
|
|
|
425 |
if (args.containsOption("brandingAlert")) {
|
|
|
426 |
onBoardingRelatedSchelduleTask.brandingAlert();
|
|
|
427 |
System.exit(0);
|
|
|
428 |
}
|
| 31089 |
amit.gupta |
429 |
|
| 33859 |
tejus.loha |
430 |
// if (args.containsOption("storeTimelinePromoterPending")) {
|
|
|
431 |
// onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
432 |
// System.exit(0);
|
|
|
433 |
// }
|
| 31249 |
tejbeer |
434 |
|
| 31753 |
tejbeer |
435 |
if (args.containsOption("ppl")) {
|
|
|
436 |
runOnceTasks.printPendingLeads();
|
|
|
437 |
System.exit(0);
|
|
|
438 |
}
|
| 31249 |
tejbeer |
439 |
|
| 31753 |
tejbeer |
440 |
if (args.containsOption("notifyAll")) {
|
|
|
441 |
scheduledTasks.sendDailySalesNotificationToPartner(null);
|
|
|
442 |
System.exit(0);
|
|
|
443 |
}
|
| 31249 |
tejbeer |
444 |
|
| 31753 |
tejbeer |
445 |
if (args.containsOption("monthlyTargetForInternalTeam")) {
|
|
|
446 |
scheduledTasks.monthlyTargetForInternalTeam();
|
|
|
447 |
System.exit(0);
|
|
|
448 |
}
|
| 31249 |
tejbeer |
449 |
|
| 31753 |
tejbeer |
450 |
if (args.containsOption("monthlyTargetForPartner")) {
|
|
|
451 |
scheduledTasks.monthlyTargetForPartner();
|
|
|
452 |
System.exit(0);
|
|
|
453 |
}
|
| 33444 |
ranu |
454 |
if (args.containsOption("findAllLiveDemoBrandItemsByBillingDate")) {
|
|
|
455 |
scheduledTasks.findAllLiveDemoBrandItemsByBillingDate();
|
|
|
456 |
System.exit(0);
|
|
|
457 |
}
|
| 33464 |
ranu |
458 |
if (args.containsOption("findTodayPocoBillingItems")) {
|
|
|
459 |
scheduledTasks.findTodayPocoBillingItems();
|
|
|
460 |
System.exit(0);
|
|
|
461 |
}
|
| 28921 |
tejbeer |
462 |
|
| 31753 |
tejbeer |
463 |
if (args.containsOption("hygineAlertForPartner")) {
|
|
|
464 |
scheduledTasks.hygineAlertForPartner();
|
|
|
465 |
System.exit(0);
|
|
|
466 |
}
|
| 28921 |
tejbeer |
467 |
|
| 31753 |
tejbeer |
468 |
if (args.containsOption("hygineAlertForInternalTeam")) {
|
|
|
469 |
scheduledTasks.hygineAlertForInternalTeam();
|
|
|
470 |
System.exit(0);
|
|
|
471 |
}
|
|
|
472 |
|
| 32214 |
jai.hind |
473 |
if (args.containsOption("checkItelImeiActivationNew")) {
|
|
|
474 |
scheduledTasks.checkItelImeiActivationNew(LocalDate.now(), 15);
|
|
|
475 |
System.exit(0);
|
|
|
476 |
}
|
| 31753 |
tejbeer |
477 |
if (args.containsOption("once")) {
|
| 33274 |
amit.gupta |
478 |
|
|
|
479 |
if (args.containsOption("autoClosePurchaseOrders")) {
|
|
|
480 |
poScheduler.autoClosePurchaseOrders();
|
|
|
481 |
}
|
| 31753 |
tejbeer |
482 |
if (args.containsOption("cancelOnceAssist")) {
|
|
|
483 |
if (args.containsOption("invoiceNumber")) {
|
|
|
484 |
String oneAssistInvoiceNumber = args.getOptionValues("invoiceNumber").get(0);
|
|
|
485 |
runOnceTasks.cancelOnceAssist(oneAssistInvoiceNumber);
|
|
|
486 |
}
|
|
|
487 |
|
|
|
488 |
}
|
| 34208 |
ranu |
489 |
if (args.containsOption("cancelOnceAssist")) {
|
|
|
490 |
if (args.containsOption("MemberShipNumber")) {
|
|
|
491 |
String applicationNo = args.getOptionValues("applicationNo").get(0);
|
|
|
492 |
String membershipId = args.getOptionValues("membershipId").get(0);
|
|
|
493 |
runOnceTasks.cancelOnceAssistByMemberShipNumber(applicationNo, membershipId);
|
|
|
494 |
}
|
|
|
495 |
|
|
|
496 |
}
|
| 33260 |
amit.gupta |
497 |
if (args.containsOption("changeFulfillmentWarehouse")) {
|
|
|
498 |
if (args.containsOption("orderId") && args.containsOption("whId")) {
|
|
|
499 |
int orderId = Integer.parseInt(args.getOptionValues("orderId").get(0));
|
|
|
500 |
int itemId = Integer.parseInt(args.getOptionValues("whId").get(0));
|
|
|
501 |
runOnceTasks.changeFulfillmentWarehouse(orderId, itemId);
|
|
|
502 |
}
|
|
|
503 |
System.exit(0);
|
|
|
504 |
}
|
| 31753 |
tejbeer |
505 |
if (args.containsOption("1")) {
|
|
|
506 |
if (args.containsOption("test")) {
|
| 31618 |
amit.gupta |
507 |
//scheduledTasks.sendPartnerInvestmentDetails(args.getOptionValues("email"));
|
| 31753 |
tejbeer |
508 |
System.out.println("Calling test method");
|
| 32482 |
amit.gupta |
509 |
scheduledTasks.test();
|
| 32083 |
tejbeer |
510 |
|
| 32482 |
amit.gupta |
511 |
|
| 32083 |
tejbeer |
512 |
if (args.containsOption("migrateVendorItemPricing")) {
|
|
|
513 |
scheduledTasks.migrateVendorItemPricing();
|
|
|
514 |
System.exit(0);
|
|
|
515 |
}
|
|
|
516 |
|
|
|
517 |
if (args.containsOption("approveVendorCatalogPricing")) {
|
|
|
518 |
scheduledTasks.approveVendorCatalogPricing();
|
|
|
519 |
System.exit(0);
|
|
|
520 |
}
|
| 32080 |
tejbeer |
521 |
} else if (args.containsOption("test1")) {
|
| 32008 |
amit.gupta |
522 |
scheduledTasks.test1();
|
| 34845 |
ranu |
523 |
} else if (args.containsOption("scheduleTaskTest1")) {
|
|
|
524 |
|
|
|
525 |
scheduledTasksTest.test();
|
|
|
526 |
}else if (args.containsOption("generateBiReport")) {
|
|
|
527 |
scheduledTasksTest.generateBiReport();
|
| 34945 |
ranu |
528 |
}else if (args.containsOption("abmSendertest")) {
|
|
|
529 |
abmReportSender.abmSendertest();
|
| 34321 |
ranu |
530 |
}
|
| 34860 |
ranu |
531 |
else if (args.containsOption("fetchPartnerDisburseMentTask")) {
|
|
|
532 |
if(args.containsOption("fetchDisbursements")){
|
|
|
533 |
fetchPartnersDisbursementTask.fetchDisbursementsTest();
|
|
|
534 |
}
|
|
|
535 |
else if(args.containsOption("creditAmountTest")){
|
|
|
536 |
fetchPartnersDisbursementTask.creditAmountTest();
|
|
|
537 |
}
|
|
|
538 |
else if(args.containsOption("createContactsAndFundsForFranchiseeTest")){
|
|
|
539 |
fetchPartnersDisbursementTask.createContactsAndFundsForFranchiseeTest();
|
|
|
540 |
}
|
|
|
541 |
else if(args.containsOption("rabbitTransactionProducertest")){
|
|
|
542 |
fetchPartnersDisbursementTask.rabbitTransactionProducertest();
|
|
|
543 |
}
|
| 34879 |
ranu |
544 |
else if(args.containsOption("sendingDisbursementMail")){
|
|
|
545 |
fetchPartnersDisbursementTask.sendingDisbursementMail();
|
|
|
546 |
}
|
| 34860 |
ranu |
547 |
else {
|
|
|
548 |
fetchPartnersDisbursementTask.test();
|
|
|
549 |
}
|
|
|
550 |
}
|
| 34845 |
ranu |
551 |
else if (args.containsOption("testNew1")) {
|
| 34307 |
ranu |
552 |
List<String> loanIdArgs = args.getOptionValues("loanIds"); // ["34833,36536,37151"]
|
|
|
553 |
List<Integer> loanIds = new ArrayList<>();
|
|
|
554 |
|
|
|
555 |
if (loanIdArgs != null && !loanIdArgs.isEmpty()) {
|
|
|
556 |
String csv = loanIdArgs.get(0);
|
|
|
557 |
loanIds = Arrays.stream(csv.split(","))
|
|
|
558 |
.map(String::trim)
|
|
|
559 |
.map(Integer::parseInt)
|
|
|
560 |
.collect(Collectors.toList());
|
|
|
561 |
}
|
| 34321 |
ranu |
562 |
scheduledTasksTest.findLoanTransactionMapingAccordingLoan(loanIds);
|
| 34309 |
ranu |
563 |
} else if (args.containsOption("testNew2")) {
|
| 34308 |
ranu |
564 |
if (args.containsOption("createLoan")) {
|
|
|
565 |
// Extract each parameter
|
|
|
566 |
int transactionId = 0;
|
|
|
567 |
double invoiceAmount = 0.0;
|
|
|
568 |
String invoiceNumber = "";
|
|
|
569 |
|
|
|
570 |
if (args.containsOption("transactionId")) {
|
|
|
571 |
transactionId = Integer.parseInt(args.getOptionValues("transactionId").get(0));
|
|
|
572 |
}
|
|
|
573 |
|
|
|
574 |
if (args.containsOption("invoiceAmount")) {
|
|
|
575 |
invoiceAmount = Double.parseDouble(args.getOptionValues("invoiceAmount").get(0));
|
|
|
576 |
}
|
|
|
577 |
|
|
|
578 |
if (args.containsOption("invoiceNumber")) {
|
|
|
579 |
invoiceNumber = args.getOptionValues("invoiceNumber").get(0);
|
|
|
580 |
}
|
|
|
581 |
|
|
|
582 |
// Call your method
|
|
|
583 |
scheduledTasksTest.createLoanForBillingByTransactionIdAndInvoiceNumber(transactionId, invoiceAmount, invoiceNumber);
|
|
|
584 |
}
|
|
|
585 |
|
| 32482 |
amit.gupta |
586 |
} else {
|
| 31753 |
tejbeer |
587 |
System.out.println("Called sendPartnerInvestmentDetails");
|
|
|
588 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
589 |
}
|
|
|
590 |
System.exit(0);
|
|
|
591 |
}
|
|
|
592 |
if (args.containsOption("2")) {
|
|
|
593 |
if (args.containsOption("test")) {
|
|
|
594 |
String[] emails = new String[args.getOptionValues("email").size()];
|
|
|
595 |
scheduledTasks.sendAgeingReport(args.getOptionValues("email").toArray(emails));
|
|
|
596 |
} else {
|
|
|
597 |
scheduledTasks.sendAgeingReport();
|
|
|
598 |
}
|
|
|
599 |
System.exit(0);
|
|
|
600 |
}
|
| 33457 |
amit.gupta |
601 |
|
| 31753 |
tejbeer |
602 |
if (args.containsOption("cancelOrder")) {
|
|
|
603 |
List<String> invoiceNumbers = args.getOptionValues("invoiceNumber");
|
|
|
604 |
runOnceTasks.cancelOrder(invoiceNumbers);
|
|
|
605 |
}
|
|
|
606 |
if (args.containsOption("migratePurchase")) {
|
|
|
607 |
runOnceTasks.migratePurchase();
|
|
|
608 |
}
|
|
|
609 |
if (args.containsOption("migratepd")) {
|
|
|
610 |
scheduledTasks.moveImeisToPriceDropImeis();
|
|
|
611 |
}
|
|
|
612 |
if (args.containsOption("walletmismatch")) {
|
|
|
613 |
scheduledTasks.walletmismatch();
|
|
|
614 |
}
|
|
|
615 |
if (args.containsOption("schemewalletmismatch")) {
|
|
|
616 |
scheduledTasks.schemewalletmismatch();
|
|
|
617 |
}
|
|
|
618 |
if (args.containsOption("gst")) {
|
|
|
619 |
scheduledTasks.gst();
|
|
|
620 |
}
|
|
|
621 |
if (args.containsOption("mailDashboardScreenshots")) {
|
|
|
622 |
runOnceTasks.mailDashboardScreenshots();
|
|
|
623 |
}
|
|
|
624 |
if (args.containsOption("notifyLead")) {
|
|
|
625 |
scheduledTasks.notifyLead();
|
|
|
626 |
scheduledTasks.notifyVisits();
|
|
|
627 |
}
|
|
|
628 |
if (args.containsOption("fixgrn")) {
|
|
|
629 |
runOnceTasks.fixGrn();
|
|
|
630 |
}
|
|
|
631 |
if (args.containsOption("pbfix")) {
|
|
|
632 |
runOnceTasks.pbfix();
|
|
|
633 |
}
|
|
|
634 |
if (args.containsOption("mongom")) {
|
|
|
635 |
runOnceTasks.mongom();
|
|
|
636 |
}
|
|
|
637 |
if (args.containsOption("processPd")) {
|
|
|
638 |
int priceDropId = Integer.parseInt(args.getOptionValues("processPd").get(0));
|
|
|
639 |
runOnceTasks.processPd(priceDropId);
|
|
|
640 |
}
|
|
|
641 |
if (args.containsOption("samsung")) {
|
|
|
642 |
if (args.containsOption("ym")) {
|
|
|
643 |
int ym = Integer.parseInt(args.getOptionValues("ym").get(0));
|
|
|
644 |
runOnceTasks.fetchImeiActivation(ym);
|
|
|
645 |
}
|
|
|
646 |
runOnceTasks.fetchImeiActivation(0);
|
|
|
647 |
}
|
|
|
648 |
if (args.containsOption("fixdupimeigrn")) {
|
|
|
649 |
runOnceTasks.fixDupGrns();
|
|
|
650 |
}
|
|
|
651 |
if (args.containsOption("cancel")) {
|
|
|
652 |
runOnceTasks.cancelDn(args.getOptionValues("dn").get(0));
|
|
|
653 |
}
|
|
|
654 |
if (args.containsOption("fixScheme")) {
|
|
|
655 |
runOnceTasks.fixScheme();
|
|
|
656 |
}
|
|
|
657 |
if (args.containsOption("syncLeads")) {
|
|
|
658 |
leadSyncRunner.syncLeads();
|
|
|
659 |
}
|
|
|
660 |
if (args.containsOption("testCs")) {
|
|
|
661 |
int category = Integer.parseInt(args.getOptionValues("category").get(0));
|
|
|
662 |
EscalationType escalationType = EscalationType.valueOf(args.getOptionValues("escalation").get(0));
|
|
|
663 |
int fofoId = Integer.parseInt(args.getOptionValues("fofoid").get(0));
|
|
|
664 |
csService.getAuthUserId(category, escalationType, fofoId);
|
|
|
665 |
}
|
|
|
666 |
if (args.containsOption("duporder")) {
|
|
|
667 |
runOnceTasks.removeDuplicateOrders();
|
|
|
668 |
}
|
|
|
669 |
if (args.containsOption("createDummyInvoices")) {
|
|
|
670 |
runOnceTasks.createDummyInvoices();
|
|
|
671 |
}
|
| 28921 |
tejbeer |
672 |
|
| 31753 |
tejbeer |
673 |
if (args.containsOption("createGeofence")) {
|
|
|
674 |
runOnceTasks.createGeofence();
|
|
|
675 |
}
|
|
|
676 |
if (args.containsOption("getAllGeofences")) {
|
|
|
677 |
runOnceTasks.getAllGeofences();
|
|
|
678 |
}
|
|
|
679 |
if (args.containsOption("payMonthlyInvestment")) {
|
|
|
680 |
investmentRelatedTasks.payMonthlyInvestment();
|
|
|
681 |
}
|
|
|
682 |
if (args.containsOption("evaluateActualInvestmentPayout")) {
|
|
|
683 |
investmentRelatedTasks.evaluateActualInvestmentPayout();
|
|
|
684 |
}
|
|
|
685 |
if (args.containsOption("deleteGeofences")) {
|
|
|
686 |
List<String> geofenceIds = args.getOptionValues("geofenceId");
|
|
|
687 |
runOnceTasks.deleteGeofences(geofenceIds);
|
|
|
688 |
}
|
|
|
689 |
if (args.containsOption("createOffers")) {
|
|
|
690 |
if (args.containsOption("fileName")) {
|
|
|
691 |
String fileName = args.getOptionValues("fileName").get(0);
|
|
|
692 |
FileInputStream stream = new FileInputStream(fileName);
|
|
|
693 |
runOnceTasks.createOffers(stream);
|
|
|
694 |
}
|
|
|
695 |
}
|
|
|
696 |
if (args.containsOption("schemeout")) {
|
|
|
697 |
if (args.containsOption("invoices")) {
|
|
|
698 |
String invoicesString = args.getOptionValues("invoices").get(0);
|
|
|
699 |
List<String> invoices = Arrays.asList(invoicesString.split(","));
|
|
|
700 |
scheduledTasks.processSchemeOut(invoices);
|
|
|
701 |
}
|
|
|
702 |
}
|
|
|
703 |
if (args.containsOption("schemein")) {
|
|
|
704 |
if (args.containsOption("invoices")) {
|
|
|
705 |
String invoicesString = args.getOptionValues("invoices").get(0);
|
|
|
706 |
List<String> invoices = Arrays.asList(invoicesString.split(","));
|
|
|
707 |
scheduledTasks.processSchemeIn(invoices);
|
|
|
708 |
}
|
|
|
709 |
}
|
| 28921 |
tejbeer |
710 |
|
| 31753 |
tejbeer |
711 |
if (args.containsOption("fixScans")) {
|
|
|
712 |
runOnceTasks.fixScans();
|
|
|
713 |
}
|
|
|
714 |
if (args.containsOption("fixPrebookingOrderGrn")) {
|
|
|
715 |
runOnceTasks.genericCreateCurrentInventorySnapshot();
|
|
|
716 |
}
|
|
|
717 |
if (args.containsOption("fixOurSerialized")) {
|
|
|
718 |
if (args.containsOption("orderIds")) {
|
|
|
719 |
String orderIdsString = args.getOptionValues("orderIds").get(0);
|
|
|
720 |
List<Integer> orderIds = Arrays.asList(orderIdsString.split(",")).stream().map(x -> Integer.parseInt(x)).collect(Collectors.toList());
|
|
|
721 |
// runOnceTasks.fixOurSerialized(orderIds);
|
|
|
722 |
}
|
|
|
723 |
}
|
| 29776 |
tejbeer |
724 |
|
| 31753 |
tejbeer |
725 |
if (args.containsOption("reverseMaa")) {
|
|
|
726 |
runOnceTasks.reverseMaa();
|
|
|
727 |
}
|
| 29776 |
tejbeer |
728 |
|
| 31753 |
tejbeer |
729 |
if (args.containsOption("fixOffer")) {
|
|
|
730 |
runOnceTasks.fixOffer();
|
|
|
731 |
}
|
| 29794 |
tejbeer |
732 |
|
| 31753 |
tejbeer |
733 |
if (args.containsOption("opporeno")) {
|
|
|
734 |
runOnceTasks.opporeno();
|
|
|
735 |
}
|
| 30309 |
amit.gupta |
736 |
|
| 31753 |
tejbeer |
737 |
if (args.containsOption("fixorders")) {
|
|
|
738 |
runOnceTasks.fixOrders();
|
|
|
739 |
}
|
|
|
740 |
if (args.containsOption("fixreservations")) {
|
|
|
741 |
runOnceTasks.fixReservations();
|
|
|
742 |
}
|
|
|
743 |
if (args.containsOption("addinvestment")) {
|
|
|
744 |
runOnceTasks.addInvestment();
|
|
|
745 |
}
|
|
|
746 |
if (args.containsOption("brandregion")) {
|
|
|
747 |
runOnceTasks.brandRegion();
|
|
|
748 |
}
|
|
|
749 |
if (args.containsOption("rollOutUpgardedMargins")) {
|
|
|
750 |
scheduledTasks.rollOutUpgardedMargins();
|
|
|
751 |
}
|
| 34029 |
ranu |
752 |
if (args.containsOption("pushRbmTargets")) {
|
|
|
753 |
scheduledTasks.persistRbmTodayTargets();
|
|
|
754 |
}
|
| 31753 |
tejbeer |
755 |
if (args.containsOption("rollOutUpgardedMarginsNextMonth")) {
|
|
|
756 |
scheduledTasks.rollOutUpgardedMarginsNextMonth();
|
|
|
757 |
}
|
|
|
758 |
if (args.containsOption("checkCancellationMargin")) {
|
|
|
759 |
scheduledTasks.checkCancellationMargin();
|
|
|
760 |
}
|
|
|
761 |
if (args.containsOption("reviewUncontactablePartner")) {
|
|
|
762 |
scheduledTasks.reviewUncontactablePartner();
|
|
|
763 |
}
|
| 33078 |
ranu |
764 |
if (args.containsOption("reviewNonSdBuyingBrand")) {
|
|
|
765 |
scheduledTasks.reviewNonSdBuyingBrand();
|
|
|
766 |
}
|
| 31753 |
tejbeer |
767 |
if (args.containsOption("sendWelcomeEmail")) {
|
|
|
768 |
onBoardingRelatedSchelduleTask.sendWelcomeEmail();
|
|
|
769 |
}
|
| 29814 |
tejbeer |
770 |
|
| 31753 |
tejbeer |
771 |
if (args.containsOption("partnerOnboardingLegalMigration")) {
|
|
|
772 |
onBoardingRelatedSchelduleTask.partnerOnboardingLegalMigration();
|
|
|
773 |
}
|
| 31031 |
amit.gupta |
774 |
|
| 33526 |
amit.gupta |
775 |
if(args.containsOption("moveOrders")) {
|
|
|
776 |
runOnceTasks.moveOrders();
|
|
|
777 |
}
|
|
|
778 |
|
| 31753 |
tejbeer |
779 |
if (args.containsOption("addKycLegalMigration")) {
|
|
|
780 |
onBoardingRelatedSchelduleTask.addKycLegalMigration();
|
|
|
781 |
}
|
| 29776 |
tejbeer |
782 |
|
|
|
783 |
|
| 31753 |
tejbeer |
784 |
if (args.containsOption("pushDataToSolr")) {
|
|
|
785 |
listing.pushDataToSolr();
|
|
|
786 |
}
|
| 30120 |
amit.gupta |
787 |
|
| 31753 |
tejbeer |
788 |
if (args.containsOption("testGstPro")) {
|
|
|
789 |
System.out.println("TestGstProc called");
|
|
|
790 |
try {
|
|
|
791 |
runOnceTasks.updateIrnsToInvoices();
|
|
|
792 |
} catch (Exception e) {
|
|
|
793 |
e.printStackTrace();
|
|
|
794 |
}
|
|
|
795 |
}
|
| 29308 |
tejbeer |
796 |
|
| 31753 |
tejbeer |
797 |
if (args.containsOption("reverseSchemeCancelInvoice")) {
|
|
|
798 |
if (args.containsOption("invoice")) {
|
|
|
799 |
String invoice = args.getOptionValues("invoice").get(0);
|
|
|
800 |
runOnceTasks.reverseSchemes(invoice);
|
|
|
801 |
}
|
|
|
802 |
}
|
| 29863 |
tejbeer |
803 |
|
| 31753 |
tejbeer |
804 |
if (args.containsOption("reverseInvalidActivation")) {
|
|
|
805 |
if (args.containsOption("inventoryids")) {
|
|
|
806 |
String inventoryItemIdsString = args.getOptionValues("inventoryids").get(0);
|
|
|
807 |
List<Integer> inventoryItemIds = new ArrayList<>();
|
|
|
808 |
for (String inventoryItemIdString : inventoryItemIdsString.split(",")) {
|
|
|
809 |
int inventoryItemId = Integer.parseInt(inventoryItemIdString.trim());
|
|
|
810 |
inventoryItemIds.add(inventoryItemId);
|
|
|
811 |
}
|
|
|
812 |
runOnceTasks.reverseInvalidActivation(inventoryItemIds);
|
|
|
813 |
}
|
|
|
814 |
}
|
| 29863 |
tejbeer |
815 |
|
| 31753 |
tejbeer |
816 |
if (args.containsOption("runme")) {
|
|
|
817 |
runOnceTasks.runMe();
|
|
|
818 |
}
|
|
|
819 |
if (args.containsOption("" + "")) {
|
|
|
820 |
upgradeOfferService.authenticateUser();
|
|
|
821 |
}
|
|
|
822 |
if (args.containsOption("mandiiUser")) {
|
|
|
823 |
runOnceTasks.mandiiUser(args.getOptionValues("firstName").get(0), args.getOptionValues("lastName").get(0), args.getOptionValues("pan").get(0), args.getOptionValues("dob").get(0), args.getOptionValues("aadhaar").get(0), args.getOptionValues("gender").get(0), args.getOptionValues("father").get(0));
|
|
|
824 |
}
|
| 30335 |
amit.gupta |
825 |
|
| 31753 |
tejbeer |
826 |
if (args.containsOption("mandiiUsers")) {
|
|
|
827 |
if (args.containsOption("pan")) {
|
|
|
828 |
runOnceTasks.mandiiUsers(args.getOptionValues("pan").get(0));
|
|
|
829 |
} else {
|
|
|
830 |
runOnceTasks.mandiiUsers();
|
|
|
831 |
}
|
|
|
832 |
}
|
| 30576 |
amit.gupta |
833 |
|
| 31753 |
tejbeer |
834 |
if (args.containsOption("checkOppoImeiStatus")) {
|
|
|
835 |
try {
|
|
|
836 |
standAlone.checkOppoImeiStatus();
|
|
|
837 |
} catch (Exception e) {
|
|
|
838 |
e.printStackTrace();
|
|
|
839 |
}
|
|
|
840 |
}
|
| 30616 |
amit.gupta |
841 |
|
| 34417 |
amit.gupta |
842 |
if (args.containsOption("checkRealmeImeiStatus")) {
|
|
|
843 |
try {
|
|
|
844 |
standAlone.checkRealmeImeiStatus();
|
|
|
845 |
} catch (Exception e) {
|
|
|
846 |
e.printStackTrace();
|
|
|
847 |
}
|
|
|
848 |
}
|
|
|
849 |
|
| 31753 |
tejbeer |
850 |
/*
|
|
|
851 |
* if (args.containsOption("checkRealmeImeiStatus")) { try {
|
|
|
852 |
* standAlone.checkRealmeImeiStatus(); } catch (Exception e) {
|
|
|
853 |
* e.printStackTrace(); } }
|
|
|
854 |
*/
|
| 30616 |
amit.gupta |
855 |
|
| 31753 |
tejbeer |
856 |
if (args.containsOption("amazonPurchase")) {
|
|
|
857 |
try {
|
|
|
858 |
runOnceTasks.amazonPurchase();
|
|
|
859 |
} catch (Exception e) {
|
|
|
860 |
e.printStackTrace();
|
|
|
861 |
}
|
|
|
862 |
}
|
| 30641 |
amit.gupta |
863 |
|
| 31753 |
tejbeer |
864 |
if (args.containsOption("getCaptchaCode")) {
|
|
|
865 |
try {
|
|
|
866 |
captchaService.getCaptchaCode("/home/amit/Desktop/generatingCodes.jpg");
|
|
|
867 |
} catch (Exception e) {
|
|
|
868 |
e.printStackTrace();
|
|
|
869 |
}
|
|
|
870 |
}
|
| 30641 |
amit.gupta |
871 |
|
| 31753 |
tejbeer |
872 |
if (args.containsOption("testIrnLive")) {
|
|
|
873 |
try {
|
|
|
874 |
runOnceTasks.testIrnLive(args.getOptionValues("invoiceNumber").get(0));
|
|
|
875 |
} catch (Exception e) {
|
|
|
876 |
e.printStackTrace();
|
|
|
877 |
}
|
|
|
878 |
}
|
| 30659 |
amit.gupta |
879 |
|
| 31753 |
tejbeer |
880 |
if (args.containsOption("createoffercriteria")) {
|
|
|
881 |
try {
|
|
|
882 |
runOnceTasks.createOfferCriteria();
|
|
|
883 |
} catch (Exception e) {
|
|
|
884 |
e.printStackTrace();
|
|
|
885 |
}
|
|
|
886 |
}
|
| 30659 |
amit.gupta |
887 |
|
| 31753 |
tejbeer |
888 |
if (args.containsOption("fix-price-drops")) {
|
|
|
889 |
runOnceTasks.fixPriceDrop();
|
|
|
890 |
}
|
| 29035 |
tejbeer |
891 |
|
| 31753 |
tejbeer |
892 |
if (args.containsOption("processSchemeByIds")) {
|
|
|
893 |
List<String> schemeIds = Arrays.asList(args.getOptionValues("ids").get(0).split(","));
|
|
|
894 |
List<Integer> schemeIdsInt = schemeIds.stream().map(x -> Integer.parseInt(x)).collect(Collectors.toList());
|
|
|
895 |
runOnceTasks.processSchemeByIds(schemeIdsInt);
|
|
|
896 |
}
|
| 30859 |
tejbeer |
897 |
|
| 31753 |
tejbeer |
898 |
if (args.containsOption("updateSaholicCISTable")) {
|
|
|
899 |
runOnceTasks.updateSaholicCISTable();
|
|
|
900 |
}
|
| 30859 |
tejbeer |
901 |
|
| 31753 |
tejbeer |
902 |
if (args.containsOption("mapbag")) {
|
|
|
903 |
runOnceTasks.mapBag();
|
|
|
904 |
}
|
| 30859 |
tejbeer |
905 |
|
| 34579 |
vikas.jang |
906 |
if (args.containsOption("todayBidPO")) {
|
| 34443 |
vikas.jang |
907 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.TODAY);
|
|
|
908 |
}
|
|
|
909 |
|
| 34579 |
vikas.jang |
910 |
if (args.containsOption("yesterdayBidPO")) {
|
|
|
911 |
runOnceTasks.processBids(ProfitMandiConstants.BID_CRON_ENUM.YESTERDAY);
|
|
|
912 |
}
|
|
|
913 |
|
| 34547 |
vikas.jang |
914 |
if (args.containsOption("biddingConsolidatedMessage")) {
|
|
|
915 |
runOnceTasks.consolidatedBiddingMessage();
|
|
|
916 |
}
|
|
|
917 |
|
|
|
918 |
if (args.containsOption("sendMailWhatsAppAfterLoanDueDate")) {
|
|
|
919 |
scheduledTasks.sendMailWhatsAppAfterLoanDueDate();
|
|
|
920 |
}
|
|
|
921 |
|
| 34836 |
vikas |
922 |
if (args.containsOption("yesterdayTrackingReport")) {
|
|
|
923 |
runOnceTasks.yesterdayTrackingReport();
|
| 34770 |
vikas.jang |
924 |
}
|
|
|
925 |
|
| 31753 |
tejbeer |
926 |
System.exit(0);
|
|
|
927 |
}
|
| 30859 |
tejbeer |
928 |
|
| 31753 |
tejbeer |
929 |
if (args.containsOption("calculateInterestAccured")) {
|
| 30929 |
tejbeer |
930 |
|
| 31753 |
tejbeer |
931 |
scheduledTasks.calculateInterestAccured();
|
|
|
932 |
System.exit(0);
|
|
|
933 |
}
|
| 30929 |
tejbeer |
934 |
|
| 31753 |
tejbeer |
935 |
if (args.containsOption("loanSettlement")) {
|
| 30890 |
amit.gupta |
936 |
|
| 31753 |
tejbeer |
937 |
scheduledTasks.loanSettlement();
|
|
|
938 |
System.exit(0);
|
|
|
939 |
}
|
| 30896 |
amit.gupta |
940 |
|
| 31753 |
tejbeer |
941 |
if (args.containsOption("dailyLoanAlert")) {
|
| 30936 |
tejbeer |
942 |
|
| 31753 |
tejbeer |
943 |
scheduledTasks.dailyLoanAlert();
|
|
|
944 |
System.exit(0);
|
|
|
945 |
}
|
| 30982 |
tejbeer |
946 |
|
| 31753 |
tejbeer |
947 |
if (args.containsOption("updatePartnerLimit")) {
|
|
|
948 |
scheduledTasks.updatePartnerLimit();
|
|
|
949 |
System.exit(0);
|
|
|
950 |
}
|
| 30982 |
tejbeer |
951 |
|
| 31753 |
tejbeer |
952 |
if (args.containsOption("notifyDefaultLoans")) {
|
|
|
953 |
scheduledTasks.notifyDefaultLoans();
|
|
|
954 |
System.exit(0);
|
|
|
955 |
}
|
| 31446 |
amit.gupta |
956 |
|
| 31753 |
tejbeer |
957 |
if (args.containsOption("fixinsurance")) {
|
|
|
958 |
runOnceTasks.addMissingWalletDebitsForInsurance();
|
|
|
959 |
System.exit(0);
|
|
|
960 |
}
|
| 31604 |
tejbeer |
961 |
|
| 31753 |
tejbeer |
962 |
if (args.containsOption("processActivatedImeisForSchemes")) {
|
|
|
963 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
964 |
System.exit(0);
|
|
|
965 |
}
|
| 31604 |
tejbeer |
966 |
|
| 31753 |
tejbeer |
967 |
if (args.containsOption("notifyLoanDueDateCross")) {
|
|
|
968 |
scheduledTasks.notifyLoanDueDateCross();
|
|
|
969 |
System.exit(0);
|
|
|
970 |
}
|
| 34275 |
tejus.loha |
971 |
if (args.containsOption("sendTenOrMoreOrderStockReport")) {
|
|
|
972 |
scheduledTasks.send10OrMoreOlderStockReport();
|
|
|
973 |
System.exit(0);
|
|
|
974 |
}
|
| 31604 |
tejbeer |
975 |
|
| 31753 |
tejbeer |
976 |
if (args.containsOption("alertForDueDate")) {
|
|
|
977 |
scheduledTasks.alertForDueDate();
|
|
|
978 |
System.exit(0);
|
|
|
979 |
}
|
| 31648 |
tejbeer |
980 |
|
| 31753 |
tejbeer |
981 |
if (args.containsOption("userMobileNumberOptIn")) {
|
|
|
982 |
scheduledTasks.userMobileNumberOptIn();
|
|
|
983 |
System.exit(0);
|
|
|
984 |
}
|
|
|
985 |
|
|
|
986 |
if (args.containsOption("fetchParnterStats")) {
|
|
|
987 |
scheduledTasks.fetchParnterStats();
|
|
|
988 |
System.exit(0);
|
|
|
989 |
}
|
|
|
990 |
|
|
|
991 |
if (args.containsOption("authUserMobileNumberOptIn")) {
|
|
|
992 |
scheduledTasks.authUserMobileNumberOptIn();
|
|
|
993 |
System.exit(0);
|
|
|
994 |
}
|
|
|
995 |
if (args.containsOption("morning")) {
|
|
|
996 |
if (args.containsOption("0")) {
|
|
|
997 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
998 |
}
|
|
|
999 |
if (args.containsOption("1")) {
|
|
|
1000 |
scheduledTasks.sendIndentTertiary();
|
|
|
1001 |
}
|
|
|
1002 |
// 0
|
|
|
1003 |
if (args.containsOption("2")) {
|
|
|
1004 |
scheduledTasks.calculateInterestAccured();
|
|
|
1005 |
}
|
|
|
1006 |
System.out.println("scheduledTasks.calculateInterestAccured()");
|
|
|
1007 |
// 0
|
|
|
1008 |
if (args.containsOption("3")) {
|
| 32831 |
amit.gupta |
1009 |
orderTrackingService.markDelhiveryOrderDelivered();
|
| 31753 |
tejbeer |
1010 |
}
|
|
|
1011 |
System.out.println("scheduledTasks.markDelhiveryOrderDelivered()");
|
|
|
1012 |
// 1
|
|
|
1013 |
if (args.containsOption("4")) {
|
|
|
1014 |
scheduledTasks.processActivatedImeisForSchemes();
|
|
|
1015 |
}
|
|
|
1016 |
System.out.println("scheduledTasks.processActivatedImeisForSchemes()");
|
|
|
1017 |
// 2
|
|
|
1018 |
if (args.containsOption("5")) {
|
|
|
1019 |
scheduledTasks.processActivation();
|
|
|
1020 |
}
|
|
|
1021 |
System.out.println("scheduledTasks.processActivation()");
|
|
|
1022 |
// 4
|
|
|
1023 |
if (args.containsOption("6")) {
|
|
|
1024 |
scheduledTasks.processPriceDrop();
|
|
|
1025 |
}
|
|
|
1026 |
System.out.println("scheduledTasks.processPriceDrop()");
|
|
|
1027 |
// 5
|
|
|
1028 |
if (args.containsOption("7")) {
|
|
|
1029 |
scheduledTasks.loanSettlement();
|
|
|
1030 |
}
|
|
|
1031 |
System.out.println("scheduledTasks.loanSettlement()");
|
|
|
1032 |
// 8
|
|
|
1033 |
if (args.containsOption("8")) {
|
|
|
1034 |
scheduledTasks.reviewUncontactablePartner();
|
|
|
1035 |
}
|
|
|
1036 |
// 9
|
| 33859 |
tejus.loha |
1037 |
// if (args.containsOption("9")) {
|
|
|
1038 |
// onBoardingRelatedSchelduleTask.storeTimelinePromoterPending();
|
|
|
1039 |
// }
|
|
|
1040 |
// // 9
|
|
|
1041 |
// if (args.containsOption("10")) {
|
|
|
1042 |
// onBoardingRelatedSchelduleTask.advancePaymentPendinglegalAlert();
|
|
|
1043 |
// }
|
| 31753 |
tejbeer |
1044 |
// sendPartnerInvestment
|
|
|
1045 |
if (args.containsOption("11")) {
|
|
|
1046 |
scheduledTasks.sendPartnerInvestmentDetails();
|
|
|
1047 |
}
|
|
|
1048 |
if (args.containsOption("sendCreditNote")) {
|
| 34029 |
ranu |
1049 |
YearMonth yearMonth = YearMonth.now().minusMonths(1);
|
| 31753 |
tejbeer |
1050 |
/*
|
|
|
1051 |
* if
|
|
|
1052 |
* (localDateTime.toLocalDate().equals(yearMonth.atEndOfMonth().getDayOfMonth())
|
|
|
1053 |
* && Arrays.asList(20,21,22,23).contains(localDateTime.getHour())) {
|
|
|
1054 |
* scheduledTasks.sendCreditNote(yearMonth); }
|
|
|
1055 |
*/
|
|
|
1056 |
scheduledTasks.sendCreditNote(yearMonth);
|
|
|
1057 |
}
|
|
|
1058 |
System.exit(0);
|
|
|
1059 |
}
|
|
|
1060 |
}
|
| 24848 |
amit.gupta |
1061 |
}
|