Subversion Repositories SmartDukaan

Rev

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

Rev 9478 Rev 9568
Line 98... Line 98...
98
	private JSONObject itemObj;
98
	private JSONObject itemObj;
99
	private String isSuppressInventoryFeed;
99
	private String isSuppressInventoryFeed;
100
	private String isSuppressPriceFeed;
100
	private String isSuppressPriceFeed;
101
	private String maxNlc;
101
	private String maxNlc;
102
	private String sdItemCode;
102
	private String sdItemCode;
-
 
103
	private String supc;
103
 
104
 
104
 
105
 
105
 
106
 
-
 
107
	public String getSupc() {
-
 
108
		return supc;
-
 
109
	}
-
 
110
 
-
 
111
	public void setSupc(String supc) {
-
 
112
		this.supc = supc;
-
 
113
	}
-
 
114
 
106
	public String getSdItemCode() {
115
	public String getSdItemCode() {
107
		return sdItemCode;
116
		return sdItemCode;
108
	}
117
	}
109
 
118
 
110
	public void setSdItemCode(String sdItemCode) {
119
	public void setSdItemCode(String sdItemCode) {
Line 203... Line 212...
203
		}
212
		}
204
		if (!StringUtils.equalsIgnoreCase(snapdealItem.getSkuAtSnapdeal(), sdItemCode)){
213
		if (!StringUtils.equalsIgnoreCase(snapdealItem.getSkuAtSnapdeal(), sdItemCode)){
205
			snapdealItem.setSkuAtSnapdeal(sdItemCode);
214
			snapdealItem.setSkuAtSnapdeal(sdItemCode);
206
			commit=true;
215
			commit=true;
207
		}
216
		}
-
 
217
		if (!StringUtils.equalsIgnoreCase(snapdealItem.getSupc(), supc)){
-
 
218
			snapdealItem.setSupc(supc);
-
 
219
			commit=true;
-
 
220
		}
208
 
221
 
209
		if (commit){
222
		if (commit){
210
			catalogClient.addOrUpdateSnapdealItem(snapdealItem);
223
			catalogClient.addOrUpdateSnapdealItem(snapdealItem);
211
		}
224
		}
212
		return "index";
225
		return "index";
Line 225... Line 238...
225
		snapdealItem.setCourierCost(Double.valueOf(courierCost));
238
		snapdealItem.setCourierCost(Double.valueOf(courierCost));
226
		snapdealItem.setCommission(Double.valueOf(commission));
239
		snapdealItem.setCommission(Double.valueOf(commission));
227
		snapdealItem.setServiceTax(Double.valueOf(serviceTax));
240
		snapdealItem.setServiceTax(Double.valueOf(serviceTax));
228
		snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
241
		snapdealItem.setMaxNlc(Double.valueOf(maxNlc));
229
		snapdealItem.setSkuAtSnapdeal(sdItemCode);
242
		snapdealItem.setSkuAtSnapdeal(sdItemCode);
-
 
243
		snapdealItem.setSupc(supc);
230
		Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
244
		Client catalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
231
		catalogClient.addOrUpdateSnapdealItem(snapdealItem);
245
		catalogClient.addOrUpdateSnapdealItem(snapdealItem);
232
		return "index";
246
		return "index";
233
	}
247
	}
234
 
248
 
Line 287... Line 301...
287
		rowhead.createCell((short) 4).setCellValue("TRANSFER-PRICE");
301
		rowhead.createCell((short) 4).setCellValue("TRANSFER-PRICE");
288
		rowhead.createCell((short) 5).setCellValue("SELLING-PRICE");
302
		rowhead.createCell((short) 5).setCellValue("SELLING-PRICE");
289
		rowhead.createCell((short) 6).setCellValue("COURIER-COST");
303
		rowhead.createCell((short) 6).setCellValue("COURIER-COST");
290
		rowhead.createCell((short) 7).setCellValue("COMMISION");
304
		rowhead.createCell((short) 7).setCellValue("COMMISION");
291
		rowhead.createCell((short) 8).setCellValue("SERVICE-TAX");
305
		rowhead.createCell((short) 8).setCellValue("SERVICE-TAX");
-
 
306
		rowhead.createCell((short) 9).setCellValue("Suppress Inventory Feed");
-
 
307
		rowhead.createCell((short) 10).setCellValue("Suppress Price Feed");
-
 
308
		rowhead.createCell((short) 11).setCellValue("Max NLC");
-
 
309
		rowhead.createCell((short) 12).setCellValue("SKU @ Snapdeal");
-
 
310
		rowhead.createCell((short) 13).setCellValue("SUPC");
292
		CatalogClient catalogServiceClient = null;
311
		CatalogClient catalogServiceClient = null;
293
		List<SnapdealItemDetails> snapdealItems = null;
312
		List<SnapdealItemDetails> snapdealItems = null;
294
		try {
313
		try {
295
			catalogServiceClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port");
314
			catalogServiceClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port");
296
			in.shop2020.model.v1.catalog.CatalogService.Client catalogClient= catalogServiceClient.getClient();
315
			in.shop2020.model.v1.catalog.CatalogService.Client catalogClient= catalogServiceClient.getClient();
Line 313... Line 332...
313
			row.createCell((short) 4).setCellValue(snapdealItem.getTransferPrice());
332
			row.createCell((short) 4).setCellValue(snapdealItem.getTransferPrice());
314
			row.createCell((short) 5).setCellValue(snapdealItem.getSellingPrice());
333
			row.createCell((short) 5).setCellValue(snapdealItem.getSellingPrice());
315
			rowhead.createCell((short) 6).setCellValue(snapdealItem.getCourierCost());
334
			rowhead.createCell((short) 6).setCellValue(snapdealItem.getCourierCost());
316
			rowhead.createCell((short) 7).setCellValue(snapdealItem.getCommission());
335
			rowhead.createCell((short) 7).setCellValue(snapdealItem.getCommission());
317
			rowhead.createCell((short) 8).setCellValue(snapdealItem.getServiceTax());
336
			rowhead.createCell((short) 8).setCellValue(snapdealItem.getServiceTax());
-
 
337
			rowhead.createCell((short) 9).setCellValue(snapdealItem.isSuppressInventoryFeed());
-
 
338
			rowhead.createCell((short) 10).setCellValue(snapdealItem.isSuppressPriceFeed());
-
 
339
			rowhead.createCell((short) 11).setCellValue(snapdealItem.getMaxNlc());
-
 
340
			rowhead.createCell((short) 12).setCellValue(snapdealItem.getSkuAtSnapdeal());
-
 
341
			rowhead.createCell((short) 13).setCellValue(snapdealItem.getSupc());
318
			iterator++;
342
			iterator++;
319
		}
343
		}
320
 
344
 
321
		FileOutputStream fileOut = null;
345
		FileOutputStream fileOut = null;
322
		try {
346
		try {
Line 463... Line 487...
463
			
487
			
464
			if (!checkEmptyString(sheet.getRow(iterator).getCell(7))){
488
			if (!checkEmptyString(sheet.getRow(iterator).getCell(7))){
465
				String snapdealItemCode = sheet.getRow(iterator).getCell(7).getStringCellValue();
489
				String snapdealItemCode = sheet.getRow(iterator).getCell(7).getStringCellValue();
466
				snapdealItem.setSkuAtSnapdeal(snapdealItemCode);
490
				snapdealItem.setSkuAtSnapdeal(snapdealItemCode);
467
			}
491
			}
-
 
492
			
-
 
493
			if (!checkEmptyString(sheet.getRow(iterator).getCell(8))){
-
 
494
				String supc = sheet.getRow(iterator).getCell(8).getStringCellValue();
-
 
495
				snapdealItem.setSupc(supc);
-
 
496
			}
468
			double weight = item.getWeight();
497
			double weight = item.getWeight();
469
 
498
 
470
			/*
499
			/*
471
			 *TODO Uncomment this for pricing feed. 
500
			 *TODO Uncomment this for pricing feed. 
472
			 * if(weight==0){
501
			 * if(weight==0){