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
69287766
Commit
69287766
authored
Apr 09, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
693e034b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
API数据处理func.py
API数据处理func.py
+1
-1
Excel数据处理func.py
Excel数据处理func.py
+2
-2
No files found.
API数据处理func.py
View file @
69287766
...
...
@@ -1416,7 +1416,7 @@ def create_to_db(path,std_value_dict):
if
category
in
computer_cat
:
cpu_attr_list
=
[]
for
index
,
row
in
df
.
iterrows
():
for
index
,
row
in
new_
df
.
iterrows
():
cpu
=
tuple
(
std_value_dict
[
int
(
row
[
'id'
])][
'CPU型号'
])[
0
]
if
'飞腾'
in
cpu
or
'龙芯'
in
cpu
or
'兆芯'
in
cpu
:
pass
...
...
Excel数据处理func.py
View file @
69287766
...
...
@@ -1544,7 +1544,7 @@ def create_to_db(path,std_value_dict):
if
cat_sku_db_df
[
cat_sku_db_df
[
'skuname'
]
==
row
[
'new_name'
]
.
upper
()]
.
empty
:
#未匹配上数据
new_product_flag_list
.
append
(
'1'
)
print
(
2
,
f
"update product_all set state = '2',remark = '未匹配上产品',new_name = '{new_name_update2}' where id = {row['id']}"
)
#
print(2,f"update product_all set state = '2',remark = '未匹配上产品',new_name = '{new_name_update2}' where id = {row['id']}")
cursor_zi_service
.
execute
(
f
"update product_all set state = '2',remark = '未匹配上产品',new_name = '{new_name_update2}' where id = {row['id']}"
)
else
:
#匹配上数据
productcode
=
cat_sku_db_df
[
cat_sku_db_df
[
'skuname'
]
==
row
[
'new_name'
]
.
upper
()][
'sku'
]
.
tolist
()[
0
]
...
...
@@ -1558,7 +1558,7 @@ def create_to_db(path,std_value_dict):
if
category
in
computer_cat
:
cpu_attr_list
=
[]
for
index
,
row
in
df
.
iterrows
():
for
index
,
row
in
new_
df
.
iterrows
():
cpu
=
tuple
(
std_value_dict
[
int
(
row
[
'id'
])][
'CPU型号'
])[
0
]
if
'飞腾'
in
cpu
or
'龙芯'
in
cpu
or
'兆芯'
in
cpu
:
pass
...
...
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