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
6bc06110
Commit
6bc06110
authored
Mar 31, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bb1f93da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
21 deletions
+21
-21
.DS_Store
.DS_Store
+0
-0
.DS_Store
public/.DS_Store
+0
-0
getBasicInfo.py
public/SKUBasicInfo/getBasicInfo.py
+4
-4
getMatchInfo.py
public/SKUMatchInfo/getMatchInfo.py
+6
-6
getParamsInfo.py
public/SKUParamsInfo/getParamsInfo.py
+4
-4
stockInfo.py
public/SKUStockInfo/stockInfo.py
+7
-7
No files found.
.DS_Store
View file @
6bc06110
No preview for this file type
public/.DS_Store
View file @
6bc06110
No preview for this file type
public/SKUBasicInfo/getBasicInfo.py
View file @
6bc06110
...
...
@@ -16,7 +16,7 @@ def get_average(list):
sum
+=
item
return
sum
/
len
(
list
)
async
def
get_brand_info
(
brand_list
,
url_brand_list
,
name_list
,
url_name_list
):
def
get_brand_info
(
brand_list
,
url_brand_list
,
name_list
,
url_name_list
):
'''
获取指数品牌信息
...
...
@@ -115,7 +115,7 @@ async def get_brand_info(brand_list,url_brand_list,name_list,url_name_list):
async
def
get_predict_category_with_textcnn
(
name_list
,
url_name_list
):
def
get_predict_category_with_textcnn
(
name_list
,
url_name_list
):
'''
使用模型预测类别
'''
...
...
@@ -156,7 +156,7 @@ async def get_predict_category_with_textcnn(name_list,url_name_list):
async
def
get_classify_info
(
category_list
,
pre_category_list
):
def
get_classify_info
(
category_list
,
pre_category_list
):
'''
获取指数类别信息
'''
...
...
@@ -266,7 +266,7 @@ async def get_classify_info(category_list,pre_category_list):
# ]
async
def
get_extract_model
(
channel_list
,
category_list
,
name_list
,
url_name_list
,
brand_list
,
param_dict_list
):
def
get_extract_model
(
channel_list
,
category_list
,
name_list
,
url_name_list
,
brand_list
,
param_dict_list
):
'''
提取型号
'''
...
...
public/SKUMatchInfo/getMatchInfo.py
View file @
6bc06110
...
...
@@ -13,7 +13,7 @@ from public.SKUMatchInfo.public_function import Index
from
elasticsearch
import
Elasticsearch
async
def
get_sku_match_res
(
channel
,
sku_list
,
engine
):
def
get_sku_match_res
(
channel
,
sku_list
,
engine
):
'''对供应商提供的SKU进行排重'''
try
:
...
...
@@ -90,7 +90,7 @@ async def get_sku_match_res(channel,sku_list,engine):
msg
=
str
(
e
)
return
code
,
msg
,{}
async
def
get_sku_match_res_backup
(
channel
,
sku_list
):
def
get_sku_match_res_backup
(
channel
,
sku_list
):
'''对供应商提供的SKU进行排重'''
try
:
...
...
@@ -133,7 +133,7 @@ async def get_sku_match_res_backup(channel,sku_list):
return
code
,
msg
,{}
async
def
get_url_match_res
(
channel_type
,
url_list
):
def
get_url_match_res
(
channel_type
,
url_list
):
'''对供应商提供的url进行排重'''
try
:
...
...
@@ -203,7 +203,7 @@ async def get_url_match_res(channel_type,url_list):
return
code
,
msg
,{}
async
def
get_name_match_res
(
channel_type
,
name_list
):
def
get_name_match_res
(
channel_type
,
name_list
):
'''对供应商提供的url中的名字进行排重'''
try
:
...
...
@@ -272,7 +272,7 @@ async def get_name_match_res(channel_type,name_list):
return
code
,
msg
,{}
async
def
get_model_match_res
(
cust_category_list
,
zgc_brand_code_list
,
model_list
,
price_list
):
def
get_model_match_res
(
cust_category_list
,
zgc_brand_code_list
,
model_list
,
price_list
):
#模糊匹配,使用品牌+型号+价格 返回的结果按价格差的生序排列,取前三
...
...
@@ -431,7 +431,7 @@ async def get_model_match_res(cust_category_list,zgc_brand_code_list,model_list,
async
def
get_zgc_name_match_res
(
zgc_name_list
):
def
get_zgc_name_match_res
(
zgc_name_list
):
#匹配产品名称
...
...
public/SKUParamsInfo/getParamsInfo.py
View file @
6bc06110
...
...
@@ -12,7 +12,7 @@ import re
import
pandas
as
pd
async
def
get_zol_info
(
zgc_categoryname
,
brand
,
model
):
def
get_zol_info
(
zgc_categoryname
,
brand
,
model
):
#获取zol参数信息,使用品牌+型号进行搜索
try
:
cname
=
''
.
join
(
re
.
findall
(
r'[0-9\u4E00-\u9FA5]'
,
str
(
brand
)))
.
strip
()
...
...
@@ -38,7 +38,7 @@ async def get_zol_info(zgc_categoryname,brand,model):
async
def
get_zgc_params
(
zgc_categoryname
,
params_list
):
def
get_zgc_params
(
zgc_categoryname
,
params_list
):
#获取zgc参数项
try
:
conn_zi_new
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'zgcprice20200628'
,
database
=
'ZI_NEW'
,
autocommit
=
True
)
...
...
@@ -90,7 +90,7 @@ async def get_zgc_params(zgc_categoryname,params_list):
return
code
,
msg
,{}
async
def
get_zgc_param_values
(
zgc_categoryname
,
id_list
,
param_value_dict_list
):
def
get_zgc_param_values
(
zgc_categoryname
,
id_list
,
param_value_dict_list
):
#获取zgc参数值
try
:
conn_zi_new
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'zgcprice20200628'
,
database
=
'ZI_NEW'
,
autocommit
=
True
)
...
...
@@ -199,7 +199,7 @@ async def get_zgc_param_values(zgc_categoryname,id_list,param_value_dict_list):
return
code
,
msg
,{}
async
def
get_ner_params
(
zgc_categorycode
,
name
):
def
get_ner_params
(
zgc_categorycode
,
name
):
#NER 识别产品参数
try
:
ner
=
LSTMNER
(
zgc_categorycode
)
...
...
public/SKUStockInfo/stockInfo.py
View file @
6bc06110
...
...
@@ -12,7 +12,7 @@ import datetime
import
time
import
uuid
async
def
stock_in_brand
(
new_brand_list
):
def
stock_in_brand
(
new_brand_list
):
#新建品牌
...
...
@@ -143,7 +143,7 @@ def dael_name_content(skuname,brand):
async
def
get_new_name
(
category
,
brandname
,
params
):
def
get_new_name
(
category
,
brandname
,
params
):
try
:
conn_zi_new
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'zgcprice20200628'
,
database
=
'ZI_NEW'
,
autocommit
=
True
)
cursor_zi_new
=
conn_zi_new
.
cursor
()
...
...
@@ -314,7 +314,7 @@ async def get_new_name(category,brandname,params):
async
def
stock_in_product
(
zi_brandname_list
,
zi_brandcode_list
,
zi_subcategoryname
,
zi_subcategorycode
,
std_params_list
,
newname_list
):
def
stock_in_product
(
zi_brandname_list
,
zi_brandcode_list
,
zi_subcategoryname
,
zi_subcategorycode
,
std_params_list
,
newname_list
):
#
try
:
...
...
@@ -740,7 +740,7 @@ def stock_in_params(params_dict_list,category_id_list,category_name_list,mode):
return
code
,
msg
async
def
stock_in_sku_relationship
(
sku_list
,
code_list
,
channel_list
):
def
stock_in_sku_relationship
(
sku_list
,
code_list
,
channel_list
):
#导入sku对应关系
...
...
@@ -777,7 +777,7 @@ async def stock_in_sku_relationship(sku_list,code_list,channel_list):
async
def
stock_in_price
(
sku_list
,
goods_name_list
,
price_list
,
url_list
,
channel_id_list
):
def
stock_in_price
(
sku_list
,
goods_name_list
,
price_list
,
url_list
,
channel_id_list
):
#导入价格信息
try
:
...
...
@@ -1027,7 +1027,7 @@ async def stock_in_price(sku_list,goods_name_list,price_list,url_list,channel_id
async
def
stock_in_attr_relationship
(
channel
,
categoryname_list
,
subtitle_list
,
outsubtitle_list
):
def
stock_in_attr_relationship
(
channel
,
categoryname_list
,
subtitle_list
,
outsubtitle_list
):
#导入参数项对应关系
...
...
@@ -1097,7 +1097,7 @@ def stock_in_category_relationship(channel,categoryname_list,zi_categoryname_lis
return code,msg
'''
async
def
stock_in_category_relationship_to_server
(
channel
,
categoryname_list
,
zi_categoryname_list
,
zi_categorycode_list
):
def
stock_in_category_relationship_to_server
(
channel
,
categoryname_list
,
zi_categoryname_list
,
zi_categorycode_list
):
#导入类别对应关系(入服务库)
...
...
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