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
7b222387
Commit
7b222387
authored
Jun 24, 2024
by
xiao-hesheng
Browse files
流程十四脚本编写
parent
a69417f8
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/demo/产品检查.air/产品检查.py
0 → 100644
View file @
7b222387
# -*- encoding=utf8 -*-
from
common.db.sql.sql_del_branch_info
import
delData
from
common.fileUtls
import
FileUtils
from
air_case.public1.public1.public1
import
*
__author__
=
"xiaohesheng"
"""
case_tag:api,spd_core1,产品检查,idxxxx,id8888-demo,sit,on
主数据平台:产品检查
python runner_test.py tag id8888-demo debug mdm3
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
airtest.core.api
import
using
import
sys
hos_goods_id
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'产品审核信息'
,
'message2'
)[
"hosGoodsId"
]
actual_value
=
delData
().
check_goods_info
(
hos_goods_id
)
print
(
'actual_value'
,
actual_value
)
expected_value
=
commonFuc
().
get_business_data
(
'b5_spd3_core_business_flow'
,
'expected_value'
)
print
(
'expected_value'
,
expected_value
)
if
actual_value
==
expected_value
:
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
common/db/sql/sql_del_branch_info.py
View file @
7b222387
...
...
@@ -681,14 +681,65 @@ class delData(object):
print
(
'外网产品信息删除成功 '
)
cursor
.
close
()
def
check_goods_info
(
self
):
def
check_goods_info
(
self
,
hos_goods_id
):
# 内网的
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
# 删除产品信息
sql1
=
"select * from mcms_goods_info where goods_name like '%一次性注射器%'and goods_spec ='G-31891' and id='h034700003737';"
cursor
.
execute
(
sql1
)
# 查询产品信息
sql
=
"""SELECT id, hos_goods_code,
hos_id,
prov_id,
prov_hos_goods_id,
srv_id,
mdm_goods_code,
mdm_goods_spec_code,
spd_goods_code,
goods_name,
goods_general_name,
goods_mfrs_id,
goods_mfrs_name,
goods_reg_cert,
goods_agent_mfrs_id,
brand,
short_pinyin,
kind_sixtyeight_code,
unit,
goods_spec,
goods_package,
bar_code_mng,
unique_code_strategy,
pur_mode,
sub_pur_mode,
erp_code,
herp_code,
hrp,
price,
abroad_flag,
made,
property,
mgr_level,
goods_desc,
charge_flag,
focus_control_type,
temp_flag,
official_status,
focus_control,
storage_conditions,
transport_conditions,
into_cost_flag,
rfid_flag,
purchase_flag,
tb_status,
version,
create_user,
create_time,
last_modified_user,
sterilize_flag,
multi_charge_flag,
use_frequency,
charge_unit FROM mcms_goods_info WHERE id ='%s';"""
%
hos_goods_id
cursor
.
execute
(
sql
)
results
=
cursor
.
fetchall
()
cursor
.
close
()
# print(results)
...
...
data/b5_spd3_core_business_flow/data
View file @
7b222387
...
...
@@ -443,3 +443,5 @@ json_headers2: {
"stockId": "%s",
"pickType": "TH"
}
"expected_value": "('h034700004220', '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)"
data/b5_spd3_core_business_flow/message2
View file @
7b222387
产品审核信息
:
MSPid
:
MSP2406210008_1
hosId
:
h0347
hosGoodsId
:
h034700004
197
hosGoodsId
:
h034700004
220
provGoodsid
:
provGood-99221385
goodsAuditBillId
:
MSP2406210008
targetId
:
MSP2406210008_1
report/summary.html
View file @
7b222387
...
...
@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1分46
秒
</td>
<td
class=
'details-col-elapsed'
>
0分0
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
a_b1流程八_高值跟台业务流程
/log.html'
target=
'_blank'
>
a_b1流程八_高值跟台业务流程
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
产品检查
/log.html'
target=
'_blank'
>
产品检查
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
106
.33
8
</td>
<td
class=
"details-col-elapsed"
>
0
.33
7
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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