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
6941f7e8
Commit
6941f7e8
authored
Jun 25, 2024
by
xiao-hesheng
Browse files
流程十四脚本编写
parent
3e11f33e
Changes
37
Hide whitespace changes
Inline
Side-by-side
air_case/demo/产品检查.air/产品检查.py
View file @
6941f7e8
...
...
@@ -29,17 +29,21 @@ import sys
# print('error')
# commonFuc().check_text_exist_result_text('error', 'succees')
#第二种方式
hos_goods_id
=
'h034700004220'
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
actual_value1
=
main2
(
hos_goods_id
)
print
(
'actual_value2'
,
actual_value1
)
print
(
actual_value1
)
# print('actual_value2',actual_value1)
actual_value2
=
get_process_list2
(
actual_value1
)
expected_value1
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
'expected_value2'
)
expected_value2
=
get_process_list
(
expected_value1
)
print
(
'expected_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'
)
\ No newline at end of file
print
(
'actual_value2'
,
actual_value2
,
type
(
actual_value2
))
prov_hos_goods_id
=
'8d6273b7bca84dd8aace12b9422d7fd6'
expected_value2
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
'expected_value2'
,
prov_hos_goods_id
)
print
(
'expected_value2'
,
expected_value2
,
type
(
expected_value2
))
actual_value2
=
actual_value2
.
replace
(
" "
,
""
)
expected_value2
=
expected_value2
.
replace
(
" "
,
""
)
print
(
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')
\ No newline at end of file
air_case/public1/public1/public1.py
View file @
6941f7e8
...
...
@@ -31,9 +31,16 @@ def get_process_list2(request_body):
new_request_body
=
request_body
.
replace
(
"'"
,
'"'
)
new_request_body1
=
new_request_body
.
replace
(
"
\\
"
,
'
\\\\
'
)
new_request_body2
=
new_request_body1
.
replace
(
"None"
,
'null'
)
print
(
new_request_body2
)
request_body_json
=
json
.
loads
(
new_request_body2
,
encoding
=
'utf-8'
)
return
request_body_json
new_request_body3
=
new_request_body2
.
replace
(
"["
,
''
)
new_request_body4
=
new_request_body3
.
replace
(
"]"
,
''
)
print
(
'new_request_body4'
,
new_request_body4
)
try
:
new_request_body4
=
json
.
dumps
(
new_request_body4
)
#格式化
request_body_json
=
json
.
loads
(
new_request_body4
)
except
json
.
decoder
.
JSONDecodeError
:
print
(
"JSONDecodeError: No valid JSON object could be decoded from the string."
)
else
:
return
request_body_json
def
get_branch_id
():
...
...
data/a2_mdm3_ea/message
View file @
6941f7e8
企业信息:
e_id: CR2024062
1
0038
cname: 国药集团公司
wAPq
1
e_id: CR2024062
5
0038
cname: 国药集团公司
YG6X
1
data/a3_mdm3_hs/message
View file @
6941f7e8
医院信息:
h_id: 湖南省人民医院
C1P*t
h_name: 湖南省人民医院
C1P*t
h_id: 湖南省人民医院
HYZpM
h_name: 湖南省人民医院
HYZpM
data/a5_mdm3_pdm/message2
View file @
6941f7e8
产品审核信息
:
MSPid
:
MSP24062
1
0011_1
MSPid
:
MSP24062
5
0011_1
hosId
:
h0347
hosGoodsId
:
h0347000042
00
provGoodsid
:
provGood-99221
388
goodsAuditBillId
:
MSP24062
1
0011
targetId
:
MSP24062
1
0011_1
hosGoodsId
:
h0347000042
52
provGoodsid
:
provGood-99221
440
goodsAuditBillId
:
MSP24062
5
0011
targetId
:
MSP24062
5
0011_1
data/a6_mdm3_si/message
View file @
6941f7e8
...
...
@@ -2,10 +2,10 @@
list_a:
- &id001
settleMonth: '202407'
pid: OBh03472024062
1
0004
hosGoodsId: h034700004
197
goodsCode: '00004
197
'
goodsName: 一次性注射器_低值
wSho7
pid: OBh03472024062
5
0004
hosGoodsId: h034700004
249
goodsCode: '00004
249
'
goodsName: 一次性注射器_低值
qPW6a
goodsGg: G-31891
mfrsName: 德国歌德公司 Geuder AG
unit: 支
...
...
@@ -20,14 +20,14 @@
normalContractId:
normalContract: '1'
detailList:
- pid: OBh03472024062
1
0004
- pid: OBh03472024062
5
0004
settleMonth: '202407'
accountDate: '2024-06-2
1
'
hosGoodsId: h034700004
197
accountDate: '2024-06-2
5
'
hosGoodsId: h034700004
249
batchCode: '333'
distrDetailId: '03838
667
'
distrId: PSh03472024062
1
000
5
distrOrderNo: PSh03472024062
1
000
5
distrDetailId: '03838
814
'
distrId: PSh03472024062
5
000
6
distrOrderNo: PSh03472024062
5
000
6
settlePrice: 99.9999
maxSettleQty: -100.0
maxSettleAmount: -9999.99
...
...
@@ -36,11 +36,11 @@
leftSettleQty: -100.0
leftSettleAmount: -9999.99
hosId: h0347
provId: p1e2
b2
branchId: h0347-36
87
balanceDetId: OBh03472024062
1
0004-000001
provId: p1e2
c6
branchId: h0347-36
95
balanceDetId: OBh03472024062
5
0004-000001
purMode: 10
barCode: 0136
87
000004
197
0103331124062
1
172
41228
21UT24062
1
000202
barCode: 0136
95
000004
249
0103331124062
5
172
50101
21UT24062
5
000202
batchId:
price:
maxQty:
...
...
@@ -53,15 +53,15 @@
volumeFlag:
onlineKind:
invoicePrice: 99.9999
viewId: 202407OBh03472024062
1
0004h034700004
197
- pid: OBh03472024062
1
0004
viewId: 202407OBh03472024062
5
0004h034700004
249
- pid: OBh03472024062
5
0004
settleMonth: '202407'
accountDate: '2024-06-2
1
'
hosGoodsId: h034700004
197
accountDate: '2024-06-2
5
'
hosGoodsId: h034700004
249
batchCode: '333'
distrDetailId: '03838
667
'
distrId: PSh03472024062
1
000
5
distrOrderNo: PSh03472024062
1
000
5
distrDetailId: '03838
814
'
distrId: PSh03472024062
5
000
6
distrOrderNo: PSh03472024062
5
000
6
settlePrice: 99.9999
maxSettleQty: 100.0
maxSettleAmount: 9999.99
...
...
@@ -70,11 +70,11 @@
leftSettleQty: 100.0
leftSettleAmount: 9999.99
hosId: h0347
provId: p1e2
b2
branchId: h0347-36
87
balanceDetId: OBh03472024062
1
0004-000002
provId: p1e2
c6
branchId: h0347-36
95
balanceDetId: OBh03472024062
5
0004-000002
purMode: 10
barCode: 0136
87
000004
197
0103331124062
1
172
41228
21UT24062
1
0002
42
barCode: 0136
95
000004
249
0103331124062
5
172
50101
21UT24062
5
0002
30
batchId:
price:
maxQty:
...
...
@@ -87,10 +87,10 @@
volumeFlag:
onlineKind:
invoicePrice: 99.9999
viewId: 202407OBh03472024062
1
0004h034700004
197
unique: 202407OBh03472024062
1
0004h034700004
197
viewId: 202407OBh03472024062
5
0004h034700004
249
unique: 202407OBh03472024062
5
0004h034700004
249
onlineKind: '10'
viewId: 202407OBh03472024062
1
0004h034700004
197
viewId: 202407OBh03472024062
5
0004h034700004
249
list_b:
- *id001
list_c:
...
...
data/b2_herp3_bs/message
View file @
6941f7e8
院区新增:
branch_id: h0347-36
87
branch_name: 东土城路院区
#Q^eJ
branch_id: h0347-36
95
branch_name: 东土城路院区
W!1gh
科室信息:
dept2_id:
97f0bb2c6f6244e5aca24dcbc1b0696b
dept2_id:
e74d518c952741f388a2ceb6560c550c
dept2_name: 二级检验科002
data/b2_herp3_bs/message3
View file @
6941f7e8
用户名信息
:
username1
:
自动化测试
2nKkb
username2
:
自动化测试
2nKkb
username1
:
自动化测试
IijzK
username2
:
自动化测试
IijzK
data/b2_herp3_bs/message4
View file @
6941f7e8
一级科室信息
:
dept1_id
:
bbcf77aa4edd44189d3d59530cebb055
dept1_id
:
ddab2a8e526b415092dd22527c326c0d
dept1_name
:
设备科001
data/b2_herp3_bs/message5
View file @
6941f7e8
部门和库区信息
:
dept1_id
:
bbcf77aa4edd44189d3d59530cebb055
stockAreaId
:
e
5ad268efab34b20a48db02c3101f2e6
dept1_id
:
ddab2a8e526b415092dd22527c326c0d
stockAreaId
:
e
3d85ed952964429a187eba7de8eee31
data/b2_herp3_bs/message6
View file @
6941f7e8
所有科室id
:
deptid1
:
bbcf77aa4edd44189d3d59530cebb055
deptid2
:
97f0bb2c6f6244e5aca24dcbc1b0696b
deptid3
:
9fdf35c1a1fd419081deeac036134602
deptid4
:
17054079cbde43eca43cfec614444428
deptid5
:
2e0632b5481640baa5ad6d59cc3b3f21
deptid1
:
ddab2a8e526b415092dd22527c326c0d
deptid2
:
e74d518c952741f388a2ceb6560c550c
deptid3
:
50c6790d9ae1490ba79b6a4a3933eea3
deptid4
:
31a92cba5f974eddb4915b439f53c765
deptid5
:
e51845f23f93497c8b4ee9486576de64
所有科室name
:
deptid1
:
设备科001
deptid2
:
二级检验科002
...
...
data/b2_herp3_bs/message7
View file @
6941f7e8
shelfinfo
:
shelfid
:
e
5ad268efab34b20a48db02c3101f2e6
shelfCode
:
areah034724
11
shelfid
:
e
3d85ed952964429a187eba7de8eee31
shelfCode
:
areah034724
60
areaName
:
自动化测试
data/b5_spd3_core_business_flow/data
View file @
6941f7e8
...
...
@@ -445,4 +445,4 @@ json_headers2: {
}
"expected_value": "('00004220', 'h0347', 'p1e2ba', '22f19044b8ae40f08aa5e170dcedc66e', None, '11661168', '11661168', '11661168', '一次性注射器_低值2^p7l', '一次性注射器', 'mfrs-11229', '德国歌德公司 Geuder AG', '', None, '', 'ycxzsq_dz2^p7l', None, '支', 'G-31891', Decimal('1.000000'), 2, '3', 10, None, None, '', None, Decimal('99.9999'), None, '德国', None, None, '', 1, None, 0, None, 0, '', '', None, None, 1, 0, 1, 'p1e2ba:UID-051933', datetime.datetime(2024, 6, 23, 7, 0, 59), 'p1e2ba:UID-051933', 0, 0, 1, None)"
"expected_value2": "{'hos_goods_code': '00004220', 'hos_id': 'h0347', 'prov_id': 'p1e2ba', 'prov_hos_goods_id': '22f19044b8ae40f08aa5e170dcedc66e', 'srv_id': None, 'mdm_goods_code': '11661168', 'mdm_goods_spec_code': '11661168', 'spd_goods_code': '11661168', 'goods_name': '一次性注射器_低值2^p7l', 'goods_general_name': '一次性注射器', 'goods_mfrs_id': 'mfrs-11229', 'goods_mfrs_name': '德国歌德公司 Geuder AG', 'goods_reg_cert': '', 'goods_agent_mfrs_id': None, 'brand': '', 'short_pinyin': 'ycxzsq_dz2^p7l', 'kind_sixtyeight_code': None, 'unit': '支', 'goods_spec': 'G-31891', 'goods_package': Decimal('1.000000'), 'bar_code_mng': 2, 'unique_code_strategy': '3', 'pur_mode': 10, 'sub_pur_mode': None, 'erp_code': None, 'herp_code': '', 'hrp': None, 'price': Decimal('99.9999'), 'abroad_flag': None, 'made': '德国', 'property': None, 'mgr_level': None, 'goods_desc': '', 'charge_flag': 1, 'focus_control_type': None, 'temp_flag': 0, 'official_status': None, 'focus_control': 0, 'storage_conditions': '', 'transport_conditions': '', 'into_cost_flag': None, 'rfid_flag': None, 'purchase_flag': 1, 'tb_status': 0, 'version': 1, 'create_user': 'p1e2ba:UID-051933', 'create_time': datetime.datetime(2024, 6, 23, 7, 0, 59), 'last_modified_user': 'p1e2ba:UID-051933', 'sterilize_flag': 0, 'multi_charge_flag': 0, 'use_frequency': 1, 'charge_unit': None}"
\ No newline at end of file
"expected_value2": '{"hos_goods_code": "00004249","hos_id": "h0347","prov_id": "p1e2c6","prov_hos_goods_id": "%s","srv_id": null,"mdm_goods_code": "11661197","mdm_goods_spec_code": "11661197","spd_goods_code": "11661197","goods_name": "一次性注射器_低值qPW6a","goods_general_name": "一次性注射器","goods_mfrs_id": "mfrs-11229","goods_mfrs_name": "德国歌德公司 Geuder AG","goods_reg_cert": "","goods_agent_mfrs_id": null,"brand": "","short_pinyin": "ycxzsq_dzqPW6a","kind_sixtyeight_code": null,"unit": "支","goods_spec": "G-31891","goods_package": Decimal("1.000000"),"bar_code_mng": 2,"unique_code_strategy": "3","pur_mode": 10,"sub_pur_mode": null,"erp_code": null,"herp_code": "","hrp": null,"price": Decimal("99.9999"),"abroad_flag": null,"made": "德国","property": null,"mgr_level": null,"goods_desc": "","charge_flag": 1,"focus_control_type": null,"temp_flag": 0,"official_status": null,"focus_control": 0,"storage_conditions": "","transport_conditions": "","into_cost_flag": null,"rfid_flag": null,"purchase_flag": 1,"tb_status": 0,"version": 1,"create_user": "p1e2c6:UID-051946","create_time": datetime.datetime(2024,6,25,7,1,34),"last_modified_user": "p1e2c6:UID-051946","sterilize_flag": 0,"multi_charge_flag": 0,"use_frequency": 1,"charge_unit": null}'
data/b5_spd3_core_business_flow/message
View file @
6941f7e8
供货关系申请2:
e_corpId: p1e2
b2
e_corpId: p1e2
c6
h_corpId: h0347
e_username: 国药集团公司
wAPq
1
e_username: 国药集团公司
YG6X
1
h_name: test001
data/b5_spd3_core_business_flow/message1
View file @
6941f7e8
产品审核信息
:
MSPid
:
MSP24062
1
0007_1
MSPid
:
MSP24062
5
0007_1
hosId
:
h0347
hosGoodsId
:
h034700004
196
provGoodsid
:
provGood-99221
384
goodsAuditBillId
:
MSP24062
1
0007
targetId
:
MSP24062
1
0007_1
hosGoodsId
:
h034700004
248
provGoodsid
:
provGood-99221
436
goodsAuditBillId
:
MSP24062
5
0007
targetId
:
MSP24062
5
0007_1
data/b5_spd3_core_business_flow/message10
View file @
6941f7e8
低值配送单号
:
distrBillId1
:
PSh03472024062
1
002
1
distrBillId2
:
PSh03472024062
1
002
1
distrBillId1
:
PSh03472024062
5
002
2
distrBillId2
:
PSh03472024062
5
002
2
高值配送单号
:
distrBillId1
:
PSh03472024062
1
002
2
distrBillId2
:
PSh03472024062
1
002
2
distrBillId1
:
PSh03472024062
5
002
3
distrBillId2
:
PSh03472024062
5
002
3
试剂配送单号
:
distrBillId1
:
PSh03472024062
1
002
3
distrBillId2
:
PSh03472024062
1
002
3
distrBillId1
:
PSh03472024062
5
002
4
distrBillId2
:
PSh03472024062
5
002
4
data/b5_spd3_core_business_flow/message11
View file @
6941f7e8
采购计划单号高值
:
orderNo1
:
PLAN2024062
1
29
450
orderNo2
:
PLAN2024062
1
29
450
orderNo1
:
PLAN2024062
5
29
966
orderNo2
:
PLAN2024062
5
29
966
data/b5_spd3_core_business_flow/message12
View file @
6941f7e8
采购计划单号试剂
:
orderNo1
:
PLAN2024062
1
29
451
orderNo2
:
PLAN2024062
1
29
451
orderNo1
:
PLAN2024062
5
29
968
orderNo2
:
PLAN2024062
5
29
968
data/b5_spd3_core_business_flow/message13
View file @
6941f7e8
...
...
@@ -3,27 +3,27 @@
-
&id001
-
id
:
hosId
:
h0347
branchId
:
h0347-36
87
branchId
:
h0347-36
95
deptId
:
taskType
:
1
sourceOrgId
:
p1e2
b2
sourceOrgName
:
国药集团公司
wAPq
1
sourceOrderNo
:
PSh03472024062
1
002
3
sourceOrgId
:
p1e2
c6
sourceOrgName
:
国药集团公司
YG6X
1
sourceOrderNo
:
PSh03472024062
5
002
4
billMode
:
'66'
stockKind
:
purMode
:
sourceId
:
PSh03472024062
1
002
3
sourceId
:
PSh03472024062
5
002
4
sourceDetailId
:
sourceType
:
PSD
sourceTypeName
:
配送单
sourceVersion
:
1
planOrderNo
:
PLAN2024062
1
29
451
purOrderNo
:
CG2024062
1
19
319
recOrgId
:
97f0bb2c6f6244e5aca24dcbc1b0696b
planOrderNo
:
PLAN2024062
5
29
968
purOrderNo
:
CG2024062
5
19
663
recOrgId
:
e74d518c952741f388a2ceb6560c550c
recOrgName
:
二级检验科002
billRelationJson
:
'{"buyBillId":"Bh03472024062
1
0001
4
","planBillId":"Ph03472024062
1
026
096
","planOrderNo":"PLAN2024062
1
29
451
","buyOrderNo":"BUY2024062
1
05
171
","purOrderNo":"CG2024062
1
19
319
","purBillId":"Ch03472024062
1
00007
7
","purBillDate":"2024-06-2
1
07
:
3
5:30
","distrBillId":"PSh03472024062
1
002
3
","distrOrderNo":"PSh03472024062
1
002
3
"}'
taskDate
:
'2024-06-2
1
07:3
6:15
'
billRelationJson
:
'{"buyBillId":"Bh03472024062
5
0001
5
","planBillId":"Ph03472024062
5
026
613
","planOrderNo":"PLAN2024062
5
29
968
","buyOrderNo":"BUY2024062
5
05
272
","purOrderNo":"CG2024062
5
19
663
","purBillId":"Ch03472024062
5
00007
6
","purBillDate":"2024-06-2
5
07
:
3
6:18
","distrBillId":"PSh03472024062
5
002
4
","distrOrderNo":"PSh03472024062
5
002
4
"}'
taskDate
:
'2024-06-2
5
07:3
7:06
'
taskDateStart
:
taskDateEnd
:
billModeList
:
...
...
data/b5_spd3_core_business_flow/message14
View file @
6941f7e8
...
...
@@ -3,11 +3,11 @@
-
&id001
-
purMode
:
60
unitName
:
100支/100
hosGoodsId
:
h034700004
198
hosGoodsId
:
h034700004
250
mdmGoodsCode
:
spdGoodsCode
:
'116611
47
'
goodsCode
:
'00004
198
'
goodsName
:
新型冠状病毒检测试剂
jGlM^
spdGoodsCode
:
'116611
98
'
goodsCode
:
'00004
250
'
goodsName
:
新型冠状病毒检测试剂
UZ5@q
goodsGg
:
G-31891
mfrsId
:
mfrsName
:
德国歌德公司 Geuder AG
...
...
@@ -22,16 +22,16 @@
pkgDefName
:
'100'
pkgDefQty
:
100.0
batchCode
:
'4444'
expdtDate
:
'202
4-12-28
'
productDate
:
'2024-06-2
1
'
provName
:
国药集团公司
wAPq
1
expdtDate
:
'202
5-01-01
'
productDate
:
'2024-06-2
5
'
provName
:
国药集团公司
YG6X
1
provId
:
viewId
:
'03838
685
'
viewId
:
'03838
832
'
verifyFlag
:
0
hasSterilize
:
0
id
:
'03838
685
'
id
:
'03838
832
'
detailRelationJson
:
extInfo
:
'{"goodsGg":"G-31891","goodsCode":"00004
198
","purMode":60,"goodsName":"新型冠状病毒检测试剂
jGlM^
","ygptCode":"","transCond":"","storageCond":"","erpCode":"116611
47
","ybDefId":""}'
extInfo
:
'{"goodsGg":"G-31891","goodsCode":"00004
250
","purMode":60,"goodsName":"新型冠状病毒检测试剂
UZ5@q
","ygptCode":"","transCond":"","storageCond":"","erpCode":"116611
98
","ybDefId":""}'
recTemperature
:
20
recHumidity
:
30
distrPrice
:
99.9999
...
...
Prev
1
2
Next
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