Subversion Repositories SmartDukaan

Rev

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

Rev 15434 Rev 15439
Line 791... Line 791...
791
		rowhead.createCell((short) 24).setCellValue("AUTO DECREMENT");
791
		rowhead.createCell((short) 24).setCellValue("AUTO DECREMENT");
792
		rowhead.createCell((short) 25).setCellValue("Max NLC");
792
		rowhead.createCell((short) 25).setCellValue("Max NLC");
793
		rowhead.createCell((short) 26).setCellValue("SKU @ Flipkart");
793
		rowhead.createCell((short) 26).setCellValue("SKU @ Flipkart");
794
		rowhead.createCell((short) 27).setCellValue("Flipkart Serial Number");
794
		rowhead.createCell((short) 27).setCellValue("Flipkart Serial Number");
795
		Client catalogClient = null;
795
		Client catalogClient = null;
796
		List<FlipkartItemDetails> flipkartItems = null;
796
		List<FlipkartItem> flipkartItems = null;
797
		try {
797
		try {
798
			catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
798
			catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
799
			flipkartItems = catalogClient.getAllFkItems();
799
			flipkartItems = catalogClient.getAllFlipkartMarketplaceItem();
800
		} catch (Exception e) {
800
		} catch (Exception e) {
801
			e.printStackTrace();
801
			e.printStackTrace();
802
		}
802
		}
803
		int iterator=1;
803
		int iterator=1;
804
		Item item;
804
		Item item;
805
		MarketplaceItems marketplaceItem;
805
		MarketplaceItems marketplaceItem;
806
		for(FlipkartItemDetails fkItem:flipkartItems){
806
		for(FlipkartItem fkItem:flipkartItems){
807
			marketplaceItem = catalogClient.getMarketplacedetailsForItem(fkItem.getItem_id(), 8);
807
			marketplaceItem = fkItem.getMarketplaceItems();
-
 
808
			item = fkItem.getItem();
808
			//MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(8, fkItem.getItem_id());
809
			//MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(8, fkItem.getItem_id());
809
			HSSFRow row = sheet.createRow((short)iterator);
810
			HSSFRow row = sheet.createRow((short)iterator);
810
			row.createCell((short) 0).setCellValue(fkItem.getItem_id());
811
			row.createCell((short) 0).setCellValue(fkItem.getItem_id());
811
			row.createCell((short) 1).setCellValue(fkItem.getCategory());
812
			row.createCell((short) 1).setCellValue(item.getCategory());
812
			row.createCell((short) 2).setCellValue(getVaildName(fkItem.getBrand())+" "+getVaildName(fkItem.getModel_name())+" "+getVaildName(fkItem.getModel_number())+" "+getVaildName(fkItem.getColor()));
813
			row.createCell((short) 2).setCellValue(getVaildName(item.getBrand())+" "+getVaildName(item.getModelName())+" "+getVaildName(item.getModelNumber())+" "+getVaildName(item.getColor()));
813
			row.createCell((short) 3).setCellValue(fkItem.getWarehouseId());
814
			row.createCell((short) 3).setCellValue(fkItem.getWarehouseId());
814
			row.createCell((short) 4).setCellValue(roundTwoDecimals(fkItem.getExceptionPrice()));
815
			row.createCell((short) 4).setCellValue(roundTwoDecimals(fkItem.getExceptionPrice()));
815
			if(fkItem.isIsListedOnFlipkart()){
816
			if(fkItem.isIsListedOnFlipkart()){
816
				row.createCell((short) 5).setCellValue(1);
817
				row.createCell((short) 5).setCellValue(1);
817
			}
818
			}
Line 825... Line 826...
825
			row.createCell((short) 10).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp()))));
826
			row.createCell((short) 10).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp()))));
826
			row.createCell((short) 11).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp())/marketplaceItem.getMinimumPossibleSp())*100));
827
			row.createCell((short) 11).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp())/marketplaceItem.getMinimumPossibleSp())*100));
827
			row.createCell((short) 12).setCellValue(roundTwoDecimals(marketplaceItem.getOtherCost()));
828
			row.createCell((short) 12).setCellValue(roundTwoDecimals(marketplaceItem.getOtherCost()));
828
			row.createCell((short) 13).setCellValue(marketplaceItem.getCourierCost());
829
			row.createCell((short) 13).setCellValue(marketplaceItem.getCourierCost());
829
			row.createCell((short) 14).setCellValue(roundTwoDecimals(marketplaceItem.getCommission()));
830
			row.createCell((short) 14).setCellValue(roundTwoDecimals(marketplaceItem.getCommission()));
830
			row.createCell((short) 15).setCellValue(roundTwoDecimals(fkItem.getCommission()));
831
			row.createCell((short) 15).setCellValue(roundTwoDecimals(fkItem.getCommissionValue()));
831
			row.createCell((short) 16).setCellValue(roundTwoDecimals(marketplaceItem.getServiceTax()));
832
			row.createCell((short) 16).setCellValue(roundTwoDecimals(marketplaceItem.getServiceTax()));
832
			row.createCell((short) 17).setCellValue(roundTwoDecimals(fkItem.getServiceTax()));
833
			row.createCell((short) 17).setCellValue(roundTwoDecimals(fkItem.getServiceTaxValue()));
833
			row.createCell((short) 18).setCellValue(roundTwoDecimals(marketplaceItem.getVat()));
834
			row.createCell((short) 18).setCellValue(roundTwoDecimals(marketplaceItem.getVat()));
834
			if(fkItem.isSuppressInventoryFeed()){
835
			if(fkItem.isSuppressInventoryFeed()){
835
				row.createCell((short) 19).setCellValue(1);
836
				row.createCell((short) 19).setCellValue(1);
836
			}
837
			}
837
			else{
838
			else{