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
24d95f56
Commit
24d95f56
authored
Apr 25, 2024
by
xiao-hesheng
Browse files
流程五脚本编写
parent
1ef14458
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/db/sql/sql_del_branch_info.py
View file @
24d95f56
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
import
pymysql
import
pymysql
from
common.fileUtls
import
FileUtils
class
delData
(
object
):
class
delData
(
object
):
def
Delete_branch_by_id
(
self
):
def
Delete_branch_by_id
(
self
):
...
@@ -221,8 +224,10 @@ class delData(object):
...
@@ -221,8 +224,10 @@ class delData(object):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
cursor
=
connection
.
cursor
()
# 删除产品信息
# 删除供应关系
sql
=
"delete from supply_relation where contact_way like '_____' and contact_user like '_____';"
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"供货关系申请2"
,
'message'
)
username
=
info
[
'e_username'
]
sql
=
"delete from supply_relation where prov_id in(select id from bas_company_info where cname = '%s');"
%
username
print
(
sql
)
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
cursor
.
execute
(
"commit;"
)
...
...
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