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
c53f42eb
Commit
c53f42eb
authored
Jul 10, 2024
by
xiao-hesheng
Browse files
新增流程十数据库验证脚本
parent
920ca4f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air/a_b3流程十请领业务流_二级库向边仓_数据库验证.py
View file @
c53f42eb
...
...
@@ -97,7 +97,26 @@ def check_mcms_dept_buy_car(type=1):
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
mcms_dept_buy_detail
(
type
=
16
):
branch_id
=
get_branch_id
()
if
type
==
16
:
# 获取主表主键
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
id1
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 获取order_no
sql1
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
order_no1
=
get_dept_buy_id
(
sql1
)
order_no1
=
process_tuple
(
order_no1
)
#子表sql
sql1
=
"select * from mcms_dept_buy_detail where pid='%s';"
%
id1
#从数据库中获取实际值
actual
=
check_mcms_dept_buy_sql
(
sql1
)
print
(
'actual'
,
actual
)
#获取子表id
detail_id
=
get_id
(
"select id from mcms_dept_buy_detail where pid='%s';"
%
id1
)
print
(
'detail_id'
,
detail_id
)
def
check_mcms_dept_buy
(
type
=
16
):
branch_id
=
get_branch_id
()
sql
=
"""select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;
...
...
@@ -186,6 +205,10 @@ def check_mcms_dept_buy(type=16):
try
:
list_data
=
[
'16'
,
'20'
,
'66'
]
for
i
in
list_data
:
check_mcms_dept_buy
(
int
(
i
))
mcms_dept_buy_detail
(
int
(
i
))
set_dept_lead
()
# 设置二级科室负责人
# 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
pro_path
=
commonFuc
().
get_pro_path2
()
...
...
@@ -218,6 +241,7 @@ try:
list_data
=
[
'16'
,
'20'
,
'66'
]
for
i
in
list_data
:
check_mcms_dept_buy
(
int
(
i
))
mcms_dept_buy_detail
(
int
(
i
))
# for i in range(6): # 三个单据共审批6次
# approval_center()
# check_buyWayText()#验证出库渠道是否为边仓
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
c53f42eb
...
...
@@ -3,4 +3,5 @@
"mcms_dept_buy": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "2", "create_type": "SG", "buy_kind": "KS", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "2", "create_type": "SG", "buy_kind": "KS", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "2", "create_type": "SG", "buy_kind": "KS", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
\ No newline at end of file
"mcms_dept_buy3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "2", "create_type": "SG", "buy_kind": "KS", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_detail": {"id": "Bh034720240710000410001", "pid": "Bh03472024071000041", "order_no": "BUY2024071006209", "order_num": 1, "source_id": None, "hos_goods_id": "h034700004523", "mdm_goods_code": "11661476", "goods_code": "00004523", "price": Decimal("99.999900"), "pur_mode": 10, "pkg_def_id": "0ad202620eb54335b560f4a41883a342", "pkg_def_name": "100", "pkg_def_qty": Decimal("100.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("100.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 10, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "h0347_UID-051406", "create_time": datetime.datetime(2024, 7, 10, 13, 52, 8), "last_modified": datetime.datetime(2024, 7, 10, 13, 52, 8), "last_modified_user": "h0347_UID-051406", "version": 0, "del_flag": 0, "re_order_no": None, "coding_type": 0}
\ No newline at end of file
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