sql3="delete from mcms_invoice_ext_detail where pid in(select id from mcms_invoice_ext where prov_name like '%国药集团公司_____');"
sql3="delete from mcms_invoice_ext_detail where pid in(select id from mcms_invoice_ext where prov_name like '%国药集团公司_____');"
sql4="delete from mcms_invoice_ext where prov_name like '%国药集团公司_____';"
sql4="delete from mcms_invoice_ext where prov_name like '%国药集团公司_____';"
sql5="delete from mcms_invoice_detail where branch_id not in (%s);"%branch_id
sql5="delete from mcms_invoice_detail where branch_id not in (%s);"%branch_id
# 删除发票中的垃圾数据
sql6=" delete from mcms_invoice where id in (select pid from mcms_invoice_detail where hos_goods_id not in(select id from mcms_goods_info));"
sql7=" delete from mcms_invoice_detail where hos_goods_id not in(select id from mcms_goods_info);"
cursor.execute(sql1)
cursor.execute(sql1)
cursor.execute(sql2)
cursor.execute(sql2)
cursor.execute(sql3)
cursor.execute(sql3)
cursor.execute(sql4)
cursor.execute(sql4)
cursor.execute(sql5)
cursor.execute(sql5)
cursor.execute(sql6)
cursor.execute(sql7)
cursor.execute("commit;")
cursor.execute("commit;")
# 退货
# 退货
sql1="delete from yb_return_batch where pid in(select id from yb_return where prov_name like '%国药集团公司_____');"
sql1="delete from yb_return_batch where pid in(select id from yb_return where prov_name like '%国药集团公司_____');"
...
@@ -631,9 +636,6 @@ class delData(object):
...
@@ -631,9 +636,6 @@ class delData(object):
sql7="delete from mcms_operation_notice where branch_name like '%东土城路院区_____';"
sql7="delete from mcms_operation_notice where branch_name like '%东土城路院区_____';"
sql8="delete from mcms_purchase_detail where pid in(select id from mcms_purchase where branch_id not in(select id from spd3_herp_test2.mcms_branch_info ));"
sql8="delete from mcms_purchase_detail where pid in(select id from mcms_purchase where branch_id not in(select id from spd3_herp_test2.mcms_branch_info ));"
sql9="delete from mcms_purchase where branch_id not in(select id from spd3_herp_test2.mcms_branch_info );"
sql9="delete from mcms_purchase where branch_id not in(select id from spd3_herp_test2.mcms_branch_info );"
#删除发票中的垃圾数据
sql10=" delete from mcms_invoice where id in (select pid from mcms_invoice_detail where hos_goods_id not in(select id from mcms_goods_info));"
sql11=" delete from mcms_invoice_detail where hos_goods_id not in(select id from mcms_goods_info);"