Commit 963c4b63 by 岳巧源

new sql

parent e4728c74
Showing with 8 additions and 8 deletions
......@@ -18,10 +18,10 @@ for i in range(len(item)):
def migrate_from_lie_scm_order():
conf = {
'host': "trading-master.ichunt.db",
'host': "master.db2.liexindev.me",
'port': 3306,
'user': "PurUxts",
'password': "sxmsgxt0t2025067A03AtIljs",
'user': "liexin_purchase",
'password': "liexin_purchase#zsyM",
'db': "liexin_purchase",
'charset': 'utf8'
}
......@@ -109,7 +109,7 @@ def migrate_from_lie_scm_order():
str(seller_uid), str(seller_name),
str(purchase_item_id)
)
insert_sql = "insert into lie_shipping_intermediate_data (" + item_str + ") " + "values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,)"
insert_sql = "insert into lie_shipping_intermediate_data (" + item_str + ") " + "values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
#判断 goods_name + warehouse_receipt_sn 还有shipment_number的组合是否出现过
if len(str(purchase_item_id)) != 0 and len(str(warehouse_receipt_sn)) != 0: #这两个字段不为空值
sql5 = "select id from lie_shipping_intermediate_data where purchase_item_id = " + "'" +str(purchase_item_id) + "'" + " and " + "warehouse_receipt_sn = " + "'" + str(warehouse_receipt_sn) + "'" + " and " + "source_type = " + "2"
......@@ -131,10 +131,10 @@ def migrate_from_lie_scm_order():
def migrate_from_stock_in_item():
conf = {
'host': "trading-master.ichunt.db",
'host': "master.db2.liexindev.me",
'port': 3306,
'user': "PurUxts",
'password': "sxmsgxt0t2025067A03AtIljs",
'user': "liexin_purchase",
'password': "liexin_purchase#zsyM",
'db': "liexin_purchase",
'charset': 'utf8'
}
......@@ -236,7 +236,7 @@ def migrate_from_stock_in_item():
str(seller_uid), str(seller_name),
str(purchase_item_id)
)
insert_sql = "insert into lie_shipping_intermediate_data (" + item_str + ") " + "values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,)"
insert_sql = "insert into lie_shipping_intermediate_data (" + item_str + ") " + "values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
#判断 goods_name + warehouse_receipt_sn 还有shipment_number的组合是否出现过
if len(str(purchase_item_id)) != 0 and len(str(warehouse_receipt_sn)) != 0: #这两个字段不为空值
sql5 = "select id from lie_shipping_intermediate_data where purchase_item_id = " + "'" +str(purchase_item_id) + "'" + " and " + "warehouse_receipt_sn = " + "'" + str(warehouse_receipt_sn) + "'" + " and " + "source_type = " + "2"
......
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