Subversion Repositories SmartDukaan

Rev

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

Rev 7423 Rev 7426
Line 7... Line 7...
7
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
7
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
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
12
    AmazonOrder as T_AmazonOrder, StoreOrderDetail as T_StoreOrderDetail, StoreOrderCollection as T_StoreOrderCollection
13
from shop2020.utils.Utils import to_java_date
13
from shop2020.utils.Utils import to_java_date
14
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
14
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
15
 
15
 
16
def to_t_transaction(transaction):
16
def to_t_transaction(transaction):
17
    t_transaction = T_Transaction()
17
    t_transaction = T_Transaction()
Line 289... Line 289...
289
        t_storeOrderDetail.payStatus = storeOrderDetail.payStatus
289
        t_storeOrderDetail.payStatus = storeOrderDetail.payStatus
290
        t_storeOrderDetail.edcBank = storeOrderDetail.edcBank
290
        t_storeOrderDetail.edcBank = storeOrderDetail.edcBank
291
        t_storeOrderDetail.cashRefundAmount = storeOrderDetail.cashRefundAmount
291
        t_storeOrderDetail.cashRefundAmount = storeOrderDetail.cashRefundAmount
292
        t_storeOrderDetail.cardRefundAmount = storeOrderDetail.cardRefundAmount
292
        t_storeOrderDetail.cardRefundAmount = storeOrderDetail.cardRefundAmount
293
        t_storeOrderDetail.approvalCode = storeOrderDetail.approvalCode
293
        t_storeOrderDetail.approvalCode = storeOrderDetail.approvalCode
294
    return t_storeOrderDetail
-
 
295
294
    return t_storeOrderDetail
-
 
295
 
-
 
296
def to_t_storeOrderCollection(storeOrderCollection):
-
 
297
    t_storeOrderCollection = T_StoreOrderCollection()
-
 
298
    if storeOrderCollection:
-
 
299
        t_storeOrderCollection.hotspotId = storeOrderCollection.hotspotId
-
 
300
        t_storeOrderCollection.orderId = storeOrderCollection.orderId
-
 
301
        t_storeOrderCollection.collectionType = storeOrderCollection.collectionType
-
 
302
        t_storeOrderCollection.productName = storeOrderCollection.productName
-
 
303
        t_storeOrderCollection.advanceAmount = storeOrderCollection.advanceAmount
-
 
304
        t_storeOrderCollection.cash = storeOrderCollection.cash
-
 
305
        t_storeOrderCollection.card = storeOrderCollection.card
-
 
306
        t_storeOrderCollection.addedAt = storeOrderCollection.addedAt
-
 
307
        t_storeOrderCollection.pushedAt = storeOrderCollection.pushedAt
-
 
308
        t_storeOrderCollection.pushedToOcr = storeOrderCollection.pushedToOcr
-
 
309
    return t_storeOrderCollection
-
 
310
296
311