| Line 1... |
Line 1... |
| 1 |
package com.smartdukaan.cron;
|
1 |
package com.smartdukaan.cron;
|
| 2 |
|
2 |
|
| 3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
3 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
| 4 |
import com.smartdukaan.cron.migrations.InternalGrnTask;
|
4 |
import com.smartdukaan.cron.migrations.InternalGrnTask;
|
| - |
|
5 |
import com.smartdukaan.cron.migrations.MovementBillingTask;
|
| 5 |
import com.smartdukaan.cron.scheduled.*;
|
6 |
import com.smartdukaan.cron.scheduled.*;
|
| 6 |
import com.smartdukaan.cron.scheduled.b2b.Listing;
|
7 |
import com.smartdukaan.cron.scheduled.b2b.Listing;
|
| 7 |
import com.smartdukaan.cron.scheduled.beatmiss.BeatMissDetectorRunner;
|
8 |
import com.smartdukaan.cron.scheduled.beatmiss.BeatMissDetectorRunner;
|
| 8 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
9 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 9 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
10 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
| Line 257... |
Line 258... |
| 257 |
|
258 |
|
| 258 |
@Autowired
|
259 |
@Autowired
|
| 259 |
private InternalGrnTask internalGrnTask;
|
260 |
private InternalGrnTask internalGrnTask;
|
| 260 |
|
261 |
|
| 261 |
@Autowired
|
262 |
@Autowired
|
| - |
|
263 |
private MovementBillingTask movementBillingTask;
|
| - |
|
264 |
|
| - |
|
265 |
@Autowired
|
| 262 |
private ScheduledTasks scheduledTasks;
|
266 |
private ScheduledTasks scheduledTasks;
|
| 263 |
|
267 |
|
| 264 |
@Autowired
|
268 |
@Autowired
|
| 265 |
private ScheduledTasksTest scheduledTasksTest;
|
269 |
private ScheduledTasksTest scheduledTasksTest;
|
| 266 |
|
270 |
|
| Line 407... |
Line 411... |
| 407 |
LOGGER.info("Starting migration for warehouse.inventoryItem.originalInventoryItemId with batchSize={}", batchSize);
|
411 |
LOGGER.info("Starting migration for warehouse.inventoryItem.originalInventoryItemId with batchSize={}", batchSize);
|
| 408 |
migrations.migrateWarehouseOriginalInventoryItemId(batchSize);
|
412 |
migrations.migrateWarehouseOriginalInventoryItemId(batchSize);
|
| 409 |
LOGGER.info("Migration completed.");
|
413 |
LOGGER.info("Migration completed.");
|
| 410 |
System.exit(0);
|
414 |
System.exit(0);
|
| 411 |
}
|
415 |
}
|
| - |
|
416 |
if (args.containsOption("autoBillMovement")) {
|
| - |
|
417 |
if (!args.containsOption("pos") || !args.containsOption("email") || !args.containsOption("provider")) {
|
| - |
|
418 |
LOGGER.error("autoBillMovement needs --pos=PO1,PO2, --email=<operator> and --provider=<logistics"
|
| - |
|
419 |
+ " provider id>; add --live to bill (default is a dry run)");
|
| - |
|
420 |
System.exit(1);
|
| - |
|
421 |
}
|
| - |
|
422 |
List<String> poNumbers = new ArrayList<>();
|
| - |
|
423 |
for (String value : args.getOptionValues("pos")) {
|
| - |
|
424 |
for (String poNumber : value.split(",")) {
|
| - |
|
425 |
if (!poNumber.trim().isEmpty()) {
|
| - |
|
426 |
poNumbers.add(poNumber.trim());
|
| - |
|
427 |
}
|
| - |
|
428 |
}
|
| - |
|
429 |
}
|
| - |
|
430 |
movementBillingTask.billMovements(poNumbers, args.getOptionValues("email").get(0),
|
| - |
|
431 |
Integer.parseInt(args.getOptionValues("provider").get(0)), args.containsOption("live"));
|
| - |
|
432 |
System.exit(0);
|
| - |
|
433 |
}
|
| 412 |
if (args.containsOption("autoGrnInternal")) {
|
434 |
if (args.containsOption("autoGrnInternal")) {
|
| 413 |
if (!args.containsOption("invoices") || !args.containsOption("email")) {
|
435 |
if (!args.containsOption("invoices") || !args.containsOption("email")) {
|
| 414 |
LOGGER.error("autoGrnInternal needs --invoices=A,B and --email=<operator>");
|
436 |
LOGGER.error("autoGrnInternal needs --invoices=A,B and --email=<operator>");
|
| 415 |
System.exit(1);
|
437 |
System.exit(1);
|
| 416 |
}
|
438 |
}
|