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
2eefae34
Commit
2eefae34
authored
Apr 28, 2021
by
Jialin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码更新
parent
4df69b5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
产品类别分析.py
公共代码/产品类别分析.py
+4
-3
产品重复型号分析.py
公共代码/产品重复型号分析.py
+3
-1
No files found.
公共代码/产品类别分析.py
View file @
2eefae34
...
...
@@ -251,14 +251,15 @@ def class_washing(category, filepath, b=0.01):
)
subtitle_fetch
=
cursor_zi_new
.
fetchall
()
if
not
subtitle_fetch
:
print
(
'该类别无‘标准参数异常’列名,或者类别名输入有误,请查证数据库。代码继续运行'
)
print
(
'该类别在vw_property中没有identy不等于0000的数据,请查证数据库'
)
return
stdparam_col_list
=
[]
for
subtitle_tuple
in
subtitle_fetch
:
if
subtitle_tuple
[
1
][
2
]
==
'1'
:
# identy第三个值为1代表是标准项
stdparam_col_list
.
append
(
subtitle_tuple
[
0
])
if
not
stdparam_col_list
:
print
(
'该类别无标准参数项'
)
print
(
'该类别无标准参数项
, 请去库里查证,代码继续运行
'
)
character_minor_dict
=
{}
for
col_i
in
stdparam_col_list
:
...
...
@@ -266,7 +267,7 @@ def class_washing(category, filepath, b=0.01):
cursor_zi_new
.
execute
(
f
"select stdvalue from ShuJuZiDian_Cfg where categoryname='{category}' and subtitle='{col_i.strip('*')}'"
)
standard_value_fetchall
=
cursor_zi_new
.
fetchall
()
if
not
standard_value_fetchall
:
print
(
f
"{col_i.strip('*')} 不在 ShuJuZiDian_Cfg,请检查。该参数项在此次运行中未被采用"
)
print
(
f
"{col_i.strip('*')} 不在 ShuJuZiDian_Cfg,请检查。该参数项在此次运行中未被采用
,代码继续运行
"
)
continue
standard_value
=
[]
...
...
公共代码/产品重复型号分析.py
View file @
2eefae34
...
...
@@ -160,7 +160,9 @@ def product_washing(filepath, category, thre=1, a=0):
for
column
in
df
.
columns
:
worksheet
.
write_string
(
row
,
col
,
column
,
bold_format
)
col
+=
1
worksheet
.
write_string
(
row
,
col
,
'正确产品编号'
,
bold_format
)
worksheet
.
write_string
(
row
,
col
,
'正确产品编码'
,
bold_format
)
col
+=
1
worksheet
.
write_string
(
row
,
col
,
'正确产品名称'
,
bold_format
)
row
=
1
col
=
0
for
item
in
related_product
:
...
...
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