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
40fa4c5f
Commit
40fa4c5f
authored
Aug 05, 2024
by
xiao-hesheng
Browse files
优化调整脚本
parent
2f3c5f35
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air/a_b7流程十四退库业务_消耗退库.py
View file @
40fa4c5f
...
@@ -281,10 +281,10 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
...
@@ -281,10 +281,10 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
print
(
'request_body'
,
request_body
)
print
(
'request_body'
,
request_body
)
# # # # 发送请求
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'
低值耗材消耗出库
result'
,
result
)
elif
type
==
3
:
elif
type
==
3
:
print
(
'检验试剂消耗出库'
)
print
(
'检验试剂消耗出库'
)
udi_code
=
get_udi2
(
4
)
# 试剂单瓶条码
udi_code
=
get_udi2
(
4
,
token
)
# 试剂单瓶条码
# 从message18文件中获取信息
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
data1
=
info
[
'list_a'
]
data1
=
info
[
'list_a'
]
...
@@ -370,7 +370,7 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
...
@@ -370,7 +370,7 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# import pdb
# import pdb
# pdb.set_trace()
# pdb.set_trace()
print
(
'result'
,
result
)
print
(
'
检验试剂消耗出库
result'
,
result
)
def
sCan_grant
(
type
=
1
):
# 获取条码and扫码发放高值不能发放
def
sCan_grant
(
type
=
1
):
# 获取条码and扫码发放高值不能发放
...
...
air_case/b5_spd3_core_business_flow/a_b9流程十六退库业务_二级库向一级库退库.air/a_b9流程十六退库业务_二级库向一级库退库.py
View file @
40fa4c5f
...
@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
if
type
==
2
:
if
type
==
2
:
udi_code
=
get_udi2
(
2
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
2
,
token
)
# 获取条码 低值1 高值2 试剂3
# 高值退库出库
# 高值退库出库
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
...
@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print
(
'result'
,
result
)
print
(
'result'
,
result
)
elif
type
==
1
:
elif
type
==
1
:
print
(
'低值耗材或者试剂退库出库'
)
print
(
'低值耗材或者试剂退库出库'
)
udi_code
=
get_udi2
(
1
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
1
,
token
)
# 获取条码 低值1 高值2 试剂3
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_stock_pick_scan_url"
)
"herpService_stock_pick_scan_url"
)
# 从message18文件中获取信息
# 从message18文件中获取信息
...
@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print
(
'低值产品退库出库,result'
,
result
)
print
(
'低值产品退库出库,result'
,
result
)
elif
type
==
3
:
elif
type
==
3
:
print
(
'试剂产品退库出库'
)
print
(
'试剂产品退库出库'
)
udi_code
=
get_udi2
(
3
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
3
,
token
)
# 获取条码 低值1 高值2 试剂3
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_stock_pick_scan_url"
)
"herpService_stock_pick_scan_url"
)
# 从message18文件中获取信息
# 从message18文件中获取信息
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b9流程十六退库业务_二级库向一级库退库_数据库验证.air/a_b9流程十六退库业务_二级库向一级库退库_数据库验证.py
View file @
40fa4c5f
...
@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
if
type
==
2
:
if
type
==
2
:
udi_code
=
get_udi2
(
2
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
2
,
token
)
# 获取条码 低值1 高值2 试剂3
# 高值退库出库
# 高值退库出库
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
...
@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print
(
'result'
,
result
)
print
(
'result'
,
result
)
elif
type
==
1
:
elif
type
==
1
:
print
(
'低值耗材或者试剂退库出库'
)
print
(
'低值耗材或者试剂退库出库'
)
udi_code
=
get_udi2
(
1
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
1
,
token
)
# 获取条码 低值1 高值2 试剂3
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_stock_pick_scan_url"
)
"herpService_stock_pick_scan_url"
)
# 从message18文件中获取信息
# 从message18文件中获取信息
...
@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
...
@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print
(
'低值产品退库出库,result'
,
result
)
print
(
'低值产品退库出库,result'
,
result
)
elif
type
==
3
:
elif
type
==
3
:
print
(
'试剂产品退库出库'
)
print
(
'试剂产品退库出库'
)
udi_code
=
get_udi2
(
3
)
# 获取条码 低值1 高值2 试剂3
udi_code
=
get_udi2
(
3
,
token
)
# 获取条码 低值1 高值2 试剂3
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_stock_pick_scan_url"
)
"herpService_stock_pick_scan_url"
)
# 从message18文件中获取信息
# 从message18文件中获取信息
...
...
air_case/public1/public1/public1.py
View file @
40fa4c5f
...
@@ -890,28 +890,29 @@ def get_udi3(type=1): # 三级科室库存明细查询获取条码
...
@@ -890,28 +890,29 @@ def get_udi3(type=1): # 三级科室库存明细查询获取条码
# # 请求体
# # 请求体
request_body
=
'request_body'
request_body
=
'request_body'
deptName3
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid3"
]
deptName3
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid3"
]
stockId3
=
get_stockId
(
deptName3
+
'库房'
,
3
)
stockId3
=
get_stockId
_fromdb
(
deptName3
+
'库房'
)
deptid3
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
]
deptid3
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
]
areaCode
=
get_stockAreaId_new_fromDb
(
deptName3
,
2
)
if
type
==
1
:
if
type
==
1
:
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
]
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2"
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2"
,
areaCode
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
elif
type
==
2
:
elif
type
==
2
:
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
]
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2_1"
,
GoodsId
,
get_branch_id
(),
deptid3
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2_1"
,
areaCode
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
stockId3
)
elif
type
==
3
:
elif
type
==
3
:
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
]
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2_2"
,
GoodsId
,
get_branch_id
(),
deptid3
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_2_2"
,
areaCode
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
stockId3
)
elif
type
==
4
:
# 试剂单瓶条码
elif
type
==
4
:
# 试剂单瓶条码
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
]
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_3"
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload17_3"
,
areaCode
,
GoodsId
,
get_branch_id
(),
deptid3
,
stockId3
)
print
(
'getudi_request_body'
,
request_body
)
print
(
'getudi_request_body'
,
request_body
)
# # # # 发送请求
# # # # 发送请求
...
@@ -2995,8 +2996,8 @@ def pickScan4(udi_code): # 二级库扫码 只扫码不发放
...
@@ -2995,8 +2996,8 @@ def pickScan4(udi_code): # 二级库扫码 只扫码不发放
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
deptName
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
deptName
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
stockId
=
get_stockId
(
deptName
+
'库房'
,
2
)
deptName2
=
deptName
+
'库房'
deptName2
=
deptName
+
'库房'
stockId
=
get_stockId_fromdb
(
deptName2
)
areaCode
=
get_stockAreaId_new_fromDb
(
deptName
,
2
)
areaCode
=
get_stockAreaId_new_fromDb
(
deptName
,
2
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload60"
,
udi_code
,
stockId
,
deptName2
,
areaCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload60"
,
udi_code
,
stockId
,
deptName2
,
areaCode
)
print
(
'获取条码信息request_body'
,
request_body
)
print
(
'获取条码信息request_body'
,
request_body
)
...
...
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