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
91ce5ae0
Commit
91ce5ae0
authored
Sep 11, 2024
by
xiao-hesheng
Browse files
流程八脚本提交
parent
5937d374
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b1流程八_高值跟台业务流程_数据库验证.air/a_b1流程八_高值跟台业务流程_数据库验证.py
View file @
91ce5ae0
...
@@ -462,7 +462,7 @@ def check_hdi_distr(type=25):
...
@@ -462,7 +462,7 @@ def check_hdi_distr(type=25):
ext_info
=
get_ext_info
(
branch_id
,
type
)
ext_info
=
get_ext_info
(
branch_id
,
type
)
confirmTime
=
reGetString
(
ext_info
,
r
'"confirmTime":"'
,
r
'""confirmUser'
)
confirmTime
=
reGetString
(
ext_info
,
r
'"confirmTime":"'
,
r
'""confirmUser'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'hdi_distr1'
,
distr_main_key
,
distr_order_no
,
hos_id
,
get_hosname
(),
'hdi_distr
_091
1'
,
distr_main_key
,
distr_order_no
,
hos_id
,
get_hosname
(),
get_branch_id
(),
source_id
,
pur_bill_id
,
prov_id
,
prov_name
,
get_branch_id
(),
source_id
,
pur_bill_id
,
prov_id
,
prov_name
,
exe_prov_id
,
exe_prov_name
,
pur_dept_id
,
pur_dept_name
,
rec_org_id
,
exe_prov_id
,
exe_prov_name
,
pur_dept_id
,
pur_dept_name
,
rec_org_id
,
rec_org_name
,
rec_user
,
buyBillId
,
planBillId
,
planOrderNo
,
buyOrderNo
,
rec_org_name
,
rec_user
,
buyBillId
,
planBillId
,
planOrderNo
,
buyOrderNo
,
...
@@ -493,6 +493,7 @@ def check_hdi_distr(type=25):
...
@@ -493,6 +493,7 @@ def check_hdi_distr(type=25):
def
check_hdi_distr_detail
(
distr_main_key
,
type
,
purchase_id
):
def
check_hdi_distr_detail
(
distr_main_key
,
type
,
purchase_id
):
branch_id
=
get_branch_id
()
sql
=
"select * from hdi_distr_detail where pid = '%s';"
%
distr_main_key
sql
=
"select * from hdi_distr_detail where pid = '%s';"
%
distr_main_key
# 获取实际值
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql
)
actual
=
check_mcms_pur_plan_sql
(
sql
)
...
@@ -501,16 +502,11 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
...
@@ -501,16 +502,11 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
distr_detail_main_key
=
get_id
(
distr_detail_main_key
=
get_id
(
"select id from hdi_distr_detail where pid = '%s';"
%
(
"select id from hdi_distr_detail where pid = '%s';"
%
(
distr_main_key
))
distr_main_key
))
source_id
=
purchase_id
source_id
=
get_id
(
"select id from mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;"
%
(
source_detail_id
=
get_id
(
"select id from mcms_purchase_detail where pid='%s'"
%
purchase_id
)
branch_id
))
source_detail_id
=
get_id
(
"select id from mcms_operation_notice_list order by create_time desc LIMIT 1;"
)
pur_detail_id
=
source_detail_id
pur_detail_id
=
source_detail_id
if
type
==
16
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
25
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
goods_name
=
get_goods_name
(
hos_goods_id
)
goods_name
=
get_goods_name
(
hos_goods_id
)
...
@@ -531,16 +527,7 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
...
@@ -531,16 +527,7 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
get_id
(
get_id
(
"select pid from spd3_herp_test2.mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;"
%
(
"select pid from spd3_herp_test2.mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;"
%
(
hos_goods_id
)))
hos_goods_id
)))
sql
=
"select id from spd3_herp_test2.mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
get_branch_id
(),
type
)
print
(
sql
)
buyBillId
=
process_tuple
(
get_dept_buy_id
(
sql
))
buyDetailId
=
get_id
(
"select id from mcms_dept_buy_detail where pid='%s';"
%
buyBillId
)
# planBillId = process_tuple(
# get_id(
# "select pid from spd3_herp_test2.mcms_pur_plan_detail where hos_goods_id='%s' order by create_time desc LIMIT 1;" % (
# hos_goods_id)))
planDetailId
=
get_id
(
planDetailId
=
get_id
(
"select id from spd3_herp_test2.mcms_pur_plan_detail where pid='%s';"
%
planBillId
)
"select id from spd3_herp_test2.mcms_pur_plan_detail where pid='%s';"
%
planBillId
)
purDetailId
=
pur_detail_id
purDetailId
=
pur_detail_id
...
@@ -560,38 +547,19 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
...
@@ -560,38 +547,19 @@ def check_hdi_distr_detail(distr_main_key, type, purchase_id):
"select last_modified from hdi_distr_detail where id = '%s';"
%
(
"select last_modified from hdi_distr_detail where id = '%s';"
%
(
distr_detail_main_key
))
distr_detail_main_key
))
last_modified_user
=
create_user
last_modified_user
=
create_user
if
type
==
16
:
operationNoticeBillId
=
source_id
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
operationNoticeBillDetailId
=
source_detail_id
'hdi_distr_detail'
,
distr_detail_main_key
,
distr_main_key
,
source_id
,
operationApplyBillDetailId
=
source_detail_id
source_detail_id
,
pur_detail_id
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
goods_name
,
goods_gg
,
'hdi_distr_detail_0911'
,
distr_detail_main_key
,
distr_main_key
,
source_id
,
mfrs_id
,
expdt_date
,
product_date
,
pkg_def_id
,
supply_id
,
sub_prov_id
,
sub_prov_name
,
planBillId
,
buyDetailId
,
planDetailId
,
purDetailId
,
purBillId
,
distrDetailId
,
distrBillId
,
goods_gg
,
goods_code
,
goods_name
,
erpCode
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
20
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'hdi_distr_detail2'
,
distr_detail_main_key
,
distr_main_key
,
source_id
,
source_detail_id
,
pur_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
goods_name
,
goods_gg
,
mfrs_id
,
expdt_date
,
product_date
,
pkg_def_id
,
supply_id
,
sub_prov_id
,
sub_prov_name
,
planBillId
,
buyDetailId
,
planDetailId
,
purDetailId
,
purBillId
,
distrDetailId
,
distrBillId
,
goods_gg
,
goods_code
,
goods_name
,
erpCode
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
66
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'hdi_distr_detail3'
,
distr_detail_main_key
,
distr_main_key
,
source_id
,
source_detail_id
,
pur_detail_id
source_detail_id
,
pur_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
goods_name
,
goods_gg
,
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
goods_name
,
goods_gg
,
mfrs_id
,
expdt_date
,
product_date
mfrs_id
,
expdt_date
,
product_date
,
pkg_def_id
,
supply_id
,
sub_prov_id
,
sub_prov_name
,
plan
BillId
,
,
pkg_def_id
,
supply_id
,
sub_prov_id
,
sub_prov_name
,
operationNotice
BillId
,
buy
DetailId
,
planDeta
ilId
,
purDetailId
,
purBillId
,
distr
DetailId
,
distr
DetailId
,
distrB
il
l
Id
,
operationNoticeBillDetailId
,
operationApplyBill
DetailId
,
distrBillId
,
goods_gg
,
goods_code
,
goods_name
,
erpCode
,
create_user
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
create_time
,
last_modified
,
last_modified_user
)
else
:
expected
=
None
# comparison_result(actual, expected)
# comparison_result(actual, expected)
actual_value1
=
get_process_list2
(
actual
)
actual_value1
=
get_process_list2
(
actual
)
...
@@ -634,9 +602,11 @@ try:
...
@@ -634,9 +602,11 @@ try:
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是中心库
# time.sleep(6)
# time.sleep(6)
# check_mcms_operation_notice()# 手术通知单数据库检查
# check_mcms_operation_notice()# 手术通知单数据库检查
# time.sleep(6)
# orderno = Search_OrderNO() # 手术通知单接口查询单号
# orderno = Search_OrderNO() # 手术通知单接口查询单号
# height_value_order_dp(orderno) # 高值跟台外网配送
# height_value_order_dp(orderno) # 高值跟台外网配送
check_hdi_distr
()
# time.sleep(6)
check_hdi_distr
()
#外网配送单数据库检查
check_accept_order
()
# 内网验收
check_accept_order
()
# 内网验收
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
second_dept_in_warehouse
()
# 二级科室入库
second_dept_in_warehouse
()
# 二级科室入库
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
91ce5ae0
...
@@ -307,4 +307,10 @@
...
@@ -307,4 +307,10 @@
"check_mcms_operation_notice": '{"id": "%s", "order_no": "%s", "source_bill_id": "%s", "source_order_no": "%s", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "branch_name": "%s", "is_operation_pkg": 0, "operation_apply_mode": 0, "rec_dept_id": "%s", "rec_dept_name": "%s", "oper_name": "血管扩张术", "oper_date": %s, "oper_doctor": "李四", "prov_id": "%s", "prov_name": "%s", "rec_address_id": "%s", "rec_address": "默认库区", "stock_address": None, "patient_in_hos_id": "123456", "patient_id": None, "patient_name": "张三", "sex": 1, "age": 44, "bed_num": "2", "opration_house": "设备科一手术间", "sur_dept_name": "", "sur_dept_id": None, "status": 10, "up_status": 0, "remark": "自动化测试", "version": 0, "bill_mode": "25", "delivery_type": 1, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}'
"check_mcms_operation_notice": '{"id": "%s", "order_no": "%s", "source_bill_id": "%s", "source_order_no": "%s", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "branch_name": "%s", "is_operation_pkg": 0, "operation_apply_mode": 0, "rec_dept_id": "%s", "rec_dept_name": "%s", "oper_name": "血管扩张术", "oper_date": %s, "oper_doctor": "李四", "prov_id": "%s", "prov_name": "%s", "rec_address_id": "%s", "rec_address": "默认库区", "stock_address": None, "patient_in_hos_id": "123456", "patient_id": None, "patient_name": "张三", "sex": 1, "age": 44, "bed_num": "2", "opration_house": "设备科一手术间", "sur_dept_name": "", "sur_dept_id": None, "status": 10, "up_status": 0, "remark": "自动化测试", "version": 0, "bill_mode": "25", "delivery_type": 1, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}'
#手术通知单主表子表
#手术通知单主表子表
"check_mcms_operation_notice_list": '{"id": "%s", "pid": "%s", "source_bill_detail_id": "%s", "pkg_code": "%s", "operation_pkg_code": None, "operation_pkg_id": None, "hos_goods_id": "%s", "goods_num": 1, "distr_qty": Decimal("0.00"), "check_qty": Decimal("0.00"), "not_send_qty": Decimal("0.00"), "up_qty": Decimal("0.00"), "price": Decimal("99.999900"), "in_settlement": 3, "sub_prov_id": "%s", "sub_prov_name": "%s", "ext_info": "{"goodsCode":"%s","goodsName":"%s","goodsSpec":"G-31891","goodsMfrsName":"德国歌德公司 Geuder AG","unit":"支"}", "status": 10, "version": 0, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}'
"check_mcms_operation_notice_list": '{"id": "%s", "pid": "%s", "source_bill_detail_id": "%s", "pkg_code": "%s", "operation_pkg_code": None, "operation_pkg_id": None, "hos_goods_id": "%s", "goods_num": 1, "distr_qty": Decimal("0.00"), "check_qty": Decimal("0.00"), "not_send_qty": Decimal("0.00"), "up_qty": Decimal("0.00"), "price": Decimal("99.999900"), "in_settlement": 3, "sub_prov_id": "%s", "sub_prov_name": "%s", "ext_info": "{"goodsCode":"%s","goodsName":"%s","goodsSpec":"G-31891","goodsMfrsName":"德国歌德公司 Geuder AG","unit":"支"}", "status": 10, "version": 0, "create_user": "%s", "create_user_name": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s"}'
\ No newline at end of file
#高值跟台配送单子表
"hdi_distr_detail_0911": '{"id": "%s", "pid": "%s", "source_id": "%s", "source_detail_id": "%s", "pur_detail_id": "%s", "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "goods_name": "%s", "goods_gg": "%s", "pur_mode": "20", "mfrs_id": "%s", "mfrs_name": "德国歌德公司 Geuder AG", "made": "德国", "unit": "支", "pur_price": Decimal("99.999900"), "batch_code": "2222", "expdt_date": %s, "product_date": %s, "pkg_def_id": %s, "pkg_def_name": null, "pkg_def_qty": Decimal("1.00"), "supply_id": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "sub_price": Decimal("99.9999"), "distr_price": Decimal("99.9999"), "distr_pkg_qty": Decimal("1.00"), "distr_qty": Decimal("1.00"), "settlement": 3, "certificate_code": null, "product_cert_code": None, "detail_relation_json": "{"operationNoticeBillId":"%s","distrDetailId":"%s","distrBillId":"%s","transCond":"","erpCode":"","storageCond":"","operationNoticeBillDetailId":"%s","operationApplyBillDetailId":"%s","ygptCode":""}","ext_info": "{"ygptCode":"","transCond":"","storageCond":"","erpCode":""}", "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0}'
#高值跟台配送单主表
"hdi_distr_0911": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "HDI", "hos_id": "%s", "hos_name": "%s", "branch_id": "%s", "source_id": "%s", "source_type": "CGD", "pur_bill_id": "%s", "prov_id": "%s", "prov_name": "%s", "sub_send_flag": 10, "exe_prov_id": "%s", "exe_prov_name": "%s", "settlement": None, "pur_dept_id": "%s", "pur_dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "rec_user": "%s", "rec_phone": "None", "rec_addr": "自动化测试", "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s"}", "ext_info": "{"purMode":20,"confirmTime":"%s","confirmUser":"%s","epidemicFlag":0,"distrUser":"%s"}", "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}'
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