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
b21d3b85
Commit
b21d3b85
authored
Aug 01, 2024
by
xiao-hesheng
Browse files
优化调整脚本
parent
5fd41d00
Changes
7
Hide whitespace changes
Inline
Side-by-side
air_case/b6_spd3_core_business_flow_database_check/a_b3流程十请领业务流_二级库向边仓_数据库验证.air/a_b3流程十请领业务流_二级库向边仓_数据库验证.py
View file @
b21d3b85
...
@@ -188,11 +188,11 @@ def check_mcms_dept_buy(type=16):
...
@@ -188,11 +188,11 @@ def check_mcms_dept_buy(type=16):
actual
=
check_mcms_dept_buy_sql
(
sql
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
print
(
actual
)
print
(
actual
)
# 获取主键id
# 获取主键id
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
branch_id
,
type
)
id1
=
get_dept_buy_id
(
sql
)
id1
=
get_dept_buy_id
(
sql
)
# 获取order_no
# 获取order_no
sql1
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
sql1
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
branch_id
,
type
)
order_no1
=
get_dept_buy_id
(
sql1
)
order_no1
=
get_dept_buy_id
(
sql1
)
print
(
process_tuple
(
id1
),
process_tuple
(
order_no1
))
print
(
process_tuple
(
id1
),
process_tuple
(
order_no1
))
...
@@ -217,23 +217,23 @@ def check_mcms_dept_buy(type=16):
...
@@ -217,23 +217,23 @@ def check_mcms_dept_buy(type=16):
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
list_a
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
list_a
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
list_a
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
list_a
)
# 获取边仓id
# 获取边仓id
target_stock_id
=
get_id
(
"select logic_id FROM yb_direct WHERE branch_id ='%s';"
%
branch_id
)
target_stock_id
=
get_id
(
"select logic_id FROM yb_direct WHERE branch_id ='%s'
order by create_time desc LIMIT 1
;"
%
branch_id
)
bill_expdt_date
=
get_expdt_date
(
bill_expdt_date
=
get_expdt_date
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
rec_user
=
get_login_user_uxid
()
rec_user
=
get_login_user_uxid
()
# rec_addr='二级检验科002'
# rec_addr='二级检验科002'
create_user
=
rec_user
create_user
=
rec_user
create_time
=
get_create_time
(
create_time
=
get_create_time
(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
last_modified
=
get_create_time
(
last_modified
=
get_create_time
(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
last_modified_user
=
rec_user
last_modified_user
=
rec_user
last_auditor
=
rec_user
last_auditor
=
rec_user
last_audit_time
=
get_create_time
(
last_audit_time
=
get_create_time
(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
target_stock_name
=
'自动化测试12345'
target_stock_name
=
'自动化测试12345'
# target_stock_name=get_branch_name()+'中心库房'
# target_stock_name=get_branch_name()+'中心库房'
...
@@ -282,16 +282,16 @@ def check_mcms_dept_buy(type=16):
...
@@ -282,16 +282,16 @@ def check_mcms_dept_buy(type=16):
def
check_mcms_dept_buy_approval_after
(
type
=
16
):
def
check_mcms_dept_buy_approval_after
(
type
=
16
):
branch_id
=
get_branch_id
()
branch_id
=
get_branch_id
()
sql
=
"""select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;
sql
=
"""select * from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;
"""
%
(
branch_id
,
type
)
"""
%
(
branch_id
,
type
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
actual
=
check_mcms_dept_buy_sql
(
sql
)
print
(
actual
)
print
(
actual
)
# 获取主键id
# 获取主键id
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
sql
=
"select id from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
branch_id
,
type
)
id1
=
get_dept_buy_id
(
sql
)
id1
=
get_dept_buy_id
(
sql
)
# 获取order_no
# 获取order_no
sql1
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
sql1
=
"select order_no from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
)
branch_id
,
type
)
order_no1
=
get_dept_buy_id
(
sql1
)
order_no1
=
get_dept_buy_id
(
sql1
)
print
(
process_tuple
(
id1
),
process_tuple
(
order_no1
))
print
(
process_tuple
(
id1
),
process_tuple
(
order_no1
))
...
@@ -318,21 +318,21 @@ def check_mcms_dept_buy_approval_after(type=16):
...
@@ -318,21 +318,21 @@ def check_mcms_dept_buy_approval_after(type=16):
# 获取边仓id
# 获取边仓id
target_stock_id
=
get_id
(
"select logic_id FROM yb_direct WHERE branch_id ='%s';"
%
branch_id
)
target_stock_id
=
get_id
(
"select logic_id FROM yb_direct WHERE branch_id ='%s';"
%
branch_id
)
bill_expdt_date
=
get_expdt_date
(
bill_expdt_date
=
get_expdt_date
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
rec_user
=
get_login_user_uxid
()
rec_user
=
get_login_user_uxid
()
# rec_addr='二级检验科002'
# rec_addr='二级检验科002'
create_user
=
rec_user
create_user
=
rec_user
create_time
=
get_create_time
(
create_time
=
get_create_time
(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select create_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
last_modified
=
get_create_time
(
last_modified
=
get_create_time
(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select last_modified from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
last_modified_user
=
rec_user
last_modified_user
=
rec_user
last_auditor
=
rec_user
last_auditor
=
rec_user
last_audit_time
=
get_create_time
(
last_audit_time
=
get_create_time
(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;"
%
(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s'
and buy_kind='KS'
order by create_time desc LIMIT 1;"
%
(
branch_id
,
type
))
branch_id
,
type
))
target_stock_name
=
'自动化测试12345'
target_stock_name
=
'自动化测试12345'
# target_stock_name = get_branch_name() + '中心库房'
# target_stock_name = get_branch_name() + '中心库房'
...
@@ -504,6 +504,7 @@ def main():
...
@@ -504,6 +504,7 @@ def main():
for
i
in
range
(
6
):
# 三个单据共审批6次
for
i
in
range
(
6
):
# 三个单据共审批6次
approval_center
()
approval_center
()
# ==================上面暂时注释===================================
# ==================上面暂时注释===================================
time
.
sleep
(
6
)
list_data
=
[
'16'
,
'20'
,
'66'
]
list_data
=
[
'16'
,
'20'
,
'66'
]
for
i
in
list_data
:
for
i
in
list_data
:
check_mcms_dept_buy_approval_after
(
int
(
i
))
check_mcms_dept_buy_approval_after
(
int
(
i
))
...
...
data/b2_herp3_bs/message
View file @
b21d3b85
院区新增:
院区新增:
branch_id: h0347-375
5
branch_id: h0347-375
7
branch_name: 东土城路院区
7R4&E
branch_name: 东土城路院区
1Joce
科室信息:
科室信息:
dept2_id:
b12c7c6ca56e4b46b418b319cbadbea5
dept2_id:
c913da28183b4b34a3ad567a345f4df6
dept2_name: 二级检验科002
dept2_name: 二级检验科002
data/b5_spd3_core_business_flow/message
View file @
b21d3b85
供货关系申请2:
供货关系申请2:
e_corpId: p1e3
32
e_corpId: p1e3
7a
h_corpId: h0347
h_corpId: h0347
e_username: 国药集团公司
L1slG
e_username: 国药集团公司
D1cRP
h_name: test001
h_name: test001
data/b5_spd3_core_business_flow/message1
View file @
b21d3b85
产品审核信息
:
产品审核信息
:
MSPid
:
MSP240
7090007
_1
MSPid
:
MSP240
8010015
_1
hosId
:
h0347
hosId
:
h0347
hosGoodsId
:
h034700004
510
hosGoodsId
:
h034700004
744
provGoodsid
:
provGood-99221
706
provGoodsid
:
provGood-99221
978
goodsAuditBillId
:
MSP240
7090007
goodsAuditBillId
:
MSP240
8010015
targetId
:
MSP240
7090007
_1
targetId
:
MSP240
8010015
_1
data/b5_spd3_core_business_flow/message13
View file @
b21d3b85
...
@@ -3,27 +3,27 @@
...
@@ -3,27 +3,27 @@
-
&id001
-
&id001
-
id
:
-
id
:
hosId
:
h0347
hosId
:
h0347
branchId
:
h0347-37
38
branchId
:
h0347-37
57
deptId
:
deptId
:
taskType
:
1
taskType
:
1
sourceOrgId
:
p1e3
5e
sourceOrgId
:
p1e3
7a
sourceOrgName
:
国药集团公司
S57ui
sourceOrgName
:
国药集团公司
D1cRP
sourceOrderNo
:
PSh03472024080100
65
sourceOrderNo
:
PSh03472024080100
93
billMode
:
'66'
billMode
:
'66'
stockKind
:
stockKind
:
purMode
:
purMode
:
sourceId
:
PSh03472024080100
65
sourceId
:
PSh03472024080100
93
sourceDetailId
:
sourceDetailId
:
sourceType
:
PSD
sourceType
:
PSD
sourceTypeName
:
配送单
sourceTypeName
:
配送单
sourceVersion
:
1
sourceVersion
:
1
planOrderNo
:
PLAN20240801341
22
planOrderNo
:
PLAN20240801341
56
purOrderNo
:
CG2024080122
381
purOrderNo
:
CG2024080122
414
recOrgId
:
63c734f07fcc422ea80f49ca8e5bbd95
recOrgId
:
c913da28183b4b34a3ad567a345f4df6
recOrgName
:
设备
科00
1
recOrgName
:
二级检验
科00
2
billRelationJson
:
'{"planBillId":"Ph034720240801030
767
","planOrderNo":"PLAN20240801341
22
","purOrderNo":"CG2024080122
381
","purBillId":"Ch034720240801000
099
","purBillDate":"2024-08-01
billRelationJson
:
'{"
buyBillId":"Bh03472024080100038","
planBillId":"Ph034720240801030
801
","planOrderNo":"PLAN20240801341
56","buyOrderNo":"BUY2024080110209
","purOrderNo":"CG2024080122
414
","purBillId":"Ch034720240801000
132
","purBillDate":"2024-08-01
1
5
:
14:28
","distrBillId":"PSh03472024080100
65
","distrOrderNo":"PSh03472024080100
65
"}'
1
6
:
50:33
","distrBillId":"PSh03472024080100
93
","distrOrderNo":"PSh03472024080100
93
"}'
taskDate
:
'2024-08-01 1
5:15
:04'
taskDate
:
'2024-08-01 1
6:51
:04'
taskDateStart
:
taskDateStart
:
taskDateEnd
:
taskDateEnd
:
billModeList
:
billModeList
:
...
...
data/b5_spd3_core_business_flow/message15
View file @
b21d3b85
验收单号
:
验收单号
:
CHECK_NO1
:
CHECKh034720240801000
56
CHECK_NO1
:
CHECKh034720240801000
84
CHECK_NO2
:
CHECKh034720240801000
56
CHECK_NO2
:
CHECKh034720240801000
84
data/b5_spd3_core_business_flow/message2
View file @
b21d3b85
产品审核信息
:
产品审核信息
:
MSPid
:
MSP240
7090008
_1
MSPid
:
MSP240
8010016
_1
hosId
:
h0347
hosId
:
h0347
hosGoodsId
:
h034700004
511
hosGoodsId
:
h034700004
745
provGoodsid
:
provGood-99221
707
provGoodsid
:
provGood-99221
979
goodsAuditBillId
:
MSP240
7090008
goodsAuditBillId
:
MSP240
8010016
targetId
:
MSP240
7090008
_1
targetId
:
MSP240
8010016
_1
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