| Line 13... |
Line 13... |
| 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,MarketplaceHistory as TMarketplaceHistory,\
|
17 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
| 18 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp, CompetitorPricing as TCompetitorPricing
|
18 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp, CompetitorPricing as TCompetitorPricing, \
|
| - |
|
19 |
AmazonPromotion as TAmazonPromotion
|
| 19 |
from shop2020.utils.Utils import to_java_date
|
20 |
from shop2020.utils.Utils import to_java_date
|
| - |
|
21 |
import datetime
|
| 20 |
|
22 |
|
| 21 |
def to_t_item(item):
|
23 |
def to_t_item(item):
|
| 22 |
t_item = Item()
|
24 |
t_item = Item()
|
| 23 |
if item is None:
|
25 |
if item is None:
|
| 24 |
return t_item
|
26 |
return t_item
|
| Line 225... |
Line 227... |
| 225 |
t_amazonlisted.suppressMfnPriceUpdate = Amazonlisted.suppressMfnPriceUpdate
|
227 |
t_amazonlisted.suppressMfnPriceUpdate = Amazonlisted.suppressMfnPriceUpdate
|
| 226 |
t_amazonlisted.suppressFbaPriceUpdate = Amazonlisted.suppressFbaPriceUpdate
|
228 |
t_amazonlisted.suppressFbaPriceUpdate = Amazonlisted.suppressFbaPriceUpdate
|
| 227 |
t_amazonlisted.suppressFbbPriceUpdate = Amazonlisted.suppressFbbPriceUpdate
|
229 |
t_amazonlisted.suppressFbbPriceUpdate = Amazonlisted.suppressFbbPriceUpdate
|
| 228 |
t_amazonlisted.taxCode = Amazonlisted.taxCode
|
230 |
t_amazonlisted.taxCode = Amazonlisted.taxCode
|
| 229 |
t_amazonlisted.fbbtaxCode = Amazonlisted.fbbtaxCode
|
231 |
t_amazonlisted.fbbtaxCode = Amazonlisted.fbbtaxCode
|
| - |
|
232 |
t_amazonlisted.overrrideWanlc = Amazonlisted.overrrideWanlc
|
| - |
|
233 |
t_amazonlisted.exceptionalWanlc = Amazonlisted.exceptionalWanlc
|
| - |
|
234 |
t_amazonlisted.fcAutoPricing = Amazonlisted.fcAutoPricing
|
| 230 |
return t_amazonlisted
|
235 |
return t_amazonlisted
|
| 231 |
|
236 |
|
| 232 |
def to_t_ebay_item(ebay_item):
|
237 |
def to_t_ebay_item(ebay_item):
|
| 233 |
t_ebay_item = TEbayItem()
|
238 |
t_ebay_item = TEbayItem()
|
| 234 |
t_ebay_item.ebayListingId = ebay_item.ebayListingId
|
239 |
t_ebay_item.ebayListingId = ebay_item.ebayListingId
|
| Line 606... |
Line 611... |
| 606 |
if item.lowestAmazonSeller is None:
|
611 |
if item.lowestAmazonSeller is None:
|
| 607 |
t_comp.lowestAmazonSeller=''
|
612 |
t_comp.lowestAmazonSeller=''
|
| 608 |
else:
|
613 |
else:
|
| 609 |
t_comp.lowestAmazonSeller = item.lowestAmazonSeller
|
614 |
t_comp.lowestAmazonSeller = item.lowestAmazonSeller
|
| 610 |
return t_comp
|
615 |
return t_comp
|
| - |
|
616 |
|
| - |
|
617 |
def to_t_amazon_promotion(amazonPromotion):
|
| - |
|
618 |
t_amazonPromotion = TAmazonPromotion()
|
| - |
|
619 |
t_amazonPromotion.sku = amazonPromotion.sku
|
| - |
|
620 |
t_amazonPromotion.startDate = to_java_date(datetime.datetime.combine(amazonPromotion.startDate, datetime.datetime.min.time()))
|
| - |
|
621 |
t_amazonPromotion.endDate = to_java_date(datetime.datetime.combine(amazonPromotion.endDate, datetime.datetime.min.time()))
|
| - |
|
622 |
t_amazonPromotion.updatedOnMarketplace = to_java_date(amazonPromotion.updatedOnMarketplace)
|
| - |
|
623 |
t_amazonPromotion.promotionActive = amazonPromotion.promotionActive
|
| - |
|
624 |
t_amazonPromotion.addedOn = to_java_date(amazonPromotion.addedOn)
|
| - |
|
625 |
t_amazonPromotion.standardPrice = amazonPromotion.standardPrice
|
| - |
|
626 |
t_amazonPromotion.salePrice = amazonPromotion.salePrice
|
| - |
|
627 |
t_amazonPromotion.stateId = amazonPromotion.stateId
|
| - |
|
628 |
t_amazonPromotion.promotionType = amazonPromotion.promotionType
|
| - |
|
629 |
return t_amazonPromotion
|
| - |
|
630 |
|
| - |
|
631 |
def to_t_Amazonlisted_promo(amazonDetails):
|
| - |
|
632 |
amazonlisted = amazonDetails[0]
|
| - |
|
633 |
fbaPromo = amazonDetails[1]
|
| - |
|
634 |
fbbPromo = amazonDetails[2]
|
| - |
|
635 |
t_amazon = to_t_Amazonlisted(amazonlisted)
|
| - |
|
636 |
if not (fbaPromo is None or len(fbaPromo)==0):
|
| - |
|
637 |
t_amazon.fbaSalePrice = fbaPromo[0].salePrice
|
| - |
|
638 |
if not (fbbPromo is None or len(fbbPromo)==0):
|
| - |
|
639 |
t_amazon.fbbSalePrice = fbbPromo[0].salePrice
|
| - |
|
640 |
return t_amazon
|
| - |
|
641 |
|
| - |
|
642 |
|
| 611 |
|
643 |
|
| 612 |
|
644 |
|