| Line 31... |
Line 31... |
| 31 |
PaginatedUserSanction as TPaginatedUserSanction, \
|
31 |
PaginatedUserSanction as TPaginatedUserSanction, \
|
| 32 |
ShipmentLogisticsCostDetail as TShipmentLogisticsCostDetail, \
|
32 |
ShipmentLogisticsCostDetail as TShipmentLogisticsCostDetail, \
|
| 33 |
OutstandingPayments as TOutstandingPayments
|
33 |
OutstandingPayments as TOutstandingPayments
|
| 34 |
from shop2020.utils.Utils import to_java_date
|
34 |
from shop2020.utils.Utils import to_java_date
|
| 35 |
|
35 |
|
| 36 |
|
- |
|
| 37 |
cutoff_date = ConfigClient().get_property("warehouse_company_cutoff_date")
|
- |
|
| 38 |
cutoff_date = datetime.datetime.strptime(cutoff_date,'%Y-%m-%d')
|
- |
|
| 39 |
|
- |
|
| 40 |
def to_t_transaction(transaction):
|
36 |
def to_t_transaction(transaction):
|
| 41 |
t_transaction = T_Transaction()
|
37 |
t_transaction = T_Transaction()
|
| 42 |
t_transaction.id = transaction.id
|
38 |
t_transaction.id = transaction.id
|
| 43 |
t_transaction.createdOn = to_java_date(transaction.createdOn)
|
39 |
t_transaction.createdOn = to_java_date(transaction.createdOn)
|
| 44 |
t_transaction.transactionStatus = transaction.status
|
40 |
t_transaction.transactionStatus = transaction.status
|
| Line 61... |
Line 57... |
| 61 |
|
57 |
|
| 62 |
def to_t_order(order):
|
58 |
def to_t_order(order):
|
| 63 |
t_order = T_Order()
|
59 |
t_order = T_Order()
|
| 64 |
t_order.id = order.id
|
60 |
t_order.id = order.id
|
| 65 |
t_order.warehouse_id = order.warehouse_id
|
61 |
t_order.warehouse_id = order.warehouse_id
|
| 66 |
if order.billing_timestamp:
|
- |
|
| 67 |
if cutoff_date >= order.billing_timestamp and order.warehouse_id==7:
|
- |
|
| 68 |
t_order.warehouse_id = 7151
|
- |
|
| 69 |
|
- |
|
| 70 |
t_order.logistics_provider_id = order.logistics_provider_id
|
62 |
t_order.logistics_provider_id = order.logistics_provider_id
|
| 71 |
if order.doa_logistics_provider_id is not None:
|
63 |
if order.doa_logistics_provider_id is not None:
|
| 72 |
t_order.doa_logistics_provider_id = order.doa_logistics_provider_id
|
64 |
t_order.doa_logistics_provider_id = order.doa_logistics_provider_id
|
| 73 |
t_order.airwaybill_no = order.airwaybill_no
|
65 |
t_order.airwaybill_no = order.airwaybill_no
|
| 74 |
t_order.tracking_id = order.tracking_id
|
66 |
t_order.tracking_id = order.tracking_id
|
| Line 93... |
Line 85... |
| 93 |
t_order.total_weight = order.total_weight
|
85 |
t_order.total_weight = order.total_weight
|
| 94 |
t_order.created_timestamp = to_java_date(order.created_timestamp)
|
86 |
t_order.created_timestamp = to_java_date(order.created_timestamp)
|
| 95 |
t_order.invoice_number = order.invoice_number
|
87 |
t_order.invoice_number = order.invoice_number
|
| 96 |
t_order.billed_by = order.billed_by
|
88 |
t_order.billed_by = order.billed_by
|
| 97 |
t_order.accepted_timestamp = to_java_date(order.accepted_timestamp)
|
89 |
t_order.accepted_timestamp = to_java_date(order.accepted_timestamp)
|
| 98 |
t_order.shipping_timestamp = to_java_date(order.shipping_timestamp)
|
- |
|
| 99 |
t_order.billing_timestamp = to_java_date(order.billing_timestamp)
|
90 |
t_order.billing_timestamp = to_java_date(order.billing_timestamp)
|
| - |
|
91 |
t_order.shipping_timestamp = to_java_date(order.shipping_timestamp)
|
| 100 |
t_order.delivery_timestamp = to_java_date(order.delivery_timestamp)
|
92 |
t_order.delivery_timestamp = to_java_date(order.delivery_timestamp)
|
| 101 |
t_order.outofstock_timestamp = to_java_date(order.outofstock_timestamp)
|
93 |
t_order.outofstock_timestamp = to_java_date(order.outofstock_timestamp)
|
| 102 |
t_order.verification_timestamp = to_java_date(order.verification_timestamp)
|
94 |
t_order.verification_timestamp = to_java_date(order.verification_timestamp)
|
| 103 |
t_order.jacket_number = order.jacket_number
|
95 |
t_order.jacket_number = order.jacket_number
|
| 104 |
t_order.receiver = order.receiver
|
96 |
t_order.receiver = order.receiver
|