| Line 12... |
Line 12... |
| 12 |
Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
|
12 |
Insurer as TInsurer, BrandInfo as TBrandInfo, Amazonlisted as TAmazonlisted, \
|
| 13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
| 14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
| 15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
| 16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
| 17 |
FlipkartItemDetails as TFlipkartItemDetails
|
17 |
FlipkartItemDetails as TFlipkartItemDetails, MarketplaceHistory as TMarketplaceHistory
|
| 18 |
from shop2020.utils.Utils import to_java_date
|
18 |
from shop2020.utils.Utils import to_java_date
|
| 19 |
|
19 |
|
| 20 |
def to_t_item(item):
|
20 |
def to_t_item(item):
|
| 21 |
t_item = Item()
|
21 |
t_item = Item()
|
| 22 |
if item is None:
|
22 |
if item is None:
|
| Line 408... |
Line 408... |
| 408 |
t_flipkart_item_details.category = flipkartitem[1].category
|
408 |
t_flipkart_item_details.category = flipkartitem[1].category
|
| 409 |
if flipkartItemInventory is not None:
|
409 |
if flipkartItemInventory is not None:
|
| 410 |
t_flipkart_item_details.lastUpdatedInventory = flipkartItemInventory.availability
|
410 |
t_flipkart_item_details.lastUpdatedInventory = flipkartItemInventory.availability
|
| 411 |
#t_flipkart_item_details.lastUpdatedInventoryTimestamp = flipkartItemInventory.lastUpdatedOnFlipkart
|
411 |
#t_flipkart_item_details.lastUpdatedInventoryTimestamp = flipkartItemInventory.lastUpdatedOnFlipkart
|
| 412 |
return t_flipkart_item_details
|
412 |
return t_flipkart_item_details
|
| - |
|
413 |
|
| - |
|
414 |
def to_t_market_place_history(marketplaceHistory):
|
| - |
|
415 |
t_marketplace_history = TMarketplaceHistory()
|
| - |
|
416 |
if marketplaceHistory is None:
|
| - |
|
417 |
return t_marketplace_history
|
| - |
|
418 |
t_marketplace_history.item_id = marketplaceHistory.item_id
|
| - |
|
419 |
t_marketplace_history.source = marketplaceHistory.source
|
| - |
|
420 |
t_marketplace_history.timestamp = to_java_date(marketplaceHistory.timestamp)
|
| - |
|
421 |
t_marketplace_history.lowest_possible_tp = marketplaceHistory.lowestPossibleTp
|
| - |
|
422 |
t_marketplace_history.lowest_possible_sp = marketplaceHistory.lowestPossibleSp
|
| - |
|
423 |
t_marketplace_history.ourInventory = marketplaceHistory.ourInventory
|
| - |
|
424 |
t_marketplace_history.otherInventory = marketplaceHistory.otherInventory
|
| - |
|
425 |
t_marketplace_history.secondLowestInventory = marketplaceHistory.secondLowestInventory
|
| - |
|
426 |
t_marketplace_history.ourRank = marketplaceHistory.ourRank
|
| - |
|
427 |
t_marketplace_history.ourOfferPrice = marketplaceHistory.ourOfferPrice
|
| - |
|
428 |
t_marketplace_history.ourSellingPrice = marketplaceHistory.ourSellingPrice
|
| - |
|
429 |
t_marketplace_history.ourTp = marketplaceHistory.ourTp
|
| - |
|
430 |
t_marketplace_history.ourNlc = marketplaceHistory.ourNlc
|
| - |
|
431 |
t_marketplace_history.competitiveCategory = marketplaceHistory.competitiveCategory
|
| - |
|
432 |
t_marketplace_history.risky = marketplaceHistory.risky
|
| - |
|
433 |
t_marketplace_history.lowestOfferPrice = marketplaceHistory.lowestOfferPrice
|
| - |
|
434 |
t_marketplace_history.lowestSellingPrice = marketplaceHistory.lowestSellingPrice
|
| - |
|
435 |
t_marketplace_history.lowestTp = marketplaceHistory.lowestTp
|
| - |
|
436 |
if marketplaceHistory.lowestSellerName is None:
|
| - |
|
437 |
t_marketplace_history.lowestSellerName = ''
|
| - |
|
438 |
else:
|
| - |
|
439 |
t_marketplace_history.lowestSellerName = marketplaceHistory.lowestSellerName
|
| - |
|
440 |
t_marketplace_history.proposedSellingPrice = marketplaceHistory.proposedSellingPrice
|
| - |
|
441 |
t_marketplace_history.proposedTp = marketplaceHistory.proposedTp
|
| - |
|
442 |
t_marketplace_history.targetNlc = marketplaceHistory.targetNlc
|
| - |
|
443 |
t_marketplace_history.salesPotential = marketplaceHistory.salesPotential
|
| - |
|
444 |
if marketplaceHistory.secondLowestSellerName is None:
|
| - |
|
445 |
t_marketplace_history.secondLowestSellerName = ''
|
| - |
|
446 |
else:
|
| - |
|
447 |
t_marketplace_history.secondLowestSellerName = marketplaceHistory.secondLowestSellerName
|
| - |
|
448 |
t_marketplace_history.secondLowestSellingPrice = marketplaceHistory.secondLowestSellingPrice
|
| - |
|
449 |
t_marketplace_history.secondLowestOfferPrice = marketplaceHistory.secondLowestOfferPrice
|
| - |
|
450 |
t_marketplace_history.secondLowestTp = marketplaceHistory.secondLowestTp
|
| - |
|
451 |
t_marketplace_history.marginIncreasedPotential = marketplaceHistory.marginIncreasedPotential
|
| - |
|
452 |
t_marketplace_history.margin = marketplaceHistory.margin
|
| - |
|
453 |
t_marketplace_history.ourEnoughStock = marketplaceHistory.ourEnoughStock
|
| - |
|
454 |
t_marketplace_history.totalSeller = marketplaceHistory.totalSeller
|
| - |
|
455 |
t_marketplace_history.averageSale = marketplaceHistory.avgSales
|
| - |
|
456 |
t_marketplace_history.toGroup = marketplaceHistory.toGroup
|
| - |
|
457 |
return t_marketplace_history
|
| 413 |
|
458 |
|
| - |
|
459 |
|