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
f4704d7d
Commit
f4704d7d
authored
Jul 15, 2024
by
xiao-hesheng
Browse files
数据库验证流程十脚本编写
parent
1d60b6b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b5流程十二请领业务流_二级库向二级库.air/a_b5流程十二请领业务流_二级库向二级库.py
View file @
f4704d7d
...
...
@@ -420,11 +420,11 @@ def pick_execute():
def
main
():
try
:
# ================暂时注释======================
#
add_dept2() # 新增一个二级科室
#
add_new_deptinfo() # 写入科室信息到文件中
#
grants_user_new() # 新增授权
#
#
同步库房信息
#
execute_command("python runner_test.py tag id2263-221 debug sit")
add_dept2
()
# 新增一个二级科室
add_new_deptinfo
()
# 写入科室信息到文件中
grants_user_new
()
# 新增授权
# 同步库房信息
execute_command
(
"python runner_test.py tag id2263-221 debug sit"
)
# 设置部门用户
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid5'
],
2
)
...
...
air_case/public1/public1/public1.py
View file @
f4704d7d
...
...
@@ -463,7 +463,7 @@ def set_dept_user(dept_id, deptName, type=1):
# ====获取库区id===== 开始==========
# stockAreaId = get_stockAreaId(dept_id, stockId)
stockAreaId
=
process_tuple
(
get_id
(
"select id from mcms_stock_shelf where
stock_id
='%s'and
address='%s';"
%
(
stockId
,
deptName
)))
stockAreaId
=
process_tuple
(
get_id
(
"select id from mcms_stock_shelf
where
address
='%s'
and
del_flag=0 order by CREATE_TIME desc LIMIT 1;"
%
(
deptName
)))
print
(
stockAreaId
)
# ====获取库区id===== 结束==========
# dept_query_all()
...
...
@@ -500,7 +500,7 @@ def set_dept_user(dept_id, deptName, type=1):
# print('查询库区是否已经存在人员', result)
# userCode = commonFuc().analysis_json('userCode',
# commonFuc().analysis_json('data', commonFuc().analysis_json('data', result)))
userCode
=
process_tuple
(
get_id
(
"select user_code from mcms_stock_user where user_code='%s' and dept_id='%s' and del_flag=0;"
%
(
username1
,
dept_id
)
))
userCode
=
delData
().
del_mcms_stock_user
(
username1
,
dept_id
)
# print('userCode',userCode)
if
userCode
!=
username1
:
# 查询库区是否已经存在人员,不需要重复添加===============
...
...
common/db/sql/sql_del_branch_info.py
View file @
f4704d7d
...
...
@@ -786,6 +786,18 @@ class delData(object):
# print(results)
s
=
''
.
join
(
map
(
str
,
results
))
return
s
def
del_mcms_stock_user
(
self
,
user_code
,
dept_id
):
# 内网的
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
# 删除库区用户
sql1
=
"delete from mcms_stock_user where user_code='%s' and dept_id='%s';"
%
(
user_code
,
dept_id
)
cursor
.
execute
(
sql1
)
cursor
.
execute
(
"commit;"
)
print
(
'库区人员信息删除成功 '
)
cursor
.
close
()
# delData().Delete_branch_by_id()
# delData().Delete_goods_change_info()
# delData().Delete_sys_config()
...
...
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