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
831e6dcf
Commit
831e6dcf
authored
Jan 07, 2020
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5568ecab
Pipeline
#128
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
matchSKU.py
matchSKU.py
+7
-2
No files found.
matchSKU.py
View file @
831e6dcf
...
@@ -8,12 +8,17 @@ Created on Tue Jan 7 15:26:43 2020
...
@@ -8,12 +8,17 @@ Created on Tue Jan 7 15:26:43 2020
import
pymssql
import
pymssql
import
pandas
as
pd
import
pandas
as
pd
'''
DL/DW/DZ/GM/JD/LXWL/OFS/SN/YHD/ZCSM
'''
def
matchSKU
(
sku_list
,
frm
=
(
'SN'
,
'JD'
,
'MG'
)
):
def
matchSKU
(
sku_list
,
frm
):
conn
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'admin@2018@)!*'
,
database
=
'ZI_DataBase'
)
conn
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'admin@2018@)!*'
,
database
=
'ZI_DataBase'
)
cursor
=
conn
.
cursor
()
cursor
=
conn
.
cursor
()
print
(
'正在删除库中产品状态为6的sku,稍等。。。'
)
#首先将库中错误状态产品的JD/SN/GM的SKU删除
print
(
'正在删除库中产品状态为6的sku,稍等。。。'
)
#首先将库中错误状态产品的JD/SN/GM的SKU删除
cursor
.
execute
(
"DELETE from productcode_sku where productcode in (select productcode from info_product where state='6')
and frm in('JD','SN','GM')
"
)
cursor
.
execute
(
"DELETE from productcode_sku where productcode in (select productcode from info_product where state='6')"
)
conn
.
commit
()
conn
.
commit
()
print
(
'正在获取当前库中所有sku,请稍等.....'
)
#获取库中所有的SKU,以供检查
print
(
'正在获取当前库中所有sku,请稍等.....'
)
#获取库中所有的SKU,以供检查
try
:
try
:
...
...
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