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
5a7c7438
Commit
5a7c7438
authored
Sep 24, 2024
by
xiao-hesheng
Browse files
流程五脚本提交
parent
e8395c0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_a9流程六_中心库入库结算_负结算_数据库验证.air/a_a9流程六_中心库入库结算_负结算_数据库验证.py
View file @
5a7c7438
...
@@ -721,12 +721,12 @@ def check_mcms_invoice():
...
@@ -721,12 +721,12 @@ def check_mcms_invoice():
settle_months
=
year_month
settle_months
=
year_month
invoice_date
=
get_account_date1
(
"select invoice_date from mcms_invoice where id='%s';"
%
id
)
invoice_date
=
get_account_date1
(
"select invoice_date from mcms_invoice where id='%s';"
%
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'
,
'check_mcms_invoice_09
18
'
,
id
,
'check_mcms_invoice_09
24
'
,
id
,
hos_id
,
prov_id
,
prov_name
,
invoice_date
,
settle_months
,
create_user
,
hos_id
,
prov_id
,
prov_name
,
invoice_date
,
settle_months
,
create_user
,
create_time
,
last_modified
,
last_modified_user
create_time
,
last_modified
,
last_modified_user
)
)
# 对比预期值和实际值是否一致
# 对比预期值和实际值是否一致
z
actual_value1
=
get_process_list2
(
actual
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
...
@@ -746,7 +746,7 @@ def check_mcms_invoice():
...
@@ -746,7 +746,7 @@ def check_mcms_invoice():
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 检查发票子表数据
# 检查发票子表数据
check_mcms_invoice_detail
(
1
,
id
)
check_mcms_invoice_detail
(
1
,
id
)
check_mcms_invoice_detail2
(
1
,
id
)
#
check_mcms_invoice_detail2(1, id)
def
check_mcms_invoice_detail
(
type
=
1
,
pid
=
""
):
def
check_mcms_invoice_detail
(
type
=
1
,
pid
=
""
):
...
@@ -1022,24 +1022,33 @@ sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a9流程六_
...
@@ -1022,24 +1022,33 @@ sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a9流程六_
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_a9流程六_中心库入库结算_负结算.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_a9流程六_中心库入库结算_负结算.air'
)
from
a_a9流程六_中心库入库结算_负结算
import
center_warehouse_return
from
a_a9流程六_中心库入库结算_负结算
import
center_warehouse_return
try
:
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
1
))
# 设置登录账号默认权限是1级库
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) # 设置登录账号默认权限是1级库
# test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# # test1() # 提交采购计划 # 外网配送 # 内网验收入库结算
# 先查询所有的部门信息写入文件
# # 先查询所有的部门信息写入文件
dept_query_all
()
# dept_query_all()
# 设置库房人员,根据传入的科室id和科室名称来设置库房
# # 设置库房人员,根据传入的科室id和科室名称来设置库房
# 中心库type=1 二级type=2三级type=3
# # 中心库type=1 二级type=2三级type=3
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
],
2
)
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid2'],2)
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid3'
],
3
)
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid3'],3)
# updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库
# # updateUserLoginDefaultRange(get_listUserMgrRangePage(1)) #设置登录账号默认权限是中心库
center_warehouse_return
()
#中心库退货
# center_warehouse_return()#中心库退货
# center_warehouse_return()#中心库退货
OBh_ID
=
settle
()
# 生成结算单
# # center_warehouse_return()#中心库退货
print
(
OBh_ID
)
# OBh_ID=settle() # 生成结算单
time
.
sleep
(
6
)
# print(OBh_ID)
check_mcms_out_balance
(
1
,
OBh_ID
)
# 结算审批前的结算数据
# time.sleep(6)
# 调用审批结算单
# check_mcms_out_balance(1, OBh_ID) # 结算审批前的结算数据
approval_center
(
OBh_ID
)
# # 调用审批结算单
invoice
(
2
,
OBh_ID
)
#type=2 传递结算单号,外网查询开票
# approval_center(OBh_ID)
# time.sleep(6)
# check_mcms_out_balance_approve_after(1, OBh_ID) # 结算审批后的结算数据
# time.sleep(3)
# invoice(2,OBh_ID)#type=2 传递结算单号,外网查询开票
# time.sleep(3)
# 检查最终的发票数据,过程数据在流程五中检查
check_mcms_invoice
()
time
.
sleep
(
3
)
# 检查付款单数据
check_mcms_invoice_ext
()
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
5a7c7438
...
@@ -394,3 +394,6 @@
...
@@ -394,3 +394,6 @@
#中心库入库结算_正负结算_付款单子表
#中心库入库结算_正负结算_付款单子表
"check_mcms_invoice_ext_detail_0919_1": '{"id": "%s", "pid": "%s", "invoice_id": "%s", "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "hos_id": "%s"}'
"check_mcms_invoice_ext_detail_0919_1": '{"id": "%s", "pid": "%s", "invoice_id": "%s", "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "hos_id": "%s"}'
#中心库入库结算_负结算_开票数据主表
"check_mcms_invoice_0924": '{"id": "%s", "hos_id": "%s", "branch_id": None, "invoice_code": "1", "invoice_number": "test", "invoice_num": 1, "prov_id": "%s", "prov_name": "%s", "invoice_amount": Decimal("-9999.990000"), "tb_status": 50, "invoice_date": %s, "settle_months": "%s", "tax_amount": None, "payment_bill_id": None, "yxpt_order_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 6, "invoice_qty": Decimal("-100.0000"), "remarks": "", "invoice_tag": None, "ext_info": 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