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
2d87da11
Commit
2d87da11
authored
Oct 15, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
13ba8643
96bd2a48
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_a3_流程三_产品导入和审批_数据库验证.air/a_a3_流程三_产品导入和审批_数据库验证.py
View file @
2d87da11
...
@@ -16,6 +16,134 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
...
@@ -16,6 +16,134 @@ from air_case.mdm_login.登录外网系统.登录外网系统 import login_syste
from
airtest.core.api
import
using
from
airtest.core.api
import
using
import
sys
import
sys
def
check_mcms_goods_info
(
type
=
1
):
print
(
'检查审批前的产品信息'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
3
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
elif
type
==
4
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message4'
)[
"hosGoodsId"
]
elif
type
==
5
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message5'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
'hos_goods_id'
branch_id
=
get_branch_id
()
sql1
=
"select * from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
hos_goods_id
actual
=
check_mcms_pur_sql
(
sql1
)
print
(
'actual'
,
actual
)
id
=
hos_goods_id
hos_goods_code
=
get_id
(
"select hos_goods_code from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
mdm_goods_code
=
get_id
(
"select mdm_goods_code from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
prov_hos_goods_id
=
get_id
(
"select prov_hos_goods_id from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
mdm_goods_spec_code
=
mdm_goods_code
spd_goods_code
=
mdm_goods_code
goods_name
=
get_id
(
"select goods_name from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
short_pinyin
=
get_id
(
"select short_pinyin from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
create_time
=
get_create_time
(
"select create_time from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
# username = commonFuc().get_business_data('b2_herp3_bs', "username")
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_username"
])
last_modified_user
=
create_user
parent_id
=
get_id
(
"select parent_id from mcms_stock_shelf where id='%s';"
%
id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_goods_info'
+
str
(
type
),
id
,
hos_goods_code
,
hos_id
,
prov_id
,
prov_hos_goods_id
,
mdm_goods_code
,
mdm_goods_spec_code
,
spd_goods_code
,
goods_name
,
short_pinyin
,
create_user
,
create_time
,
last_modified_user
,
last_modified
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_goods_info_after_approval
(
type
=
1
):
print
(
'检查审批后的产品信息'
)
if
type
==
1
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
elif
type
==
2
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
elif
type
==
3
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
elif
type
==
4
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message4'
)[
"hosGoodsId"
]
elif
type
==
5
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message5'
)[
"hosGoodsId"
]
else
:
hos_goods_id
=
'hos_goods_id'
branch_id
=
get_branch_id
()
sql1
=
"select * from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
hos_goods_id
actual
=
check_mcms_pur_sql
(
sql1
)
print
(
'actual'
,
actual
)
id
=
hos_goods_id
hos_goods_code
=
get_id
(
"select hos_goods_code from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
hos_id
=
get_hosid
()
prov_id
=
get_prov_id
()
mdm_goods_code
=
get_id
(
"select mdm_goods_code from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
prov_hos_goods_id
=
get_id
(
"select prov_hos_goods_id from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
mdm_goods_spec_code
=
mdm_goods_code
spd_goods_code
=
mdm_goods_code
goods_name
=
get_id
(
"select goods_name from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
short_pinyin
=
get_id
(
"select short_pinyin from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
create_time
=
get_create_time
(
"select create_time from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from spd_ybtest_hdi.mcms_goods_info where id='%s';"
%
id
)
# username = commonFuc().get_business_data('b2_herp3_bs', "username")
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'供货关系申请2'
,
'message'
)[
"e_username"
])
last_modified_user
=
create_user
parent_id
=
get_id
(
"select parent_id from mcms_stock_shelf where id='%s';"
%
id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'check_mcms_goods_info_after_approval'
+
str
(
type
),
id
,
hos_goods_code
,
hos_id
,
prov_id
,
prov_hos_goods_id
,
mdm_goods_code
,
mdm_goods_spec_code
,
spd_goods_code
,
goods_name
,
short_pinyin
,
create_user
,
create_time
,
last_modified_user
,
last_modified
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
# print('actual_value2',actual_value2)
print
(
'expected_value2'
)
print
(
expected_value2
)
print
(
'actual_value2'
)
print
(
actual_value2
)
result
=
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'result'
,
result
)
if
actual_value2
==
expected_value2
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 删除上次新增的产品,避免产生过多的重复数据====这里不能每天删除,万一导入产品功能出现问题会影响后续脚本
# 删除上次新增的产品,避免产生过多的重复数据====这里不能每天删除,万一导入产品功能出现问题会影响后续脚本
# 每隔一段时间来删除重复的产品数据即可,内外网同步删除
# 每隔一段时间来删除重复的产品数据即可,内外网同步删除
pro_path
=
commonFuc
().
get_pro_path2
()
pro_path
=
commonFuc
().
get_pro_path2
()
...
@@ -29,13 +157,23 @@ try:
...
@@ -29,13 +157,23 @@ try:
# ==============分割线 暂时注释===============
# ==============分割线 暂时注释===============
add_goods
()
# 直销高值
add_goods
()
# 直销高值
select1
(
'message1'
)
select1
(
'message1'
)
apply
()
time
.
sleep
(
3
)
check_mcms_goods_info
(
1
)
#审核前的产品信息
apply
()
#审批产品
time
.
sleep
(
3
)
check_mcms_goods_info_after_approval
(
1
)
#审核后的产品信息
add_goods1
()
# 直销低值
add_goods1
()
# 直销低值
select1
(
'message2'
)
select1
(
'message2'
)
time
.
sleep
(
3
)
check_mcms_goods_info
(
2
)
# 审核前的产品信息
apply
()
apply
()
check_mcms_goods_info_after_approval
(
2
)
#审核后的产品信息
add_goods2
()
# 直销试剂
add_goods2
()
# 直销试剂
select1
(
'message3'
)
select1
(
'message3'
)
check_mcms_goods_info
(
3
)
# 审核前的产品信息
apply
()
apply
()
check_mcms_goods_info_after_approval
(
3
)
# 审核后的产品信息
add_goods3
()
# 集配
add_goods3
()
# 集配
select1
(
'message4'
)
select1
(
'message4'
)
apply
()
apply
()
...
...
air_case/b6_spd3_core_business_flow_database_check/a_a4_流程四_基础模块设置_数据库验证.air/a_a4_流程四_基础模块设置_数据库验证.py
View file @
2d87da11
...
@@ -365,12 +365,12 @@ def check_sys_user_mgr_range():
...
@@ -365,12 +365,12 @@ def check_sys_user_mgr_range():
user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
user_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
# 要验证的数据sql
# 要验证的数据sql
for
i
in
range
(
4
):
for
i
in
range
(
4
):
sql1
=
"select * from sys_user_mgr_range where user_id='%s' order by
create_ti
me desc LIMIT 1 OFFSET %s;"
%
(
sql1
=
"select * from sys_user_mgr_range where user_id='%s' order by
mgr_range_na
me desc LIMIT 1 OFFSET %s;"
%
(
(
user_id
,
i
))
(
user_id
,
i
))
actual
=
check_mcms_pur_sql
(
sql1
)
actual
=
check_mcms_pur_sql
(
sql1
)
print
(
'actual'
,
actual
)
print
(
'actual'
,
actual
)
id
=
get_id
(
id
=
get_id
(
"select id from sys_user_mgr_range where user_id='%s' order by
create_ti
me desc LIMIT 1 OFFSET %s;"
%
(
"select id from sys_user_mgr_range where user_id='%s' order by
mgr_range_na
me desc LIMIT 1 OFFSET %s;"
%
(
user_id
,
i
))
user_id
,
i
))
corp_id
=
hos_id
corp_id
=
hos_id
if
i
==
0
:
if
i
==
0
:
...
@@ -438,9 +438,10 @@ def check_dept_leader():
...
@@ -438,9 +438,10 @@ def check_dept_leader():
last_modified_user
=
create_user
last_modified_user
=
create_user
user_leader_id
=
get_login_user_uxid_bydb
(
user_leader_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
version
=
get_id
(
"select version from sys_org 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_dept_leader'
,
id
,
pid
,
code
,
corp_id
,
branch_id
,
'check_dept_leader'
,
id
,
pid
,
code
,
corp_id
,
branch_id
,
last_update_datetime
last_update_datetime
,
version
,
create_time
,
create_user
,
last_modified_user
,
last_modified
,
,
create_time
,
create_user
,
last_modified_user
,
last_modified
,
user_leader_id
)
user_leader_id
)
...
@@ -471,24 +472,23 @@ def check_StockArea():
...
@@ -471,24 +472,23 @@ def check_StockArea():
actual
=
check_mcms_pur_sql
(
sql1
)
actual
=
check_mcms_pur_sql
(
sql1
)
print
(
'actual'
,
actual
)
print
(
'actual'
,
actual
)
id
=
get_id
(
id
=
get_id
(
"select id from sys_org where branch_id='%s' order by create_time desc LIMIT 1 OFFSET 3;"
%
(
branch_id
))
"select id from mcms_stock_shelf order by shelf_code desc LIMIT 1 OFFSET %s;"
%
(
i
))
pid
=
get_id
(
"select pid from sys_org where branch_id='%s' order by create_time desc LIMIT 1 OFFSET 3;"
%
(
dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid1'
]
branch_id
))
stock_name
=
get_branch_name
()
+
"中心库房"
code
=
get_id
(
"select code from sys_org where branch_id='%s' and id='%s';"
%
(
branch_id
,
id
))
stock_id
=
get_stockId_fromdb
(
stock_name
)
corp_id
=
get_hosid
()
shelf_code
=
get_stockAreaId_new_fromDb
(
dept_name
,
1
)
last_update_datetime
=
get_create_time
(
"select last_update_datetime from sys_org where id='%s';"
%
id
)
shelf_no
=
"自动化测试"
create_time
=
get_create_time
(
"select create_time from sys_org where id='%s';"
%
id
)
create_time
=
get_create_time
(
"select create_time from mcms_stock_shelf where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from sys_org where id='%s';"
%
id
)
last_modified
=
get_create_time
(
"select last_modified from mcms_stock_shelf where id='%s';"
%
id
)
username
=
commonFuc
().
get_business_data
(
'b2_herp3_bs'
,
"username"
)
# username = commonFuc().get_business_data('b2_herp3_bs', "username")
create_user
=
get_login_user_uxid_bydb
(
username
)
create_user
=
get_login_user_uxid_bydb
(
last_modified_user
=
create_user
user_leader_id
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
last_modified_user
=
create_user
parent_id
=
get_id
(
"select parent_id from mcms_stock_shelf 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_dept_leader'
,
id
,
pid
,
code
,
corp_id
,
branch_id
,
'check_mcms_stock_shelf'
+
str
(
i
),
id
,
stock_id
,
shelf_code
,
shelf_no
,
parent_id
,
last_update_datetime
create_user
,
create_time
,
last_modified
,
last_modified_user
,
create_time
,
create_user
,
last_modified_user
,
last_modified
,
)
user_leader_id
)
actual_value1
=
get_process_list2
(
actual
)
actual_value1
=
get_process_list2
(
actual
)
expected_value1
=
get_process_list2
(
expected
)
expected_value1
=
get_process_list2
(
expected
)
...
@@ -515,23 +515,23 @@ from a_a4_流程四_基础模块设置 import test1, test2, grants_user, add_Sto
...
@@ -515,23 +515,23 @@ from a_a4_流程四_基础模块设置 import test1, test2, grants_user, add_Sto
try
:
try
:
#
#
==============删除业务数据和报表数据
# ==============删除业务数据和报表数据
#
test1() # 参数2是新增院区后缀为6位数的参数1是老模式
test1
()
# 参数2是新增院区后缀为6位数的参数1是老模式
#
test2() # 科室添加产品信息(产品是从外网同步过来的)
test2
()
# 科室添加产品信息(产品是从外网同步过来的)
#
dept_query_all() # 科室查询,将科室id写入文件中
dept_query_all
()
# 科室查询,将科室id写入文件中
#
time.sleep(6)
time
.
sleep
(
6
)
#
#
检查院区数据,科室数据,库房,新增用户数据
# 检查院区数据,科室数据,库房,新增用户数据
#
check_basics_set_info()
check_basics_set_info
()
#
time.sleep(3)
time
.
sleep
(
3
)
#
#
检查mcms_dept_goods_info表数据,验证科室添加的产品信息
# 检查mcms_dept_goods_info表数据,验证科室添加的产品信息
#
check_mcms_dept_goods_info()
check_mcms_dept_goods_info
()
#
grants_user() # 给用户授权
grants_user
()
# 给用户授权
#检查授权数据
#
检查授权数据
#
check_sys_user_mgr_range()
check_sys_user_mgr_range
()
#
set_dept_lead1() # 设置一级科室负责人
set_dept_lead1
()
# 设置一级科室负责人
#
time.sleep(3)
time
.
sleep
(
3
)
#
check_dept_leader()
check_dept_leader
()
#
add_StockArea() # 添加库区
add_StockArea
()
# 添加库区
time
.
sleep
(
3
)
time
.
sleep
(
3
)
#检查库区数据
#检查库区数据
check_StockArea
()
check_StockArea
()
...
...
data/b6_spd3_core_business_flow_database_check/data
View file @
2d87da11
...
@@ -507,10 +507,25 @@
...
@@ -507,10 +507,25 @@
"check_sys_user_mgr_range_info3": '{"id": "%s", "user_id": "%s", "corp_id": "%s", "mgr_range_id": "%s", "mgr_range_name": "%s", "default_flag": 0, "project_code": "herp", "mgr_branch_id": "%s", "mgr_branch_name": "%s", "mgr_range_kind": 0, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "ext_str1": "%s", "ext_str2": None, "ext_str3": None}'
"check_sys_user_mgr_range_info3": '{"id": "%s", "user_id": "%s", "corp_id": "%s", "mgr_range_id": "%s", "mgr_range_name": "%s", "default_flag": 0, "project_code": "herp", "mgr_branch_id": "%s", "mgr_branch_name": "%s", "mgr_range_kind": 0, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "ext_str1": "%s", "ext_str2": None, "ext_str3": None}'
#检查部门负责人数据
#检查部门负责人数据
"check_dept_leader": '{"id": "%s", "pid": "%s", "code": "%s", "self_code": None, "corp_id": "%s", "branch_id": "%s", "corp_kind": "1", "ename": "设备科001", "cname": "设备科001", "dept_level": 1, "dept_type": "1", "ext1": None, "ext2": None, "ext3": None, "ext4": None, "ext5": None, "dept_cate": 1, "dept_kind": 1, "ordinal": None, "short_pinyin": "sbk001", "address": "设备科001", "contact_way": "13401003250", "scm_code": None, "erp_code": "001", "remark": None, "node_kind": None, "flag": "1", "last_update_datetime": %s, "version":
3
, "create_time": %s, "create_user": "%s", "last_modified_user": "%s", "last_modified": %s, "user_leader_id": "%s"}'
"check_dept_leader": '{"id": "%s", "pid": "%s", "code": "%s", "self_code": None, "corp_id": "%s", "branch_id": "%s", "corp_kind": "1", "ename": "设备科001", "cname": "设备科001", "dept_level": 1, "dept_type": "1", "ext1": None, "ext2": None, "ext3": None, "ext4": None, "ext5": None, "dept_cate": 1, "dept_kind": 1, "ordinal": None, "short_pinyin": "sbk001", "address": "设备科001", "contact_way": "13401003250", "scm_code": None, "erp_code": "001", "remark": None, "node_kind": None, "flag": "1", "last_update_datetime": %s, "version":
%s
, "create_time": %s, "create_user": "%s", "last_modified_user": "%s", "last_modified": %s, "user_leader_id": "%s"}'
#检查库区数据
#检查库区数据
"check_mcms_stock_shelf0": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-02", "shelf_no": "%s-2-02-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf0": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-02", "shelf_no": "%s-2-02-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf1": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-02", "shelf_no": "%s-2-02-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf1": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-01", "shelf_no": "%s-2-02-01", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf2": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-02", "shelf_no": "%s-2-02-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf2": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-01-02", "shelf_no": "%s-2-01-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf3": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-02-02", "shelf_no": "%s-2-02-02", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 0, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
"check_mcms_stock_shelf3": '{"id": "%s", "stock_id": "%s", "shelf_code": "%s-2-01-01", "shelf_no": "%s-2-01-01", "shelf_name": None, "shelf_type": None, "stock_type": 1, "default_flag": 1, "special_flag": None, "parent_id": "%s", "linkman": None, "rec_phone": None, "level_code": None, "tb_status": 1, "shelf_kind": 0, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "address": None}'
\ No newline at end of file
#检查产品信息表数据_审批前
"check_mcms_goods_info1": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": %s, "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "牙钻机", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "0", "pur_mode": 20, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info2": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": %s, "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info3": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": %s, "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "检测试剂", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "0", "pur_mode": 60, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info4": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": %s, "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info5": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": %s, "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 1, "version": 0, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
#检查产品信息表数据_审批后
"check_mcms_goods_info_after_approval1": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "牙钻机", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "0", "pur_mode": 20, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info_after_approval2": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info_after_approval3": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "检测试剂", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "0", "pur_mode": 60, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info_after_approval4": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
"check_mcms_goods_info_after_approval5": '{"id": "%s", "hos_goods_code": "%s", "hos_id": "%s", "prov_id": "%s", "prov_hos_goods_id": "%s", "srv_id": None, "mdm_goods_code": "%s", "mdm_goods_spec_code": "%s", "spd_goods_code": "%s", "goods_name": "%s", "goods_general_name": "一次性注射器", "goods_mfrs_id": "mfrs-11229", "goods_mfrs_name": "德国歌德公司 Geuder AG", "goods_reg_cert": "", "goods_agent_mfrs_id": None, "brand": "", "short_pinyin": "%s", "kind_sixtyeight_code": None, "unit": "支", "goods_spec": "G-31891", "goods_package": Decimal("1.000000"), "bar_code_mng": 2, "unique_code_strategy": "3", "pur_mode": 10, "sub_pur_mode": None, "erp_code": None, "herp_code": "", "price": Decimal("99.9999"), "abroad_flag": None, "made": "德国", "property": None, "mgr_level": None, "goods_desc": "", "charge_flag": 1, "focus_control_type": None, "temp_flag": 0, "official_status": None, "focus_control": 0, "storage_conditions": "", "transport_conditions": "", "into_cost_flag": None, "rfid_flag": None, "purchase_flag": 1, "tb_status": 0, "version": 1, "create_user": "%s", "create_time": %s, "last_modified_user": "%s", "last_modified": %s, "sterilize_flag": 0, "multi_charge_flag": 0, "use_frequency": 1, "charge_unit": None, "remark": "无 "}'
main1/main_text.py
View file @
2d87da11
...
@@ -4,6 +4,7 @@ import os
...
@@ -4,6 +4,7 @@ import os
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
import
traceback
import
traceback
from
tkinter
import
messagebox
from
air_case.public1.public1.public1
import
approval_center
,
approval_center_all
from
air_case.public1.public1.public1
import
approval_center
,
approval_center_all
from
common.Logger_Utils
import
Logger
from
common.Logger_Utils
import
Logger
...
@@ -311,6 +312,7 @@ def main_text():
...
@@ -311,6 +312,7 @@ def main_text():
button
.
pack
()
button
.
pack
()
root
.
mainloop
()
root
.
mainloop
()
def
button_clicked
(
branch_id
):
def
button_clicked
(
branch_id
):
result
=
confirm
()
result
=
confirm
()
if
result
==
True
:
if
result
==
True
:
...
@@ -326,6 +328,7 @@ def main_text():
...
@@ -326,6 +328,7 @@ def main_text():
delData
().
Delete_business_Data_All2
()
delData
().
Delete_business_Data_All2
()
delData
().
Delete_branch_by_id
(
3
,
branch_id
)
delData
().
Delete_branch_by_id
(
3
,
branch_id
)
print
(
branch_id
,
'删除完毕'
)
print
(
branch_id
,
'删除完毕'
)
messagebox
.
showinfo
(
"提示信息"
,
branch_id
+
"数据删除完毕"
)
def
del_current_brachdata
():
def
del_current_brachdata
():
import
tkinter
as
tk
import
tkinter
as
tk
...
@@ -373,6 +376,7 @@ def main_text():
...
@@ -373,6 +376,7 @@ def main_text():
# delData().Delete_business_Data_All2()
# delData().Delete_business_Data_All2()
#只删除业务数据,不删除当前院区和库房数据
#只删除业务数据,不删除当前院区和库房数据
print
(
branch_id
,
'业务数据删除完毕'
)
print
(
branch_id
,
'业务数据删除完毕'
)
messagebox
.
showinfo
(
"提示信息"
,
branch_id
+
"业务数据删除完毕"
)
def
get_input
():
def
get_input
():
import
tkinter
as
tk
import
tkinter
as
tk
from
tkinter
import
simpledialog
from
tkinter
import
simpledialog
...
...
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