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
fe04e4d9
Commit
fe04e4d9
authored
Nov 19, 2024
by
xiao-hesheng
Browse files
流程一脚本提交
parent
22d0d38d
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_a5流程五_中心库入库结算_正结算1_提交采购计划.air/a_a5流程五_中心库入库结算_正结算1_提交采购计划.py
View file @
fe04e4d9
...
...
@@ -489,6 +489,60 @@ def goods_move3(token='token'): # 设置请领出库渠道为中心库
# # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'goods_move,result'
,
result
)
def
edit_goods_property
():
# 2024年11月19日,检测试剂产品增加了是否单瓶管理功能,默认为否,需要修改脚本
# 在科室产品分配中查询检测试剂
#修改试剂的属性值,单瓶管理为"是"
module
=
"b2_herp3_bs"
# # 登录获取用户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
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message3'
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
""
)
currentDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
targetDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_page_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
,
"payload58_13_2"
,
GoodsId
,
currentDeptId
,
get_hosid
())
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'科室产品列表查询'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
for
i
in
data1
:
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
i
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
i
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
i
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
i
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
i
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_basic_mcmsDeptGoodsInfo_url"
)
url
=
url
+
id1
result
=
commonFuc
().
http_get
(
url
,
headers
)
print
(
'获取产品详情信息'
,
result
)
data2
=
commonFuc
().
analysis_json
(
'data'
,
result
)
packetQty
=
commonFuc
().
analysis_json
(
'packetQty'
,
data2
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_updateById"
)
if
purMode
==
60
:
# 低值和试剂
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload58_10_3"
,
id1
,
pkgDefId
,
targetDeptId
,
shelfCode
,
packetQty
,
tbStatus
)
print
(
'编辑试剂产品属性request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'编辑试剂产品属性result'
,
result
)
def
SERACH_goods_id
(
GoodsId
):
# 在请领出库渠道直送中搜索产品
module
=
'b5_spd3_core_business_flow'
...
...
@@ -518,7 +572,8 @@ def main():
token
,
projectCode1
,
uxid1
,
corpId1
,
info1
=
call_login
(
2
)
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
# 设置登录账号默认权限是1级库
try
:
goods_move3
(
token
)
goods_move3
(
token
)
#
edit_goods_property
()
# 获取低值的hosGoodsId
hosGoodsId
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
get_GoodsPkgDef
(
hosGoodsId
,
token
)
# 获取单元包id
...
...
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
fe04e4d9
...
...
@@ -827,7 +827,60 @@ def check_accept_order(type=1):
titlename
=
(
'CHECK_NO1'
,
'CHECK_NO2'
)
FileUtils
().
w_info8
(
info
,
'b5_spd3_core_business_flow'
,
'验收单号'
,
titlename
,
'message15'
)
def
edit_goods_property
():
# 2024年11月19日,检测试剂产品增加了是否单瓶管理功能,默认为否,需要修改脚本
# 在科室产品分配中查询检测试剂
#修改试剂的属性值,单瓶管理为"是",直配
module
=
"b2_herp3_bs"
# # 登录获取用户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
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message3'
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
""
)
currentDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
targetDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_page_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
,
"payload58_13_2"
,
GoodsId
,
currentDeptId
,
get_hosid
())
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'科室产品列表查询'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
for
i
in
data1
:
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
i
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
i
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
i
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
i
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
i
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_basic_mcmsDeptGoodsInfo_url"
)
url
=
url
+
id1
result
=
commonFuc
().
http_get
(
url
,
headers
)
print
(
'获取产品详情信息'
,
result
)
data2
=
commonFuc
().
analysis_json
(
'data'
,
result
)
packetQty
=
commonFuc
().
analysis_json
(
'packetQty'
,
data2
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_updateById"
)
if
purMode
==
60
:
# 低值和试剂
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload58_10_4"
,
id1
,
pkgDefId
,
targetDeptId
,
shelfCode
,
packetQty
,
tbStatus
)
print
(
'编辑试剂产品属性request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'编辑试剂产品属性result'
,
result
)
def
main
():
try
:
# add_dept2() # 新增一个二级科室
...
...
@@ -839,6 +892,7 @@ def main():
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
# 从下面开始,上面的暂时注释
goods_move2
()
# 设置产品出库渠道为直送
edit_goods_property
()
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
for
i
in
range
(
6
):
# # 低值
...
...
air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air/a_b7流程十四退库业务_消耗退库.py
View file @
fe04e4d9
...
...
@@ -583,6 +583,60 @@ def second_dept_consume_in_Stock(type=1):
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
edit_goods_property
():
# 2024年11月19日,检测试剂产品增加了是否单瓶管理功能,默认为否,需要修改脚本
# 在科室产品分配中查询检测试剂
#修改试剂的属性值,单瓶管理为"是"
module
=
"b2_herp3_bs"
# # 登录获取用户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
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"产品审核信息"
,
'message3'
)
hosGoodsId
=
info
[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
""
)
currentDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
targetDeptId
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_page_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
,
"payload58_13_2"
,
GoodsId
,
currentDeptId
,
get_hosid
())
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'科室产品列表查询'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
for
i
in
data1
:
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
i
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
i
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
i
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
i
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
i
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_basic_mcmsDeptGoodsInfo_url"
)
url
=
url
+
id1
result
=
commonFuc
().
http_get
(
url
,
headers
)
print
(
'获取产品详情信息'
,
result
)
data2
=
commonFuc
().
analysis_json
(
'data'
,
result
)
packetQty
=
commonFuc
().
analysis_json
(
'packetQty'
,
data2
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsDeptGoodsInfo_updateById"
)
if
purMode
==
60
:
# 低值和试剂
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload58_10_3"
,
id1
,
pkgDefId
,
targetDeptId
,
shelfCode
,
packetQty
,
tbStatus
)
print
(
'编辑试剂产品属性request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'编辑试剂产品属性result'
,
result
)
def
main
():
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
# 设置登录账号默认权限是二级库
...
...
data/b2_herp3_bs/data
View file @
fe04e4d9
...
...
@@ -399,9 +399,10 @@ json_headers2: {
"payload58_8": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":0}
"payload58_9": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":1}
"payload58_10": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"f8ad68aae4a5406ab04316e46bbf38bd","stockLower":100,"stockUpper":1000000,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-02-01","codingType":0,"grantWay":2,"packetQty":66,"tbStatus":1}
"payload58_10_1": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":"%s","tbStatus":"%s","autoUnpack":
null
}
"payload58_10_2": {"consumeMode":null,"id":"%s","pkgDefId":null,"stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":null,"tbStatus":"%s","autoUnpack":
null
}
"payload58_10_1": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":"%s","tbStatus":"%s","autoUnpack":
0,"limitFlag":0,"buyRound":0,"buyAllow":1,"bottleMgrFlag":1
}
"payload58_10_2": {"consumeMode":null,"id":"%s","pkgDefId":null,"stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":null,"tbStatus":"%s","autoUnpack":
0,"limitFlag":0,"buyRound":0,"buyAllow":1,"bottleMgrFlag":1
}
"payload58_10_3": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":"%s","tbStatus":"%s","autoUnpack":0,"limitFlag":0,"buyRound":0,"buyAllow":1,"bottleMgrFlag":1}
"payload58_10_4": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":3,"packetQty":"%s","tbStatus":"%s","autoUnpack":0,"limitFlag":0,"buyRound":0,"buyAllow":1,"bottleMgrFlag":1}
"payload58_11": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"aaf8ad68aae4a5406ab04316e46bbf38bd","stockLower":100,"stockUpper":1000000,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-02-01","codingType":0,"grantWay":2,"packetQty":66,"tbStatus":1}
...
...
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