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
d943257e
Commit
d943257e
authored
Jul 12, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
d520a49e
37be800f
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_a5流程五_中心库入库结算_正结算1_提交采购计划.air/a_a5流程五_中心库入库结算_正结算1_提交采购计划.py
View file @
d943257e
# -*- encoding=utf8 -*-
import
traceback
from
air_case.public1.public1.public1
import
get_hosid
,
get_branch_id
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
...
...
@@ -454,6 +455,59 @@ def reagent_purchase_plan():
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
goods_move3
():
# 设置请领出库渠道为中心库
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
module
=
"b2_herp3_bs"
# 设置请领出库渠道为中心库
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateSettleType_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
for
i
in
range
(
1
,
4
):
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message%s'
%
i
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
branchGoodsId
=
SERACH_goods_id
(
GoodsId
)
# #请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload47_3"
,
branchGoodsId
,
hosGoodsId
,
get_branch_id
())
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'goods_move,result'
,
result
)
def
SERACH_goods_id
(
GoodsId
):
# 在请领出库渠道边仓中搜索产品
module
=
'b5_spd3_core_business_flow'
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'username,password'
,
username
,
password
)
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_mcmsBranchGoodsInfo_page_url"
)
dept1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
# GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload53_2"
,
GoodsId
,
get_hosid
(),
get_branch_id
(),
dept1
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
branchGoodsId
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
return
branchGoodsId
def
main
():
try
:
# 获取低值的hosGoodsId
...
...
data/b2_herp3_bs/data
View file @
d943257e
...
...
@@ -284,6 +284,7 @@ json_headers2: {
"payload46": {"queryObject": {"goodsName": "","goodsMfrsName": "","purModes": [],"hosId": "h0347","branchId": "%s","grantRule": 1,"goodsSpec": "xhs"},"pageNum": 1, "pageSize": 50}
"payload47": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 2,"branchId": "%s"}
"payload47_2": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 3,"branchId": "%s"}
"payload47_3": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 1,"branchId": "%s"}
"payload48": {"branchGoodsIds": ["%s"],"hosGoodsIds": ["%s"],"grantRule": 3,"branchId": "%s"}
"payload49": {"queryObject": {"goodsName": "","provName": "","purModes": [],"hosId": "h0347","settleType": 1,"goodsSpec": "" },"pageNum": 1,"pageSize": 100}
...
...
main1/main_text.py
View file @
d943257e
...
...
@@ -197,7 +197,15 @@ def main_text():
flow16
()
flow17
()
flow18
()
def
flow11_flow18
():
flow11
()
flow12
()
flow13
()
flow14
()
flow15
()
flow16
()
flow17
()
flow18
()
def
confirm
():
result
=
tkinter
.
messagebox
.
askokcancel
(
"确认"
,
"您确定要执行此操作吗?"
)
...
...
@@ -233,7 +241,9 @@ def main_text():
Button
(
root
,
text
=
'一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow0
).
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
=
'从jenkins
\n
下载data
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
download_data
).
grid
(
row
=
5
,
column
=
8
)
Button
(
root
,
text
=
'流程十一开始
\n
一键执行'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
flow11_flow18
).
grid
(
row
=
5
,
column
=
8
)
Button
(
root
,
text
=
'从jenkins
\n
下载data
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
download_data
).
grid
(
row
=
5
,
column
=
10
)
Button
(
root
,
text
=
'退 出'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
exit
).
grid
(
row
=
5
,
column
=
10
)
# Button(root, text='anchor', anchor='e', width=30, height=4).pack()
...
...
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