Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
924a7de8
Commit
924a7de8
authored
Jul 02, 2024
by
xiao-hesheng
Browse files
脚本优化
parent
ddebc3f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/db/sql/sql_del_branch_info.py
View file @
924a7de8
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment