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
d996030b
Commit
d996030b
authored
Oct 23, 2023
by
xiao-hesheng
Browse files
产品管理_产品维护_耗材分类
parent
dd0c770d
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/a2_herp3_bs/d9_在耗材分类中添加产品.air/d9_在耗材分类中添加产品.py
View file @
d996030b
...
@@ -62,5 +62,5 @@ def add_goods_in_kind():
...
@@ -62,5 +62,5 @@ def add_goods_in_kind():
commonFuc
().
check_result
(
checkDict
,
result
)
commonFuc
().
check_result
(
checkDict
,
result
)
add_goods_in_kind
()
add_goods_in_kind
()
#删除耗材分类下的产品信息
#删除耗材分类下的产品信息
delKindGoodsinfo
().
D
el
ete_branch_by_id
()
delKindGoodsinfo
().
d
el
KindGoodsinfo
()
common/db/sql/sql_del_kind_goodsinfo.py
View file @
d996030b
...
@@ -5,7 +5,7 @@ import pymysql
...
@@ -5,7 +5,7 @@ import pymysql
class
delKindGoodsinfo
(
object
):
class
delKindGoodsinfo
(
object
):
def
D
el
ete_branch_by_id
(
self
):
def
d
el
KindGoodsinfo
(
self
):
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
()
...
@@ -15,6 +15,17 @@ class delKindGoodsinfo(object):
...
@@ -15,6 +15,17 @@ class delKindGoodsinfo(object):
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
cursor
.
execute
(
"commit;"
)
print
(
'耗材分类下的产品删除完毕'
)
print
(
'耗材分类下的产品删除完毕'
)
def
delkind
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
# 删除耗材分类下的产品,便于脚本下次执行时再次添加产品信息到该耗材分类中
sql
=
"DELETE from mcms_goods_kind where kind_code in('9999','9999_2');"
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
print
(
'耗材分类删除完毕'
)
# delByBranchId().Delete_branch_by_name('11122222')
# delByBranchId().Delete_branch_by_name('11122222')
\ No newline at end of file
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