Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
matchSKUWithDB
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
matchSKUWithDB
Commits
a4f00a9b
Commit
a4f00a9b
authored
Feb 12, 2020
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update strip
parent
05c9571f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
matchSKU.py
matchSKU.py
+5
-1
No files found.
matchSKU.py
View file @
a4f00a9b
...
...
@@ -14,7 +14,7 @@ DL/DW/DZ/GM/JD/LXWL/OFS/SN/YHD/ZCSM
def
matchSKU
(
sku_list
,
frm
):
conn
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'admin@2018@)!*'
,
database
=
'ZI_DataBase'
)
cursor
=
conn
.
cursor
()
print
(
'正在删除库中产品状态为6的sku,稍等。。。'
)
#首先将库中错误状态产品的JD/SN/GM的SKU删除
...
...
@@ -69,12 +69,16 @@ def matchSKU(sku_list,frm):
data_sku_file_op
=
pd
.
DataFrame
(
data_sku
,
columns
=
[
'productcode'
,
'sku'
])
data_sku_file
=
pd
.
concat
([
data_sku_file
,
data_sku_file_op
])
.
drop_duplicates
()
data_sku_file
[
'productcode'
]
=
data_sku_file
[
'productcode'
]
.
apply
(
lambda
x
:
x
.
strip
())
data_sku_file
[
'sku'
]
=
data_sku_file
[
'sku'
]
.
apply
(
lambda
x
:
x
.
strip
())
print
(
'sku获取完毕'
)
conn
.
close
()
cursor
.
close
()
sku_check
=
{}
for
sku
in
set
(
sku_list
):
sku
=
sku
.
strip
()
#print(sku)
#sku = 100004460761
if
str
(
sku
)
in
list
(
data_sku_file
[
'sku'
]):
...
...
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