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
9ca2d530
Commit
9ca2d530
authored
Apr 30, 2025
by
liguangyu06
Browse files
生成采购单
parent
5476afca
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b2_herp3_bs/审批.air/审批.py
0 → 100644
View file @
9ca2d530
# -*- encoding=utf8 -*-
import
random
import
sys
from
airtest.core.helper
import
using
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_del_kind_goodsinfo
import
delKindGoodsinfo
from
common.db.sql.sql_del_notices_info
import
delByNoticeName
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
import
threading
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,r_e2用户管理_角色管理_角色列表展示,id20250430,id20250412-id20250430,sit,on
内网:生成采购单
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
import
requests
import
uuid
import
json
module
=
"b2_herp3_bs"
def
l_task
():
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username411"
)
## print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password411"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers_pur"
,
token
)
# 获取审批列表
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"wait_url"
)
# print(url)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload_wait"
)
"""
场景: 审批
"""
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
# 获取接口响应时间
result
=
json
.
loads
(
result
.
content
)
# 获取待审批任务信息
for
i
in
result
[
"data"
][
"data"
]:
# 获取待审批任务id
task_id
=
i
[
"taskId"
]
# 审批
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"approval_url"
)
# print(url)
request_body
=
{
"dtos"
:
[
{
"remark"
:
""
,
"taskId"
:
task_id
}
],
"opinion"
:
1
}
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
# 获取接口响应时间
result
=
json
.
loads
(
result
.
content
)
print
(
result
)
l_task
()
data/b2_herp3_bs/data
View file @
9ca2d530
...
...
@@ -120,6 +120,8 @@
"pur_submit_url": "/api/herpService/mcmsManualStock/submit"
"pur_insert_url": "/api/herpService/purPlan/insert"
"pur_sub_url": "/api/herpService/purPlan/submitPurPlan"
"wait_url": "/api/herpService/apprCenterExtra/waitPage"
"approval_url": "/api/herpService/apprCenter/approvalBatch"
data1: '条码,high_info,check_detail,高值打码,out_stock,goods_change_baseInfo,center_out_stock_pkg,mcms_centre_out_stock,pkg_info,mcms_dept_out_stock,barcode_common,mcms_centre_in_stock,goods_change_price,mcms_dept_in_stock,check_detail_pkg,center_out_stock_high,center_out_stock_high,high_consume,shelf_code,barcode_common_pkg,check_detail_high,balance_bill,barcode_rfid,bottle_info,验收单明细打印,产品信息变更,中心库出库单低值,医院中心库出库单,包信息,医院科室出库单,高值纸质条码打印,医院中心库入库单,产品调价,医院科室入库单,低值验收单,中心库出库单高值,高值耗材使用登记表,货位码,单元包纸质条码打印,高值验收单,结算单打印,高值RFID条码打印,单瓶码打印'
...
...
@@ -211,14 +213,14 @@ json_headers_pur: {
"branchId": "h0347-2013",
"mgrCorpName": "测试医院",
"deptName": "",
"deptId": "
177b66929d40480d910ed7a3177dbd6f
",
"recOrgId": "
177b66929d40480d910ed7a3177dbd6f
",
"deptId": "
391d5e06d0ba4cb39a3a7ee2e7934ae7
",
"recOrgId": "
391d5e06d0ba4cb39a3a7ee2e7934ae7
",
"recOrgName": "",
"areaCode": "area03
8
9",
"areaName": "
输血科
库区
0
1",
"areaCode": "area03
7
9",
"areaName": "
千泉院区中心库
库区1",
"recUser": "UID-048770",
"recPhone": "18271691751",
"recAddr": "
输血科
库区
0
1",
"recAddr": "
千泉中心库房
库区1",
"remark": "",
"sourceType": "",
"createType": "SG",
...
...
@@ -226,12 +228,26 @@ json_headers_pur: {
}
"payload_wait": {
"pageNum": 1,
"pageSize": 100000,
"queryObject": {
"createOrderTime": [
"2025-05-01",
"2025-05-06"
],
"createOrderTimeStart": "2025-05-01",
"createOrderTimeEnd": "2025-05-06"
}
}
"payload_sub": {
"id": "%s",
"planDetailList": [
{
"closeStatus": 0,
"id": "
38d9c045a467462a8dfc8578b3774d02
",
"id": "
442bec2aa9b14fc4967ed349210b0b9d
",
"inSettlement": 1,
"planPkgQty": 1,
"pkgDefQty": 1,
...
...
@@ -251,7 +267,7 @@ json_headers_pur: {
},
{
"closeStatus": 0,
"id": "b
eebcd3870434348b3cbb16010913e10
",
"id": "b
9aa65ac6329495a8fdf921f11d85ed8
",
"inSettlement": 1,
"planPkgQty": 1,
"pkgDefQty": 1,
...
...
@@ -271,7 +287,7 @@ json_headers_pur: {
},
{
"closeStatus": 0,
"id": "
ed3cca45887842898bb2d2ae94193748
",
"id": "
1c5cf826bd0e4897b62d3356b21a4277
",
"inSettlement": 1,
"planPkgQty": 1,
"pkgDefQty": 1,
...
...
@@ -291,7 +307,7 @@ json_headers_pur: {
},
{
"closeStatus": 0,
"id": "
39d011d5a7344e50a105305a8525995e
",
"id": "
c5b8ad22e86243babc300361ef180d13
",
"inSettlement": 1,
"planPkgQty": 1,
"pkgDefQty": 1,
...
...
@@ -311,7 +327,7 @@ json_headers_pur: {
},
{
"closeStatus": 0,
"id": "
d0afd0610ebc4fa08e62753dd685c94e
",
"id": "
fe056e594eae4cea814c3483267e695b
",
"inSettlement": 1,
"planPkgQty": 1,
"pkgDefQty": 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