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
e595d311
Commit
e595d311
authored
Jul 16, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
38e995b3
e9dffc06
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air/a_b3流程十请领业务流_二级库向边仓_数据库验证.py
View file @
e595d311
...
@@ -48,7 +48,7 @@ def check_mcms_dept_buy_car(type=1):
...
@@ -48,7 +48,7 @@ def check_mcms_dept_buy_car(type=1):
print
(
actual_value1
)
print
(
actual_value1
)
deptid2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
deptid2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
deptname2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
deptname2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
areaCode
=
get_stockAreaId_new
(
deptid2
,
deptname2
,
2
)
areaCode
=
get_stockAreaId_new
_fromDb
(
deptname2
,
2
)
areaName
=
'默认库区'
areaName
=
'默认库区'
# 读取文件中的信息
# 读取文件中的信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库请领产品信息"
,
'message21'
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库请领产品信息"
,
'message21'
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air/a_b4流程十一请领业务流_二级库向直送_数据库验证.py
View file @
e595d311
...
@@ -50,7 +50,7 @@ def check_mcms_dept_buy_car(type=1):
...
@@ -50,7 +50,7 @@ def check_mcms_dept_buy_car(type=1):
print
(
actual_value1
)
print
(
actual_value1
)
deptid2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
deptid2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
deptname2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
deptname2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
areaCode
=
get_stockAreaId_new_fromDb
(
deptid2
,
deptname2
,
2
)
areaCode
=
get_stockAreaId_new_fromDb
(
deptname2
,
2
)
areaName
=
'默认库区'
areaName
=
'默认库区'
# 读取文件中的信息
# 读取文件中的信息
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库请领产品信息"
,
'message21'
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"二级库请领产品信息"
,
'message21'
)
...
@@ -240,7 +240,7 @@ def check_mcms_dept_buy(type=16):
...
@@ -240,7 +240,7 @@ def check_mcms_dept_buy(type=16):
rec_addr
=
deptname2
rec_addr
=
deptname2
dept_id1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
dept_id1
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid1'
]
stock_name
=
get_branch_name
()
+
"中心库房"
stock_name
=
get_branch_name
()
+
"中心库房"
target_stock_id
=
get_stockId_fromdb
(
stock_name
,
1
)
target_stock_id
=
get_stockId_fromdb
(
stock_name
)
if
type
==
16
:
if
type
==
16
:
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_dept_buy_direct_sending'
,
id1
,
order_no1
,
get_hosid
(),
branch_id
,
'mcms_dept_buy_direct_sending'
,
id1
,
order_no1
,
get_hosid
(),
branch_id
,
...
@@ -324,7 +324,7 @@ def check_mcms_dept_buy_approval_after(type=16):
...
@@ -324,7 +324,7 @@ def check_mcms_dept_buy_approval_after(type=16):
# # 获取边仓id
# # 获取边仓id
# target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
# target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
stock_name
=
get_branch_name
()
+
"中心库房"
stock_name
=
get_branch_name
()
+
"中心库房"
target_stock_id
=
get_stockId_fromdb
(
stock_name
,
1
)
target_stock_id
=
get_stockId_fromdb
(
stock_name
)
bill_expdt_date
=
get_expdt_date
(
bill_expdt_date
=
get_expdt_date
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
...
@@ -343,8 +343,7 @@ def check_mcms_dept_buy_approval_after(type=16):
...
@@ -343,8 +343,7 @@ def check_mcms_dept_buy_approval_after(type=16):
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
target_stock_name
=
get_branch_name
()
+
"中心库房"
target_stock_name
=
get_branch_name
()
+
"中心库房"
# import pdb
# pdb.set_trace()
rec_addr
=
deptname2
rec_addr
=
deptname2
if
type
==
16
:
if
type
==
16
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
...
@@ -494,6 +493,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -494,6 +493,7 @@ def check_mcms_mcms_pur_plan(type=16):
sql
=
"select order_no from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select order_no from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
branch_id
,
id1
)
PLAN_order_no
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划主表order_no
PLAN_order_no
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划主表order_no
# 要验证的数据sql
# 要验证的数据sql
sql1
=
"select * from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
sql1
=
"select * from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
branch_id
,
id1
)
...
@@ -529,6 +529,8 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -529,6 +529,8 @@ def check_mcms_mcms_pur_plan(type=16):
last_modified_user
=
create_user
last_modified_user
=
create_user
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
)
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
,
...
@@ -536,6 +538,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -536,6 +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
)
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
,
...
@@ -544,6 +547,7 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -544,6 +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
)
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
,
...
@@ -571,27 +575,18 @@ def check_mcms_mcms_pur_plan(type=16):
...
@@ -571,27 +575,18 @@ 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
(
type
=
16
):
def
check_mcms_mcms_pur_plan_detail
(
id
,
type
,
source_id
,
planOrderNo
):
branch_id
=
get_branch_id
()
branch_id
=
get_branch_id
()
# 获取请领单主键id
# 根据采购计划主表的id获取采购计划单子表主键
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%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;"
%
(
branch_id
,
type
)
id
)
print
(
sql
,
'type'
,
type
)
id2
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划单子表主键
id1
=
process_tuple
(
get_dept_buy_id
(
sql
))
sql
=
"select order_no from mcms_pur_plan where id='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
id2
)
branch_id
,
type
)
PLAN_order_no
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划单子表order_no
print
(
sql
)
buyOrderNo1
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 根据请领单的id获取采购计划单主表主键
sql
=
"select id from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
id2
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划主表主键
sql
=
"select order_no from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
PLAN_order_no
=
process_tuple
(
get_dept_buy_id
(
sql
))
# 采购计划主表order_no
# 要验证的数据sql
# 要验证的数据sql
sql1
=
"select * from mcms_pur_plan where
branch_id='%s' and source_
id='%s' order by create_time desc LIMIT 1;"
%
(
sql1
=
"select * from mcms_pur_plan
_detail
where id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
id2
)
# 获取实际值
# 获取实际值
actual
=
check_mcms_pur_plan_sql
(
sql1
)
actual
=
check_mcms_pur_plan_sql
(
sql1
)
print
(
'actual'
,
actual
)
print
(
'actual'
,
actual
)
...
@@ -601,53 +596,104 @@ def check_mcms_mcms_pur_plan_detail(type=16):
...
@@ -601,53 +596,104 @@ def check_mcms_mcms_pur_plan_detail(type=16):
dept_name2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
dept_name2
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
rec_org_id
=
process_tuple
(
rec_org_id
=
process_tuple
(
get_id
(
"select id from sys_org where branch_id='%s' and ename='%s';"
%
(
branch_id
,
dept_name2
)))
get_id
(
"select id from sys_org where branch_id='%s' and ename='%s';"
%
(
branch_id
,
dept_name2
)))
rec_org_name
=
dept_name2
info
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"库区信息"
,
'message22'
)
list_a
=
info
[
'list_a'
]
area_code
=
commonFuc
().
analysis_json
(
'shelfCode'
,
list_a
)
area_name
=
'默认库区'
source_id
=
id1
rec_user
=
get_login_user_uxid
()
rec_user
=
get_login_user_uxid
()
rec_addr
=
'自动化测试'
sql
=
"select bill_expdt_date from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
)
print
(
sql
)
bill_expdt_date
=
get_expdt_date
(
sql
)
buyBillId
=
id1
planBillId
=
id2
buyOrderNo
=
buyOrderNo1
create_user
=
rec_user
create_user
=
rec_user
create_time
=
get_create_time
(
# last_modified = create_time
"select create_time from mcms_pur_plan where branch_id='%s' and source_id='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
id1
))
last_modified
=
create_time
last_modified_user
=
create_user
last_modified_user
=
create_user
p
lanOrderNo
=
PLAN_order_no
p
id
=
id
if
type
==
16
:
if
type
==
16
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
mdm_goods_code
=
process_tuple
(
get_id
(
"select mdm_goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
# print(mdm_goods_code)
goods_code
=
process_tuple
(
get_id
(
"select goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
pkg_def_id
=
process_tuple
(
get_id
(
"select pkg_def_id from mcms_pkg where hos_goods_id='%s' LIMIT 1;"
%
hos_goods_id
))
supply_id
=
process_tuple
(
get_id
(
"select supply_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
prov_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_corpId"
]
prov_name
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_username"
]
sub_prov_id
=
prov_id
create_time
=
get_create_time
(
"select create_time from mcms_pur_plan_detail where id='%s';"
%
(
id2
))
last_modified
=
create_time
sub_prov_name
=
prov_name
source_id
=
process_tuple
(
get_id
(
"select source_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
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'
,
id2
,
PLAN_order_no
,
hos_id
,
'mcms_pur_plan_detail'
,
id2
,
pid
,
planOrderNo
,
source_id
,
hos_goods_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
mdm_goods_code
,
goods_code
,
pkg_def_id
,
supply_id
,
prov_id
,
prov_name
,
sub_prov_id
,
sub_prov_name
,
area_code
,
area_name
,
source_id
,
rec_user
,
create_user
,
create_time
,
last_modified
,
last_modified_user
rec_addr
,
bill_expdt_date
,
buyBillId
,
planBillId
,
planOrderNo
,
buyOrderNo
,
)
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
20
:
elif
type
==
20
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
mdm_goods_code
=
process_tuple
(
get_id
(
"select mdm_goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
# print(mdm_goods_code)
goods_code
=
process_tuple
(
get_id
(
"select goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
pkg_def_id
=
process_tuple
(
get_id
(
"select pkg_def_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
supply_id
=
process_tuple
(
get_id
(
"select supply_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
prov_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_corpId"
]
prov_name
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_username"
]
sub_prov_id
=
prov_id
create_time
=
get_create_time
(
"select create_time from mcms_pur_plan_detail where id='%s';"
%
(
id2
))
last_modified
=
create_time
sub_prov_name
=
prov_name
source_id
=
process_tuple
(
get_id
(
"select source_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
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
'
,
id2
,
PLAN_o
rder
_n
o
,
ho
s_id
,
'mcms_pur_plan
_detail2'
,
id2
,
pid
,
planO
rder
N
o
,
source_id
,
hos_good
s_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org
_name
,
mdm_goods_code
,
goods_code
,
supply_id
,
prov_id
,
prov
_name
,
area_code
,
area_name
,
source_id
,
rec_user
,
sub_prov_id
,
sub_prov_name
,
re
c_addr
,
bill_expdt_date
,
buyBillId
,
planBillI
d
,
p
la
nOrderNo
,
c
re
ate_user
,
create_time
,
last_modifie
d
,
la
st_modified_user
buyOrderNo
,
)
create_user
,
create_time
,
last_modified
,
last_modified_user
)
else
:
else
:
import
pdb
pdb
.
set_trace
()
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
mdm_goods_code
=
process_tuple
(
get_id
(
"select mdm_goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
# print(mdm_goods_code)
goods_code
=
process_tuple
(
get_id
(
"select goods_code from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
pkg_def_id
=
process_tuple
(
get_id
(
"select pkg_def_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
supply_id
=
process_tuple
(
get_id
(
"select supply_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
hos_goods_id
,
id2
)))
prov_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_corpId"
]
prov_name
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_username"
]
sub_prov_id
=
prov_id
create_time
=
get_create_time
(
"select create_time from mcms_pur_plan_detail where id='%s';"
%
(
id2
))
last_modified
=
create_time
sub_prov_name
=
prov_name
source_id
=
process_tuple
(
get_id
(
"select source_id from mcms_pur_plan_detail where hos_goods_id='%s' and id='%s';"
%
(
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'
,
id2
,
PLAN_order_no
,
hos_id
,
'mcms_pur_plan_detail'
,
id2
,
pid
,
planOrderNo
,
source_id
,
hos_goods_id
,
get_branch_id
(),
dept_id1
,
dept_name1
,
rec_org_id
,
rec_org_name
,
mdm_goods_code
,
goods_code
,
pkg_def_id
,
supply_id
,
prov_id
,
prov_name
,
area_code
,
area_name
,
source_id
,
rec_user
,
sub_prov_id
,
sub_prov_name
,
rec_addr
,
bill_expdt_date
,
buyBillId
,
planBillId
,
planOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
buyOrderNo
,
)
create_user
,
create_time
,
last_modified
,
last_modified_user
)
actual_value1
=
get_process_list2
(
actual
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
expected_value1
=
get_process_list2
(
expected
)
...
@@ -667,14 +713,6 @@ def check_mcms_mcms_pur_plan_detail(type=16):
...
@@ -667,14 +713,6 @@ def check_mcms_mcms_pur_plan_detail(type=16):
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
try
:
# add_dept2() # 新增一个二级科室
# add_new_deptinfo() # 写入科室信息到文件中
# grants_user_new() #新增授权
# 设置部门用户
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'],2)
# 设置部门负责人
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
# 从下面开始,上面的暂时注释
pro_path
=
commonFuc
().
get_pro_path2
()
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
print
(
'pro_path'
,
pro_path
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air'
)
...
@@ -718,7 +756,7 @@ try:
...
@@ -718,7 +756,7 @@ 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
))
# check_mcms_mcms_pur_plan_detail(int(i))
# 采购模块处理
# 采购模块处理
purchase_module_process
()
purchase_module_process
()
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
e595d311
...
@@ -28,4 +28,8 @@
...
@@ -28,4 +28,8 @@
"mcms_pur_plan": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
"mcms_pur_plan": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
"mcms_pur_plan2": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
"mcms_pur_plan2": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
"mcms_pur_plan3": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
"mcms_pur_plan3": '{"id": "%s", "order_no": "%s", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "rec_org_id": "%s", "rec_org_name": "%s", "area_code": "%s", "area_name": "%s", "create_type": "SG", "source_id": "%s", "source_type": "QLD", "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "priority": 0, "bill_expdt_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s"}", "remark": "", "close_status": 0, "tb_status": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "last_auditor": None, "last_audit_time": None, "rec_type": "HDI", "audit_remark": None}'
\ No newline at end of file
"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}'
\ 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