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
cc1fa8df
Commit
cc1fa8df
authored
Aug 02, 2024
by
xiao-hesheng
Browse files
优化调整脚本
parent
6a7ec89d
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
cc1fa8df
...
...
@@ -856,24 +856,10 @@ def main():
# 采购模块处理
purchase_module_process
()
# 三个单据共审批3次
while
True
:
try
:
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
except
:
print
(
'审批流程可能被修改,等待手工审批'
)
if
get_last_auditor
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
\
and
get_last_auditor
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message7'
))
\
and
get_last_auditor
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message11'
))
!=
None
:
break
else
:
continue
else
:
break
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
order_dp
(
1
)
# 1低值
order_dp
(
2
)
# 2高值
order_dp
(
3
)
# 3试剂
...
...
air_case/public1/public1/public1.py
View file @
cc1fa8df
...
...
@@ -121,6 +121,14 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
if
total
>
0
:
taskId
=
commonFuc
().
analysis_json
(
'taskId'
,
data1
[
0
])
else
:
#调用函数去审批流实例中去审批
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message7'
))
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message11'
))
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message7'
))
approval_allProcessPage
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message11'
))
return
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"approvalBatch_url"
)
...
...
@@ -141,7 +149,73 @@ def approval_center(OBH_ID='OBhxxxxxxxxxxxxxxx'):
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
approval_allProcessPage
(
OBH_ID
=
'OBhxxxxxxxxxxxxxxx'
):
module
=
"b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
print
(
info
)
username1
=
info
[
'username1'
]
username
=
username1
## print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"apprCenter_allProcessPage_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"
))
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_6_1_2"
,
OBH_ID
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
total
==
0
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_6"
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# 断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
commonFuc
().
check_text_exist
(
0
,
result
)
if
total
>
0
:
taskId
=
commonFuc
().
analysis_json
(
'taskId'
,
data1
[
0
])
else
:
return
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"approvalBatch_url"
)
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_7"
,
taskId
)
print
(
request_body
)
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
# 断言
# checkDict=commonFuc().get_business_data(module,'checkDict10')
# commonFuc().check_result(checkDict,result)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
if
code
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
approval_center_all
(
OBH_ID
=
'OBhxxxxxxxxxxxxxxx'
):
module
=
"b2_herp3_bs"
...
...
data/b2_herp3_bs/data
View file @
cc1fa8df
...
...
@@ -35,6 +35,7 @@
"queryInSettlementStockQty_url": "/api/herpService/goodsChgSub/queryInSettlementStockQty"
"goodsChgMain_insert_url": "/api/herpService/goodsChgMain/insert"
"apprCenter_url": "/api/herpService/apprCenter/waitPage"
"apprCenter_allProcessPage_url": "/api/herpService/apprCenter/allProcessPage"
"approvalBatch_url": "/api/herpService/apprCenter/approvalBatch"
"baseInfoChangePage_url": "/api/herpService/goodsChgMain/baseInfoChangePage"
"goodsChgMain_insert_url1": "/api/herpService/goodsChgMain/insert"
...
...
data/b5_spd3_core_business_flow/message13
View file @
cc1fa8df
...
...
@@ -8,22 +8,22 @@
taskType
:
1
sourceOrgId
:
p1e37e
sourceOrgName
:
国药集团公司sya!$
sourceOrderNo
:
PSh03472024080200
21
sourceOrderNo
:
PSh03472024080200
30
billMode
:
'66'
stockKind
:
purMode
:
sourceId
:
PSh03472024080200
21
sourceId
:
PSh03472024080200
30
sourceDetailId
:
sourceType
:
PSD
sourceTypeName
:
配送单
sourceVersion
:
1
planOrderNo
:
PLAN20240802342
64
purOrderNo
:
CG20240802224
7
3
planOrderNo
:
PLAN20240802342
75
purOrderNo
:
CG20240802224
8
3
recOrgId
:
ea59fe790acd41719499e7278b8bb50b
recOrgName
:
二级检验科002
billRelationJson
:
'{"buyBillId":"Bh034720240802000
3
4","planBillId":"Ph03472024080203090
9
","planOrderNo":"PLAN20240802342
64
","buyOrderNo":"BUY202408021027
5
","purOrderNo":"CG20240802224
7
3","purBillId":"Ch0347202408020000
4
9","purBillDate":"2024-08-02
1
5
:
54:23
","distrBillId":"PSh03472024080200
21
","distrOrderNo":"PSh03472024080200
21
"}'
taskDate
:
'2024-08-02 1
5:55:08
'
billRelationJson
:
'{"buyBillId":"Bh0347202408020004
6
","planBillId":"Ph0347202408020309
2
0","planOrderNo":"PLAN20240802342
75
","buyOrderNo":"BUY20240802102
8
7","purOrderNo":"CG20240802224
8
3","purBillId":"Ch0347202408020000
5
9","purBillDate":"2024-08-02
1
6
:
20:30
","distrBillId":"PSh03472024080200
30
","distrOrderNo":"PSh03472024080200
30
"}'
taskDate
:
'2024-08-02 1
6:21:10
'
taskDateStart
:
taskDateEnd
:
billModeList
:
...
...
data/b5_spd3_core_business_flow/message15
View file @
cc1fa8df
验收单号
:
CHECK_NO1
:
CHECKh034720240802000
21
CHECK_NO2
:
CHECKh034720240802000
21
CHECK_NO1
:
CHECKh034720240802000
30
CHECK_NO2
:
CHECKh034720240802000
30
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