Subversion Repositories SmartDukaan

Rev

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

Rev 12889 Rev 12920
Line 502... Line 502...
502
            return null;
502
            return null;
503
        }
503
        }
504
    }
504
    }
505
 
505
 
506
    public Long getTimetoShip(String itemId) throws LogisticsServiceException, TException{
506
    public Long getTimetoShip(String itemId) throws LogisticsServiceException, TException{
507
        //LogisticsClient logisticsClient = new LogisticsClient();
507
        LogisticsClient logisticsClient = new LogisticsClient();
508
        //return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
508
        return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
509
        return 0L;
509
        //return 0L;
510
    }
510
    }
511
    
511
    
512
    
512
    
513
    public double getWanlcForItem(String itemId){
513
    public double getWanlcForItem(String itemId){
514
        InventoryClient inventoryServiceClient;
514
        InventoryClient inventoryServiceClient;
Line 557... Line 557...
557
        testProcess.command(command);
557
        testProcess.command(command);
558
        logger.info(testProcess.command().toString());
558
        logger.info(testProcess.command().toString());
559
        Process process = testProcess.start();
559
        Process process = testProcess.start();
560
        process.waitFor();
560
        process.waitFor();
561
        logger.info(String.valueOf(process.exitValue()));
561
        logger.info(String.valueOf(process.exitValue()));
-
 
562
        return "asinjob";
-
 
563
    }
-
 
564
    
-
 
565
    public String runFbgListingJob() throws IOException, InterruptedException {
-
 
566
        if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
-
 
567
            logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
-
 
568
            return "authfail";
-
 
569
        }
-
 
570
        ProcessBuilder testProcess = new ProcessBuilder("/bin/bash");
-
 
571
        String[] command = {"/bin/bash", "-c", "sudo /root/code/trunk/AmazonFeeds/RunFbgListingJob.sh"};
-
 
572
        testProcess.command(command);
-
 
573
        logger.info(testProcess.command().toString());
-
 
574
        Process process = testProcess.start();
-
 
575
        process.waitFor();
-
 
576
        logger.info(String.valueOf(process.exitValue()));
562
        return "asinjob";
577
        return "asinjob";
563
    }
578
    }
564
 
579
 
565
 
580
 
566
    public String runFbaListingJob() throws IOException, InterruptedException {
581
    public String runFbaListingJob() throws IOException, InterruptedException {