Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
重
重点类信息提取
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZGC_INDEX
重点类信息提取
Commits
c91268e8
Commit
c91268e8
authored
Jun 11, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了转换简称的调用方式
parent
b107e7a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
更新库内产品数据.py
公共代码/更新库内产品数据.py
+6
-5
No files found.
公共代码/更新库内产品数据.py
View file @
c91268e8
...
...
@@ -29,12 +29,11 @@ def get_simple_value():
conn_zi_new
.
close
()
return
temp
def
transform_simplevalue
(
cursor_zi_new
,
shujuzidiandf
,
categoryname
,
subtitle
,
stdvalue
):
def
transform_simplevalue
(
simple_subtitle_list
,
shujuzidiandf
,
categoryname
,
subtitle
,
stdvalue
):
stdvalue
=
stdvalue
.
strip
()
#simple_subtitle_list = ['CPU型号','显存容量','操作系统','双面器','双面输稿器','网络打印','标配外服务及配件','标配外耗材','镜头描述','碎纸效果','产品尺寸','分辨率','是否含壁挂架','是否含底座','CPU','内存','硬盘','尺寸','容量','最大读取速度','颜色','最大容积L','总容积L','类别','内存容量','硬盘容量','操作系统','网络连接','屏幕尺寸','硬盘尺寸','容量','类型']
simple_subtitle_list
=
get_simple_value
()
if
subtitle
not
in
simple_subtitle_list
:
return
stdvalue
...
...
@@ -134,6 +133,8 @@ def upload_params_data(category,path):
data_dict
[
'stdvalue'
]
=
data_dict
[
'stdvalue'
]
.
apply
(
lambda
x
:
x
.
upper
())
single_data_dict
=
data_dict
#获取需要转换简称的参数列表
simple_subtitle_list
=
get_simple_value
()
process_index
=
0
index_
=
Index
()
...
...
@@ -238,7 +239,7 @@ def upload_params_data(category,path):
#value = cat_sku_df[(cat_sku_df['sku'] == sku) & (cat_sku_df['name'] == detail_element_list[i])]['value'].tolist()[0]
value
=
str
(
params
[
detail_element_list
[
i
]])
value
=
transform_simplevalue
(
cursor_zi_new
,
single_data_dict
,
category
,
detail_element_list
[
i
],
value
.
upper
())
value
=
transform_simplevalue
(
simple_subtitle_list
,
single_data_dict
,
category
,
detail_element_list
[
i
],
value
.
upper
())
if
i
==
0
:
skuname
+=
"("
+
value
+
"/"
...
...
@@ -255,7 +256,7 @@ def upload_params_data(category,path):
value
=
str
(
params
[
element
])
value
=
transform_simplevalue
(
cursor_zi_new
,
single_data_dict
,
category
,
element
,
value
.
upper
())
value
=
transform_simplevalue
(
simple_subtitle_list
,
single_data_dict
,
category
,
element
,
value
.
upper
())
skuname
+=
"("
+
value
+
") "
continue
...
...
@@ -263,7 +264,7 @@ def upload_params_data(category,path):
else
:
value
=
str
(
params
[
element
])
value
=
transform_simplevalue
(
cursor_zi_new
,
single_data_dict
,
category
,
element
,
value
.
upper
())
value
=
transform_simplevalue
(
simple_subtitle_list
,
single_data_dict
,
category
,
element
,
value
.
upper
())
if
element
==
'计价规格(包/箱或单包装)'
:
value
=
'计价规格:'
+
value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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