Commit 924a7de8 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

脚本优化

parent ddebc3f1
......@@ -618,7 +618,17 @@ class delData(object):
cursor.execute(sql2)
cursor.execute(sql3)
cursor.execute("commit;")
#删除院区产品表和部门产品表多余的数据
sql1 = "delete from mcms_branch_goods_info where hos_goods_id not in(select id from mcms_goods_info);"
sql2 = "delete from mcms_branch_goods_info where branch_id not in(%s);" % branch_id
sql3 = "delete mcms_dept_goods_info where hos_goods_id not in(select id from mcms_goods_info);"
sql4 = "delete from mcms_dept_goods_info where branch_id not in(%s);"%branch_id
cursor.execute(sql1)
cursor.execute(sql2)
cursor.execute(sql3)
cursor.execute(sql4)
cursor.execute("commit;")
print('院区产品表和部门产品表多余的数据删除成功')
print('业务数据,包括采购,出入库,结算等数据删除成功')
cursor.close()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment