Subversion Repositories SmartDukaan

Rev

Rev 33446 | Rev 33464 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33446 Rev 33457
Line 295... Line 295...
295
        }
295
        }
296
        /*
296
        /*
297
         * if (args.containsOption("test")) { schemeService.processSchemeIn(9243,
297
         * if (args.containsOption("test")) { schemeService.processSchemeIn(9243,
298
         * 175138102); throw new Exception(); }
298
         * 175138102); throw new Exception(); }
299
         */
299
         */
300
        if (args.containsOption("fixSchemePayouts")) {
-
 
301
 
300
 
302
            runOnceTasks.fixSchemePayouts();
-
 
303
            System.exit(0);
-
 
304
        }
-
 
305
        if (args.containsOption("sendNotification")) {
301
        if (args.containsOption("sendNotification")) {
306
            scheduledTasks.sendNotification();
302
            scheduledTasks.sendNotification();
307
            System.exit(0);
303
            System.exit(0);
308
        }
304
        }
309
 
305
 
Line 535... Line 531...
535
                } else {
531
                } else {
536
                    scheduledTasks.sendAgeingReport();
532
                    scheduledTasks.sendAgeingReport();
537
                }
533
                }
538
                System.exit(0);
534
                System.exit(0);
539
            }
535
            }
540
            if (args.containsOption("3")) {
-
 
541
                if (args.getOptionNames().contains("offset")) {
-
 
542
                    int offset = Integer.parseInt(args.getOptionValues("offset").get(0));
-
 
543
                    if (args.getOptionNames().contains("days")) {
-
 
544
                        int durationDays = Integer.parseInt(args.getOptionValues("days").get(0));
-
 
545
                        scheduledTasks.processScheme(offset, durationDays, args.containsOption("dryRun"));
-
 
546
                    } else {
-
 
547
                        scheduledTasks.processScheme(offset, args.containsOption("dryRun"));
-
 
548
                    }
-
 
549
                } else if (args.containsOption("catalogid")) {
-
 
550
                    // scheduledTasks.processSchemeForModel(args.getOptionValues("catalogid").get(0));
-
 
551
                } else {
-
 
552
                    scheduledTasks.processScheme(args.containsOption("dryRun"));
-
 
553
                }
-
 
554
                System.exit(0);
-
 
555
            }
536
 
556
            if (args.containsOption("4")) {
537
            if (args.containsOption("4")) {
557
                scheduledTasks.evaluateExcessSchemeOut();
538
                scheduledTasks.evaluateExcessSchemeOut();
558
            }
539
            }
559
            if (args.containsOption("5")) {
-
 
560
                int offset = Integer.parseInt(args.getOptionValues("offset").get(0));
-
 
561
                scheduledTasks.processScheme(offset, args.containsOption("dryRun"));
-
 
562
                System.exit(0);
-
 
563
            }
-
 
564
            if (args.containsOption("cancelOrder")) {
540
            if (args.containsOption("cancelOrder")) {
565
                List<String> invoiceNumbers = args.getOptionValues("invoiceNumber");
541
                List<String> invoiceNumbers = args.getOptionValues("invoiceNumber");
566
                runOnceTasks.cancelOrder(invoiceNumbers);
542
                runOnceTasks.cancelOrder(invoiceNumbers);
567
            }
543
            }
568
            if (args.containsOption("migratePurchase")) {
544
            if (args.containsOption("migratePurchase")) {