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
f900e505
Commit
f900e505
authored
Jul 30, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
21190c98
7ec8fadc
Changes
8
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air/a_b3流程十请领业务流_二级库向边仓_数据库验证.py
View file @
f900e505
...
@@ -465,8 +465,7 @@ def mcms_dept_buy_detail_approval_after(type=16):
...
@@ -465,8 +465,7 @@ def mcms_dept_buy_detail_approval_after(type=16):
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
main
():
try
:
# ==================暂时注释===================================
# ==================暂时注释===================================
set_dept_lead
()
# 设置二级科室负责人
set_dept_lead
()
# 设置二级科室负责人
# 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
...
@@ -510,8 +509,12 @@ try:
...
@@ -510,8 +509,12 @@ try:
check_mcms_dept_buy_approval_after
(
int
(
i
))
check_mcms_dept_buy_approval_after
(
int
(
i
))
mcms_dept_buy_detail_approval_after
(
int
(
i
))
mcms_dept_buy_detail_approval_after
(
int
(
i
))
check_buyWayText
()
#
验证出库渠道是否为边仓
check_buyWayText
()
#
验证出库渠道是否为边仓
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
try
:
main
()
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
print
(
f
"发生错误:
{
e
}
"
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air/a_b4流程十一请领业务流_二级库向直送_数据库验证.py
View file @
f900e505
...
@@ -1166,7 +1166,9 @@ def check_hdi_distr(type=16):
...
@@ -1166,7 +1166,9 @@ def check_hdi_distr(type=16):
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
last_modified
=
create_time
last_modified
=
get_create_time
(
"select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
confirmUser
=
distrUser
confirmUser
=
distrUser
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'
)
...
@@ -1218,7 +1220,9 @@ def check_hdi_distr(type=16):
...
@@ -1218,7 +1220,9 @@ def check_hdi_distr(type=16):
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
last_modified
=
create_time
last_modified
=
get_create_time
(
"select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
confirmUser
=
distrUser
confirmUser
=
distrUser
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'
)
...
@@ -1270,7 +1274,9 @@ def check_hdi_distr(type=16):
...
@@ -1270,7 +1274,9 @@ def check_hdi_distr(type=16):
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
get_id
(
"select id from spd3_herp_test2.sys_org where branch_id='%s' and ename='%s';"
%
(
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
branch_id
,
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
])))
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
rec_org_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
last_modified
=
create_time
last_modified
=
get_create_time
(
"select last_modified from hdi_distr where branch_id = '%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
confirmUser
=
distrUser
confirmUser
=
distrUser
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'
)
...
@@ -2373,8 +2379,7 @@ def check_mcms_hos_batch(type=1): # 检查批次表信息
...
@@ -2373,8 +2379,7 @@ def check_mcms_hos_batch(type=1): # 检查批次表信息
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
main
():
try
:
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'
)
...
@@ -2448,7 +2453,7 @@ try:
...
@@ -2448,7 +2453,7 @@ try:
check_hdi_distr
(
int
(
i
))
check_hdi_distr
(
int
(
i
))
time
.
sleep
(
20
)
time
.
sleep
(
20
)
#到这里就是验收和中心库自动入库以及中心库出库
#
到这里就是验收和中心库自动入库以及中心库出库
check_accept_order
(
1
)
# 低值 验收和自动入库和出库
check_accept_order
(
1
)
# 低值 验收和自动入库和出库
time
.
sleep
(
6
)
time
.
sleep
(
6
)
check_mcms_check
(
1
)
# 调用函数检查验收单数据库写值
check_mcms_check
(
1
)
# 调用函数检查验收单数据库写值
...
@@ -2478,6 +2483,8 @@ try:
...
@@ -2478,6 +2483,8 @@ try:
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
try
:
main
()
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
print
(
f
"发生错误:
{
e
}
"
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air/a_b5流程十二请领业务流_二级库向二级库_数据库验证.py
View file @
f900e505
...
@@ -834,7 +834,7 @@ def check_mcms_psi_dept_in(type=16):
...
@@ -834,7 +834,7 @@ def check_mcms_psi_dept_in(type=16):
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
def
main
()
:
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_b5流程十二请领业务流_二级库向二级库.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b5流程十二请领业务流_二级库向二级库.air'
)
...
@@ -864,9 +864,9 @@ try:
...
@@ -864,9 +864,9 @@ try:
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
],
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
],
get_stockAreaId2_new_fromDb
(
deptName5
,
2
))
get_stockAreaId2_new_fromDb
(
deptName5
,
2
))
#新建科室产品分配
#
新建科室产品分配
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
])
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
])
#编辑产品请领目标为二级检验科002
#
编辑产品请领目标为二级检验科002
currentDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
]
currentDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
]
targetDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
targetDeptId
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
edit_goods_target
(
currentDeptId
,
targetDeptId
)
edit_goods_target
(
currentDeptId
,
targetDeptId
)
...
@@ -908,11 +908,14 @@ try:
...
@@ -908,11 +908,14 @@ try:
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
second_dept_one_key_in
(
5
)
# # 上面暂时注释========================
# # 上面暂时注释========================
#检查入库单
#
检查入库单
check_mcms_psi_dept_in
(
16
)
check_mcms_psi_dept_in
(
16
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
try
:
main
()
except
Exception
as
e
:
except
Exception
as
e
:
# 打印错误信息
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
print
(
f
"发生错误:
{
e
}
"
)
...
...
air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air/a_b6流程十三请领业务流_三级库向二级库_数据库验证.py
View file @
f900e505
...
@@ -820,13 +820,12 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id1):
...
@@ -820,13 +820,12 @@ def check_mcms_psi_dept_batch_in(DR_ID,type,order_no,source_id1):
else
:
else
:
print
(
'error'
)
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
try
:
def
main
()
:
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_b6流程十三请领业务流_三级库向二级库.air'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_b6流程十三请领业务流_三级库向二级库.air'
)
from
a_b6流程十三请领业务流_三级库向二级库
import
edit_goods_target
,
second_dept_Request
from
a_b6流程十三请领业务流_三级库向二级库
import
edit_goods_target
,
second_dept_Request
from
a_b6流程十三请领业务流_三级库向二级库
import
BuyCarSubmit
,
pick_execute
from
a_b6流程十三请领业务流_三级库向二级库
import
BuyCarSubmit
,
pick_execute
# # 设置部门用户
# # 设置部门用户
...
@@ -840,7 +839,7 @@ try:
...
@@ -840,7 +839,7 @@ try:
# 设置库区联系人
# 设置库区联系人
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid3"
],
set_stockShelf_Linkman
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid3"
],
get_stockAreaId2_new_fromDb
(
deptName3
,
3
))
# 设置库区联系人
get_stockAreaId2_new_fromDb
(
deptName3
,
3
))
# 设置库区联系人
#三级科室产品分配
#
三级科室产品分配
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
])
dept_goods_distribute
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid3'
])
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
# 设置登录账号默认权限是三级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
# 设置登录账号默认权限是三级库
...
@@ -863,8 +862,8 @@ try:
...
@@ -863,8 +862,8 @@ try:
for
i
in
range
(
6
):
# 三个单据共审批6次
for
i
in
range
(
6
):
# 三个单据共审批6次
approval_center
()
approval_center
()
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
#设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
#
设置登录账号默认权限是二级库
#二级科室领用出库
#
二级科室领用出库
# 低值拣货执行
# 低值拣货执行
pick_execute
()
pick_execute
()
...
@@ -877,7 +876,7 @@ try:
...
@@ -877,7 +876,7 @@ try:
check_mcms_psi_dept
(
16
)
check_mcms_psi_dept
(
16
)
check_mcms_psi_dept
(
20
)
check_mcms_psi_dept
(
20
)
check_mcms_psi_dept
(
66
)
check_mcms_psi_dept
(
66
)
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
#设置登录账号默认权限是三级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
3
))
#
设置登录账号默认权限是三级库
# 上面暂时注释===================================
# 上面暂时注释===================================
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
second_dept_one_key_in
(
3
)
...
@@ -888,5 +887,11 @@ try:
...
@@ -888,5 +887,11 @@ try:
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
20
)
check_mcms_psi_dept_in
(
66
)
check_mcms_psi_dept_in
(
66
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
commonFuc
().
check_text_exist_result_text
(
'error '
,
'1'
)
try
:
main
()
except
Exception
as
e
:
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
air_case/b6_spd3_core_business_flow_database_check/a_b7流程十四退库业务_消耗退库_数据库验证.air/a_b7流程十四退库业务_消耗退库_数据库验证.py
View file @
f900e505
...
@@ -5,6 +5,9 @@ import traceback
...
@@ -5,6 +5,9 @@ import traceback
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.public1.public1.public1
import
*
from
air_case.public1.public1.public1
import
*
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_tools
import
check_mcms_dept_buy_sql
,
get_PICK_id
,
get_buyBillId
,
get_PICK_order_no
,
\
get_buyOrderNo
,
get_login_user_uxid_bydb
,
get_create_time
,
get_account_date
,
get_pick_detail_id
,
\
get_mdm_goods_code1
,
get_goods_code1
,
get_pkg_def_id
,
check_batch_id
,
check_barcode_id
from
common.fileUtls
import
FileUtils
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
from
common.run_cmd_script
import
execute_command
...
@@ -20,573 +23,517 @@ python runner_test.py tag id2303-17 debug mdm3
...
@@ -20,573 +23,517 @@ python runner_test.py tag id2303-17 debug mdm3
"""
"""
def
second_dept_consume_Out_Stock
(
type
):
# 二级库消耗出库
def
check_mcms_psi_dept_in
(
type
=
10
):
module
=
"b5_spd3_core_business_flow"
branch_id
=
get_branch_id
()
# # 登录获取用户id等信息,使用创建的用户登录===========开始
sql
=
" select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
branch_id
,
type
)
username
=
info
[
'username1'
]
actual
=
check_mcms_dept_buy_sql
(
sql
)
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
actual
)
print
(
'username,password'
,
username
,
password
)
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"拣货单id"
,
'message28'
)
# # 获取token和projectCode
if
type
==
16
:
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
source_id
=
info
[
'DR_NO2'
]
# 登录获取用户id等信息,使用创建的用户登录============结束
elif
type
==
20
:
# 我要请领_手工请领_列表查询===========================
source_id
=
info
[
'DR_NO3'
]
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
else
:
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
source_id
=
info
[
'DR_NO1'
]
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
source_id
=
''
.
join
(
source_id
)
source_no
=
get_id
(
"select order_no from mcms_psi_dept where id='%s';"
%
source_id
)
#获取入库单主键DR_ID
sql
=
" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
type
)
DR_ID
=
get_id
(
sql
)
#获取order_no
sql
=
" select order_no from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
type
)
order_no
=
get_id
(
sql
)
target_corp_id
=
get_hosid
()
target_branch_id
=
get_branch_id
()
target_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
target_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
target_stock_id
=
get_stockId_fromdb
(
target_dept_name
+
'库房'
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
2
)
PICK_id
=
get_PICK_id
(
branch_id
,
type
)
# if type == 2:
source_corp_id
=
get_hosid
()
# print('下面处理')
source_branch_id
=
get_branch_id
()
# elif type == 3:
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
# # udi_code = get_udi2(3) # 获取条码 低值1 高值2 试剂3
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
# print('下面处理')
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
# else:
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
# udi_code = 'udi_code'
buyBillId
=
get_buyBillId
(
branch_id
,
type
)
if
type
==
2
:
pickOrderNo
=
get_PICK_order_no
(
branch_id
,
type
)
udi_code
=
get_udi2
(
2
)
# 获取条码 低值1 高值2 试剂3
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
type
)
# import pdb
pickBillId
=
get_PICK_id
(
branch_id
,
type
)
# pdb.set_trace()
psiDeptOutBillId
=
source_id
info
=
(
udi_code
,
udi_code
)
psiDeptOutOrderNo
=
source_no
titlename
=
(
'udi_code'
,
'udi_code'
)
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
# 将高值消耗出库条码信息写入文件
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept where id='%s';"
%
DR_ID
)
FileUtils
().
w_info8
(
info
,
'b5_spd3_core_business_flow'
,
'高值消耗条码'
,
titlename
,
'message24'
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept where id='%s';"
%
DR_ID
)
# 高值消耗
last_modified_user
=
create_user
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
accounter
=
create_user
"herpService_stock_pick_scan_url"
)
sql
=
"select account_date from mcms_psi_dept where id='%s';"
%
DR_ID
# 从message18文件中获取信息
account_date
=
get_account_date
(
sql
)
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
psiDeptInBillId
=
DR_ID
print
(
'info'
,
info
)
psiDeptInOrderNo
=
order_no
list_a
=
info
[
'list_a'
]
if
type
==
16
:
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
# 子表检查
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
'mcms_psi_dept_in_1'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
# 从message18文件中获取信息
target_dept_id
,
target_dept_name
,
target_stock_id
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload61"
,
udi_code
,
stockId
,
stockName
,
areaCode
,
,
target_area_code
,
source_id
,
source_no
,
source_corp_id
,
source_branch_id
,
areaName
)
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
accounter
,
account_date
,
buyBillId
,
pickOrderNo
,
buyOrderNo
,
pickBillId
,
psiDeptOutBillId
,
# 获取必要信息
psiDeptOutOrderNo
,
psiDeptInBillId
,
psiDeptInOrderNo
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
,
create_user
,
create_time
,
last_modified
,
last_modified_user
deptName
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
data1
=
commonFuc
().
analysis_json
(
'data'
,
result
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
UTid
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
createTime
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
codeType
=
commonFuc
().
analysis_json
(
'codeType'
,
data1
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
mdmGoodsCode
=
commonFuc
().
analysis_json
(
'mdmGoodsCode'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCode
=
commonFuc
().
analysis_json
(
'pkgCode'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data1
)
ext
=
commonFuc
().
analysis_json
(
'ext'
,
data1
)
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
ext
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
ext
)
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
ext
)
pkgDefQty
=
commonFuc
().
analysis_json
(
'pkgDefQty'
,
ext
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
ext
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
ext
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
data1
)
printNum
=
commonFuc
().
analysis_json
(
'printNum'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
sourceId
=
commonFuc
().
analysis_json
(
'sourceId'
,
data1
)
price
=
commonFuc
().
analysis_json
(
'price'
,
data1
)
purModeText
=
commonFuc
().
analysis_json
(
'purModeText'
,
data1
)
version
=
commonFuc
().
analysis_json
(
'version'
,
data1
)
unitName
=
commonFuc
().
analysis_json
(
'unitName'
,
data1
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
data1
)
# ==============================获取条码信息
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
print
(
'extInfo'
,
extInfo
)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime
=
reGetString
(
extInfo
,
r
'inStockTime": "'
,
r
'",'
)
print
(
'inStockTime'
,
inStockTime
)
# 从message18文件中获取信息
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_out_submit_url"
)
# import pdb
# pdb.set_trace()
deptid1
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
)
deptName2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
elif
type
==
20
:
stockName2
=
deptName2
+
"库房"
# 子表检查
createTime
=
timeUtils
().
get_time_hms
(
1
)
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
request_body
=
"request_body"
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
mgrCorpName
=
get_hosname
()
'mcms_psi_dept_in_2'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
mgrRangeId
=
deptid2
target_dept_id
,
target_dept_name
,
target_stock_id
mgrRangeName
=
deptName2
,
target_area_code
,
source_id
,
source_no
,
source_corp_id
,
source_branch_id
,
extStr1
=
get_branch_name
()
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
extStr3
=
get_branch_name
()
accounter
,
account_date
,
buyBillId
,
pickOrderNo
,
buyOrderNo
,
pickBillId
,
psiDeptOutBillId
,
snCode
=
UTid
psiDeptOutOrderNo
,
psiDeptInBillId
,
psiDeptInOrderNo
userLoginCode
=
username
,
create_user
,
create_time
,
last_modified
,
last_modified_user
cname
=
username
orgCode1
=
get_orgCode
()
orgName1
=
get_orgName
()
print
(
orgCode1
,
orgName1
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_1_3"
,
stockId
,
stockName2
,
areaCode
,
)
areaName
,
else
:
uxid
,
userLoginCode
,
cname
,
get_hosid
(),
get_branch_id
(),
# 子表检查
deptid1
,
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
,
order_no
,
source_id
)
orgCode1
,
orgName1
,
get_hosid
(),
get_hosid
(),
mgrCorpName
,
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
get_branch_id
(),
'mcms_psi_dept_in_3'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
get_branch_name
(),
mgrRangeId
,
mgrRangeName
,
extStr1
,
extStr3
,
target_dept_id
,
target_dept_name
,
target_stock_id
get_hosid
(),
stockId
,
,
target_area_code
,
source_id
,
source_no
,
source_corp_id
,
source_branch_id
,
stockName2
,
areaCode
,
areaName
,
UTid
,
createTime
,
snCode
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
get_hosid
(),
stockId
,
areaCode
,
areaName
,
shelfCode
,
accounter
,
account_date
,
buyBillId
,
pickOrderNo
,
buyOrderNo
,
pickBillId
,
psiDeptOutBillId
,
codeType
,
hosGoodsId
,
mdmGoodsCode
,
goodsCode
,
goodsDi
,
psiDeptOutOrderNo
,
psiDeptInBillId
,
psiDeptInOrderNo
barName
,
,
create_user
,
create_time
,
last_modified
,
last_modified_user
batchCode
,
expdtDate
,
productDate
,
pkgCode
,
pkgCodeSee
,
ssccCode
,
tbStatus
,
purBillId
,
distrBillId
,
inStockTime
,
distrDetailId
,
purMode
,
price
,
goodsMfrsName
,
goodsSpec
,
unit
,
goodsName
,
unitName
,
hosGoodsCode
,
purModeText
)
print
(
'request_body'
,
'高值消耗出库'
,
request_body
)
# # # # 发送请求
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
elif
type
==
1
:
print
(
'低值耗材消耗出库'
)
udi_code
=
get_udi2
(
1
)
data1
=
pickScan4
(
udi_code
)
# 获取必要信息
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
UTid
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
createTime
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
codeType
=
commonFuc
().
analysis_json
(
'codeType'
,
data1
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
mdmGoodsCode
=
commonFuc
().
analysis_json
(
'mdmGoodsCode'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCode
=
commonFuc
().
analysis_json
(
'pkgCode'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data1
)
ext
=
commonFuc
().
analysis_json
(
'ext'
,
data1
)
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
ext
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
ext
)
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
ext
)
pkgDefQty
=
commonFuc
().
analysis_json
(
'pkgDefQty'
,
ext
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
ext
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
ext
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
data1
)
printNum
=
commonFuc
().
analysis_json
(
'printNum'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
sourceId
=
commonFuc
().
analysis_json
(
'sourceId'
,
data1
)
price
=
commonFuc
().
analysis_json
(
'price'
,
data1
)
purModeText
=
commonFuc
().
analysis_json
(
'purModeText'
,
data1
)
version
=
commonFuc
().
analysis_json
(
'version'
,
data1
)
unitName
=
commonFuc
().
analysis_json
(
'unitName'
,
data1
)
# ==============================获取条码信息
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
print
(
'extInfo'
,
extInfo
)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime
=
reGetString
(
extInfo
,
'inStockTime
\"
\:
\"
'
,
'
\"
\,
\"
distrDetailId'
)
print
(
'inStockTime'
,
inStockTime
)
# 从message18文件中获取信息
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_out_submit_url"
)
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
print
(
'expected'
,
expected
)
deptid1
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
print
(
'aaaaaaaaaaaaaaaaa'
)
deptName2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
actual_value1
=
get_process_list2
(
actual
)
stockName2
=
deptName2
+
"库房"
expected_value1
=
get_process_list2
(
expected
)
createTime
=
timeUtils
().
get_time_hms
(
1
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
request_body
=
"request_body"
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
mgrCorpName
=
get_hosname
()
# print('actual_value2',actual_value2)
mgrRangeId
=
deptid2
print
(
'expected_value2'
)
mgrRangeName
=
deptName2
print
(
expected_value2
)
extStr1
=
get_branch_name
()
print
(
'actual_value2'
)
extStr3
=
get_branch_name
()
print
(
actual_value2
)
snCode
=
UTid
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
userLoginCode
=
username
if
actual_value2
==
expected_value2
:
cname
=
username
print
(
'ok'
)
orgCode1
=
get_orgCode
()
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
orgName1
=
get_orgName
()
else
:
url2
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
print
(
'error'
)
"herpService_stockpile_list_url"
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
def
check_mcms_psi_dept_batch_in
(
DR_ID
,
type
):
branch_id
=
get_branch_id
()
sql
=
" select * from mcms_psi_dept_batch where pid='%s';"
%
(
DR_ID
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
print
(
'actual'
,
actual
)
batch_main_key
=
get_id
(
"select id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
pid
=
DR_ID
order_no
=
get_id
(
"select order_no from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
request_body2
=
commonFuc
().
get_business_data
(
module
,
"payload62"
,
stockId
,
stockName2
,
areaCode
,
areaName
,
if
type
==
16
or
type
==
10
:
get_hosid
())
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
# # # # 发送请求
elif
type
==
20
:
result2
=
commonFuc
().
http_post
(
url2
,
request_body2
,
headers
)
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message1'
)[
"hosGoodsId"
]
availableQty
=
commonFuc
().
analysis_json
(
'availableQty'
,
commonFuc
().
analysis_json
(
'data'
,
else
:
commonFuc
().
analysis_json
(
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message3'
)[
"hosGoodsId"
]
'data'
,
result2
)))
mdm_goods_code
=
get_mdm_goods_code1
(
hos_goods_id
)
transferRatio
=
commonFuc
().
analysis_json
(
'transferRatio'
,
commonFuc
().
analysis_json
(
'data'
,
goods_code
=
get_goods_code1
(
hos_goods_id
)
commonFuc
().
analysis_json
(
pkg_def_id
=
get_pkg_def_id
(
hos_goods_id
)
'data'
,
result2
)))
picker_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"用户名信息"
,
'message3'
)[
'username1'
]
print
(
'result2'
,
result2
)
picker
=
get_login_user_uxid_bydb
(
picker_name
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_1_4"
,
stockId
,
stockName2
,
areaCode
,
source_batch_id
=
get_id
(
"select source_batch_id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
areaName
,
get_hosid
(),
deptid2
,
target_batch_id
=
source_batch_id
uxid
,
userLoginCode
,
cname
,
get_hosid
(),
get_branch_id
(),
if
check_batch_id
(
source_batch_id
)
==
True
:
deptid1
,
print
(
'ok'
)
orgCode1
,
orgName1
,
get_hosid
(),
get_hosid
(),
mgrCorpName
,
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
get_branch_id
(),
else
:
get_branch_name
(),
mgrRangeId
,
mgrRangeName
,
extStr1
,
extStr3
,
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
stockId
,
barcode_id
=
get_id
(
"select barcode_id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
stockName2
,
areaCode
,
areaName
,
areaCode
,
if
check_barcode_id
(
barcode_id
)
==
True
:
purMode
,
print
(
'ok'
)
hosGoodsId
,
goodsCode
,
batchCode
,
expdtDate
,
goodsSpec
,
goodsName
,
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
goodsMfrsName
,
unit
,
mdmGoodsCode
,
availableQty
,
transferRatio
else
:
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
shelf_code
=
get_stockAreaId_new_fromDb
(
dept_name
,
2
)
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
last_modified_user
=
create_user
if
type
==
16
or
type
==
10
:
source_detail_id
=
get_pick_detail_id
(
branch_id
,
16
)
pick_detail_id
=
source_detail_id
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_batch_in7'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
last_modified_user
print
(
'request_body'
,
request_body
)
)
# # # # 发送请求
elif
type
==
20
:
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
source_detail_id
=
get_pick_detail_id
(
branch_id
,
16
)
print
(
'result'
,
result
)
pick_detail_id
=
source_detail_id
elif
type
==
3
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
print
(
'检验试剂消耗出库'
)
'mcms_psi_dept_batch_in8'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
udi_code
=
get_udi2
(
4
)
# 试剂单瓶条码
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
# 从message18文件中获取信息
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
last_modified_user
data1
=
info
[
'list_a'
]
UTid
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
purModeText
=
commonFuc
().
analysis_json
(
'purModeText'
,
data1
)
unitName
=
commonFuc
().
analysis_json
(
'unitName'
,
data1
)
# ==============================获取条码信息
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
pkgBarcodeId
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
print
(
'extInfo'
,
extInfo
)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime
=
reGetString
(
extInfo
,
r
'inStockTime": "'
,
r
'",'
)
shelfNo
=
commonFuc
().
analysis_json
(
'shelfNo'
,
list_a
)
pkgUdi
=
reGetString
(
extInfo
,
r
'pkgDefId": "'
,
r
'",'
)
bottleId
=
commonFuc
().
analysis_json
(
'bottleId'
,
list_a
)
shelfKindName
=
commonFuc
().
analysis_json
(
'shelfKindName'
,
list_a
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
list_a
)
provId
=
commonFuc
().
analysis_json
(
'provId'
,
list_a
)
inStockDate
=
commonFuc
().
analysis_json
(
'inStockDate'
,
list_a
)
# 从message18文件中获取信息
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_out_submit_url"
)
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
)
deptid1
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
else
:
deptName2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid2"
]
source_detail_id
=
get_pick_detail_id
(
branch_id
,
66
)
stockName2
=
deptName2
+
"库房"
pick_detail_id
=
source_detail_id
createTime
=
timeUtils
().
get_time_hms
(
1
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
request_body
=
"request_body"
'mcms_psi_dept_batch_in9'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
mgrCorpName
=
get_hosname
()
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
mgrRangeId
=
deptid2
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
mgrRangeName
=
deptName2
last_modified_user
extStr1
=
get_branch_name
()
extStr3
=
get_branch_name
()
snCode
=
UTid
userLoginCode
=
username
cname
=
username
orgCode1
=
get_orgCode
()
orgName1
=
get_orgName
()
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_1_5"
,
stockId
,
stockName2
,
areaCode
,
areaName
,
uxid
,
userLoginCode
,
cname
,
get_hosid
(),
get_branch_id
(),
deptid1
,
orgCode1
,
orgName1
,
get_hosid
(),
get_hosid
(),
mgrCorpName
,
get_branch_id
(),
get_branch_name
(),
mgrRangeId
,
mgrRangeName
,
extStr1
,
extStr3
,
get_hosid
(),
stockId
,
stockName2
,
areaCode
,
areaName
,
UTid
,
snCode
,
ssccCode
,
pkgCodeSee
,
hosGoodsId
,
hosGoodsCode
,
goodsCode
,
goodsName
,
goodsSpec
,
goodsMfrsName
,
unit
,
purMode
,
batchCode
,
productDate
,
expdtDate
,
stockId
,
stockName2
,
areaName
,
areaCode
,
unitName
,
shelfCode
,
shelfNo
,
pkgUdi
,
inStockTime
,
pkgBarcodeId
,
bottleId
,
shelfKindName
,
provName
,
provId
,
inStockDate
,
made
,
barName
,
purModeText
)
print
(
'request_body'
,
request_body
)
)
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'expected'
,
expected
)
# import pdb
print
(
'aaaaaaaaaaaaaaaaa'
)
# pdb.set_trace()
actual_value1
=
get_process_list2
(
actual
)
print
(
'result'
,
result
)
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
)
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
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
sCan_grant
(
type
=
1
):
# 获取条码and扫码发放高值不能发放
def
check_mcms_psi_dept_batch
(
DR_ID
,
type
,
order_no
):
module
=
"b5_spd3_core_business_flow"
branch_id
=
get_branch_id
()
# # 登录获取用户id等信息,使用创建的用户登录===========开始
sql
=
" select * from mcms_psi_dept_batch where pid='%s';"
%
(
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
DR_ID
)
username
=
info
[
'username1'
]
actual
=
check_mcms_dept_buy_sql
(
sql
)
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
print
(
'actual'
,
actual
)
print
(
'username,password'
,
username
,
password
)
batch_main_key
=
get_id
(
"select id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
# # 获取token和projectCode
pid
=
DR_ID
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
# 登录获取用户id等信息,使用创建的用户登录============结束
source_detail_id
=
get_pick_detail_id
(
branch_id
,
type
)
if
type
==
1
:
pick_detail_id
=
source_detail_id
udi_code
=
get_udi2
(
1
)
# 获取条码 低值1 高值2 试剂3
if
type
==
16
:
elif
type
==
3
:
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
udi_code
=
get_udi2
(
3
)
# 获取条码 低值1 高值2 试剂3
elif
type
==
20
:
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
)
goods_code
=
get_goods_code1
(
hos_goods_id
)
pkg_def_id
=
get_pkg_def_id
(
hos_goods_id
)
picker_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"用户名信息"
,
'message3'
)[
'username1'
]
picker
=
get_login_user_uxid_bydb
(
picker_name
)
source_batch_id
=
get_id
(
"select source_batch_id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
target_batch_id
=
source_batch_id
if
check_batch_id
(
source_batch_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
barcode_id
=
get_id
(
"select barcode_id from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
if
check_barcode_id
(
barcode_id
)
==
True
:
print
(
'ok'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
else
:
udi_code
=
'udi_code'
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
if
type
==
1
:
dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
pickScan3
(
udi_code
,
1
)
# 低值扫码发放
shelf_code
=
get_stockAreaId_new_fromDb
(
dept_name
,
2
)
elif
type
==
3
:
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
pickScan3
(
udi_code
,
3
)
# 试剂扫码发放
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept_batch where pid='%s';"
%
DR_ID
)
last_modified_user
=
create_user
if
type
==
16
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_batch1'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type
==
20
:
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept_batch2'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
last_modified_user
def
second_dept_consume_in_Stock
(
type
=
1
):
)
module
=
'b5_spd3_core_business_flow'
else
:
# # 登录获取用户id等信息,使用创建的用户登录===========开始
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
'mcms_psi_dept_batch3'
,
batch_main_key
,
pid
,
order_no
,
source_detail_id
username
=
info
[
'username1'
]
,
pick_detail_id
,
hos_goods_id
,
mdm_goods_code
,
goods_code
,
source_batch_id
,
password
=
commonFuc
().
get_business_data
(
"b2_herp3_bs"
,
"password"
)
target_batch_id
,
barcode_id
,
shelf_code
,
create_user
,
create_time
,
last_modified
,
print
(
'username,password'
,
username
,
password
)
last_modified_user
# # 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login
(
username
,
password
,
2
)
# 登录获取用户id等信息,使用创建的用户登录============结束\
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
if
type
==
2
:
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"dept_stock_scan_url"
)
print
(
'消耗扫条码,url'
,
url
)
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
data1
=
info
[
'list_a'
]
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
purModeText
=
commonFuc
().
analysis_json
(
'purModeText'
,
data1
)
unitName
=
commonFuc
().
analysis_json
(
'unitName'
,
data1
)
# ==============================获取条码信息
# 从message18文件中获取信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
extInfo
=
commonFuc
().
analysis_json
(
'extInfo'
,
list_a
)
pkgBarcodeId
=
commonFuc
().
analysis_json
(
'id'
,
list_a
)
print
(
'extInfo'
,
extInfo
)
# inStockTime = commonFuc().analysis_json('inStockTime', extInfo)
inStockTime
=
reGetString
(
extInfo
,
r
'inStockTime": "'
,
r
'",'
)
shelfNo
=
commonFuc
().
analysis_json
(
'shelfNo'
,
list_a
)
pkgUdi
=
reGetString
(
extInfo
,
r
'pkgDefId": "'
,
r
'",'
)
bottleId
=
commonFuc
().
analysis_json
(
'bottleId'
,
list_a
)
shelfKindName
=
commonFuc
().
analysis_json
(
'shelfKindName'
,
list_a
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
list_a
)
provId
=
commonFuc
().
analysis_json
(
'provId'
,
list_a
)
inStockDate
=
commonFuc
().
analysis_json
(
'inStockDate'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload34"
,
pkgCodeSee
,
stockId
,
stockName
,
print
(
'expected'
,
expected
)
areaCode
,
areaName
)
print
(
'aaaaaaaaaaaaaaaaa'
)
print
(
'消耗扫条码'
,
'request_body'
,
request_body
)
actual_value1
=
get_process_list2
(
actual
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
expected_value1
=
get_process_list2
(
expected
)
print
(
'消耗扫条码,result'
,
result
)
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
viewId2
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
# print('actual_value2',actual_value2)
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
print
(
'expected_value2'
)
# 扫条码 == == == == == == == == == == == == == == == ==
print
(
expected_value2
)
# 消耗退回 == == == == == == == == == == == == == == == ==
print
(
'actual_value2'
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
print
(
actual_value2
)
"dept_stock_rtn_submit_url"
)
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
print
(
'高值消耗退回,url'
,
url
)
if
actual_value2
==
expected_value2
:
billMode
=
'20'
print
(
'ok'
)
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload35"
,
viewId2
,
hosGoodsId
,
DRh_id
,
else
:
barcodeId
,
billMode
,
deptid2
,
areaCode
,
areaName
)
print
(
'error'
)
print
(
'消耗退回'
,
'request_body'
,
request_body
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'消耗退回,result'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
data
!=
None
and
code
==
0
:
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
elif
type
==
1
:
print
(
'低值耗材消耗退回入库'
)
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_dept_availablePage_list_url"
)
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
list_a
=
info
[
'list_a'
]
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload63"
,
stockId
,
stockName
,
areaCode
,
areaName
,
get_hosid
())
print
(
'低值消耗产品查询'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'低值消耗产品查询,result'
,
result
)
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
def
check_mcms_psi_dept_out_and_in
(
type1
=
16
,
type2
=
10
):
result
)))
branch_id
=
get_branch_id
()
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
if
type1
==
20
:
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
sql
=
" select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_XH' order by CREATE_TIME desc LIMIT 1;"
%
(
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
branch_id
,
type1
)
commonFuc
().
analysis_json
(
'data'
,
else
:
result
)))
sql
=
" select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
branch_id
,
type1
)
commonFuc
().
analysis_json
(
'data'
,
actual
=
check_mcms_dept_buy_sql
(
sql
)
result
)))
print
(
actual
)
# 消耗退回 == == == == == == == == == == == == == == == ==
if
type1
==
20
:
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
DR_ID
=
get_id
(
" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_XH' order by CREATE_TIME desc LIMIT 1;"
%
(
"dept_stock_rtn_submit_url"
)
branch_id
,
type1
))
print
(
'低值消耗消耗退回,url'
,
url
)
else
:
billMode
=
'10'
DR_ID
=
get_id
(
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload35"
,
viewId2
,
hosGoodsId
,
DRh_id
,
branch_id
,
type1
))
barcodeId
,
billMode
,
deptid2
,
areaCode
,
areaName
)
sql
=
"select order_no from mcms_psi_dept where id='%s';"
%
DR_ID
print
(
'低值消耗消耗退回'
,
'request_body'
,
request_body
)
order_no
=
get_id
(
sql
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
target_corp_id
=
get_hosid
()
print
(
'低值消耗消耗退回,result'
,
result
)
target_branch_id
=
get_branch_id
()
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
target_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
target_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
if
data
!=
None
and
code
==
0
:
target_stock_id
=
get_stockId_fromdb
(
target_dept_name
+
'库房'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
2
)
PICK_id
=
get_PICK_id
(
branch_id
,
type1
)
source_id
=
PICK_id
source_corp_id
=
get_hosid
()
source_branch_id
=
get_branch_id
()
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
buyBillId
=
get_buyBillId
(
branch_id
,
type1
)
pickOrderNo
=
get_PICK_order_no
(
branch_id
,
type1
)
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
type1
)
pickBillId
=
get_PICK_id
(
branch_id
,
type1
)
psiDeptOutBillId
=
DR_ID
psiDeptOutOrderNo
=
order_no
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept where id='%s';"
%
DR_ID
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept where id='%s';"
%
DR_ID
)
last_modified_user
=
create_user
accounter
=
create_user
account_date
=
process_tuple
(
get_create_time
(
"select account_date from mcms_psi_dept where id='%s';"
%
DR_ID
))
if
type1
==
16
:
# 子表检查
check_mcms_psi_dept_batch
(
DR_ID
,
type1
,
order_no
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept4'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
elif
type1
==
20
:
# 子表检查
check_mcms_psi_dept_batch
(
DR_ID
,
type1
,
order_no
)
his_charge_no
=
get_id
(
" select his_charge_no from his_order where branch_id='%s'order by create_time desc LIMIT 1;"
%
branch_id
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept5'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
his_charge_no
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
else
:
# 子表检查
check_mcms_psi_dept_batch
(
DR_ID
,
type1
,
order_no
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept6'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
print
(
'expected'
,
expected
)
print
(
'aaaaaaaaaaaaaaaaa'
)
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
)
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
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'
)
#检查拆包后生成的入库单============================================================
if
type1
==
20
:
print
(
'高值直接出库,不存在拆包业务,也就不存在自动的入库业务'
)
else
:
branch_id
=
get_branch_id
()
sql
=
" select * from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
type2
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
print
(
actual
)
DR_ID1
=
get_id
(
" select id from mcms_psi_dept where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_CB' order by CREATE_TIME desc LIMIT 1;"
%
(
branch_id
,
type2
))
sql
=
"select order_no from mcms_psi_dept where id='%s';"
%
DR_ID1
order_no1
=
get_id
(
sql
)
target_corp_id
=
get_hosid
()
target_branch_id
=
get_branch_id
()
target_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
target_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
target_stock_id
=
get_stockId_fromdb
(
target_dept_name
+
'库房'
)
target_area_code
=
get_stockAreaId_new_fromDb
(
target_dept_name
,
2
)
PICK_id
=
get_PICK_id
(
branch_id
,
type1
)
source_id
=
DR_ID
source_corp_id
=
get_hosid
()
source_branch_id
=
get_branch_id
()
source_dept_id
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid2'
]
source_dept_name
=
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid2'
]
source_stock_id
=
get_stockId_fromdb
(
source_dept_name
+
'库房'
)
source_area_code
=
get_stockAreaId_new_fromDb
(
source_dept_name
,
2
)
buyBillId
=
get_buyBillId
(
branch_id
,
type1
)
pickOrderNo
=
get_PICK_order_no
(
branch_id
,
type1
)
buyOrderNo
=
get_buyOrderNo
(
branch_id
,
type1
)
pickBillId
=
get_PICK_id
(
branch_id
,
type1
)
psiDeptOutBillId
=
DR_ID
psiDeptOutOrderNo
=
order_no
psiDeptInBillId
=
DR_ID1
psiDeptInOrderNo
=
order_no1
create_user
=
get_login_user_uxid_bydb
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)[
'username1'
])
create_time
=
get_create_time
(
"select create_time from mcms_psi_dept where id='%s';"
%
DR_ID1
)
last_modified
=
get_create_time
(
"select last_modified from mcms_psi_dept where id='%s';"
%
DR_ID1
)
last_modified_user
=
create_user
accounter
=
create_user
source_no
=
order_no
last_auditor
=
create_user
last_audit_time
=
get_create_time
(
"select last_audit_time from mcms_psi_dept where id='%s';"
%
DR_ID1
)
account_date
=
process_tuple
(
get_create_time
(
"select account_date from mcms_psi_dept where id='%s';"
%
DR_ID1
))
if
type2
==
10
:
# 子表检查
check_mcms_psi_dept_batch_in
(
DR_ID
,
type2
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept7'
,
DR_ID1
,
order_no1
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_no
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
accounter
,
account_date
,
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
psiDeptInBillId
,
psiDeptInOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
last_auditor
,
last_audit_time
)
elif
type1
==
20
:
# 子表检查
check_mcms_psi_dept_batch_in
(
DR_ID
,
type2
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
'mcms_psi_dept8'
,
DR_ID
,
order_no
,
target_corp_id
,
target_branch_id
,
target_dept_id
,
target_dept_name
,
target_stock_id
,
target_area_code
,
source_id
,
source_corp_id
,
source_branch_id
,
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
buyBillId
,
pickOrderNo
,
buyOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
)
else
:
else
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
# 子表检查
elif
type
==
3
:
check_mcms_psi_dept_batch_in
(
DR_ID
,
type2
)
print
(
'试剂耗材消耗退回入库'
)
expected
=
commonFuc
().
get_business_data
(
'b6_spd3_core_business_flow_database_check'
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
'mcms_psi_dept9'
,
DR_ID1
,
order_no1
,
target_corp_id
,
target_branch_id
,
"herpService_dept_availablePage_list_url"
)
target_dept_id
,
target_dept_name
,
target_stock_id
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
,
target_area_code
,
source_id
,
source_no
,
source_corp_id
,
source_branch_id
,
list_a
=
info
[
'list_a'
]
source_dept_id
,
source_dept_name
,
source_stock_id
,
source_area_code
,
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
list_a
)
accounter
,
account_date
,
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
list_a
)
pickOrderNo
,
pickBillId
,
psiDeptOutBillId
,
psiDeptOutOrderNo
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
list_a
)
,
psiDeptInBillId
,
psiDeptInOrderNo
,
create_user
,
create_time
,
last_modified
,
last_modified_user
,
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
list_a
)
last_auditor
,
last_audit_time
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
list_a
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload64"
,
stockId
,
stockName
,
areaCode
,
areaName
,
get_hosid
())
print
(
'试剂耗材消耗退回入库产品查询'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'试剂耗材消耗退回入库产品查询,result'
,
result
)
# import pdb
# pdb.set_trace()
viewId2
=
commonFuc
().
analysis_json
(
'viewId'
,
commonFuc
().
analysis_json
(
'data'
,
print
(
'expected'
,
expected
)
commonFuc
().
analysis_json
(
'data'
,
print
(
'aaaaaaaaaaaaaaaaa'
)
result
)))
actual_value1
=
get_process_list2
(
actual
)
DRh_id
=
commonFuc
().
analysis_json
(
'billId'
,
expected_value1
=
get_process_list2
(
expected
)
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
)))
actual_value2
=
actual_value1
.
replace
(
" "
,
""
)
barcodeId
=
commonFuc
().
analysis_json
(
'bottleId'
,
commonFuc
().
analysis_json
(
'data'
,
expected_value2
=
expected_value1
.
replace
(
" "
,
""
)
commonFuc
().
analysis_json
(
'data'
,
# print('actual_value2',actual_value2)
result
)))
print
(
'expected_value2'
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
commonFuc
().
analysis_json
(
'data'
,
print
(
expected_value2
)
commonFuc
().
analysis_json
(
'data'
,
print
(
'actual_value2'
)
result
)))
print
(
actual_value2
)
# 消耗退回 == == == == == == == == == == == == == == == ==
print
(
compare_text_index
(
actual_value2
,
expected_value2
))
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
if
actual_value2
==
expected_value2
:
"dept_stock_rtn_submit_url"
)
print
(
'ok'
)
print
(
'试剂耗材消耗退回,url'
,
url
)
billMode
=
'67'
deptid2
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload35"
,
viewId2
,
hosGoodsId
,
DRh_id
,
barcodeId
,
billMode
,
deptid2
,
areaCode
,
areaName
)
print
(
'试剂耗材消耗退回'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'试剂耗材消耗退回,result'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
data
!=
None
and
code
==
0
:
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
else
:
else
:
print
(
'error'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'succees'
)
#========================================================
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air'
)
using
(
pro_path
+
r
'//air_case/b5_spd3_core_business_flow/a_b7流程十四退库业务_消耗退库.air'
)
from
a_b7流程十四退库业务_消耗退库
import
sCan_grant
,
second_dept_consume_Out_Stock
,
second_dept_consume_in_Stock
try
:
try
:
updateUserLoginDefaultRange
(
get_listUserMgrRangePage1
(
2
))
# 设置登录账号默认权限是二级库
# updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
sCan_grant
(
1
)
# 低值扫码发放
# sCan_grant(1) # 低值扫码发放
sCan_grant
(
3
)
# 试剂扫码发放
# check_mcms_psi_dept_out_and_in(16,10)
second_dept_consume_Out_Stock
(
2
)
# 高值消耗出库
# sCan_grant(3) # 试剂扫码发放
# check_mcms_psi_dept_out_and_in(66,67)
# second_dept_consume_Out_Stock(2) # 高值消耗出库
# check_mcms_psi_dept_out_and_in(20, 67)
second_dept_consume_in_Stock
(
2
)
# 高值消耗退货入库
second_dept_consume_in_Stock
(
2
)
# 高值消耗退货入库
check_mcms_psi_dept_out_and_in
(
20
,
67
)
second_dept_consume_Out_Stock
(
1
)
# 低值消耗出库
second_dept_consume_Out_Stock
(
1
)
# 低值消耗出库
second_dept_consume_in_Stock
(
1
)
# 低值消耗退回入库
second_dept_consume_in_Stock
(
1
)
# 低值消耗退回入库
second_dept_consume_Out_Stock
(
3
)
# 试剂消耗出库
second_dept_consume_Out_Stock
(
3
)
# 试剂消耗出库
second_dept_consume_in_Stock
(
3
)
# 试剂消耗退回入库
second_dept_consume_in_Stock
(
3
)
# 试剂消耗退回入库
commonFuc
().
check_text_exist_result_text
(
'SUCCESS'
,
'SUCCESS'
)
commonFuc
().
check_text_exist_result_text
(
'SUCCESS'
,
'SUCCESS'
)
except
:
except
Exception
as
e
:
# 打印错误信息
print
(
f
"发生错误:
{
e
}
"
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'SUCCESS'
)
commonFuc
().
check_text_exist_result_text
(
'error'
,
'SUCCESS'
)
data/b5_spd3_core_business_flow/message15
View file @
f900e505
验收单号
:
验收单号
:
CHECK_NO1
:
CHECKh0347202407290003
1
CHECK_NO1
:
CHECKh0347202407290003
7
CHECK_NO2
:
CHECKh0347202407290003
1
CHECK_NO2
:
CHECKh0347202407290003
7
data/b6_spd3_core_business_flow_database_check/data
View file @
f900e505
...
@@ -144,4 +144,23 @@
...
@@ -144,4 +144,23 @@
#三级科室请领单
#三级科室请领单
"mcms_dept_buy6": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_buy6": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_buy6_2": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_buy6_2": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_buy6_3": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_buy6_3": '{"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": null, "create_type": "SG", "buy_kind": "LY", "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": "null", "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_psi_dept4": '{"id":"%s","order_no":"%s","bill_mode":"16","rec_type":"YND","psi_flag":-1,"psi_kind":"206","stock_kind":"CK_CB","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":2,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept6": '{"id":"%s","order_no":"%s","bill_mode":"66","rec_type":"YND","psi_flag":-1,"psi_kind":"206","stock_kind":"CK_CB","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":2,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
#高值消耗出库
"mcms_psi_dept5": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":-1,"psi_kind":"207","stock_kind":"CK_XH","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":2,"patient_id":"","patient_name":"","machine_id":null,"machine_name":null,"his_charge_no":"%s","remark":null,"tb_status":30,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":1,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
#拆包入库单主表
"mcms_psi_dept7": '{"id": "%s", "order_no": "%s", "bill_mode": "10", "rec_type": "YND", "psi_flag": 1, "psi_kind": "106", "stock_kind": "RK_CB", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": None, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "默认库区", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": "%s", "last_audit_time": %s, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
"mcms_psi_dept8": '{"id":"%s","order_no":"%s","bill_mode":"20","rec_type":"YND","psi_flag":-1,"psi_kind":"206","stock_kind":"CK_CB","target_corp_id":"%s","target_branch_id":"%s","target_dept_id":"%s","target_dept_name":"%s","target_stock_id":"%s","target_area_code":"%s","target_area_name":"默认库区","source_id":"%s","source_no":null,"source_repl_id":null,"source_corp_id":"%s","source_branch_id":"%s","source_dept_id":"%s","source_dept_name":"%s","source_stock_id":"%s","source_area_code":"%s","source_area_name":"默认库区","consume_type":0,"patient_id":null,"patient_name":null,"machine_id":null,"machine_name":null,"his_charge_no":null,"remark":null,"tb_status":40,"accounter":"%s","account_date":"%s","bill_relation_json":"{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s"}","create_user":"%s","create_time":%s,"last_modified":%s,"last_modified_user":"%s","version":2,"last_auditor":null,"last_audit_time":null,"reject_reason":null,"reject_user":null,"reject_time":null,"initial_order":null,"source_type":"SG","target_coding_type":null}'
"mcms_psi_dept9": '{"id": "%s", "order_no": "%s", "bill_mode": "67", "rec_type": "YND", "psi_flag": 1, "psi_kind": "106", "stock_kind": "RK_CB", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "默认库区", "source_id": "%s", "source_no": "%s", "source_repl_id": None, "source_corp_id": "%s", "source_branch_id": "%s", "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": "%s", "source_area_name": "默认库区", "consume_type": 0, "patient_id": None, "patient_name": None, "machine_id": None, "machine_name": None, "his_charge_no": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": "%s", "bill_relation_json": "{"pickOrderNo":"%s","pickBillId":"%s","psiDeptOutBillId":"%s","psiDeptOutOrderNo":"%s","psiDeptInBillId":"%s","psiDeptInOrderNo":"%s"}", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": "%s", "last_audit_time": %s, "reject_reason": None, "reject_user": None, "reject_time": None, "initial_order": None, "source_type": "SG", "target_coding_type": None}'
#拆包人库单子表
"mcms_psi_dept_batch_in7": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 10, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in8": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": %s, "pur_mode": 20, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("1.00"), "unit_name": "1支", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": null, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
"mcms_psi_dept_batch_in9": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "pick_detail_id": "%s", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "source_batch_id": "%s", "target_batch_id": "%s", "settle_flag": 0, "psi_price": Decimal("99.9999"), "qty": Decimal("100.00"), "unit_name": "100支/100", "barcode_id": "%s", "sub_barcode_id": None, "shelf_code": "%s-A-01-01", "tb_status": 0, "charge_flag": 1, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
main1/main_text2.py
0 → 100644
View file @
f900e505
import
time
import
sys
import
os
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
import
traceback
from
air_case.public1.public1.public1
import
approval_center
,
approval_center_all
curPath
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
# 获取当前文件的所在目录的绝对路径
# print('将路径中的/换成\\', curPath) # C:\Users\Administrator\Desktop\temp\dbshop99\main
# # #将当前文件的所在目录的绝对路径进行分离,分离成 ('C:\\Users\\Administrator\\Desktop\\temp\\dbshop99', 'main'),存到元组中
# print('切割路径,切割成一个元组,将路径分离', os.path.split(curPath))
rootPath
=
os
.
path
.
split
(
curPath
)[
0
]
# [0]表示元组中的为一个元素
# print('当前项目的根目录', rootPath)
sys
.
path
.
append
(
rootPath
)
# 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
sys
.
path
.
append
(
os
.
path
.
join
(
rootPath
,
'common'
))
# print('根据当前文件获取当前文件所在目录的路径', os.path.dirname(__file__))
from
airtest.core.helper
import
using
from
common.common_func
import
commonFuc
from
common.db.sql.sql_del_branch_info
import
delData
import
tkinter
as
tk
from
tkinter
import
*
import
tkinter.messagebox
from
common.run_cmd_script
import
execute_command
pro_path
=
commonFuc
().
get_pro_path2
()
print
(
'pro_path'
,
pro_path
)
def
main_text
():
# 创建窗口
root
=
tk
.
Tk
()
# 获取屏幕宽高
window_width
=
root
.
winfo_screenwidth
()
window_height
=
root
.
winfo_screenheight
()
# 设置窗口大小
root
.
geometry
(
'800x560'
)
# 刷新窗口参数
root
.
update
()
# 计算窗口居中时左上角的坐标
x
=
(
window_width
-
root
.
winfo_width
())
//
2
y
=
(
window_height
-
root
.
winfo_height
())
//
2
# 设置窗口左上角的坐标
root
.
geometry
(
"+{}+{}"
.
format
(
x
,
y
))
root
.
title
(
string
=
"数据库验证核心业务流"
)
root
.
resizable
(
False
,
False
)
# for a in ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw']:
# Button(root,
# text='anchor',
# anchor=a,
# width=30,
# height=4).pack()
def
flow1
():
print
(
'调用流程一'
)
# from execute import flow1
# flow1()
# print('流程一执行完毕')
# execute_command("python runner_test.py tag id2302-1 debug mdm3")
# sys.exit(0)
def
flow2
():
print
(
'调用流程二'
)
# from execute import flow2
# flow2()
# print('流程2执行完毕')
# execute_command("python runner_test.py tag id2302-2 debug mdm3")
# sys.exit(0)
def
flow3
():
print
(
'调用流程三'
)
# from execute import flow3
# flow3()
# print('流程3执行完毕')
# execute_command("python runner_test.py tag id2302-3 debug mdm3")
# sys.exit(0)
def
flow4
():
print
(
'调用流程四'
)
# execute_command("python runner_test.py tag id2302-4 debug mdm3")
# from execute import flow4
# flow4()
# print('流程4执行完毕')
# sys.exit(0)
def
flow5
():
print
(
'调用流程五'
)
# execute_command("python runner_test.py tag id2302-5,id2302-6,id2302-7,id2302-8 debug mdm3")
# from execute import flow5,flow6,flow7,flow8
# flow5()
# flow6()
# flow7()
# flow8()
# print('流程5执行完毕')
# sys.exit(0)
def
flow6
():
print
(
'调用流程六'
)
# from execute import flow9
# flow9()
# print('流程6执行完毕')
# sys.exit(0)
def
flow7
():
print
(
'流程七开始执行'
)
# from execute import flow10
# flow10()
# print('流程七执行完毕')
# sys.exit(0)
def
flow8
():
print
(
'调用流程八'
)
# from execute import flow11
# flow11()
# print('流程八执行完毕','流程八执行完毕 ')
# sys.exit(0)
def
flow9
():
print
(
'调用流程九'
)
# from execute import flow12
# flow12()
# print('流程9执行完毕','流程9执行完毕')
# sys.exit(0)
def
flow10
():
print
(
'数据库验证_流程十'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air'
)
from
a_b3流程十请领业务流_二级库向边仓_数据库验证
import
main
# main()
print
(
'数据库验证_流程十执行完毕'
,
'流程十执行完毕'
)
# sys.exit(0)
def
flow11
():
print
(
'调用流程十一'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b4流程十一请领业务流_二级库向直送_数据库验证.air'
)
from
a_b4流程十一请领业务流_二级库向直送_数据库验证
import
main
print
(
'流程11执行完毕'
,
'flow11执行完毕'
)
# sys.exit(0)
def
flow12
():
print
(
'调用流程十二'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b5流程十二请领业务流_二级库向二级库_数据库验证.air'
)
from
a_b5流程十二请领业务流_二级库向二级库_数据库验证
import
main
print
(
'流程12执行完毕'
,
'flow12执行完毕'
)
# sys.exit(0)
def
flow13
():
print
(
'调用流程十三'
)
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
using
(
pro_path
+
r
'//air_case/b6_spd3_core_business_flow_database_check/a_b6流程十三请领业务流_三级库向二级库_数据库验证.air'
)
from
a_b6流程十三请领业务流_三级库向二级库_数据库验证
import
main
print
(
'流程13执行完毕'
,
'flow13执行完毕'
)
# sys.exit(0)
def
flow14
():
print
(
'调用流程十四'
)
# from execute import flow17
# flow17()
# print('流程14执行完毕', 'flow14执行完毕')
# sys.exit(0)
def
flow15
():
print
(
'调用流程十五'
)
# from execute import flow18
# flow18()
# print('流程十五执行完毕')
# sys.exit(0)
def
flow16
():
# from execute import flow19
# flow19()
print
(
'流程十六执行完毕'
)
sys
.
exit
(
0
)
def
flow17
():
# from execute import flow20
# flow20()
print
(
'流程十七执行完毕'
)
sys
.
exit
(
0
)
def
flow18
():
# from execute import flow21
# flow21()
print
(
'流程十八执行完毕'
)
sys
.
exit
(
0
)
def
flow0
():
# execute_command("python runner_test.py tag id2302-23 debug mdm3")
sys
.
exit
(
0
)
def
exit
():
print
(
'退出'
)
sys
.
exit
(
0
)
def
del_data
():
# 删除自动化脚本产生的数据
result
=
confirm
()
if
result
==
True
:
result1
=
confirm1
()
if
result1
==
True
:
delData
().
Delete_branch_by_id
()
delData
().
Delete_goods_change_info
()
delData
().
Delete_probeInfo_other
()
# delData().Del_supply_relation()
delData
().
Delete_business_Data
()
delData
().
Del_reporter_data
()
delData
().
Delete_business_Data_All
()
delData
().
Delete_business_Data_All2
()
print
(
'===================删除垃圾数据完毕============================'
)
else
:
print
(
'Cancel'
)
# def flow5_flow18():
# #脚本运行前清空所有待审批数据
# approval_center_all()
# try:
# flow5()
# flow6()
# flow7()
# flow8()
# flow9()
# flow10()
# flow11()
# flow12()
# flow13()
# flow14()
# flow15()
# flow16()
# flow17()
# flow18()
# except Exception as e:
# print('脚本出现异常,请检查脚本或者数据')
# print("发生异常:", str(e))
# traceback.print_exc()
# def flow11_flow18():
# flow11()
# flow12()
# flow13()
# flow14()
# flow15()
# flow16()
# flow17()
# flow18()
def
confirm
():
result
=
tkinter
.
messagebox
.
askokcancel
(
"确认"
,
"您确定要执行此操作吗?"
)
# print(result)
print
(
"用户选择了:"
,
"OK"
if
result
else
"Cancel"
)
return
result
def
confirm1
():
result
=
tkinter
.
messagebox
.
askokcancel
(
"再次确认"
,
"您确定要执行此删除操作吗?数据删除后不可逆."
)
# print(result)
print
(
"用户选择了:"
,
"OK"
if
result
else
"Cancel"
)
return
result
def
download_data
():
print
(
'从Jenkins服务器下载data数据'
)
# 文本显示的位置。
Button
(
root
,
text
=
'流程一
\n
外网企业注册审批'
,
width
=
16
,
height
=
8
,
command
=
flow1
).
grid
(
row
=
2
,
column
=
0
)
Button
(
root
,
text
=
'流程二
\n
供货关系申请审批'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow2
).
grid
(
row
=
2
,
column
=
2
)
Button
(
root
,
text
=
'流程三
\n
流程三_产品导
\n
入和审批'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow3
).
grid
(
row
=
2
,
column
=
4
)
Button
(
root
,
text
=
'流程
\n
内网基础模块设置'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow4
).
grid
(
row
=
2
,
column
=
6
)
Button
(
root
,
text
=
'流程五
\n
中心库入库正结算
\n
开票'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow5
).
grid
(
row
=
2
,
column
=
8
)
Button
(
root
,
text
=
'流程六
\n
中心库入库负结算'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow6
).
grid
(
row
=
2
,
column
=
10
)
Button
(
root
,
text
=
'流程七
\n
中心库入库正负结算'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow7
).
grid
(
row
=
3
,
column
=
0
)
Button
(
root
,
text
=
'流程八
\n
高值跟台业务'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow8
).
grid
(
row
=
3
,
column
=
2
)
Button
(
root
,
text
=
'流程九
\n
请领业务二级库向
\n
中心库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow9
).
grid
(
row
=
3
,
column
=
4
)
Button
(
root
,
text
=
'流程十
\n
请领业务流_二级库
\n
向边仓'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow10
).
grid
(
row
=
3
,
column
=
6
)
Button
(
root
,
text
=
'流程十一
\n
请领业务流_二级库
\n
向直送'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow11
).
grid
(
row
=
3
,
column
=
8
)
Button
(
root
,
text
=
'流程十二
\n
请领业务流_二级库
\n
向二级库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow12
).
grid
(
row
=
3
,
column
=
10
)
Button
(
root
,
text
=
'流程十三
\n
请领业务流_三级库
\n
向二级库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow13
).
grid
(
row
=
4
,
column
=
0
)
Button
(
root
,
text
=
'流程十四
\n
退库业务消耗退库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow14
).
grid
(
row
=
4
,
column
=
2
)
Button
(
root
,
text
=
'流程十五
\n
退库业务三级库向
\n
二级库退库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow15
).
grid
(
row
=
4
,
column
=
4
)
Button
(
root
,
text
=
'流程十六
\n
退库业务_二级库向
\n
一级库退库'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow16
).
grid
(
row
=
4
,
column
=
6
)
Button
(
root
,
text
=
'流程十七
\n
退库业务_中心库退
\n
供应商'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow17
).
grid
(
row
=
4
,
column
=
8
)
Button
(
root
,
text
=
'流程十八
\n
中心库业务_拆包功能'
,
anchor
=
'center'
,
width
=
16
,
height
=
8
,
command
=
flow18
).
grid
(
row
=
4
,
column
=
10
)
#Button(root, text='一键执行', anchor='center', width=8, height=2,command=flow0).grid(row=5,column=2)
# Button(root, text='流程五开始\n一键执行', anchor='center', width=8, height=2,command=flow5_flow18).grid(row=5,column=4)
Button
(
root
,
text
=
'删除垃圾
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
del_data
).
grid
(
row
=
5
,
column
=
6
)
# Button(root, text='流程十一开始\n一键执行', anchor='center', width=8, height=2,command=flow11_flow18).grid(row=5,column=8)
Button
(
root
,
text
=
'从jenkins
\n
下载data
\n
数据'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
download_data
).
grid
(
row
=
5
,
column
=
10
)
Button
(
root
,
text
=
'退 出'
,
anchor
=
'center'
,
width
=
8
,
height
=
2
,
command
=
exit
).
grid
(
row
=
5
,
column
=
10
)
# Button(root, text='anchor', anchor='e', width=30, height=4).pack()
# Button(root, text='anchor', anchor='w', width=30, height=4).pack()
# Button(root, text='anchor', anchor='ne', width=30, height=4).pack()
# Button(root, text='anchor', anchor='nw', width=30, height=4).pack()
# Button(root, text='anchor', anchor='se', width=30, height=4).pack()
# Button(root, text='anchor', anchor='sw', width=30, height=4).pack()
root
.
mainloop
()
main_text
()
\ 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