Subversion Repositories SmartDukaan

Rev

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

Rev 6826 Rev 6838
Line 12... Line 12...
12
import in.shop2020.catalog.dashboard.shared.VoucherItemMapping;
12
import in.shop2020.catalog.dashboard.shared.VoucherItemMapping;
13
import in.shop2020.config.ConfigException;
13
import in.shop2020.config.ConfigException;
14
import in.shop2020.content.ContentService;
14
import in.shop2020.content.ContentService;
15
import in.shop2020.content.ContentServiceException;
15
import in.shop2020.content.ContentServiceException;
16
import in.shop2020.model.v1.catalog.CatalogService.Client;
16
import in.shop2020.model.v1.catalog.CatalogService.Client;
-
 
17
import in.shop2020.model.v1.catalog.Insurer;
17
import in.shop2020.model.v1.catalog.ItemType;
18
import in.shop2020.model.v1.catalog.ItemType;
18
import in.shop2020.model.v1.catalog.status;
19
import in.shop2020.model.v1.catalog.status;
19
import in.shop2020.model.v1.inventory.InventoryService;
20
import in.shop2020.model.v1.inventory.InventoryService;
20
import in.shop2020.model.v1.inventory.ItemStockPurchaseParams;
21
import in.shop2020.model.v1.inventory.ItemStockPurchaseParams;
21
import in.shop2020.model.v1.user.VoucherType;
22
import in.shop2020.model.v1.user.VoucherType;
Line 616... Line 617...
616
        tItem.setIsWarehousePreferenceSticky(item.isWarehouseStickiness());
617
        tItem.setIsWarehousePreferenceSticky(item.isWarehouseStickiness());
617
        
618
        
618
        if(item.getPreferredVendor() != null) {
619
        if(item.getPreferredVendor() != null) {
619
            tItem.setPreferredVendor(item.getPreferredVendor());
620
            tItem.setPreferredVendor(item.getPreferredVendor());
620
        }
621
        }
-
 
622
        tItem.setPreferredInsurer(item.getPreferredInsurer());
621
        
623
        
622
        tItem.setBestDealText(item.getBestDealsText());
624
        tItem.setBestDealText(item.getBestDealsText());
623
        tItem.setBestDealsDetailsText(item.getBestDealsDetailsText());
625
        tItem.setBestDealsDetailsText(item.getBestDealsDetailsText());
624
        tItem.setBestDealsDetailsLink(item.getBestDealsDetailsLink());
626
        tItem.setBestDealsDetailsLink(item.getBestDealsDetailsLink());
625
        if(item.getBestDealsValue() != null) {
627
        if(item.getBestDealsValue() != null) {
Line 1080... Line 1082...
1080
                thriftItem.isHasItemNo(),
1082
                thriftItem.isHasItemNo(),
1081
                ItemType.SERIALIZED.equals(thriftItem.getType()),
1083
                ItemType.SERIALIZED.equals(thriftItem.getType()),
1082
                thriftItem.isClearance(),
1084
                thriftItem.isClearance(),
1083
                thriftItem.isSetShowSellingPrice() ? thriftItem.isShowSellingPrice() : false,
1085
                thriftItem.isSetShowSellingPrice() ? thriftItem.isShowSellingPrice() : false,
1084
                thriftItem.isSetPreferredVendor() ? thriftItem.getPreferredVendor() : null,
1086
                thriftItem.isSetPreferredVendor() ? thriftItem.getPreferredVendor() : null,
-
 
1087
                thriftItem.isSetPreferredInsurer() ? thriftItem.getPreferredInsurer() : null,		
1085
                itemInventoryMap,
1088
                itemInventoryMap,
1086
                vendorPricingMap,
1089
                vendorPricingMap,
1087
                vItemMap,
1090
                vItemMap,
1088
                sourcePricingMap,
1091
                sourcePricingMap,
1089
                SimilarItemslist,
1092
                SimilarItemslist,
Line 1356... Line 1359...
1356
            logger.error("Error while updating expected delay on production", e);
1359
            logger.error("Error while updating expected delay on production", e);
1357
            return "Error while updating expected delay on production";
1360
            return "Error while updating expected delay on production";
1358
        }
1361
        }
1359
	}
1362
	}
1360
 
1363
 
-
 
1364
	@Override
-
 
1365
	public Map<Long, String> getAllInsurers() {
-
 
1366
		 Map<Long, String> insurersMap = new HashMap<Long, String>();
-
 
1367
	        try {
-
 
1368
	            CatalogClient catalogServiceClient = new CatalogClient();
-
 
1369
	            in.shop2020.model.v1.catalog.CatalogService.Client catalogClient = catalogServiceClient.getClient();
-
 
1370
	            
-
 
1371
	            List<Insurer> insurers = catalogClient.getAllInsurers();
-
 
1372
 
-
 
1373
	            for(in.shop2020.model.v1.catalog.Insurer i : insurers) {
-
 
1374
	                insurersMap.put(i.getId(), i.getName());
-
 
1375
	            }
-
 
1376
	        } catch (Exception e) {
-
 
1377
	            logger.error("Error while getting all the vendors: ", e);
-
 
1378
	        }
-
 
1379
	        return insurersMap;
-
 
1380
	}
-
 
1381
 
1361
 
1382
 
1362
	
1383
	
1363
		
1384
		
1364
 
1385
 
1365
}
1386
}