Subversion Repositories SmartDukaan

Rev

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

Rev 10156 Rev 10184
Line 734... Line 734...
734
		rowhead.createCell((short) 5).setCellValue("FLIPKART-LISTED");
734
		rowhead.createCell((short) 5).setCellValue("FLIPKART-LISTED");
735
		rowhead.createCell((short) 6).setCellValue("TRANSFER-PRICE");
735
		rowhead.createCell((short) 6).setCellValue("TRANSFER-PRICE");
736
		rowhead.createCell((short) 7).setCellValue("SELLING-PRICE");
736
		rowhead.createCell((short) 7).setCellValue("SELLING-PRICE");
737
		rowhead.createCell((short) 8).setCellValue("LOWEST POSSIBLE SP");
737
		rowhead.createCell((short) 8).setCellValue("LOWEST POSSIBLE SP");
738
		rowhead.createCell((short) 9).setCellValue("LOWEST POSSIBLE TP");
738
		rowhead.createCell((short) 9).setCellValue("LOWEST POSSIBLE TP");
-
 
739
		rowhead.createCell((short) 10).setCellValue("MARGIN");
-
 
740
		rowhead.createCell((short) 11).setCellValue("MARGING PERCENTAGE");
739
		rowhead.createCell((short) 10).setCellValue("OTHER COST");
741
		rowhead.createCell((short) 12).setCellValue("OTHER COST");
740
		rowhead.createCell((short) 11).setCellValue("COURIER-COST");
742
		rowhead.createCell((short) 13).setCellValue("COURIER-COST");
741
		rowhead.createCell((short) 12).setCellValue("COMMISION PERCENTAGE");
743
		rowhead.createCell((short) 14).setCellValue("COMMISION PERCENTAGE");
742
		rowhead.createCell((short) 13).setCellValue("COMMISION VALUE");
744
		rowhead.createCell((short) 15).setCellValue("COMMISION VALUE");
743
		rowhead.createCell((short) 14).setCellValue("SERVICE TAX RATE");
745
		rowhead.createCell((short) 16).setCellValue("SERVICE TAX RATE");
744
		rowhead.createCell((short) 15).setCellValue("SERVICE-TAX VALUE");
746
		rowhead.createCell((short) 17).setCellValue("SERVICE-TAX VALUE");
-
 
747
		rowhead.createCell((short) 18).setCellValue("VAT PERCENTAGE");
745
		rowhead.createCell((short) 16).setCellValue("Suppress Inventory Feed");
748
		rowhead.createCell((short) 19).setCellValue("Suppress Inventory Feed");
746
		rowhead.createCell((short) 17).setCellValue("Suppress Price Feed");
749
		rowhead.createCell((short) 20).setCellValue("Suppress Price Feed");
747
		rowhead.createCell((short) 18).setCellValue("AUTO FAVOURITE");
750
		rowhead.createCell((short) 21).setCellValue("AUTO FAVOURITE");
748
		rowhead.createCell((short) 19).setCellValue("MANUAL FAVOURITE");
751
		rowhead.createCell((short) 22).setCellValue("MANUAL FAVOURITE");
749
		rowhead.createCell((short) 20).setCellValue("AUTO INCREMENT");
752
		rowhead.createCell((short) 23).setCellValue("AUTO INCREMENT");
750
		rowhead.createCell((short) 21).setCellValue("AUTO DECREMENT");
753
		rowhead.createCell((short) 24).setCellValue("AUTO DECREMENT");
751
		rowhead.createCell((short) 22).setCellValue("Max NLC");
754
		rowhead.createCell((short) 25).setCellValue("Max NLC");
752
		rowhead.createCell((short) 23).setCellValue("SKU @ Flipkart");
755
		rowhead.createCell((short) 26).setCellValue("SKU @ Flipkart");
753
		rowhead.createCell((short) 24).setCellValue("Flipkart Serial Number");
756
		rowhead.createCell((short) 27).setCellValue("Flipkart Serial Number");
754
		Client catalogClient = null;
757
		Client catalogClient = null;
755
		List<FlipkartItemDetails> flipkartItems = null;
758
		List<FlipkartItemDetails> flipkartItems = null;
756
		try {
759
		try {
757
			catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
760
			catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
758
			flipkartItems = catalogClient.getAllFkItems();
761
			flipkartItems = catalogClient.getAllFkItems();
Line 762... Line 765...
762
		int iterator=1;
765
		int iterator=1;
763
		Item item;
766
		Item item;
764
		MarketplaceItems marketplaceItem;
767
		MarketplaceItems marketplaceItem;
765
		for(FlipkartItemDetails fkItem:flipkartItems){
768
		for(FlipkartItemDetails fkItem:flipkartItems){
766
			marketplaceItem = catalogClient.getMarketplacedetailsForItem(fkItem.getItem_id(), 8);
769
			marketplaceItem = catalogClient.getMarketplacedetailsForItem(fkItem.getItem_id(), 8);
767
			MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(8, fkItem.getItem_id());
770
			//MarketplacePercentage mpCosting = catalogClient.getCostingForMarketplace(8, fkItem.getItem_id());
768
			HSSFRow row = sheet.createRow((short)iterator);
771
			HSSFRow row = sheet.createRow((short)iterator);
769
			row.createCell((short) 0).setCellValue(fkItem.getItem_id());
772
			row.createCell((short) 0).setCellValue(fkItem.getItem_id());
770
			row.createCell((short) 1).setCellValue(fkItem.getCategory());
773
			row.createCell((short) 1).setCellValue(fkItem.getCategory());
771
			row.createCell((short) 2).setCellValue(getVaildName(fkItem.getBrand())+" "+getVaildName(fkItem.getModel_name())+" "+getVaildName(fkItem.getModel_number())+" "+getVaildName(fkItem.getColor()));
774
			row.createCell((short) 2).setCellValue(getVaildName(fkItem.getBrand())+" "+getVaildName(fkItem.getModel_name())+" "+getVaildName(fkItem.getModel_number())+" "+getVaildName(fkItem.getColor()));
772
			row.createCell((short) 3).setCellValue(fkItem.getWarehouseId());
775
			row.createCell((short) 3).setCellValue(fkItem.getWarehouseId());
Line 779... Line 782...
779
			}
782
			}
780
			row.createCell((short) 6).setCellValue(roundTwoDecimals(marketplaceItem.getCurrentTp()));
783
			row.createCell((short) 6).setCellValue(roundTwoDecimals(marketplaceItem.getCurrentTp()));
781
			row.createCell((short) 7).setCellValue(roundTwoDecimals(marketplaceItem.getCurrentSp()));
784
			row.createCell((short) 7).setCellValue(roundTwoDecimals(marketplaceItem.getCurrentSp()));
782
			row.createCell((short) 8).setCellValue(roundTwoDecimals(marketplaceItem.getMinimumPossibleSp()));
785
			row.createCell((short) 8).setCellValue(roundTwoDecimals(marketplaceItem.getMinimumPossibleSp()));
783
			row.createCell((short) 9).setCellValue(roundTwoDecimals(marketplaceItem.getMinimumPossibleTp()));
786
			row.createCell((short) 9).setCellValue(roundTwoDecimals(marketplaceItem.getMinimumPossibleTp()));
-
 
787
			row.createCell((short) 10).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp()))));
-
 
788
			row.createCell((short) 11).setCellValue(roundTwoDecimals(roundTwoDecimals((marketplaceItem.getCurrentTp()-marketplaceItem.getMinimumPossibleTp())/marketplaceItem.getMinimumPossibleSp())));
784
			row.createCell((short) 10).setCellValue(roundTwoDecimals(marketplaceItem.getOtherCost()));
789
			row.createCell((short) 12).setCellValue(roundTwoDecimals(marketplaceItem.getOtherCost()));
785
			row.createCell((short) 11).setCellValue(marketplaceItem.getCourierCost());
790
			row.createCell((short) 13).setCellValue(marketplaceItem.getCourierCost());
786
			row.createCell((short) 12).setCellValue(roundTwoDecimals(mpCosting.getCommission()));
791
			row.createCell((short) 14).setCellValue(roundTwoDecimals(marketplaceItem.getCommission()));
787
			row.createCell((short) 13).setCellValue(roundTwoDecimals(fkItem.getCommission()));
792
			row.createCell((short) 15).setCellValue(roundTwoDecimals(fkItem.getCommission()));
788
			row.createCell((short) 14).setCellValue(roundTwoDecimals(mpCosting.getServiceTax()));
793
			row.createCell((short) 16).setCellValue(roundTwoDecimals(marketplaceItem.getServiceTax()));
789
			row.createCell((short) 15).setCellValue(roundTwoDecimals(fkItem.getServiceTax()));
794
			row.createCell((short) 17).setCellValue(roundTwoDecimals(fkItem.getServiceTax()));
-
 
795
			row.createCell((short) 18).setCellValue(roundTwoDecimals(marketplaceItem.getVat()));
790
			if(fkItem.isSuppressInventoryFeed()){
796
			if(fkItem.isSuppressInventoryFeed()){
791
				row.createCell((short) 16).setCellValue(1);
797
				row.createCell((short) 19).setCellValue(1);
792
			}
798
			}
793
			else{
799
			else{
794
				row.createCell((short) 16).setCellValue(0);
800
				row.createCell((short) 19).setCellValue(0);
795
			}
801
			}
796
			if(fkItem.isSuppressPriceFeed()){
802
			if(fkItem.isSuppressPriceFeed()){
797
				row.createCell((short) 17).setCellValue(1);
803
				row.createCell((short) 20).setCellValue(1);
798
			}
804
			}
799
			else{
805
			else{
800
				row.createCell((short) 17).setCellValue(0);
806
				row.createCell((short) 20).setCellValue(0);
801
			}
807
			}
802
			if(marketplaceItem.isAutoFavourite()){
808
			if(marketplaceItem.isAutoFavourite()){
803
				row.createCell((short) 18).setCellValue(1);
809
				row.createCell((short) 21).setCellValue(1);
804
			}
810
			}
805
			else{
811
			else{
806
				row.createCell((short) 18).setCellValue(0);
812
				row.createCell((short) 21).setCellValue(0);
807
			}
813
			}
808
			if(marketplaceItem.isManualFavourite()){
814
			if(marketplaceItem.isManualFavourite()){
809
				row.createCell((short) 19).setCellValue(1);
815
				row.createCell((short) 22).setCellValue(1);
810
			}
816
			}
811
			else{
817
			else{
812
				row.createCell((short) 19).setCellValue(0);
818
				row.createCell((short) 22).setCellValue(0);
813
			}
819
			}
814
			if(marketplaceItem.isAutoIncrement()){
820
			if(marketplaceItem.isAutoIncrement()){
815
				row.createCell((short) 20).setCellValue(1);
821
				row.createCell((short) 23).setCellValue(1);
816
			}
822
			}
817
			else{
823
			else{
818
				row.createCell((short) 20).setCellValue(0);
824
				row.createCell((short) 23).setCellValue(0);
819
			}
825
			}
820
			if(marketplaceItem.isAutoDecrement()){
826
			if(marketplaceItem.isAutoDecrement()){
821
				row.createCell((short) 21).setCellValue(1);
827
				row.createCell((short) 24).setCellValue(1);
822
			}
828
			}
823
			else{
829
			else{
824
				row.createCell((short) 21).setCellValue(0);
830
				row.createCell((short) 24).setCellValue(0);
825
			}
831
			}
826
			row.createCell((short) 22).setCellValue(fkItem.getMaxNlc());
832
			row.createCell((short) 25).setCellValue(fkItem.getMaxNlc());
827
			row.createCell((short) 23).setCellValue(fkItem.getSkuAtFlipkart());
833
			row.createCell((short) 26).setCellValue(fkItem.getSkuAtFlipkart());
828
			row.createCell((short) 24).setCellValue(fkItem.getFlipkartSerialNumber());
834
			row.createCell((short) 27).setCellValue(fkItem.getFlipkartSerialNumber());
829
			iterator++;
835
			iterator++;
830
		}
836
		}
831
 
837
 
832
		FileOutputStream fileOut = null;
838
		FileOutputStream fileOut = null;
833
		try {
839
		try {