| Line 18... |
Line 18... |
| 18 |
import in.shop2020.model.v1.catalog.Insurer;
|
18 |
import in.shop2020.model.v1.catalog.Insurer;
|
| 19 |
import in.shop2020.model.v1.catalog.ItemType;
|
19 |
import in.shop2020.model.v1.catalog.ItemType;
|
| 20 |
import in.shop2020.model.v1.catalog.status;
|
20 |
import in.shop2020.model.v1.catalog.status;
|
| 21 |
import in.shop2020.model.v1.inventory.InventoryService;
|
21 |
import in.shop2020.model.v1.inventory.InventoryService;
|
| 22 |
import in.shop2020.model.v1.inventory.ItemStockPurchaseParams;
|
22 |
import in.shop2020.model.v1.inventory.ItemStockPurchaseParams;
|
| - |
|
23 |
import in.shop2020.model.v1.inventory.OOSStatus;
|
| 23 |
import in.shop2020.model.v1.user.VoucherType;
|
24 |
import in.shop2020.model.v1.user.VoucherType;
|
| 24 |
import in.shop2020.thrift.clients.CatalogClient;
|
25 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 25 |
import in.shop2020.thrift.clients.ContentClient;
|
26 |
import in.shop2020.thrift.clients.ContentClient;
|
| 26 |
import in.shop2020.thrift.clients.InventoryClient;
|
27 |
import in.shop2020.thrift.clients.InventoryClient;
|
| 27 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
28 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
| Line 326... |
Line 327... |
| 326 |
List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
|
327 |
List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
|
| 327 |
List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
|
328 |
List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
|
| 328 |
List<in.shop2020.model.v1.catalog.Item> sit = catalogClient.getAllSimilarItems(thriftItem.getId());
|
329 |
List<in.shop2020.model.v1.catalog.Item> sit = catalogClient.getAllSimilarItems(thriftItem.getId());
|
| 329 |
in.shop2020.model.v1.inventory.ItemInventory itemInventory = inventoryClient.getItemInventoryByItemId(thriftItem.getId());
|
330 |
in.shop2020.model.v1.inventory.ItemInventory itemInventory = inventoryClient.getItemInventoryByItemId(thriftItem.getId());
|
| 330 |
ItemStockPurchaseParams stockPurchaseParams = inventoryClient.getItemStockPurchaseParams(thriftItem.getId());
|
331 |
ItemStockPurchaseParams stockPurchaseParams = inventoryClient.getItemStockPurchaseParams(thriftItem.getId());
|
| - |
|
332 |
String lastNdaySale = "";
|
| - |
|
333 |
for(int sid: Arrays.asList(0,1,3,6,7,8)){
|
| - |
|
334 |
lastNdaySale = "S" + sid + ":";
|
| 331 |
String lastNdaySale = inventoryClient.getLastNdaySaleForItem(thriftItem.getId(), 5);
|
335 |
List<OOSStatus> oosStatuses = inventoryClient.getOosStatusesForXDaysForItem(thriftItem.getId(), sid, 5);
|
| - |
|
336 |
for(OOSStatus oosStatus : oosStatuses){
|
| - |
|
337 |
if(oosStatus.isIs_oos()){
|
| - |
|
338 |
lastNdaySale += "X-";
|
| - |
|
339 |
}else{
|
| - |
|
340 |
lastNdaySale += oosStatus.getNum_orders() + "-";
|
| - |
|
341 |
}
|
| - |
|
342 |
}
|
| - |
|
343 |
lastNdaySale = lastNdaySale.substring(0, lastNdaySale.length()-1);
|
| - |
|
344 |
lastNdaySale += "\n";
|
| - |
|
345 |
}
|
| - |
|
346 |
lastNdaySale = lastNdaySale.substring(0, lastNdaySale.length()-1);
|
| - |
|
347 |
|
| 332 |
Long freebieItemId = catalogClient.getFreebieForItem(thriftItem.getId());
|
348 |
Long freebieItemId = catalogClient.getFreebieForItem(thriftItem.getId());
|
| 333 |
List<in.shop2020.model.v1.catalog.VoucherItemMapping> tvouchers = catalogClient.getAllItemVouchers(thriftItem.getId());
|
349 |
List<in.shop2020.model.v1.catalog.VoucherItemMapping> tvouchers = catalogClient.getAllItemVouchers(thriftItem.getId());
|
| 334 |
Item it = getItemFromThriftItem(thriftItem, vip, vim, sip, sit, itemInventory, tvouchers, stockPurchaseParams, lastNdaySale, freebieItemId);
|
350 |
Item it = getItemFromThriftItem(thriftItem, vip, vim, sip, sit, itemInventory, tvouchers, stockPurchaseParams, lastNdaySale, freebieItemId);
|
| 335 |
it.setSameItemsWithDifferentColors(sameItemsWithDifferentColors);
|
351 |
it.setSameItemsWithDifferentColors(sameItemsWithDifferentColors);
|
| 336 |
return it;
|
352 |
return it;
|