Subversion Repositories SmartDukaan

Rev

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

Rev 8445 Rev 8488
Line 8... Line 8...
8
    LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
8
    LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
9
    PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
9
    PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
10
    Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction, \
10
    Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction, \
11
    FRC as T_FRC, HotspotStore as T_HotSpotStore, SourceDetail as T_SourceDetail , \
11
    FRC as T_FRC, HotspotStore as T_HotSpotStore, SourceDetail as T_SourceDetail , \
12
    AmazonOrder as T_AmazonOrder, StoreOrderDetail as T_StoreOrderDetail, StoreOrderCollection as T_StoreOrderCollection, \
12
    AmazonOrder as T_AmazonOrder, StoreOrderDetail as T_StoreOrderDetail, StoreOrderCollection as T_StoreOrderCollection, \
13
    HotspotServiceMatrix as T_HotspotServiceMatrix, EbayOrder as T_EbayOrder, AmazonFbaSalesSnapshot as T_AmazonFbaSalesSnapshot
13
    HotspotServiceMatrix as T_HotspotServiceMatrix, EbayOrder as T_EbayOrder, \
-
 
14
    AmazonFbaSalesSnapshot as T_AmazonFbaSalesSnapshot, SnapdealOrder as T_SnapdealOrder
14
from shop2020.utils.Utils import to_java_date
15
from shop2020.utils.Utils import to_java_date
15
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
16
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
16
import datetime
17
import datetime
17
 
18
 
18
def to_t_transaction(transaction):
19
def to_t_transaction(transaction):
Line 334... Line 335...
334
    t_ebayOrder.transactionId = ebayOrder.transactionId
335
    t_ebayOrder.transactionId = ebayOrder.transactionId
335
    t_ebayOrder.listingName = ebayOrder.listingName
336
    t_ebayOrder.listingName = ebayOrder.listingName
336
    t_ebayOrder.listingPrice = ebayOrder.listingPrice
337
    t_ebayOrder.listingPrice = ebayOrder.listingPrice
337
    t_ebayOrder.bluedartPaisaPayRef = ebayOrder.bluedartPaisaPayRef
338
    t_ebayOrder.bluedartPaisaPayRef = ebayOrder.bluedartPaisaPayRef
338
    return t_ebayOrder 
339
    return t_ebayOrder 
-
 
340
 
-
 
341
def to_t_snapdealOrder(snapdealOrder):
-
 
342
    t_snapdealOrder = T_SnapdealOrder()
-
 
343
    t_snapdealOrder.orderId = snapdealOrder.orderId
-
 
344
    t_snapdealOrder.subOrderId = snapdealOrder.subOrderId
-
 
345
    t_snapdealOrder.referenceCode = snapdealOrder.referenceCode
-
 
346
    t_snapdealOrder.snapdealTxnDate = to_java_date(snapdealOrder.referenceCode)
-
 
347
    t_snapdealOrder.productName = snapdealOrder.productName
-
 
348
    t_snapdealOrder.listingPrice = snapdealOrder.listingPrice
-
 
349
    return t_snapdealOrder 
339
    
350
    
340
def to_t_amazonFbaSalesSnapshot(amazonFbaSalesSnapshot):
351
def to_t_amazonFbaSalesSnapshot(amazonFbaSalesSnapshot):
341
    t_amazonFbaSalesSnapshot = T_AmazonFbaSalesSnapshot()
352
    t_amazonFbaSalesSnapshot = T_AmazonFbaSalesSnapshot()
342
    if amazonFbaSalesSnapshot:
353
    if amazonFbaSalesSnapshot:
343
        t_amazonFbaSalesSnapshot.dateOfSale = to_java_date(datetime.datetime.combine(amazonFbaSalesSnapshot.dateOfSale,datetime.time(0,0)))
354
        t_amazonFbaSalesSnapshot.dateOfSale = to_java_date(datetime.datetime.combine(amazonFbaSalesSnapshot.dateOfSale,datetime.time(0,0)))