Subversion Repositories SmartDukaan

Rev

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

Rev 13473 Rev 14780
Line 101... Line 101...
101
	private String sellingPrice;
101
	private String sellingPrice;
102
	private String transferPrice;
102
	private String transferPrice;
103
	private String webisteMrp;
103
	private String webisteMrp;
104
	private String webisteSellingPrice;
104
	private String webisteSellingPrice;
105
	private String isListedOnFlipkart;
105
	private String isListedOnFlipkart;
-
 
106
	private String isFaListedOnFlipkart;
106
	private String commission;
107
	private String commission;
107
	private String serviceTax;
108
	private String serviceTax;
108
	private String courierCost;
109
	private String courierCost;
109
	private JSONObject itemObj;
110
	private JSONObject itemObj;
110
	private String isSuppressInventoryFeed;
111
	private String isSuppressInventoryFeed;
Line 376... Line 377...
376
		if (mpCosting.getSource()==0){
377
		if (mpCosting.getSource()==0){
377
			throw new CatalogServiceException();
378
			throw new CatalogServiceException();
378
		}
379
		}
379
		MarketplaceItems mpItem = catalogClient.getMarketplacedetailsForItem(Long.valueOf(itemId),8);
380
		MarketplaceItems mpItem = catalogClient.getMarketplacedetailsForItem(Long.valueOf(itemId),8);
380
		boolean toUpdate =false;
381
		boolean toUpdate =false;
381
		if (mpItem.getCurrentSp()!=Double.valueOf(sellingPrice) || flipkartItem.isIsListedOnFlipkart()!=Boolean.valueOf(isListedOnFlipkart) || flipkartItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed)){
382
		if (mpItem.getCurrentSp()!=Double.valueOf(sellingPrice) || flipkartItem.isIsListedOnFlipkart()!=Boolean.valueOf(isListedOnFlipkart) || flipkartItem.isSuppressPriceFeed()!=Boolean.valueOf(isSuppressPriceFeed) || flipkartItem.isIsFaListed()!=Boolean.valueOf(isFaListedOnFlipkart)){
382
			toUpdate=true;
383
			toUpdate=true;
383
		}
384
		}
384
		mpItem.setEmiFee(mpCosting.getEmiFee());
385
		mpItem.setEmiFee(mpCosting.getEmiFee());
385
		mpItem.setReturnProvision(mpCosting.getReturnProvision());
386
		mpItem.setReturnProvision(mpCosting.getReturnProvision());
386
		mpItem.setClosingFee(mpCosting.getClosingFee());
387
		mpItem.setClosingFee(mpCosting.getClosingFee());
Line 400... Line 401...
400
		flipkartItem.setCommissionValue(Double.valueOf(commission));
401
		flipkartItem.setCommissionValue(Double.valueOf(commission));
401
		flipkartItem.setServiceTaxValue(Double.valueOf(serviceTax));
402
		flipkartItem.setServiceTaxValue(Double.valueOf(serviceTax));
402
		flipkartItem.setMaxNlc(Double.valueOf(maxNlc));
403
		flipkartItem.setMaxNlc(Double.valueOf(maxNlc));
403
		flipkartItem.setSkuAtFlipkart(fkItemCode);
404
		flipkartItem.setSkuAtFlipkart(fkItemCode);
404
		flipkartItem.setFlipkartSerialNumber(fkSerialNumber);
405
		flipkartItem.setFlipkartSerialNumber(fkSerialNumber);
-
 
406
		flipkartItem.setIsFaListed(Boolean.valueOf(isFaListedOnFlipkart));
405
		MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
407
		MarketplaceItems t_mpItem = updateMarketplaceItemDetails(mpItem);
406
		//double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
408
		//double vat = catalogClientProd.getVatPercentageForItem(Long.valueOf(itemId), warehouse.getStateId(), Double.valueOf(sellingPrice));
407
		//t_mpItem.setVat(vat);
409
		//t_mpItem.setVat(vat);
408
		flipkartItem.setUpdatedBy(getUserName());
410
		flipkartItem.setUpdatedBy(getUserName());
409
		flipkartItem.setMarketplaceItems(t_mpItem);
411
		flipkartItem.setMarketplaceItems(t_mpItem);
Line 422... Line 424...
422
 
424
 
423
		if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
425
		if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
424
			sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
426
			sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
425
		}
427
		}
426
		logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
428
		logger.info("\nUpdate Method Item Id "+itemId+"\nSelling Price "+sellingPrice+"\nWarehouse Id "+warehouseId+"\nMax Nlc "+maxNlc+"\nUpdated By: "+session.getAttribute(ReportsUtils.USER_NAME).toString());
427
		if(toUpdate && Boolean.valueOf(live) && Boolean.valueOf(isListedOnFlipkart) && (!Boolean.valueOf(isSuppressPriceFeed))){
429
		if(toUpdate && Boolean.valueOf(live) && (Boolean.valueOf(isListedOnFlipkart) || Boolean.valueOf(isFaListedOnFlipkart)) && (!Boolean.valueOf(isSuppressPriceFeed))){
428
			UpdateFlipkartPricing updateFlipkartPricing = new UpdateFlipkartPricing(Float.valueOf(sellingPrice),fkItemCode,item,timestamp);
430
			UpdateFlipkartPricing updateFlipkartPricing = new UpdateFlipkartPricing(Float.valueOf(sellingPrice),fkItemCode,item,timestamp);
429
			updateFlipkartPricing.start();
431
			updateFlipkartPricing.start();
430
		}
432
		}
431
		return "flipkart-update-result";
433
		return "flipkart-update-result";
432
	}
434
	}
Line 644... Line 646...
644
			throw new CatalogServiceException();
646
			throw new CatalogServiceException();
645
		}
647
		}
646
		if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
648
		if (t_mpItem.getCurrentSp()< t_mpItem.getMinimumPossibleSp()){
647
			sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
649
			sendAlert(t_mpItem.getItemId(),t_mpItem.getCurrentSp(),t_mpItem.getMinimumPossibleSp());
648
		}
650
		}
649
		if(Boolean.valueOf(isListedOnFlipkart) && Boolean.valueOf(live) && (!Boolean.valueOf(isSuppressPriceFeed))){
651
		if((Boolean.valueOf(isListedOnFlipkart) || Boolean.valueOf(isFaListedOnFlipkart)) && Boolean.valueOf(live) && (!Boolean.valueOf(isSuppressPriceFeed))){
650
			UpdateFlipkartPricing updateFlipkartPricing = new UpdateFlipkartPricing(Float.valueOf(sellingPrice),fkItemCode,item,timestamp);
652
			UpdateFlipkartPricing updateFlipkartPricing = new UpdateFlipkartPricing(Float.valueOf(sellingPrice),fkItemCode,item,timestamp);
651
			updateFlipkartPricing.start();
653
			updateFlipkartPricing.start();
652
		}
654
		}
653
		return "flipkart-update-result";
655
		return "flipkart-update-result";
654
	}
656
	}
Line 1436... Line 1438...
1436
 
1438
 
1437
	public String getVaildName(String name){
1439
	public String getVaildName(String name){
1438
		return name!=null?name:"";
1440
		return name!=null?name:"";
1439
	}
1441
	}
1440
 
1442
 
-
 
1443
	public String getIsFaListedOnFlipkart() {
-
 
1444
		return isFaListedOnFlipkart;
-
 
1445
	}
1441
 
1446
 
-
 
1447
	public void setIsFaListedOnFlipkart(String isFaListedOnFlipkart) {
-
 
1448
		this.isFaListedOnFlipkart = isFaListedOnFlipkart;
-
 
1449
	}
1442
 
1450
 
1443
}
1451
}
1444
1452