Subversion Repositories SmartDukaan

Rev

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

Rev 2738 Rev 2740
Line 347... Line 347...
347
	    priorityList.add(Utils.HEADSET);
347
	    priorityList.add(Utils.HEADSET);
348
	    priorityList.add(Utils.CHARGER);
348
	    priorityList.add(Utils.CHARGER);
349
	    
349
	    
350
	    StringBuffer sb = new StringBuffer();
350
	    StringBuffer sb = new StringBuffer();
351
	    int totalCount = 0;
351
	    int totalCount = 0;
-
 
352
	    if(relatedAccessories!=null){
352
	    for(Long catID: priorityList){
353
		    for(Long catID: priorityList){
353
	    	int individualCount = 0;
354
		    	int individualCount = 0;
354
	    	List<Long> ents = relatedAccessories.get(catID);
355
		    	List<Long> ents = relatedAccessories.get(catID);
355
	    	if(ents != null && !ents.isEmpty()){
356
		    	if(ents != null && !ents.isEmpty()){
356
	    		if(ents.size()>individualLimit){
357
		    		if(ents.size()>individualLimit){
357
	    			ents = ents.subList(0, individualLimit);
358
		    			ents = ents.subList(0, individualLimit);
358
	    		}
359
		    		}
359
	    		for(Long entID: ents){
360
		    		for(Long entID: ents){
360
	    			if(totalLimit > totalCount){
361
		    			if(totalLimit > totalCount){
361
	    				sb.append(entID + "\n");
362
		    				sb.append(entID + "\n");
362
	    				individualCount++;
363
		    				individualCount++;
363
	    				totalCount++;
364
		    				totalCount++;
364
	    			}
365
		    			}
365
	    		}
366
		    		}
366
	    	}
367
		    	}
-
 
368
		    }
367
	    }
369
	    }
368
	    
370
	    
369
        String exportFileName = exportPath + catalogId + File.separator + "RelatedAccessories.vm";
371
        String exportFileName = exportPath + catalogId + File.separator + "RelatedAccessories.vm";
370
        File exportFile = new File(exportFileName);
372
        File exportFile = new File(exportFileName);
371
        if(!exportFile.exists()) {
373
        if(!exportFile.exists()) {