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
bd4f8d84
Commit
bd4f8d84
authored
Jul 16, 2024
by
xiao-hesheng
Browse files
数据库验证流程十一脚本编写
parent
e9dffc06
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air/a_b4流程十一请领业务流_二级库向直送_数据库验证.py
View file @
bd4f8d84
...
@@ -530,7 +530,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -530,7 +530,7 @@ def check_mcms_mcms_pur_plan(type=16):
planOrderNo
=
PLAN_order_no
planOrderNo
=
PLAN_order_no
if
type
==
16
:
if
type
==
16
:
# 验证子表数据
# 验证子表数据
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
source_id
,
planOrderNo
)
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
planOrderNo
)
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_pur_plan'
,
id2
,
PLAN_order_no
,
hos_id
,
'mcms_pur_plan'
,
id2
,
PLAN_order_no
,
hos_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
...
@@ -538,7 +538,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -538,7 +538,7 @@ def check_mcms_mcms_pur_plan(type=16):
rec_addr
,
bill_expdt_date
,
buyBillId
,
planBillId
,
planOrderNo
,
buyOrderNo
,
rec_addr
,
bill_expdt_date
,
buyBillId
,
planBillId
,
planOrderNo
,
buyOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
20
:
elif
type
==
20
:
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
source_id
,
planOrderNo
)
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
planOrderNo
)
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_pur_plan2'
,
id2
,
PLAN_order_no
,
hos_id
,
'mcms_pur_plan2'
,
id2
,
PLAN_order_no
,
hos_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
...
@@ -547,7 +547,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -547,7 +547,7 @@ def check_mcms_mcms_pur_plan(type=16):
buyOrderNo
,
buyOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
66
:
elif
type
==
66
:
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
source_id
,
planOrderNo
)
check_mcms_mcms_pur_plan_detail
(
id2
,
type
,
planOrderNo
)
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_pur_plan3'
,
id2
,
PLAN_order_no
,
hos_id
,
'mcms_pur_plan3'
,
id2
,
PLAN_order_no
,
hos_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
...
@@ -575,7 +575,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -575,7 +575,7 @@ def check_mcms_mcms_pur_plan(type=16):
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_mcms_pur_plan_detail
(
id
,
type
,
source_id
,
planOrderNo
):
def
check_mcms_mcms_pur_plan_detail
(
id
,
type
,
planOrderNo
):
branch_id
=
get_branch_id
()
branch_id
=
get_branch_id
()
# 根据采购计划主表的id获取采购计划单子表主键
# 根据采购计划主表的id获取采购计划单子表主键
sql
=
"select id from mcms_pur_plan_detail where pid='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select id from mcms_pur_plan_detail where pid='%s' order by create_time desc LIMIT 1;"
%
(
...
@@ -689,7 +689,7 @@ def check_mcms_mcms_pur_plan_detail(id,type,source_id,planOrderNo):
...
@@ -689,7 +689,7 @@ def check_mcms_mcms_pur_plan_detail(id,type,source_id,planOrderNo):
get_id
(
"select source_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
get_id
(
"select source_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
hos_goods_id
,
id2
)))
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_pur_plan_detail'
,
id2
,
pid
,
planOrderNo
,
source_id
,
hos_goods_id
,
'mcms_pur_plan_detail
3
'
,
id2
,
pid
,
planOrderNo
,
source_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
pkg_def_id
,
supply_id
,
prov_id
,
prov_name
,
mdm_goods_code
,
goods_code
,
pkg_def_id
,
supply_id
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
sub_prov_id
,
sub_prov_name
,
create_user
,
create_time
,
last_modified
,
last_modified_user
create_user
,
create_time
,
last_modified
,
last_modified_user
...
@@ -756,8 +756,6 @@ try:
...
@@ -756,8 +756,6 @@ try:
list_data
=
[
'16'
,
'20'
,
'66'
]
list_data
=
[
'16'
,
'20'
,
'66'
]
for
i
in
list_data
:
for
i
in
list_data
:
check_mcms_mcms_pur_plan
(
int
(
i
))
check_mcms_mcms_pur_plan
(
int
(
i
))
# 采购模块处理
# 采购模块处理
purchase_module_process
()
purchase_module_process
()
for
i
in
range
(
3
):
# 三个单据共审批3次
for
i
in
range
(
3
):
# 三个单据共审批3次
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
bd4f8d84
...
@@ -32,4 +32,5 @@
...
@@ -32,4 +32,5 @@
"mcms_pur_plan_detail": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 10, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("100.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
"mcms_pur_plan_detail": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 10, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("100.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
"mcms_pur_plan_detail2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 20, "pkg_def_id": None, "pkg_def_name": None, "pkg_def_qty": Decimal("1.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("1.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("1.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
"mcms_pur_plan_detail2": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 20, "pkg_def_id": None, "pkg_def_name": None, "pkg_def_qty": Decimal("1.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("1.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("1.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 0}'
\ No newline at end of file
"mcms_pur_plan_detail3": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "pur_mode": 60, "pkg_def_id": "%s", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "plan_pkg_qty": Decimal("1.00"), "plan_qty": Decimal("100.00"), "pkg_qty": Decimal("1.00"), "price": Decimal("99.999900"), "qty": Decimal("100.00"), "in_settlement": None, "supply_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "sub_prov_id": "%s", "sub_prov_name": "%s", "contract_id": None, "remark": None, "close_status": 0, "tb_status": 10, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "coding_type": 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