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
b73b44f1
Commit
b73b44f1
authored
Aug 02, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
9f2ac4ed
7204bc4b
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b2_herp3_bs/r_g7流程设置_审批流程设置_自定义流程_删除.air/r_g7流程设置_审批流程设置_自定义流程_删除.py
View file @
b73b44f1
...
...
@@ -3,7 +3,7 @@ import sys
from
airtest.core.helper
import
using
from
air_case.public1.public1.public1
import
dept_query_all
from
air_case.public1.public1.public1
import
dept_query_all
,
get_process_list
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
...
...
@@ -52,12 +52,13 @@ def test1():
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload65"
)
print
(
'request_body'
,
request_body
)
new_request_body
=
request_body
.
replace
(
"'"
,
'"'
)
request_body_json
=
get_process_list
(
request_body
)
# new_request_body = request_body.replace("'", '"')
# new_request_body = new_request_body.replace("None", 'null')
# print(new_request_body)
import
json
request_body_json
=
json
.
loads
(
new_request_body
)
print
(
'request_body_json'
,
request_body_json
)
#
request_body_json = json.loads(new_request_body)
#
print('request_body_json', request_body_json)
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body_json
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaa'
,
result
)
...
...
@@ -70,5 +71,10 @@ def test1():
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
try
:
test1
()
except
:
print
(
'出现异常'
)
finally
:
branch_id
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
delData
().
Delete_branch_by_id
(
3
,
branch_id
)
\ No newline at end of file
common/db/sql/sql_del_branch_info.py
View file @
b73b44f1
...
...
@@ -9,7 +9,7 @@ from common.fileUtls import FileUtils
class
delData
(
object
):
def
Delete_branch_by_id
(
self
,
type
=
1
):
def
Delete_branch_by_id
(
self
,
type
=
1
,
id
=
'id'
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
...
...
@@ -17,8 +17,12 @@ class delData(object):
# sql = "DELETE from mcms_branch_info where id = '%s';" % id
if
type
==
1
:
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区_____';"
el
se
:
el
if
type
==
2
:
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区______';"
elif
type
==
3
:
sql
=
"DELETE from mcms_branch_info where id = '%s';"
%
id
else
:
sql
=
'sql'
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
...
...
@@ -33,8 +37,12 @@ class delData(object):
# sql = "DELETE from mcms_branch_info where id = '%s';" % id
if
type
==
1
:
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区_____';"
el
se
:
el
if
type
==
2
:
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区______';"
elif
type
==
3
:
sql
=
"DELETE from mcms_branch_info where id = '%s';"
%
id
else
:
sql
=
'sql'
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
...
...
data/b2_herp3_bs/data
View file @
b73b44f1
...
...
@@ -493,7 +493,7 @@ json_headers2: {
"payload64_2": {"pageNum":1,"pageSize":200,"queryObject":{"methodCode":"%s","operType":"restful","startTime":"2024-02-28 00:00:00","endTime":"2024-02-29 23:59:59"}}
"payload64_3": {"pageNum":1,"pageSize":200,"queryObject":{"methodCode":"%s","operType":"restful","startTime":"","endTime":""}}
"payload64_4": {"pageNum":1,"pageSize":"%s","queryObject":{"methodCode":"","operType":"restful","startTime":"","endTime":""}}
"payload65":
'[
{"id":"3a8395c5578745a6a7cf6b48ae166ce6","lastModified":"2024-01-22 09:09:29","version":0,"createTime":"2024-01-22 09:09:29","createUser":"UID-050151","lastModifiedUser":"UID-050151","businessType":0,"procType":0,"modelName":"默认审批流","judgeType":"111","rangeType":0,"rangeData":null,"modelJson":"[{\"no\":0,\"nodeName\":\"运营主管\",\"assigneeType\":2}]","nodeQty":1,"sortNo":0,"modelList":[{"no":0,"nodeName":"运营主管","assigneeType":2,"assignee":null}],"rangeDataFirst":null,"rangeDataSecond":null}
]'
"payload65": {"id":"3a8395c5578745a6a7cf6b48ae166ce6","lastModified":"2024-01-22 09:09:29","version":0,"createTime":"2024-01-22 09:09:29","createUser":"UID-050151","lastModifiedUser":"UID-050151","businessType":0,"procType":0,"modelName":"默认审批流","judgeType":"111","rangeType":0,"rangeData":null,"modelJson":"[{\"no\":0,\"nodeName\":\"运营主管\",\"assigneeType\":2}]","nodeQty":1,"sortNo":0,"modelList":[{"no":0,"nodeName":"运营主管","assigneeType":2,"assignee":null}],"rangeDataFirst":null,"rangeDataSecond":null}
"payload65_1": '[{"id":"3a8395c5578745a6a7cf6b48ae166ce6","lastModified":"2024-03-07 08:44:05","version":0,"createTime":"2024-03-07 08:44:05","createUser":"h0347:UID-042066","lastModifiedUser":"h0347:UID-042066","businessType":0,"procType":0,"modelName":"默认审批流","judgeType":"111","rangeType":0,"rangeData":null,"modelJson":"[{\"no\":0,\"nodeName\":\"运营主管\",\"assigneeType\":2}]","nodeQty":1,"sortNo":0,"modelList":[{"no":0,"nodeName":"运营主管","assigneeType":2,"assignee":null}],"rangeDataFirst":null,"rangeDataSecond":null},{"businessType":0,"judgeType":"","modelList":[{"assigneeType":0,"nodeName":"test","assignee":"UID-048618"}],"modelName":"test","rangeDataFirst":999999,"rangeDataSecond":null,"rangeType":3}]'
"payload65_2": '[{"id":"3a8395c5578745a6a7cf6b48ae166ce6","lastModified":"2024-03-07 09:32:20","version":0,"createTime":"2024-03-07 09:32:20","createUser":"h0347:UID-042066","lastModifiedUser":"h0347:UID-042066","businessType":0,"procType":0,"modelName":"默认审批流","judgeType":"111","rangeType":0,"rangeData":null,"modelJson":"[{\"no\":0,\"nodeName\":\"运营主管\",\"assigneeType\":2}]","nodeQty":1,"sortNo":0,"modelList":[{"no":0,"nodeName":"运营主管","assigneeType":2,"assignee":null}],"rangeDataFirst":null,"rangeDataSecond":null},{"businessType":0,"judgeType":"","modelList":[{"assigneeType":0,"nodeName":"zzzz","assignee":"UID-050151"}],"modelName":"zzzz","rangeDataFirst":2222,"rangeDataSecond":44444,"rangeType":2}]'
"payload65_3": {"queryObject":{"deptId":"%s","stockAreaId":"%s","hosId":"%s"},"pageNum":1,"pageSize":50}
...
...
main1/main_text.py
View file @
b73b44f1
...
...
@@ -245,6 +245,29 @@ def main_text():
return
result
def
download_data
():
print
(
'从Jenkins服务器下载data数据'
)
def
del_brachdata_from_brachid
():
import
tkinter
as
tk
from
tkinter
import
ttk
def
dropdown_changed
(
event
):
value
=
combo
.
get
()
print
(
value
)
root
=
tk
.
Tk
()
root
.
title
(
"删除指定院区数据"
)
# 计算窗口居中时左上角的坐标
x
=
(
window_width
-
root
.
winfo_width
())
//
2
y
=
(
window_height
-
root
.
winfo_height
())
//
2
# 设置窗口左上角的坐标
root
.
geometry
(
"+{}+{}"
.
format
(
x
,
y
))
root
.
resizable
(
False
,
False
)
combo
=
ttk
.
Combobox
(
root
)
combo
[
"values"
]
=
(
"选项1"
,
"选项2"
,
"选项3"
)
combo
.
current
(
0
)
# 设置默认选项
combo
.
bind
(
"<<ComboboxSelected>>"
,
dropdown_changed
)
combo
.
pack
()
root
.
mainloop
()
# 文本显示的位置。
Button
(
root
,
text
=
'流程一
\n
外网企业注册审批'
,
width
=
16
,
height
=
8
,
command
=
flow1
).
grid
(
row
=
2
,
column
=
0
)
Button
(
root
,
text
=
'流程二
\n
供货关系申请审批'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow2
).
grid
(
row
=
2
,
column
=
2
)
...
...
@@ -264,7 +287,8 @@ def main_text():
Button
(
root
,
text
=
'流程十六
\n
退库业务_二级库向
\n
一级库退库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow16
).
grid
(
row
=
4
,
column
=
6
)
Button
(
root
,
text
=
'流程十七
\n
退库业务_中心库退
\n
供应商'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow17
).
grid
(
row
=
4
,
column
=
8
)
Button
(
root
,
text
=
'流程十八
\n
中心库业务_拆包功能'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow18
).
grid
(
row
=
4
,
column
=
10
)
#Button(root, text='一键执行', anchor='center', width=8, height=2,command=flow0).grid(row=5,column=2)
Button
(
root
,
text
=
'一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow0
).
grid
(
row
=
5
,
column
=
0
)
Button
(
root
,
text
=
'删除指定
\n
院区数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_brachdata_from_brachid
).
grid
(
row
=
5
,
column
=
2
)
Button
(
root
,
text
=
'流程五开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow5_flow18
).
grid
(
row
=
5
,
column
=
4
)
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
6
)
Button
(
root
,
text
=
'流程十一开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow11_flow18
).
grid
(
row
=
5
,
column
=
8
)
...
...
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