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
0a3e9f95
Commit
0a3e9f95
authored
May 28, 2024
by
xiao-hesheng
Browse files
流程十一脚本编写
parent
3e8d5a21
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
0a3e9f95
...
@@ -21,7 +21,7 @@ python runner_test.py tag id2302-14 debug mdm3
...
@@ -21,7 +21,7 @@ python runner_test.py tag id2302-14 debug mdm3
def
SERACH_goods_id
(
GoodsId
):
def
SERACH_goods_id
(
GoodsId
):
#在请领出库渠道边仓中搜索产品
#
在请领出库渠道边仓中搜索产品
module
=
'b5_spd3_core_business_flow'
module
=
'b5_spd3_core_business_flow'
# # 登录获取用户id等信息,使用创建的用户登录===========开始
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
@@ -47,7 +47,7 @@ def SERACH_goods_id(GoodsId):
...
@@ -47,7 +47,7 @@ def SERACH_goods_id(GoodsId):
return
branchGoodsId
return
branchGoodsId
def
goods_move2
():
#
设置请领出库渠道为直送
def
goods_move2
():
#
设置请领出库渠道为直送
# # 登录获取用户id等信息,使用创建的用户登录===========开始
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
username
=
info
[
'username1'
]
...
@@ -230,48 +230,6 @@ def BuyCarSubmit():
...
@@ -230,48 +230,6 @@ def BuyCarSubmit():
currentTaskList
=
commonFuc
().
analysis_json
(
'currentTaskList'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
currentTaskList
=
commonFuc
().
analysis_json
(
'currentTaskList'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
def
add_logic_stock
():
delData
().
Delete_yb_logic_stock
()
module
=
"b5_spd3_core_business_flow"
# 登录集中管控平台
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_platform
()
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_url
()
+
commonFuc
().
get_business_data
(
module
,
"platformService_basic_logic_save_url"
)
print
(
'添加云仓================='
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload54"
,
get_hosid
(),
get_branch_id
(),
get_branch_id
(),
uxid
,
uxid
,
get_in_userid
(),
get_hosid
(),
uxid
,
uxid
)
print
(
'添加云仓'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'添加云仓,result'
,
result
)
def
cloud_stock_opeartion
():
print
(
'云仓处理'
)
# 云仓登录
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_logic_stock
()
module
=
"b5_spd3_core_business_flow"
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_url
()
+
commonFuc
().
get_business_data
(
module
,
"platformService_basic_logic_save_url"
)
print
(
'云仓处理查看单据================='
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload54"
,
get_hosid
(),
get_branch_id
(),
get_branch_id
(),
uxid
,
uxid
,
get_in_userid
(),
get_hosid
(),
uxid
,
uxid
)
print
(
'云仓处理查看单据'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'云仓处理查看单据,result'
,
result
)
def
add_dept2
():
def
add_dept2
():
module
=
'b2_herp3_bs'
module
=
'b2_herp3_bs'
# 内网登录
# 内网登录
...
@@ -347,28 +305,26 @@ def add_new_deptinfo():
...
@@ -347,28 +305,26 @@ def add_new_deptinfo():
try
:
try
:
add_dept2
()
# 新增一个二级科室
# add_dept2() # 新增一个二级科室
add_new_deptinfo
()
# 写入科室信息到文件中
# add_new_deptinfo() # 写入科室信息到文件中
grants_user_new
()
#新增授权
# grants_user_new() #新增授权
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid5'
],
2
)
# 设置部门用户
set_dept_lead_new
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
])
# 设置二级科室负责人
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'],2)
goods_move2
()
# 设置产品出库渠道为直送
# 设置部门负责人
# # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
# add_logic_stock()
goods_move2
()
# 设置产品出库渠道为直送
#
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
# # 设置产品出库渠道为边仓
# # 低值
# goods_move()
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
],
1
)
# updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
# # 高值
#
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
],
2
)
# # # # 低值
# # 试剂
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId'], 1)
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
],
3
)
# # # 高值
BuyCarSubmit
()
# 请领车提交
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId'], 2)
for
i
in
range
(
6
):
#三个单据共审批6次
# # # 试剂
approval_center
()
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
# 采购模块处理
# BuyCarSubmit() # 请领车提交
# for i in range(6): # 三个单据共审批6次
# approval_center()
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
except
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
air_case/public1/public1/public1.py
View file @
0a3e9f95
This diff is collapsed.
Click to expand it.
data/b5_spd3_core_business_flow/message21
View file @
0a3e9f95
...
@@ -33,14 +33,14 @@
...
@@ -33,14 +33,14 @@
targetStockName
:
东土城路院区Sn
%
cM中心库房
targetStockName
:
东土城路院区Sn
%
cM中心库房
purchaseFlag
:
1
purchaseFlag
:
1
tempFlag
:
0
tempFlag
:
0
grantWay
:
2
grantWay
:
3
deptGoodsStatus
:
deptGoodsStatus
:
codingType
:
0
codingType
:
0
purModeText
:
检验试剂
purModeText
:
检验试剂
goodsGeneralName
:
检测试剂
goodsGeneralName
:
检测试剂
provName
:
国药集团公司m!4a&
provName
:
国药集团公司m!4a&
noRecPkgQty
:
0
.0
noRecPkgQty
:
1
.0
noRecQty
:
0.0
noRecQty
:
10
0.0
autoUnpack
:
autoUnpack
:
list_b
:
list_b
:
-
*id001
-
*id001
...
...
report/summary.html
View file @
0a3e9f95
...
@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
...
@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
21
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
50
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
...
@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b4流程十一请领业务流_二级库向
二级库
/log.html'
target=
'_blank'
>
a_b4流程十一请领业务流_二级库向
二级库
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b4流程十一请领业务流_二级库向
直送
/log.html'
target=
'_blank'
>
a_b4流程十一请领业务流_二级库向
直送
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
21.361
</td>
<td
class=
"details-col-elapsed"
>
50.434
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
</tr>
...
...
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