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
dc2ca8db
Commit
dc2ca8db
authored
Jul 25, 2024
by
xiao-hesheng
Browse files
数据库验证流程十二脚本编写
parent
9046eea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air/a_b5流程十二请领业务流_二级库向二级库_数据库验证.py
View file @
dc2ca8db
...
@@ -637,7 +637,7 @@ def check_mcms_pick(type=16):
...
@@ -637,7 +637,7 @@ def check_mcms_pick(type=16):
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
):
def
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id1
):
branch_id
=
get_branch_id
()
branch_id
=
get_branch_id
()
sql
=
" select * from mcms_psi_dept_batch where pid='%s';"
%
(
sql
=
" select * from mcms_psi_dept_batch where pid='%s';"
%
(
DR_ID
)
DR_ID
)
...
@@ -646,7 +646,7 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no):
...
@@ -646,7 +646,7 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no):
batch_main_key
=
get_id
(
"select id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
batch_main_key
=
get_id
(
"select id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
pid
=
DR_ID
pid
=
DR_ID
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
source_detail_id
=
batch_main_key
source_detail_id
=
source_id1
+
'0001'
pick_detail_id
=
None
pick_detail_id
=
None
if
type
==
16
:
if
type
==
16
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
...
@@ -777,7 +777,7 @@ def check_mcms_psi_dept_in(type=16):
...
@@ -777,7 +777,7 @@ def check_mcms_psi_dept_in(type=16):
psiDeptInOrderNo
=
order_no
psiDeptInOrderNo
=
order_no
if
type
==
16
:
if
type
==
16
:
# 子表检查
# 子表检查
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
)
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_in_1'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
'mcms_psi_dept_in_1'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
target_dept_id
,
target_dept_name
,
target_stock_id
...
@@ -790,7 +790,7 @@ def check_mcms_psi_dept_in(type=16):
...
@@ -790,7 +790,7 @@ def check_mcms_psi_dept_in(type=16):
)
)
elif
type
==
20
:
elif
type
==
20
:
# 子表检查
# 子表检查
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
)
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_in_2'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
'mcms_psi_dept_in_2'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
target_dept_id
,
target_dept_name
,
target_stock_id
...
@@ -803,7 +803,7 @@ def check_mcms_psi_dept_in(type=16):
...
@@ -803,7 +803,7 @@ def check_mcms_psi_dept_in(type=16):
)
)
else
:
else
:
# 子表检查
# 子表检查
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
)
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_in_3'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
'mcms_psi_dept_in_3'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
target_dept_id
,
target_dept_name
,
target_stock_id
...
@@ -909,7 +909,7 @@ try:
...
@@ -909,7 +909,7 @@ try:
# second_dept_one_key_in(5)
# second_dept_one_key_in(5)
# # 上面暂时注释========================
# # 上面暂时注释========================
#检查入库单
#检查入库单
check_mcms_psi_dept_in
(
16
)
#
check_mcms_psi_dept_in(16)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
dc2ca8db
...
@@ -100,6 +100,6 @@
...
@@ -100,6 +100,6 @@
"mcms_psi_dept_in_3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "107", "stock_kind": "RK_SL", "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": None, "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": "默认库区", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
"mcms_psi_dept_in_3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "107", "stock_kind": "RK_SL", "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": None, "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": "默认库区", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"buyBillId":"%s","pickOrderNo":"%s","buyOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
#入库单子表
#入库单子表
"mcms_psi_dept_batch_in1": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id":
"
%s
"
, "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in1": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id":
"
%s
"
, "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id":
"
%s
"
, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
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