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
c1e3a0e4
Commit
c1e3a0e4
authored
Sep 12, 2024
by
xiao-hesheng
Browse files
流程八脚本提交
parent
b3788760
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b1流程八_高值跟台业务流程.air/a_b1流程八_高值跟台业务流程.py
View file @
c1e3a0e4
...
@@ -331,17 +331,17 @@ def out_return_gt():
...
@@ -331,17 +331,17 @@ def out_return_gt():
def
dept2_set
():
def
dept2_set
():
#设置
部门用户
#设置
库管人员路径 库房管理-库区设置-编辑库房-人员管理-添加人员
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
# 设置
部门
负责人
# 设置
科室
负责人
set_dept_lead_new
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
])
# 设置二级科室负责人
set_dept_lead_new
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
])
# 设置二级科室负责人
get_stockAreaId_new
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
get_stockAreaId_new
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
deptName2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
deptName2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
# 设置库区联系人
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
],
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
],
get_stockAreaId2_new_fromDb
(
deptName2
,
2
))
# 设置库区联系人
get_stockAreaId2_new_fromDb
(
deptName2
,
2
))
# 跟台退货出库确认========================
# 跟台退货出库确认========================
def
main
():
def
main
():
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程_数据库验证.air/a_b1流程八_高值跟台业务流程_数据库验证.py
View file @
c1e3a0e4
This diff is collapsed.
Click to expand it.
air_case/public1/public1/public1.py
View file @
c1e3a0e4
...
@@ -248,33 +248,36 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
...
@@ -248,33 +248,36 @@ def approval_center_all(OBH_ID='OBhxxxxxxxxxxxxxxx'):
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
if
total
==
0
:
for
i
in
data1
:
return
# code = commonFuc().analysis_json('code', result)
else
:
# data = commonFuc().analysis_json('data', result)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
# total = commonFuc().analysis_json('total', result)
for
i
in
data1
:
# data1 = commonFuc().analysis_json('data', i)
# code = commonFuc().analysis_json('code', result)
# data = commonFuc().analysis_json('data', result)
taskId
=
commonFuc
().
analysis_json
(
'taskId'
,
i
)
# total = commonFuc().analysis_json('total', result)
# data1 = commonFuc().analysis_json('data', i)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"approvalBatch_url"
)
taskId
=
commonFuc
().
analysis_json
(
'taskId'
,
i
)
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_7"
,
taskId
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"approvalBatch_url"
)
print
(
request_body
)
# # # 发送请求
# 请求体
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_7"
,
taskId
)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
print
(
request_body
)
# 断言
# # # 发送请求
# checkDict=commonFuc().get_business_data(module,'checkDict10')
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# commonFuc().check_result(checkDict,result)
print
(
'resultaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
# 断言
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
# checkDict=commonFuc().get_business_data(module,'checkDict10')
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
# commonFuc().check_result(checkDict,result)
if
code
>=
0
:
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
else
:
total
=
commonFuc
().
analysis_json
(
'total'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
if
code
>=
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
approval_center1
():
def
approval_center1
():
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
c1e3a0e4
...
@@ -314,3 +314,16 @@
...
@@ -314,3 +314,16 @@
#高值跟台配送单主表
#高值跟台配送单主表
"hdi_distr_0911": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": "HDI", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "source_id": "%s", "source_type": "SUR", "pur_bill_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 30, "exe_prov_id": "%s", "exe_prov_name": "%s", "settlement": 3, "pur_dept_id": "%s", "pur_dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "rec_user": null, "rec_phone": None, "rec_addr": null, "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s"}", "ext_info": "{"distrUser":"%s","operUserPhone":"ttt","operUserName":"ttt","operationPriority":0,"operationPkg":0}", "barcode_flag": 1, "pkg_flag": 0, "remark": "自动化测试", "task_id": None, "convert_flag": 1, "convert_time": None, "convert_user_name": None, "reject_status": 0, "tb_status": 20, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "initial_order": None}'
"hdi_distr_0911": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": "HDI", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "source_id": "%s", "source_type": "SUR", "pur_bill_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 30, "exe_prov_id": "%s", "exe_prov_name": "%s", "settlement": 3, "pur_dept_id": "%s", "pur_dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "rec_user": null, "rec_phone": None, "rec_addr": null, "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s"}", "ext_info": "{"distrUser":"%s","operUserPhone":"ttt","operUserName":"ttt","operationPriority":0,"operationPkg":0}", "barcode_flag": 1, "pkg_flag": 0, "remark": "自动化测试", "task_id": None, "convert_flag": 1, "convert_time": None, "convert_user_name": None, "reject_status": 0, "tb_status": 20, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "initial_order": None}'
#高值跟台验收单子表
"mcms_check_batch_0912": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "distr_detail_id": "%s", "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "barcode_id": "%s", "sub_barcode_id": None, "qty": Decimal("1.00"), "reject_qty": Decimal("0.00"), "reject_reason": None, "settlement": 3, "tb_status": 1, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
#高值跟台验收单主表
"mcms_check_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "hos_id": "%s", "branch_id": "%s", "source_id": "%s", "source_no": "%s", "source_type": "PSD", "tb_status": 20, "prov_id": "%s", "prov_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "dept_id": "%s", "dept_name": "%s", "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s","checkBillId":"%s","checkOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "initial_order": None, "remark": ""}'
#高值跟台中心库入库单子表和主表
"mcms_psi_batch_in_0912": '{"id":"%s","pid":"%s","order_no":"%s","source_detail_id":"%s","pick_detail_id":null,"pur_mode":20,"hos_goods_id":"%s","mdm_goods_code":"%s","goods_code":"%s","source_batch_id":"%s","target_batch_id":"%s","psi_price":Decimal("99.999900"),"qty":Decimal("1.00"),"unit_name":"1支","barcode_id":"%s","sub_barcode_id":null,"shelf_code":"%s-2-01-01","settle_flag":0,"tb_status":0,"pur_task_id":null,"create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1}'
"check_mcms_psi_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": null, "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}'
##高值跟台中心库出库单主表
"check_mcms_psi_out_0912": '{"id": "%s", "order_no": "%s", "bill_mode": "25", "rec_type": null, "psi_flag": -1, "psi_kind": "202", "stock_kind": "CK_QL", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "自动化测试", "remark": None, "tb_status": 20, "accounter": None, "account_date": None, "bill_relation_json":"{"operationApplyOrderNo":"%s","operationNoticeBillId":"%s","distrBillId":"%s","operationNoticeOrderNo":"%s","distrOrderNo":"%s","operationApplyBillId":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s","psiOutBillId":"%s","psiOutOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}'
main1/main_text.py
View file @
c1e3a0e4
...
@@ -229,10 +229,11 @@ def main_text():
...
@@ -229,10 +229,11 @@ def main_text():
def
flow5_flow18
():
def
flow5_flow18
():
# 脚本运行前清空所有待审批数据
# 脚本运行前清空所有待审批数据
approval_center_all
()
approval_center_all
()
approval_center_all
()
try
:
try
:
flow5
()
flow5
()
flow6
()
flow6
()
time
.
sleep
(
20
)
time
.
sleep
(
6
)
flow7
()
flow7
()
flow8
()
flow8
()
flow9
()
flow9
()
...
...
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