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
dbf8e004
Commit
dbf8e004
authored
Mar 13, 2024
by
xiao-hesheng
Browse files
优化脚本
parent
9f62f4cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/b2_herp3_bs/o7科室管理_科室产品分配_科室新增产品.air/o7科室管理_科室产品分配_科室新增产品.py
View file @
dbf8e004
...
...
@@ -40,13 +40,7 @@ def test1():
# from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1
# id1= test1()
# print(id1)
#o5科室管理_科室产品分配_添加科室产品页面_查询全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsGoodsInfo_insert"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# branch_id = FileUtils().r_info(module, '院区新增')["branch_id"]
branch_name
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_name"
]
name
=
branch_name
+
'中心库房'
...
...
@@ -59,7 +53,13 @@ def test1():
# date2=timeUtils().get_time_hms(2)
# for i in list2:
# dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
dept2_id
=
FileUtils
().
r_info
(
module
,
'科室信息'
)[
"dept2_id"
]
#同步库房信息
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\r_b8库房管理_库区设置_同步库房信息.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\r_b8库房管理_库区设置_同步库房信息.air'
)
from
r_b8库房管理_库区设置_同步库房信息
import
test1
test1
()
#查询库房id
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\r_b9库房管理_库区设置_库房查询_查询全部.air'
)
...
...
@@ -67,11 +67,22 @@ def test1():
from
r_b9库房管理_库区设置_库房查询_查询全部
import
test1
stockId
=
test1
(
name
)
#调用库区设置脚本新增库区
#新增前删除货位,库区
delData
().
Delete_probeInfo
()
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\r_c3库房管理_库区设置_新增库区.air'
)
using
(
pro_path
+
r
'\\air_case\\b2_herp3_bs\\r_c3库房管理_库区设置_新增库区.air'
)
from
r_c3库房管理_库区设置_新增库区
import
test1
print
(
'stockId'
,
stockId
)
test1
(
stockId
)
# o5科室管理_科室产品分配_添加科室产品页面_查询全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"basic_mcmsGoodsInfo_insert"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload58_6"
,
dept2_id
)
request_body
=
'['
+
str
(
request_body
)
+
']'
...
...
common/db/sql/sql_del_branch_info.py
View file @
dbf8e004
...
...
@@ -112,13 +112,23 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'库区信息删除成功 '
)
# 删除多余库房信息
# sql = "delete from mcms_stock_info where stock_name like '%东土城路院区_____中心库房';"
# print(sql)
# cursor.execute(sql)
# cursor.execute("commit;")
# print('多余库房信息删除成功 ')
cursor
.
close
()
def
Delete_probeInfo_other
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
cursor
=
connection
.
cursor
()
# 删除多余库房信息
sql
=
"delete from mcms_stock_info where stock_name like '%东土城路院区_____中心库房';"
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
print
(
'多余库房信息删除成功 '
)
cursor
.
close
()
def
Delete_role
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
data/b2_herp3_bs/message
View file @
dbf8e004
院区新增:
branch_id: h0347-335
8
branch_name: 东土城路院区
RkS*Z
branch_id: h0347-335
9
branch_name: 东土城路院区
c#YBu
report/summary.html
View file @
dbf8e004
...
...
@@ -55,9 +55,9 @@
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
2
秒
</td>
<td
class=
"details-col-elapsed"
>
10
0.0%
</td>
<td
class=
'details-col-elapsed'
>
0
</td>
<td
class=
'details-col-elapsed'
>
0分
0
秒
</td>
<td
class=
"details-col-elapsed"
>
0.0%
</td>
</tr>
</table>
...
...
@@ -72,9 +72,9 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
c0_新增科室_特殊科室_设备科_中心库房
/log.html'
target=
'_blank'
>
c0_新增科室_特殊科室_设备科_中心库房
</a></td>
<td
class=
"
success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.342
</td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
o7科室管理_科室产品分配_科室新增产品
/log.html'
target=
'_blank'
>
o7科室管理_科室产品分配_科室新增产品
</a></td>
<td
class=
"
fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.838
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
runner.py
View file @
dbf8e004
...
...
@@ -94,6 +94,7 @@ if __name__ == '__main__':
print
(
'删了什么文件'
,
del_file
)
#删除自动化脚本产生的数据
# delData().Delete_branch_by_id()
# delData().Delete_goods_change_info()
delData
().
Delete_branch_by_id
()
delData
().
Delete_goods_change_info
()
delData
().
Delete_probeInfo_other
()
print
(
'结束了'
)
\ 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