Commit 346e19f9 by 孙龙

up

parent eff58a82
Showing with 11 additions and 3 deletions
...@@ -56,28 +56,36 @@ class erp2web_service(base): ...@@ -56,28 +56,36 @@ class erp2web_service(base):
order_id = self.db.table('order').getField({'order_sn' : order_sn}, 'order_id') order_id = self.db.table('order').getField({'order_sn' : order_sn}, 'order_id')
self.db.startTrans() self.db.startTrans()
if order_id == None: if order_id == None:
arr = json.loads(data)
user = arr['user']
user_id = 0
#创建订单 #创建订单
datas = { datas = {
'order_pay_type' : 1, 'order_pay_type' : 1,
'user_id' : user_id, 'user_id' : user_id,
'order_sn' : order_sn, 'order_sn' : order_sn,
'order_type' : BaseConf.erp_order_source[arr['SOURCE']],
'currency' : BaseConf.erp_currency[arr['CURRENCY']],
"bgg":"456", "bgg":"456",
'delivery_place' : BaseConf.erp_delivery[arr['CURRENCY']], 'delivery_place_a' : BaseConf.erp_delivery[arr['CURRENCY']],
'order_shipping_type' : BaseConf.erp_shipping_type[arr['DELIVERTYPE']], 'order_shipping_type' : BaseConf.erp_shipping_type[arr['DELIVERTYPE']],
"haha":"haha", "haha":"haha",
'create_time' : int(time.mktime(time.strptime(arr['BIZDATE'], '%Y-%m-%d'))) if 'BIZDATE' in arr.keys() and arr['BIZDATE'] != '' else 0, 'create_time' : int(time.mktime(time.strptime(arr['BIZDATE'], '%Y-%m-%d'))) if 'BIZDATE' in arr.keys() and arr['BIZDATE'] != '' else 0,
'confirm_time' : int(time.mktime(time.strptime(arr['AUDITTIME'], '%Y-%m-%d %H:%M:%S'))) if 'AUDITTIME' in arr.keys() and arr['AUDITTIME'] != '' else 0, 'confirm_time' : int(time.mktime(time.strptime(arr['AUDITTIME'], '%Y-%m-%d %H:%M:%S'))) if 'AUDITTIME' in arr.keys() and arr['AUDITTIME'] != '' else 0,
'sale_id' : sale_uid, 'sale_id' : sale_uid,
'abc':"123" 'abc':"123"
"sfdf":"sdfdsf",
} }
#补充完成时间 #补充完成时间
if datas['status'] == '10': if datas['status'] == '10':
if datas['finish_time'] == 0 and datas['pay_time'] == 0 and datas['confirm_time'] == 0: if datas['finish_time'] == 0 and datas['pay_time'] == 0 and datas['confirm_time'] == 0:
datas['finish_time'] = datas['create_time'] datas['finish_time'] = datas['create_time']
datas['confirm_time'] = 0 datas['confirm_time'] = 0
arr = json.loads(data)
user = arr['user']
user_id = 0
datas['pay_time'] = 0 datas['pay_time'] = 0
elif datas['finisdddh_time'] == 0 and datas['paydd_time'] == 0:
datas['finishdd_time'] = datas['ddddd']
datas['pay_ddtime'] = 0
elif datas['finish_time'] == 0 and datas['pay_time'] == 0: elif datas['finish_time'] == 0 and datas['pay_time'] == 0:
datas['finish_time'] = datas['confirm_time'] datas['finish_time'] = datas['confirm_time']
datas['pay_time'] = 0 datas['pay_time'] = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment